vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to stop Groups link showing in navbar to unregistered users (https://vborg.vbsupport.ru/showthread.php?t=289524)

Macsee 10-23-2012 06:36 PM

How to stop Groups link showing in navbar to unregistered users
 
vB 4.1.9

Unregistered users and some other usergroups don't have access to Groups.php. But it still shows to them in the navbar (there's a link there to Groups). How do I stop it showing to these users? Thanks.

Revelence 10-23-2012 07:42 PM

Code:

<vb:if condition="$bbuserinfo['userid'] != 0">
//show the code
</vb:if>


Macsee 10-24-2012 10:34 AM

Thanks, Revelence, but where do I insert this if condition? In the navbar template? Any particular location in that template?

Lynne 10-24-2012 03:33 PM

You should see a link for the groups in the navbar template and you would put that condition around it. The link is probably something like:

<vb:if condition="$show['quick_links_groups']">
<li><a href="{vb:link grouphome}">{vb:rawphrase social_groups}</a></li>
</vb:if>

(Are you sure it is showing for usergroups that have no permission to see the social groups? that condition implies otherwise.)

Macsee 10-24-2012 04:23 PM

Thanks for pointing me to where it is.

I moved this:

Code:

<li><a href="group.php{vb:raw session.sessionurl_q}">{vb:rawphrase social_groups}</a></li>
to within the
Code:

<vb:if condition="$show['pmmainlink']">
<li><a href="private.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase private_messages}</a></li>
</vb:if>

and now the Groups link shows to only those to whom the Private Message link shows ... which does the main job of blocking the Groups links from unregistered visitors.


All times are GMT. The time now is 03:15 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.01009 seconds
  • Memory Usage 1,715KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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