The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Menu like on vB.org
You see at the top right, that menu (Home, Forums, Articles, Mods, Styles) that change the class into 'current' depending on wich category we are browsing. I have setted something like that on my vBulletin forum. But I don't know how can I do the same: example -> if we are on category id.2 (and all the subforums wich they are in), active this part of the menu, etc. Can you please help me?
|
#2
|
|||
|
|||
Use the THIS_SCRIPT condition?
|
#3
|
||||
|
||||
Yes, but how do I set that in order to change my menu's class when we're browsing just some categories?
|
#4
|
||||
|
||||
$foruminfo['forumid']
|
#5
|
||||
|
||||
Yes, but if I set that.. I define one forum id.. and not a forum category id.
Should I create an array with all the forum ids in wich it should be 'active', or can I define just the categories ids? |
#6
|
||||
|
||||
I believe there is also $foruminfo['parentid'].
|
#7
|
||||
|
||||
Ok, it works but only when I enter one subforum of that category id. When I directly view the category id it doesn't appear as 'current'.
Also, for the forums wich are on my forumhome.. it should be 'current' for the 'Home' part of the menu. I have used THIS_SCRIPT == 'index'.. but it work only when I'm browsing the homepage.. This is my actual code: Code:
<div id="menucase"> <div id="styletwo"> <ul> <li><a href="http://www.example.org/" <if condition="THIS_SCRIPT == 'index'">class="current"</if>>Home</a></li> <li><a href="forumdisplay.php?f=72" <if condition="$foruminfo['parentid'] == 72">class="current"</if>>Test 1</a></li> <li><a href="forumdisplay.php?f=36">Test 2</a></li> <li><a href="forumdisplay.php?f=60">Test 3</a></li> </ul> </div> </div> |
#8
|
||||
|
||||
Combine it with $foruminfo['forumid'] . As for your home part, you will need to compile all your other ones together, and make one big "not" conditional.
|
#9
|
||||
|
||||
Can you please post me an example of both these methods?
How do I combine them? Also, what do you mean with a 'big "not" conditional'? |
#10
|
||||
|
||||
Code:
<if condition="$foruminfo['parentid'] == 72 OR $foruminfo['forumid'] == 72"> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|