vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create a New Tab in the navbar (https://vborg.vbsupport.ru/showthread.php?t=226914)

Lynne 02-11-2010 08:27 PM

Assuming your code was correct to begin with, this should work:
PHP Code:

$tabselected '';
$tablinks '';
if (
THIS_SCRIPT == 'osc_shop')
{
    
$vbulletin->options['selectednavtab']='oscShop';
    
$tabselected ' class="selected"';
if (
$vbulletin->userinfo['userid']) $tablinks '<ul class="floatcontainer">';
if (
is_member_of($vbulletin->userinfo6))  
{
$tablinks .= '<li><a href="misc.php">Misc</a></li>';
}
if (
$vbulletin->userinfo['userid'])
{
      
$tablinks .= '    <li><a href="account.php">My Account</a></li>
                        <li><a href="shopping_cart.php">Cart Contents</a></li>
                        <li><a href="checkout_shipping.php">Checkout</a></li>
 
                        </ul> '
;

}


$template_hook['navtab_middle'] .= '<li'.$tabselected.'><a class="navtab" href="shop.php">Shop</a>'.$tablinks.'</li>' 


Satviewers 02-11-2010 10:09 PM

Thank you for that. It works perfect.

CFodder 02-15-2010 09:51 PM

Hi Lynne, thanks for another great guide :) (Yes, I'm a suck up).

Just wondering if could have it so the sublink menu popup menu can be displayed when hovering your pointer over it instead of having to click, is there an in-built JS within VB to do this or would I have to use an external one?

Lynne 02-16-2010 02:02 AM

Quote:

Originally Posted by CFodder (Post 1983303)
Hi Lynne, thanks for another great guide :) (Yes, I'm a suck up).

Just wondering if could have it so the sublink menu popup menu can be displayed when hovering your pointer over it instead of having to click, is there an in-built JS within VB to do this or would I have to use an external one?

Could probably do it with javascript or some creative css, but I haven't looked into it.

Sarcoth 02-17-2010 08:14 PM

Thanks Lynne. :)

samiro 02-18-2010 08:02 AM

i want to add a new "nav link" to go to the privet messages.

like in this original photo- how can i do that ?

https://vborg.vbsupport.ru/external/2011/07/104.jpg

Sarcoth 02-18-2010 05:28 PM

Can this plugin call variables from my custom page?

I'm looking to use this menu to sort the tables on my custom page. My custom page creates an array (which you may be familiar with in another post):

PHP Code:

$columns = array(
    
'column1' => $field1st,
    
'title1' => $title1st,
    
'column2' => $field2nd,
    
'title2' => $title2nd,
    
'column3' => $field3rd,
    
'title3' => $title3rd,
    
'column4' => $field4th,
    
'title4' => $title4th,
    
'column5' => $field5th,
    
'title5' => $title5th,
    
'column6' => $field6th,
    
'title6' => $title6th,
    
'column7' => $field7th,
    
'title7' => $title7th,
    
'column8' => $field8th,
    
'title8' => $title8th
); 

Anyhow, instead of link1, I'd like to use $columns['title1'] in this plugin.

Lynne 02-18-2010 11:32 PM

Quote:

Originally Posted by samiro (Post 1985387)
i want to add a new "nav link" to go to the privet messages.

like in this original photo- how can i do that ?

https://vborg.vbsupport.ru/external/2011/07/104.jpg

Did you read the article? What code have you written to try to do what you want and what were the results? I can't tell you want is wrong unless you post your code and an image of the result and you tell us what is wrong with the result.

Quote:

Originally Posted by Sarcoth (Post 1985739)
Can this plugin call variables from my custom page?

I'm looking to use this menu to sort the tables on my custom page. My custom page creates an array (which you may be familiar with in another post):

PHP Code:

$columns = array(
    
'column1' => $field1st,
    
'title1' => $title1st,
    
'column2' => $field2nd,
    
'title2' => $title2nd,
    
'column3' => $field3rd,
    
'title3' => $title3rd,
    
'column4' => $field4th,
    
'title4' => $title4th,
    
'column5' => $field5th,
    
'title5' => $title5th,
    
'column6' => $field6th,
    
'title6' => $title6th,
    
'column7' => $field7th,
    
'title7' => $title7th,
    
'column8' => $field8th,
    
'title8' => $title8th
); 

Anyhow, instead of link1, I'd like to use $columns['title1'] in this plugin.

I don't know. I've never tried what you want to do. You'd have to make your variables available to the plugin by defining them prior to this plugin being rendered. So, depending on how you go about it, you should be able to do what you want.

Sarcoth 02-19-2010 04:05 AM

Quote:

Originally Posted by Lynne (Post 1986003)
I don't know. I've never tried what you want to do. You'd have to make your variables available to the plugin by defining them prior to this plugin being rendered. So, depending on how you go about it, you should be able to do what you want.

Thanks for the reply Lynne. That's actually my question. How do I make the variables available to the plugin. Perhaps this isn't a question for this thread now that I think about it. I'll look around some more and maybe just post it in the Programming forum instead. Thanks Lynne. :)

samiro 02-19-2010 04:27 AM

hii - i donnt want to make what you do in this articles ,.
i want to add NAV LINK - not a drop down menu !


All times are GMT. The time now is 08:46 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01823 seconds
  • Memory Usage 1,768KB
  • 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
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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