vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   plugin conditional help (https://vborg.vbsupport.ru/showthread.php?t=279768)

tommyxv 03-08-2012 09:04 PM

Code:

global $template_hook; $vbulletin;
$tabselected = '';
$tablinks = '';
if (PP_SCRIPT == 'PP_Pro')
{
    $vbulletin->options['selectednavtab']='pp_pro';
    $tabselected = ' class="selected"';
    $tablinks = '                <ul class="floatcontainer">
                        <li><a href="http://www.mysite.com/gallery/index.php">Gallery Home</a></li>
                        <li><a href="http://www.mysite.com/gallery/showgallery.php?cat=500&amp;ppuser=$vbuserid">My Photos</a></li>
                        <li><a href="http://www.mysite.com/gallery/search.php?what=fav">My Favorites</a></li>
                        <li><a href="http://www.mysite.com/gallery/useralbums.php">My Albums</a></li>
                        <li><a href="http://www.mysite.com/gallery/uploadphoto.php">Upload Photos</a></li>
                        <li><a href="http://www.mysite.com/gallery/search.php">Search</a></li>

// if (is_member_of($vbulletin->userinfo, 6))
//{
//$tablinks .= '<li> link here </li>';
//}


$tablinks .= '</ul> '; 


}
$template_hook['navtab_middle'] .= '<li'.$tabselected.'><a class="navtab" href="http://www.mysite.com/gallery/">Gallery</a>'.$tablinks.'</li>';


The plugin is still not working now. hmmmm.

kh99 03-08-2012 09:05 PM

Oh, now I see, you missed the close quote and semicolon at the end of the line before the if. (You need to scroll right on my post #6 to see it).

tommyxv 03-08-2012 09:08 PM

Code:

global $template_hook; $vbulletin;
$tabselected = '';
$tablinks = '';
if (PP_SCRIPT == 'PP_Pro')
{
    $vbulletin->options['selectednavtab']='pp_pro';
    $tabselected = ' class="selected"';
    $tablinks = '                <ul class="floatcontainer">
                        <li><a href="http://www.mysite.com/gallery/index.php">Gallery Home</a></li>
                        <li><a href="http://www.mysite.com/gallery/showgallery.php?cat=500&amp;ppuser=$vbuserid">My Photos</a></li>
                        <li><a href="http://www.mysite.com/gallery/search.php?what=fav">My Favorites</a></li>
                        <li><a href="http://www.mysite.com/gallery/useralbums.php">My Albums</a></li>
                        <li><a href="http://www.mysite.com/gallery/uploadphoto.php">Upload Photos</a></li>
                        <li><a href="http://www.mysite.com/gallery/search.php">Search</a></li>

 // if (is_member_of($vbulletin->userinfo, 6))
//{
//$tablinks .= '<li> link here </li>';
//}

            </ul> '; 


}
$template_hook['navtab_middle'] .= '<li'.$tabselected.'><a class="navtab" href="http://www.mysite.com/gallery/">Gallery</a>'.$tablinks.'</li>';

It works this way when i change

Code:

$tablinks .= '</ul> ';
to

Code:

</ul> ';

kh99 03-08-2012 09:10 PM

Right, OK, but now you're pretty much back to where you started. If there are no other chnages, just copy what I posted in post 6 and try that. (Unless you're not posting the actual plugin code - then you'll have to look again at that line before the 'if' line).

tommyxv 03-08-2012 09:11 PM

Quote:

Originally Posted by kh99 (Post 2307650)
Oh, now I see, you missed the close quote and semicolon at the end of the line before the if. (You need to scroll right on my post #6 to see it).

I must be blind... you point this out.



EDIT:

That is all the of plugin code.

kh99 03-08-2012 09:13 PM

So is it working now? Or are you asking me to point out the missing part I was talking about? It's at the end of this line:

Code:

<li><a href="http://www.mysite.com/gallery/search.php">Search</a></li>';

tommyxv 03-08-2012 09:17 PM

Yes, the plugin and admin link are working now. Thank you so much! I been trying to fix this for weeks.


All times are GMT. The time now is 08:12 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
  • Page Generation 0.01058 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete