vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Hiding Existing Tabs from Unregistered Users (https://vborg.vbsupport.ru/showthread.php?t=287461)

rodeojones 09-04-2012 06:00 PM

Hiding Existing Tabs from Unregistered Users
 
Greetings all. I am currently using vB 4.1.11 (haven't upgraded because things are running smoothly and I am afraid to mess with that :) )

I would like to know if there is a simple plug-in script that I can execute in order to hide all but the home and blog tabs from unregistered users. I made the forum visible in order to let unregistered users see the articles and blogs I am posting, but they don't need to see a bunch of links for sections they can't access anyway. I appreciate the help! Thanks!

John Lester 09-04-2012 08:16 PM

Do you have any of the "tabs" mods installed?

rodeojones 09-04-2012 08:33 PM

I have the sstab advanced 2.0.5 installed, but it appears that I can only set those permissions for newly created tabs, not existing tabs.

rodeojones 09-11-2012 03:49 PM

Just checking in. Any help would be appreciated. Thanks!

Lynne 09-11-2012 04:02 PM

You will need to ask that question in the modification thread since we know nothing about that modification and how to add permissions to the tabs.

rodeojones 09-11-2012 04:16 PM

Lynne,

Thanks for the response :)

My mention of the mod was in response to the question ask about the mods I have installed. From what I can see, this cannot be done with that mod so I am looking for any code I can add as a plug-in or a mod that currently exists to make this happen. Thanks!

ForceHSS 09-11-2012 04:23 PM

The one in my sig can do what u ask if you have any problems with it pm me

Lynne 09-11-2012 04:35 PM

Or write a plugin - https://vborg.vbsupport.ru/showthread.php?t=226914

John Lester 09-11-2012 04:39 PM

Sorry forgot about this thread :( You will need to edit the navbar template and add a conditional around the tabs you want to hide.

<vb:if condition="$show['member']"> is the tag you put in front of the stuff you want to hide from guests.

</vb:if> is the tag you put at the end of the stuff you want to hide from guests.

This example is the default code for the "what's new" tab, it hides the tab from guests. As I don't have that tab mod installed I can't show you an example using the code from one of the tabs you created.

Code:

<vb:if condition="$show['member']">
                        <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post">{vb:rawphrase new_posts_nav}</a></li>
                        <vb:else />
                        <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post">{vb:rawphrase todays_posts}</a></li>
                        </vb:if>


rodeojones 09-12-2012 12:17 PM

John,

Thanks for your code. I am trying to hide 4 tabs, two of which are built in to vB, two are plugins.

The two tabs built in are the Forum and What's New. I looked in the navbar template and can't find the code that specifically points to the "Forum" tab itself. Any guidance would be appreciated.

The two plugins use the following code:

Code:

$tabselected = '';
$tablinks = '';
if (THIS_SCRIPT == 'calendar')
{
$vbulletin->options['selectednavtab']='events';
    $tabselected = ' class="selected"';

$template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="http://www.projecttheophilus.com/comcenter/calendar.php?calendarid=1">EVENTS</a>'.$tablinks.'</li>' ;

I'm not sure where to add the code you provided into these plugins. Any help there would be appreciated. Thank you so much for all the help!


All times are GMT. The time now is 02:25 PM.

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.01040 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_code_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