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

Stunner Inc. 11-02-2005 09:53 PM

VERY Cool....*Install*

kadafi_alive 11-03-2005 07:08 PM

Is there a to apply this hack only to a specific set of subforums?

Regards

Darat 11-04-2005 11:58 AM

Quote:

Originally Posted by kadafi_alive
Is there a to apply this hack only to a specific set of subforums?

Regards

That would be great.

flup 11-04-2005 07:41 PM

Nice

Flow Fusion 11-04-2005 09:24 PM

Perfect...Installed.

o1dirtydog 11-05-2005 10:31 AM

this is pretty nice. im not going to use it, but i could see it being useful on some forums.

good job

lsgworldl 11-07-2005 11:21 PM

this is for my site the best hack ;) 100/10

lsgworldl 11-07-2005 11:29 PM

would it be possible to have this wit out it needing to be 2 forums deep, I have a lot of child forums

Jukov 11-25-2005 02:42 PM

for whom it doesn't work:
you also need to set Depth of Forums - Forum Home on VB setting pannel to 1

rb290 12-01-2005 06:53 AM

dont think this works for 3.5.1

ReZ 12-27-2005 03:29 PM

Thanks for this.

YOimYO 12-27-2005 10:23 PM

thanks :D

YOimYO 12-29-2005 01:13 PM

I have installed this, it looks great. actually i just installed it twice :) to make sure ....


but .... when i click to open the dropdown, it auto redirects me to inside the main forum, and doesnt give me a chance to click on the subforum ... :P


any suggestions ?

YOimYO 12-29-2005 01:18 PM

PHP Code:

<!-- top category table setup -->
<
table border="0" cellpadding="0" cellspacing="0"  width="100%" align="center" style="background-image: url($stylevar[imgdir_misc]/cat_back.gif)">
  <
tr>
    <
td width="150" height="27" align="left" valign="top"><img  src="$stylevar[imgdir_misc]/cat_top_ls.gif" width="150" height="27" alt="" /></td>
    <
td width="100%" valign="middle">
    
            
            <
a style="float:$stylevar[right]href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumidsrc="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
            <
div align="center">
            <
a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><b>$forum[title]</b></a></div>
            <if 
condition="$show['forumdescription']"><div align="center" class="smallfont">$forum[description]</div></if>
            <if 
condition="$show['subforums']"><div class="smallfont"><!-- 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 ---------------------------------------></div></div></if>
        
    
    </
td>
     <
td width="150" height="27" align="right" valign="top"><img src="$stylevar[imgdir_misc]/cat_top_rs.gif" width="150" height="27" alt="" /></td>
  </
tr>
</
table>

        <!-- 
End top category table setup --> 


YOimYO 12-29-2005 07:27 PM

aha i found my problem. to make this mod compatible with mouse rollover effect hack just remove this code ....
PHP Code:

 onclick="window.location.href='forumdisplay.php?$session[sessionurl]f=$forum[forumid]';" 


pirotess 12-30-2005 05:09 PM

Quote:

Originally Posted by kadafi_alive
Is there a to apply this hack only to a specific set of subforums?

Regards

Yes there is if your board only has one style like mine. Make a child style of your normal board style and make the changes listed above. Then go into the Forum Manager and edit the Style Options section on the forums you want this to be used on. Set the Custom Style dropdown to the child style you just created and have it override your users style choice.

Stunner Inc. 12-30-2005 07:52 PM

HEYYYYYYYYY THAT'S MY SITE (Stunner-Entertainment.com),lol
I don't mind you using it though :)

bashy 01-13-2006 08:36 PM

Hi, I have installed this and working well....
Just 1 question, is there a way to make the drop down white background the colour of my forum?

kartik786 01-22-2006 09:45 AM

works hell sexy on v 3.5.3

o0Hubba0o 01-28-2006 12:11 AM

Quote:

Originally Posted by YOimYO
aha i found my problem. to make this mod compatible with mouse rollover effect hack just remove this code ....
PHP Code:

 onclick="window.location.href='forumdisplay.php?$session[sessionurl]f=$forum[forumid]';" 


