MyBB Community Forums

Full Version: Make friendly URLs configurable or pluggable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I might be cool if you can choose how the URLs should look like. I personally don't like the default rewritten URLs.

It would be nice if you can adjust the way the URLs are rewritten in de admincp or if you could write a plugin to setup a custom way to rewrite the URLs. MyBB 1.4 now has pretty urls and it would be stupid to hack your way around it to get another "layout".
If you want foobar-x instead of thread-x, you can set this by changing some of the variables in MyBB code. If you want Thread-Make-friendly-URLs instead of thread-x, see the Google SEO plugin. If you want to make something different, replace the get_*_link() functions in inc/functions.php with whatever it is you want (that's how Google SEO plugin does its URLs anyway).

It's not a perfect solution because MyBB has several places where it expects its own URL scheme and not something else (e.g. appending of dynamic parameters to URLs, multipage(), merge threads, ...), but that's a different story.
I can change the code in init.php because all the rewrites are declared there but I don't want to go and modify the core-code. And because define() is used, you can't change it.
Switching URLs is something you probably don't want to do often, unless you don't care about existing links to your site.
I wont change my URL structure, because Google already cache thousands of my forum Smile
But, for new forum. It will be advantage, if this url configurable