vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Mini Mods - Hiding Certain Navbar Links From Guests (https://vborg.vbsupport.ru/showthread.php?t=206739)

metalguy639 02-26-2009 10:00 PM

Hiding Certain Navbar Links From Guests
 
1 Attachment(s)
THIS TEMPLATE EDIT BROUGHT TO YOU BY:

https://vborg.vbsupport.ru/
www.skinsnstyles.com

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>
Replace With:

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>

To Hide The Community Link Popups:

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>

Replace With:

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>

To Hide The Search Link:

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>

Replace With:

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>

You can pretty much hide any links that you want as long as you include both tags into your code. Be sure to always put:

Code:

<if condition="$show['member']">
at the beginning of the link area and be sure to close your tag and place...

Code:

</if>
at the end.

If you get an error or get stumped, post here & I will try to help you.

metalguy639 02-26-2009 11:27 PM

Reserved...

Jasem 04-04-2009 02:26 PM

great work, thank you!

Installed

metalguy639 04-20-2009 08:24 AM

No problem. Glad you found it helpful.

Blue Ink 05-19-2009 03:58 PM

<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>

metalguy639 05-19-2009 10:13 PM

Quote:

Originally Posted by Blue Ink (Post 1813556)
Can you tell me how to modity this so that a navbar link is hidden from anyone who is not an Administrator?

Thank you

Which link? All navbar links or one link in particular?

Thanks

www.nofal 10-09-2012 11:51 AM

Good Work

metalguy639 10-10-2012 01:14 AM

Quote:

Originally Posted by www.nofal (Post 2371764)
Good Work


No problem, thanks :)

matrex722 11-10-2012 12:46 PM

great work, thank you!

metalguy639 11-10-2012 11:41 PM

Quote:

Originally Posted by matrex722 (Post 2379945)
great work, thank you!

Thanks :)


All times are GMT. The time now is 02:48 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.01159 seconds
  • Memory Usage 1,745KB
  • 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
  • (8)bbcode_code_printable
  • (3)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
  • (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