Hey thanks alot for posting what you did to fix this, so many people just "nevermind I fixed it", really appreciate. I'd like to add that that code was in the "forumhome_forumbit_level1_post" and "forumhome_forumbit_level2_post" templates. The drop down now workd great for me! Great space saver.

rza733 01-29-2006 03:27 AM

Hello

in the (forumhome_forumbit_level1_nopost) i dont have the
Code:

<strong>$vbphrase[subforums]</strong>: $forum[subforums]
this is my current code

Code:

<table style="border-collapse: collapse">
        <tr>
                <td align="left" style="padding: 0"><img src="$stylevar[imgdir_misc]/cat_top_l.gif" alt="" /></td>
                <td style="background-image: url($stylevar[imgdir_misc]/cat_top_bg.gif); width: 100%; padding-top: 5px" class="cat"><div style="float: right"><a href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
</div><a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a><if condition="$show['forumdescription']"><span class="smallfont"> - $forum[description]</span></if></td>
                <td align="right" style="padding: 0"><img src="$stylevar[imgdir_misc]/cat_top_r.gif" alt="" /></td>
        </tr>
</table>

<if condition="$childforumbits">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
        <tr align="center">
          <td class="thead">&nbsp;</td>
          <td class="thead" width="60%" align="$stylevar[left]">$vbphrase[forum]</td>
          <td class="thead">$vbphrase[last_post]</td>
          <td class="thead">$vbphrase[threads]</td>
          <td class="thead">$vbphrase[posts]</td>
          <if condition="$vboptions['showmoderatorcolumn']">
          <td class="thead">$vbphrase[moderator]</td>
          </if>
        </tr>
$childforumbits
</tbody>
</table>
</if>
<table style="border-collapse: collapse">
      <tr>
        <td align="left" style="padding: 0"><img src="$stylevar[imgdir_misc]/cat_bottom_l.gif" alt="" /></td>
        <td style="background-image: url($stylevar[imgdir_misc]/cat_bottom_bg.gif);width: 100%"></td>
        <td align="right" style="padding: 0"><img  src="$stylevar[imgdir_misc]/cat_bottom_r.gif" alt="" /></td>
      </tr>
    </table>
<br />

any ideas on where to apply the new code at?

thanks

bashy 03-14-2006 06:19 PM

Can some one please help

What was in these 2 templates please

forumhome_subforumbit_nopost
forumhome_subforumbit_post

I am trying to uninstall and i cant remember

MThornback 04-17-2006 05:16 AM

Revert the template :)

In 3.5.4 its just showing me the name (and link) of the main forum and not the subs in the drop down....good idea, but its not working for me :(

ShadowOne 04-17-2006 07:25 PM

beautiful hack... nicely done...

Trana 04-17-2006 09:34 PM

Doesn't work for me. I have the mouseover effects, but I removed the code as instructed. The forums still don't show up as a drop down.

Trana 04-18-2006 08:45 PM

Can someone explain how this works? I only want the drop down box to show up for forums that have subforums (not for all forums).

I can't seem to figure out how this is checking for this before displaying.

Thanks!

ShadowOne 04-21-2006 05:53 AM

hey is there anyway to change the colors of it? and anyway to change it to say instead of the main forum name like a name of our choice or just "sub forums"?

almukmin 06-30-2006 01:13 AM

Quote:

Originally Posted by pirotess
Yes there is if your board only has one style like mine. Make a child style of your normal board style and make the changes listed above. Then go into the Forum Manager and edit the Style Options section on the forums you want this to be used on. Set the Custom Style dropdown to the child style you just created and have it override your users style choice.

Tried that but it doesn't work for specific forum. It only worked if I change the default style for ALL forums. Any clue?

EnIgMa1234 08-10-2006 08:39 PM

thanks, works great

ltaylor 08-19-2006 09:40 PM

Looking for a safe way to change colors of the background inside, text and go button. Any ideas?


All times are GMT. The time now is 03:58 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.01418 seconds
  • Memory Usage 1,853KB
  • 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
  • (5)bbcode_code_printable
  • (3)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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