The Arcive of vBulletin Modifications Site. |
|
Hiding Certain Navbar Links From Guests Details »»
|
|||||||||||||||||||||||||||||||
|
Hiding Certain Navbar Links From Guests
Developer Last Online: Jan 2014
CLICK INSTALLED TO GET SUPPORT FOR THIS ADD-ON. IF YOU DO NOT CLICK INSTALLED I CANNOT HELP YOU. If you want to hide some of the links in your navbar to guests you can do it by adding an if/else statement to your template code. Steps To Add Code: 1. Login to your admin CP 2. Scroll down to Styles & Templates & click on "Style Manager" 3. Now find the skin you want to edit in the right side panel. 4. Click the drop down box and choose "Edit Templates" 5. Expand the templates to include all the template groups by clicking the bottom left button on the far right large box. 6. Scroll through the templates until you find the "navbar" template & double click on it. 7. Now you should see the code, I will go through each button that does not have the if/else statement on it already. To Hide The FAQ Link: Find: Code:
<td class="vbmenu_control"><a rel="help" href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td> Code:
<if condition="$show['member']"> <td class="vbmenu_control"><a rel="help" href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td> </if> Find: Code:
<if condition="$show['communitylink'] AND $show['popups']">
<td class="vbmenu_control"><a id="community" href="$show[nojs_link]#community" rel="nofollow" accesskey="6">$vbphrase[community]</a> <script type="text/javascript"> vbmenu_register("community"); </script></td>
Code:
<if condition="$show['member']">
<if condition="$show['communitylink'] AND $show['popups']">
<td class="vbmenu_control"><a id="community" href="$show[nojs_link]#community" rel="nofollow" accesskey="6">$vbphrase[community]</a> <script type="text/javascript"> vbmenu_register("community"); </script></td>
</if>
Find: Code:
<td class="vbmenu_control"><a id="navbar_search" href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search"); </script></if></td>
</if>
Code:
<if condition="$show['member']">
<td class="vbmenu_control"><a id="navbar_search" href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search"); </script></if></td>
</if>
</if>
Code:
<if condition="$show['member']"> Code:
</if> If you get an error or get stumped, post here & I will try to help you. Screenshots
Show Your Support
|
|||||||||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Reserved...
|
|
#3
|
||||
|
||||
|
great work, thank you!
Installed |
|
#4
|
|||
|
|||
|
No problem. Glad you found it helpful.
|
|
#5
|
|||
|
|||
|
<font color="Navy">Can you tell me how to modity this so that a navbar link is hidden from anyone who is not an Administrator?
Thank you</font> |
|
#6
|
|||
|
|||
|
Quote:
Thanks |
|
#7
|
|||
|
|||
|
Good Work
|
|
#8
|
|||
|
|||
|
|
|
#9
|
||||
|
||||
|
great work, thank you!
|
|
#10
|
|||
|
|||
|
|
![]() |
|
|