Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Hiding Certain Navbar Links From Guests Details »»
Hiding Certain Navbar Links From Guests
Version: 1.00, by metalguy639 metalguy639 is offline
Developer Last Online: Jan 2014 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.8.1 Rating:
Released: 02-26-2009 Last Update: Never Installs: 7
Template Edits
 
No support by the author.

THIS TEMPLATE EDIT BROUGHT TO YOU BY:


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.

Screenshots

File Type: png Logged In.png (21.5 KB, 0 views)
File Type: png Logged Out.png (18.2 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-11-2013, 07:03 PM
madness85 madness85 is offline
 
Join Date: Jun 2012
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by metalguy639 View Post
Reserved...
how to do this on 4.2 ?
Reply With Quote
  #13  
Old 01-12-2013, 05:11 AM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by madness85 View Post
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.
Reply With Quote
Благодарность от:
madness85
  #14  
Old 01-24-2013, 06:11 PM
madness85 madness85 is offline
 
Join Date: Jun 2012
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by metalguy639 View Post
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
Reply With Quote
  #15  
Old 01-30-2013, 12:09 AM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by madness85 View Post
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.
Reply With Quote
  #16  
Old 04-03-2013, 11:09 PM
Dorgham's Avatar
Dorgham Dorgham is offline
 
Join Date: May 2012
Location: Egypt
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good Job
Reply With Quote
  #17  
Old 04-05-2013, 01:07 AM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dorgham View Post
Good Job
Thanks.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:14 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04379 seconds
  • Memory Usage 2,304KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (1)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (2)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete