Mini-hack: show list of forums from the same category in a popup menu
This modification is in the archives.
Description:
This hack makes navigation within forums from the same category much easier - no need to go to forum home or other aggregate page, just use popup menu similar to "Forum tools". See attached screenshot, it is really self-describing. There're no new db queries, one .php file changed, one template edited and one template added. Limitations: Obviously, this is for forums which are categorized. Also, it will list all sub-forums of a parent forum, including subforums of the current forum and all subforums of forums from the current category. In other words, it's not for boards with advanced tree-like forum structure (more than 1 level deep). Another issue: it will only work when DHTML popups are enabled. Required code is missing from the part of FORUMDISPLAY template responsible for displaying non-DHTML navigation. Updates: 1.2 - Add check for active forum state when listing forums. 1.01 - Check forum permissions to hide forums which can't be accessed by user. Code changes: In forumdisplay.php, find this code fragment (vb 3.0.7): Code:
else { $lastread = $bbuserinfo['lastvisit']; } PHP Code:
// HACK: display sibling forums as related topics menu
Code:
'none' => array( 'FORUMDISPLAY', Code:
'relatedtopicbit', In the FORUMDISPLAY template, find this line: Code:
<td class="tcat" width="100%">$vbphrase[threads_in_forum]<span class="normal">: $foruminfo[title]</span></td> Code:
<td class="vbmenu_control" id="relatedtools"><a href="#goto_relatedtools">Related Topics</a> <script type="text/javascript"> vbmenu_register("relatedtools"); </script></td> Code:
<if condition="$show['popups']"> <br /> <!-- popup menu contents --> Code:
<!-- related tools menu --> <div class="vbmenu_popup" id="relatedtools_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr><td class="thead">Forums<a name="goto_relatedtools"></a></td></tr> $relatedtopicbits </table> </div> <!-- / related tools menu --> Code:
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]f=$relatedinfo[forumid]">$relatedinfo[title]</a></td></tr> Download This modification is archived and cannot be downloaded. Screenshots
|
Similar Mods
[mini-hack] Stylin' Buddy List | vBulletin 2.x Full Releases |
Mini-Hack: Improved PM Popup JavaScript | vBulletin 2.x Beta Releases |