Quote:
Originally Posted by hIBEES
Lynne,
How do you add them for a certain usergroup?
Basically what I want to do is add a linked drop down for private members linking to various sections that only the private members can see, things like arcade.php, gameroom.php etc etc.
Is it...
Code:
global $template_hook;
$tabselected = '';
$tablinks = '';
if (THIS_SCRIPT == 'yourpage')
{
$vbulletin->options['selectednavtab']='private_members';
$tabselected = ' class="selected"';
$tablinks = ' <ul class="floatcontainer">
<li><a href="URL LINK">Prediction League</a></li>
<li class="popupmenu">
<a href="javascript://" class="popupctrl">Drop Down</a>
<ul class="popupbody popuphover">
<li><a href="arcade.php">Arcade</a></li>
<li><a href="gameroom.php">Gameroom</a></li>
<li><a href="THE LINK TO FORUM">Forum</a></li>
</ul>
</li>
<li><a href="URL LINK">Gallery</a></li>
</ul> ';
}
I also want to link to external links, can I do this or am I better doing it via the bottom code
Code:
$template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="link.php">Nav Link</a>'.$tablinks.'</li>' ;
Thanks
|
If you want to add in a condition, you could do something like this for say, arcade.php to only usergroup 5,6, ad 7:
PHP Code:
$tablinks = '<ul class="floatcontainer">
<li><a href="URL LINK">Prediction League</a></li>
<li class="popupmenu">
<a href="javascript://" class="popupctrl">Drop Down</a>
<ul class="popupbody popuphover">';
if (is_member_of($vbulletin->userinfo, 5, 6, 7))
{
$tablinks .= '<li><a href="arcade.php">Arcade</a></li>';
}
$tablinks .= ' <li><a href="gameroom.php">Gameroom</a></li>
<li><a href="THE LINK TO FORUM">Forum</a></li>
</ul>
</li>
<li><a href="URL LINK">Gallery</a></li>
</ul> ';
That isn't tested, but it should work. And, there is no reason you can't make external links.
Quote:
Originally Posted by arena
|
Sorry, but I still don't understand your question. That is not a vb4 site at all.