View Single Post
  #66  
Old 12-01-2009, 08:15 AM
Anseur's Avatar
Anseur Anseur is offline
 
Join Date: Jun 2004
Location: Nottingham, UK.
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01603 seconds
  • Memory Usage 1,783KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete