The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Currently I've been trying to create a completely new style however despite being able to create and display templates fine, hiding elements from users and other usergroups just doesn't seem to work for some reason. If I put all of the elements in a new template it won't work, however putting them in the navbar element works.
Is there something I need to put into the plugin to get the elements to hide? Putting the code in the navbar will not work for this style so putting code in the navbar isn't really an option. Any help is appreciated. ![]() I have tried: Code:
<if condition="$show['member']"> Code:
<if condition="$show['admincplink']"> |
#2
|
||||
|
||||
![]()
What are you trying to hide exactly, and from whom? I'm not sure I understand what your trying to do.
|
#3
|
||||
|
||||
![]()
At the moment I'm trying to create a new navbar, however there's certain options (like the current navbar) that I want hidden from guests and only show up if you're registered. Think of it like copying the current navbar to a different template.
This is what I'm trying to do at the moment: ![]() I pasted the code from the custom template and put it into the navbar template and it worked fine, I'm trying to figure out why it doesn't work in the custom template. Also the bottom part of the new navbar is supposed to be hidden from guests, which also works in the navbar template but not the custom template. You can test what I mean on my site using test/pass. |
#4
|
||||
|
||||
![]()
<if condition="$show['member']">
^^ this should have worked as I have tried this long time back and it worked. Can you post the code from your custom template? . |
#5
|
||||
|
||||
![]()
That's exactly what I did funnily enough, the custom template looks like this:
Code:
<ul id="topMenu"> <li><a href="http://www.nexusrealms.co.uk">Home</a></li> <li><a href="http://media.nexusrealms.co.uk">Media Projects</a></li> <li><a href="http://forums.nexusrealms.co.uk/project.php">Projects Tools</a></li> <li><a href="http://forums.nexusrealms.co.uk">Forums</a></li> <li><a href="http://forums.nexusrealms.co.uk/faq.php">FAQs</a></li> <li><a href="http://wiki.nexusrealms.co.uk">Wiki</a></li> </ul> <if condition="$show['member']"> <ul class="topMenu2 blue"> <li><a href="http://forums.nexusrealms.co.uk/usercp.php">Control Panel</a></li> <li><a href="http://forums.nexusrealms.co.uk/search.php?$session[sessionurl]do=finduser&u=$bbuserinfo[userid]">My Posts</a></li> <li><a href="http://forums.nexusrealms.co.uk/search.php?do=getnew">New Posts</a></li> <if condition="$vboptions['enablememberlist']"> <li><a href="http://forums.nexusrealms.co.uk/memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></li> </if> <if condition="$show['member']"> <li><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></li> </if> <if condition="$show['admincplink']"><li><a href="$admincpdir/index.php$session[sessionurl_q]">$vbphrase[admin]</a></li></if> </ul> </if> global_start Code:
eval('$nxr_topMenu = "' . fetch_template('nxr_topMenu') . '";'); Code:
$globaltemplates = array_merge($globaltemplates, array('nxr_topMenu')); Code:
globaltemplates[] = 'nxr_topMenu'; |
#6
|
||||
|
||||
![]()
Hmmm
Try this: <if condition="is_member_of($bbuserinfo, 5, 6, 7)"> Change the user groups as needed. . |
#7
|
||||
|
||||
![]()
Ok that worked well, could be a big problem down the road though as I'll be making constant changes to usergroups. Also in the same code I'm finding that Logout and Admin CP links are not showing up either, there's got to be something that I'm doing wrong or have missed. In the bottom setup (for the navbar) the Admin CP just links to the index page rather than the admin CP so that isn't working for the navbar (moving form the footer). I've really got to figure all of this skinn molarchy out. o_O
|
#8
|
||||
|
||||
![]()
What you can do is use <if condition="!is_member_of($bbuserinfo, 5, 6, 7)"> to exclude usergroups
![]() For adminCP link you can use Code:
<if condition="is_member_of($bbuserinfo, 5, 6, 7)"> instead of <if condition="$show['admincplink']"> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|