![]() |
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! |
Do you have any of the "tabs" mods installed?
|
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.
|
Just checking in. Any help would be appreciated. Thanks!
|
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.
|
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! |
The one in my sig can do what u ask if you have any problems with it pm me
|
Or write a plugin - https://vborg.vbsupport.ru/showthread.php?t=226914
|
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']"> |
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 = ''; |
Well the "what's new" tab should already be hidden from unregistered / logged out members. Did you look in your navbar template for the code I posted?
In regards to the other tabs, were those added using sstab advanced? If so it has an option built in to hide the tabs. You will have to read up on the documentation for a how to do it. |
No, the code I posted was added via the creation of a new plugin. While I installed sstab advanced, I haven't yet used it. I suppose I can always get rid of the plugin tabs I created and recreate them in sstabs with the restrictions. I will try that.
As far as the "What's New" tab, I did search in the navbar template and found that. Now I need to find the "Forums" tab and insert the code there. That is proving trickier to find. Any idea where that one is? Thanks again for your help John, I very much appreciate your time |
Yea you should pick one or the other before going forward. I'm not that experience writing plug-ins or mods, I'm a frakencoder :D I find something close to what I'm looking for and then butcher it until I get it to do what I want XD
|
LOL! Yeah, that has pretty much been my method as well. I know enough code to be dangerous :D
If anyone out there knows where to find the "Forums" tab in the templates that would be great. I also deleted those plugins and used the sstab advanced to remake them and it works perfectly. Thanks for the help! |
Quote:
Code:
<a class="navtab" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a> |
The easy way is to just upgrade to 4.2 and update the add-ons. But, if you must stay on 4.1.11 AND you can code...
Disable the plugins that create the tabs for the add-ons and re-create the tabs using this, then wrap the tab declarations in a $show['member'] condition, e.g. on the parse_templates plugin hook: PHP Code:
|
Ok, so I upgraded to 4.2. And now I have some new problems.
1. There were sub-nav that I added via plugin that aren't working. They appended themselves to the sub-nav under what is now considered "articles", but they now do not show up. Here is a what the plugin script looks like: Code:
if (is_member_of($vbulletin->userinfo, 6, 9, 18)) { --------------- Added [DATE]1349203510[/DATE] at [TIME]1349203510[/TIME] --------------- So I figured out the solution to the first one. The subnav information is now found on each article. So if you want to set your page/article as subnav under the CMS tab, you have to indicate that on the article itself through the editor... interesting... Still have no answer for the second question I asked... anyone? :) |
For your existing tabs click on Edit in the navigation manager and in the "Show Permission Name" put member and it will only appear for members. For the sstab plugin you can use the selection to choose which membergroups can see your custom tabs. I just fixed this on mine so I figured I'd post here to help out.
This is for 4.2.0 PL2. Not sure if it will work on other versions. PM me if you need further assistance with your tabs. I'm using this method without any problems. |
All times are GMT. The time now is 05:49 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|