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)

speedracer68 11-17-2009 03:20 PM

Please visit http://www.pro-touring.com/forum_new...the-front-page

In the upper left on the navbar it says

* Home Page * New Products * News * Events

To the right of events I want to add *Tech of the week *Member of the month * Advertise with us

or something like that.

Lynne 11-17-2009 03:47 PM

Quote:

Originally Posted by speedracer68 (Post 1915970)
Please visit http://www.pro-touring.com/forum_new...the-front-page

In the upper left on the navbar it says

* Home Page * New Products * News * Events

To the right of events I want to add *Tech of the week *Member of the month * Advertise with us

or something like that.

Then this is not the article for you. This article would help you add a whole new tab next to What's New. The sections in the CMS are added through the Section Manager. Don wrote an article (or blog, I forget) on how to do this over on vb.com

speedracer68 11-17-2009 03:54 PM

Hmm, I am able to add sections. I have 6 or 8 of them and I added them through the control panel but they don't show at the top. Thanks! I will head over.

arena 11-17-2009 06:01 PM

How do I show links forum categories navbar? Same as forum blog cms

Lynne 11-17-2009 06:25 PM

Quote:

Originally Posted by arena (Post 1916075)
How do I show links forum categories navbar? Same as forum blog cms

I don't understand what you mean.

Bounce 11-17-2009 06:46 PM

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:confused:

arena 11-17-2009 06:47 PM

Please www.arenatr.com look top navbar link (Forum categories)

Lynne 11-17-2009 07:28 PM

Quote:

Originally Posted by hIBEES (Post 1916110)
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:confused:

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->userinfo567))  
{
$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 (Post 1916111)
Please www.arenatr.com look top navbar link (Forum categories)

Sorry, but I still don't understand your question. That is not a vb4 site at all.

Bounce 11-17-2009 07:40 PM

Quote:

Originally Posted by Lynne (Post 1916136)
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->userinfo567))  
{
$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.


Sorry, but I still don't understand your question. That is not a vb4 site at all.

Thank you very much lynne, am at a loss thou with the
Code:


if (THIS_SCRIPT == 'yourpage')

Where do you get that from?

ragtek 11-17-2009 07:46 PM

When you create your own page, you have to define this_script;)


All times are GMT. The time now is 07:09 PM.

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.02865 seconds
  • Memory Usage 1,771KB
  • 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
  • (2)bbcode_php_printable
  • (5)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