MyBB Community Forums

Full Version: Virtual Directory Structure
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This would be nice, I know xenforo has it and tbh it's a much neater and nicer thing.

Instead of /showthread.php?tid=1 something like /threads/1-thread-subject
Not going to happen as core in 1.8. It's too big of a change. 2.0 will certainly use friendly URLs such as this though.
I've done a plugin that basically does this. It's ugly as sin and probably slow and unmaintainable though. I may release it for the public.

Basically it hooks into the page output hook, and runs several regexes (with it's own hook for plugins to add more) and callbacks to go through and reformat the links. Then I have an .htaccess that contains all the mod_rewrite stuff to make it work.

It doesn't add the thread title to the url though, with the way it works I don't want to add a database query to every link.