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

madness85 01-11-2013 07:03 PM

Quote:

Originally Posted by metalguy639 (Post 1755630)
Reserved...

how to do this on 4.2 ?

metalguy639 01-12-2013 05:11 AM

Quote:

Originally Posted by madness85 (Post 2396279)
how to do this on 4.2 ?

I will have to post an entirely different tutorial for that since the code is different from vB 3.8. When I have some time I'll post it this weekend.

madness85 01-24-2013 06:11 PM

Quote:

Originally Posted by metalguy639 (Post 2396392)
I will have to post an entirely different tutorial for that since the code is different from vB 3.8. When I have some time I'll post it this weekend.

Please if ya would buddy I can't hide faq and community link

metalguy639 01-30-2013 12:09 AM

Quote:

Originally Posted by madness85 (Post 2399224)
Please if ya would buddy I can't hide faq and community link

Sorry for the late reply. I'm really bogged down in other stuff right now. If you are using vBulletin 4.2 there is a built in system for navigation that you can set who can see a link and who cannot. It maybe easier to use that system if you are on 4.2.

Or if you are not using vB 4.2 you can place the conditionals yourself. The vB4 conditionals are here: https://vborg.vbsupport.ru/showthrea...t=Conditionals. If you can find the part of the template for those links you should be able to put the conditionals around it and make it where its not seen.

Dorgham 04-03-2013 11:09 PM

Good Job

metalguy639 04-05-2013 01:07 AM

Quote:

Originally Posted by Dorgham (Post 2414148)
Good Job

Thanks.


All times are GMT. The time now is 09:05 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.01273 seconds
  • Memory Usage 1,755KB
  • 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
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete