The following warnings occurred:
Warning [2] Undefined array key "sourceeditor" - Line: 718 - File: inc/plugins/rineditor.php PHP 8.3.25 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/rineditor.php 718 errorHandler->error_callback
/inc/plugins/rineditor.php 776 rineditor_inserter_quick
/inc/class_plugins.php 142 rineditor
/showthread.php 471 pluginSystem->run_hooks



Eldenroot   19-04-2019, 08:37 AM
#1
This is a simple tutorial how to add a support for easier filtering of threads by their thread prefix. After this change prefixes will be changed to URL links. When you click to them, threads with the selected prefix will be displayed.

1) In ACP open and edit "forumdisplay_thread" template and find this line of code:
{$thread['threadprefix']}

replace it by this line of code:
<a href="{$mybb->settings['bburl']}/forumdisplay.php?fid={$mybb->input['fid']}&prefix={$thread['prefix']}" style="text-decoration: none !important;">{$thread['threadprefix']}</a>

2) Save and reload (Ctrl+F5) your page to see the result!

3) Click on any thread prefix and check the output  Cool
This post was last modified: 24-04-2019, 08:34 PM by effone.
srjrol
srjrol
srjrol   11-03-2021, 04:12 PM
#2
Thanks for this great little hack, much easier than using the dropdown to select a prefix!  The filtering appears to be limited to the forum the threads are currently being viewed from.  It would be wonderful if this could extend beyond the threads within that forum but I guess that's more of a search instead of a filter.  This could allow prefix links work from places like the homepage or portal.
  
Users browsing this thread: 1 Guest(s)
Powered By MyBB, © 2002-2025 MyBB Group.
Made with by MattyWjeisz of Curves UI.