HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Instructions: How to Make a prettyURL for a plugin
How to Make a prettyURL for a plugin
e.g. in this case for the membership enhanced plugin - A similar routine can be done with extrapage plugin, etc.
to display
instead of
http://myforum.com/plugin/MembersListEnh
In you default.php or class.YOURPLUGIN.php
public function OnDisable() { // delete route when plugin is disabled $matchroute = '^members(/.*)?$'; $target = 'plugin/MembersListEnh$1'; Gdn::Router()-> DeleteRoute($matchroute,$target,'Internal'); } public function Setup() { // insert route when plugin is enabled. It is now displayed in dashboard - routes $matchroute = '^members(/.*)?$'; $target = 'plugin/MembersListEnh$1'; if(!Gdn::Router()->MatchRoute($matchroute)) Gdn::Router()->SetRoute($matchroute,$target,'Internal'); }
see this thread for the participants who participated in the underlying features of the above guide.
feel free to add it to the wiki.
I will update the plugin in a week or two, I am making other changes so read the following commeont and the following comment if you are in a rush to change the plugin.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Tagged:
7
Comments
Thanks For this Im really happy! Now...
Again, I don't get this but Ill explain why:
Added my code to class.PLUGIN.php
I see it in the routes, but when I do /community/members/ I get this
Did I add this to wrong the place?
You have a loop going on..that is using up the allocated memory.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
How may I fix this? Loop?
this might help http://vanillaforums.org/discussion/comment/177746/#Comment_177746
you need to remove or repair the offending Route
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