I actualy tried that way of doing it too, what happens if with is, the if conditional just gets put in the navbar as plain text, as if vb is not seeing it as a conditional. I notice the syntax highlighting on the plug code input page also doesn't color the extra if statement in green like the if statement at the top for the 'this_script ==' one.
Here's my complete code for the navtab plugin:
Code:
$tabselected = '';
$tablinks = '';
if (THIS_SCRIPT == 'dkp.php')
{
$vbulletin->options['selectednavtab']='dkp_listmembers';
$tabselected = ' class="selected"';
$tablinks = ' <ul class="floatcontainer">
<li class="popupmenu">
<a href="javascript://" class="popupctrl">Administration</a>
<ul class="popupbody popuphover">
if (is_member_of($vbulletin->userinfo, 5, 6, 13, 14))
{
<li><a href="/25manwrathplus/admin/" target=dkp_frame>Eqdkp Admin Index</a></li>
<li><a href="/25manwrathplus/plugins/ctrt/" target=dkp_frame>Import CTRA String</a></li>
<li><a href="/25manwrathplus/admin/addiadj.php" target=dkp_frame>Do Adjustments</a></li>
}
</ul>
</li>
<li><a href="/25manwrathplus/listmembers.php?s="
target=dkp_frame>Standings</a></li>
<li><a href="/25manwrathplus/listraids.php?s="
target=dkp_frame>Raids</a></li>
<li><a href="/25manwrathplus/listevents.php?s="
target=dkp_frame>Events</a></li>
<li><a href="/25manwrathplus/listitems.php?s="
target=dkp_frame>items</a></li>
<li><a href="/25manwrathplus/listitems.php?s=&p=history"
target=dkp_frame>History</a></li>
<li><a href="/25manwrathplus/stats.php?s="
target=dkp_frame>Stats</a></li>
<li><a href="/25manwrathplus/plugins/raidplan/listraids.php?s="
target=dkp_frame>Raid Planner</a></li>
<li><a href="/25manwrathplus/plugins/raidplan/raidstats.php?s="
target=dkp_frame>Raid Planner Stats</a></li>
<li class="popupmenu">
<a href="javascript://" class="popupctrl">Your DKP Account</a>
<ul class="popupbody popuphover">
<li><a href="/25manwrathplus/settings.php?mode=account" target=dkp_frame>Account Settings</a></li>
<li><a href="/25manwrathplus/plugins/raidplan/usersettings.php" target=dkp_frame>Raid Planner Settings</a></li>
<li><a href="/25manwrathplus/login.php?logout=true" target=dkp_frame>Log Out of Eqdkp</a></li>
<li><a href="/25manwrathplus/login.php" target=dkp_frame>Log Into Eqdkp</a></li>
</ul>
</li>
</ul> ';
}
$template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="dkp.php">DKP</a>'.$tablinks.'</li>' ;
I tried putting the conditional before the first <li> on the top most popup control, before the <a> just below it, and where you see it now. (with the bracket closed in the appropriate place in each instance. same thing happens on each occasion.
Only difference I can see in the example you gave and my version, is I'm trying to hide an entire popup control to non admins, your example just tries to hide a link.