The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Mini-hack: show list of forums from the same category in a popup menu Details »» | |||||||||||||||||||||||||||
Mini-hack: show list of forums from the same category in a popup menu
Developer Last Online: Apr 2014
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:
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> Show Your Support
|
Comments |
#2
|
|||
|
|||
Oooui... first to post and second to click "INSTALL" (=
I'll try it out this afternoon.. Seems quite promissing, thanks Kmike |
#3
|
|||
|
|||
Does this use the permission system so that usergroups only see the forums which they can access?
|
#4
|
|||
|
|||
Quote:
Changes from 1.00: before this line in forumdisplay.php: Code:
$relatedinfo = fetch_foruminfo($val); Code:
$relatedperms = $bbuserinfo['forumpermissions']["$val"]; if (!($relatedperms & CANVIEW) AND $vboptions['hideprivateforums']) { continue; } |
#5
|
||||
|
||||
Can you do me a favor and put it into a text file attachment and add to first post ( makes things easier for some ppl ) nice hack!
|
#6
|
|||
|
|||
I uploaded instructions as a text file.
|
#7
|
||||
|
||||
I'd love to use this as a way of showing sub forums instead of having them as a block at the top of the page ..
The one thing stopping me using this is that it would mean the sub forums not showing if the parent forum is a forum that posting isn't allowed on .. and therefore empty apart from the subforums .. So could you point me in the right direction on having this hack only work on forums that allow posting .. therefore allowing me to delete the subforums list at the top of the page .. but still have the subforums showing if its in a forum that doesn't allow posting .. hmm .. does that make sense? |
#8
|
|||
|
|||
Not really
This hack works only in forums that allow posting, and displays all sub-forums of a parent forum. |
#9
|
||||
|
||||
k .. so if I installed this hack and then deleted the subforum listing from the FORUMDISPLAY template I would then be able to get to the subforums if the forum was open for posts .. but if not then it wouldn't show anything ..
I guess I need an "IF" statement wrapped around the subforum part of the FORUMDISPLAY template to have it work how I would want .. but I have no idea what it would be .. Anyone know? |
#10
|
||||
|
||||
hmm .. I've just looked at the code a bit more and I might of sussed it ..
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|