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 01-02-2010 11:12 PM

Try this then (I think I got them all):
PHP Code:

if (in_array(THIS_SCRIPT ,array('ip_site_information''our_philosophy''sig_advertising''banner_advertising''donations'))) 


Meje 01-02-2010 11:44 PM

ahhhh!!! I was trying to figure out how to get them all in there! Works perfectly! Thank you!! :D

For anyone looking to do this, I have replaced this part of the plug in code:

PHP Code:

if (THIS_SCRIPT == 'ip_site_information'

With this from the post above:
PHP Code:

if (in_array(THIS_SCRIPT ,array('ip_site_information''our_philosophy''sig_advertising''banner_advertising''donations'))) 


MaryTheG(r)eek 01-03-2010 02:01 PM

Hello,

Why I can't add to the left side? I tried:
Code:

$template_hook['navtab_left']
but it didn't worked. Changing to 'navtab_middle' works fine. Actually I want to place it at very first (before Forums). Maybe I need to use a diffent hook place than process_templates_complete ?

Thank you
Maaria

Lynne 01-03-2010 02:07 PM

Quote:

Originally Posted by MicroHellas (Post 1945963)
Hello,

Why I can't add to the left side? I tried:
Code:

$template_hook['navtab_left']
but it didn't worked. Changing to 'navtab_middle' works fine. Actually I want to place it at very first (before Forums). Maybe I need to use a diffent hook place than process_templates_complete ?

Thank you
Maaria

You want navtab_start, not navtab_left. (There is no navtab_left.)

SuperGLS 01-03-2010 03:52 PM

So, after a bit of time reading a bunch of stuff in this thread (coupled with your HOW TO on adding pages) I've got this all figured out.

For the people that seem to be trying to grasp exactly what to do, it's probably best to follow this thread https://vborg.vbsupport.ru/showthread.php?t=228112 in order to create the link.php (or whatever you want to name it). Then everything else will make a lot more sense I think. Because then you'll actually have a webpage, that when you click on Nav Link, you'll be directed to and you'll be able to see the sublink and dropdown menus. After I did that up and read through the thread again it made a bit more sense. I hope that helps some people.

Lynne, you are great! Thanks again.

Because this is plugin form there won't be any problems when we update vB, right?

Lynne 01-03-2010 07:33 PM

Quote:

Originally Posted by SuperGLS (Post 1946082)
Because this is plugin form there won't be any problems when we update vB, right?

Unless they somehow screw up plugin locations or template_hook names or totally change the navbar or something like that, then this should be fine when you update vB.

SuperGLS 01-04-2010 01:34 AM

Thought so. Great! Template edits are just a pain to deal with that's why I love this plguin.

NJAquaman 01-04-2010 11:42 AM

Here is an Add-on i made to help the Nab Tab Drop Down Issues. Its a Easy Plugin code that can be Duplicated for another tab in the same Plugin!

https://vborg.vbsupport.ru/showthread.php?p=1946819

Let Me know If this Works!

Thanks!

OcR Envy 01-06-2010 08:53 PM

Quote:

Originally Posted by MikeWarner (Post 1944792)
Great post Lynne! I'm not that great at hacks, but I managed to get this to work for a CMS news section. I thought others may want to know how to do this too. This is how I did it:

Copy the original vBulletin file "content.php" and save as "about.php" (or whatever filename you wish)

In your new about.php file Change:

Code:

define('CMS_SCRIPT', true);
define('THIS_SCRIPT', 'vbcms');

to
Code:

// define('CMS_SCRIPT', true);
define('THIS_SCRIPT', 'about_ridehub');

Ensure you comment out the first line as shown about, this stops the default CMS section links from showing in the lower area. I used "about_ridehub' for THIS_SCRIPT, but you can use anything you want, just make sure it is unique and set as per this How-To.

Upload your new .php file to forum root.

Make sure the CMS section you want this new nav bar to work with is "Not Published" otherwise Google will find duplicate content. This can be done in the Section Manager in the AdminCP.

Now instead of linking to (for example):
http://www.yoursite.co.uk/content.php/48-About

You can use:
http://www.yoursite.co.uk/about.php/48-About

Add these links to the menu bar, and it should all work ok.

See here for an example:
http://www.ridehub.co.uk/about.php/48-What-is-RideHub


This works until you click on a category or article then it reverts back to selecting home. Any idea on a fix?

MikeWarner 01-07-2010 07:41 AM

Yeah - the items listed within the main page body do refer back to the original php file. I'm trying to think of a way around this. I'll post when I figure it out.


All times are GMT. The time now is 12:36 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.01989 seconds
  • Memory Usage 1,754KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_php_printable
  • (3)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