vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Subforum Drop-down Menu (https://vborg.vbsupport.ru/showthread.php?t=99821)

DanLai 10-31-2005 10:00 PM

Subforum Drop-down Menu
 
Description. This is a Mod to make sub-forums appear in a drop-down menu fashion.
  1. +/- sign for forums with/without unread posts
  2. Hierachy show for at most 2 level of sub-forums

Screenshot. Stealed image from the great Stunner-Entertainment forum, hope you don't mind!! :nervous:
https://vborg.vbsupport.ru/attachmen...id=36952&stc=1


Step 1. Open:
forumhome_forumbit_level1_nopost
forumhome_forumbit_level1_post
forumhome_forumbit_level2_nopost
forumhome_forumbit_level2_post


Find:
Code:

<strong>$vbphrase[subforums]</strong>: $forum[subforums]
Replace with:
Code:

<!-- Subforum pull-down menu --------------------------------------->
        <form action="forumdisplay.php" method="get">
                <input name="s" value="" type="hidden">
                <input name="daysprune" value="-1" type="hidden">
                <select name="f" onchange="this.form.submit();">
<if condition="$forum[statusicon] == 'new'">
<option value="$forum[forumid]" style="font-weight:bold;">$forum[title]</option>
<else />
<option value="$forum[forumid]">$forum[title]</option>
</if>
                        $forum[subforums]
                </select>
                <input class="button" value="$vbphrase[go]" type="submit">
        </form>
<!-- Subforum pull-down menu --------------------------------------->

Step 2. Open:
forumhome_subforumbit_nopost
forumhome_subforumbit_post


Replace the templates with:
Code:

<!-- Subforum pull-down menu --------------------------------------->
<option value="$forum[forumid]">

<if condition="$forum[depth] == '2'">
&nbsp; &nbsp;
</if>
<if condition="$forum[depth] == '3'">
&nbsp; &nbsp; &nbsp; &nbsp;
</if>

<if condition="$forum[statusicon] == 'new'">
+&nbsp;
<else />
-&nbsp;
</if>

$forum[title]

</option>
<!-- Subforum pull-down menu --------------------------------------->

Caution. Not every forum need this, our forum has a lot of forums, and forum names are in different languages, so we have to do this. Otherwise, showing all the forums seems to be better for user-friendliness. :devious:

Allan 11-01-2005 08:17 AM

screen please ;)

thedvs 11-01-2005 11:25 AM

you dont need a screenshot look at the demo link

foniac 11-01-2005 11:31 AM

Its not showing on my forum

www.habzilla.com/forum
the coding help forums
Any ideas? Thanks guys

DanLai 11-01-2005 01:21 PM

Quote:

Originally Posted by foniac
Its not showing on my forum

www.habzilla.com/forum
the coding help forums
Any ideas? Thanks guys

Please check this variable:

Admin -> vBulletin Options -> vBulletin Options -> Forum Listings Display Options -> Depth of Sub-Forums

Generally, setting it to "2" will work in most cases.

Thanks,
DanLai.

RMS-Chef 11-01-2005 01:23 PM

This is a great little mod and works well. I made a child style of my default and just made these changes in the child style so that my users can choose if they want to use it.

Thanks.

BoYagoob 11-01-2005 04:14 PM

wonderful :)

Snake 11-01-2005 04:29 PM

Well said! :)

Snake 11-01-2005 04:29 PM

Installed. :nervous:

Gizmo5h1t3 11-01-2005 07:56 PM

lookin good
/me clicks install


All times are GMT. The time now is 01:06 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01096 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete