View Full Version : Smart tabs Like vb.org
Akademiks
03-08-2009, 03:15 AM
I'm looking for a system that works like the tabs here on vb.org that aren't just tabs but smart tabs you see how it knows when your are in forums and when you are in styles etc, how does it work?:D
Dismounted
03-08-2009, 04:41 AM
You can achieve this by creating a separate CSS class, and then using conditionals around the tabs to switch a tab's classes. For example, to check for forum 15:
<if condition="$foruminfo['forumid'] == 15">SOMETHING</if>
Akademiks
03-08-2009, 08:41 PM
Please help me this is the code when its not active just plain tab:
<a href="forumX" class="tab">Graphics</a>
This is when tab is active
<a href="forumX" class="tab2">Graphics</a>
How would I add the code you showed me with this? Please help thanks
Dismounted
03-09-2009, 05:04 AM
<a href="forumX" class="<if condition="$foruminfo['forumid'] == 15">tab2<else />tab</if>">Graphics</a>
Akademiks
03-09-2009, 09:14 PM
thanks dude I <3 you..
Akademiks
03-13-2009, 12:25 AM
<a href="forumX" class="<if condition="$foruminfo['forumid'] == 15">tab2<else />tab</if>">Graphics</a>
sorry run into another whole
how would i do this for
/forum/index.php and with /index.php?
how would the conditionals be?
Dismounted
03-14-2009, 04:06 AM
You can use variables/constants that are only specific to that page (e.g. THIS_SCRIPT).
Akademiks
03-14-2009, 08:19 AM
You can use variables/constants that are only specific to that page (e.g. THIS_SCRIPT).
can you post an example please using my tab script posted above. thanks
Dismounted
03-14-2009, 11:57 AM
Have you tried searching for how it is used? Because I know you will find what you want.
Akademiks
03-14-2009, 05:55 PM
great, thanks for your reply, it works!
Thank you very much
Akademiks
05-24-2009, 11:29 PM
okneed your help again now using a new code this is current tabs
<li><a id="overviewTab" href="/"><span>
<img class="inlineimg" src="images/welcome/group.png" alt="" border="0">Home</span></a></li>
and this is when its active
<li id="currentSub"><a id="createsendTab" href="/"><span><img class="inlineimg" src="images/welcome/group.png" alt="" border="0">Home</span></a></li>
how would I use the conditionals here? thanks a bunch
Dismounted
05-25-2009, 05:44 AM
Just put the conditionals in there - conditionals can go anywhere (inside templates).
Akademiks
05-25-2009, 05:50 PM
I know im being a pain but can do them for me really fast tried but im still missing some "<>" thanks a million
Lynne
05-25-2009, 05:52 PM
Post what you've done (using the html or php tags) and then we can help fix the problem.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.