MyBB Community Forums

Full Version: Add filtering by thread prefix in forumdisplay_thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is a simple tutorial how to add a support for easier filtering of threads by their thread prefixes. After this change prefixes will be changed to links. When you click to them, threads with the selected prefix will be displayed.

1) In ACP open and edit "forumdisplay_thread" template

2) Find and select this code:
{$thread['threadprefix']} 

3) Replace the code above by this one:
<a href="{$mybb->settings['bburl']}/forumdisplay.php?fid={$mybb->input['fid']}&prefix={$thread['prefix']}" style="text-decoration: none !important;">{$thread['threadprefix']}</a> 

4) Save and reload your page (Ctrl+F5)
5) Click on any thread prefix and check the output Smile
Never thought of this, thanks.
Glad to help Smile maybe it would be nice to add it to MyBB by default - https://github.com/mybb/mybb/issues/1583 - what do you think guys?
Wow, you will need to create a new issue imo for this and unfinished items in that issue.

If you can find more information about whether this helps the website (seo, structure, etc) it would be easier to get accepted.

Changes like this are usually rejected because they offer no real value to seo or webpage structure (I'm sure there is a term for this last one but can't remember).
Though its fancy but its not a fresh idea.
The function is already there in MyBB (extreme right dropdown selection at the bottom right of forumdisplay).
It is just a usefull improvement.