The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
I need help Please
Hi,
I am new and need help please, I have created forums each with subforums, I know how to create a link in the navbar, I added the main forum link to the navbar to be accessbile from the navbar and from the admincp - setting - options - Fourm home page option - Show Forum Button - and I displayed the link to the Forum Page on the navigation bar. The problem: 1. Forum Page on the navigation bar is still showing. 2. When I select one of the new pages I created it shows that the Forum Page tab that I displayed is selected instead of the one I clicked. Can you please tell me how to correct this, Thanks |
#2
|
||||
|
||||
What method did you use to add the navtab - there are several.
I would guess you need to use a unique condition to show your navtab as selected. Perhaps your condition isn't unique or isn't valid? |
#3
|
|||
|
|||
Hi,
I have tried the following 2 methods but I get the same problem with both of them. HTML Code:
https://vborg.vbsupport.ru/showthread.php?t=226914 HTML Code:
https://vborg.vbsupport.ru/showthread.php?t=245826 Also would you please explain what did you mean by "you need to use a unique condition to show your navtab as selected" Thanks |
#4
|
||||
|
||||
In the top thread you linked to, you will see this at the top of the plugin you need to create:
PHP Code:
Quote:
|
#5
|
|||
|
|||
Here How I did it
$tabselected = ''; $tablinks = ''; if (THIS_SCRIPT == 'Shop') { $vbulletin->options['shop']='unique_name'; $tabselected = ' class="selected"'; $tablinks = ' <ul class="floatcontainer"> <li><a href="http://www.christian-gate.net/cgforum/forumdisplay.php?2-Christian-Gate-Main-Forum">shop</a></li> <li class="popupmenu"> <a href="javascript://" class="popupctrl">Drop Down</a> <ul class="popupbody popuphover"> <li><a href="sublink1.php">SubLink 1</a></li> <li><a href="sublink2.php">SubLink 2</a></li> <li><a href="sublink3.php">SubLink 3</a></li> </ul> </li> <li><a href="link2.php">Link 2</a></li> <li><a href="link3.php">Link 3</a></li> </ul> '; } $template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="http://www.christian-gate.net/cgforum/forumdisplay.php?2-Christian-Gate-Main-Forum">Shop Forum</a>'.$tablinks.'</li>' ; Thanks |
#6
|
||||
|
||||
And you have a custom script that, in the custom php page, you define the variable THIS_SCRIPT to be Shop? I thought this was a forum? You can't use THIS_SCRIPT to be unique if it's a forum. You should look at the article on conditions to find a condition if it's a forumid you need.
You also shouldn't leave this line as is: PHP Code:
|
#7
|
|||
|
|||
"And you have a custom script that, in the custom php page, you define the variable THIS_SCRIPT to be Shop? I thought this was a forum? You can't use THIS_SCRIPT to be unique if it's a forum.
Yes it's a forum made as a shop and named "shop" and has subforums. I have created 3 forums each with subforums, I need to use this script to add the 3 forums to the navbar each with it's own name ( Service) eg the forum for advertising stuff for sale will be called "shop" and so on, also I want it to be only be accessible from the navbar so I need to disable the "Forum Navbar" that give access to all the forums list. So this forums been created from the admincp - Forums & Moderators - add new forum Not as custom php page Thanks |
#8
|
|||
|
|||
And you have a custom script that, in the custom php page, you define the variable THIS_SCRIPT to be Shop? I thought this was a forum? You can't use THIS_SCRIPT to be unique if it's a forum.
It's a forum not custom php page, Called "shop" You can't use THIS_SCRIPT to be unique if it's a forum, so what's it used for? Thanks |
#9
|
||||
|
||||
THIS_SCRIPT is a variable that is defined on the top of most pages. Open the forumdisplay.php page and you'll see:
PHP Code:
PHP Code:
PHP Code:
|
#10
|
|||
|
|||
Hi,
I have 3 questions, sorry I am taking a lot of your time. 1. when I change the if ($GLOBALS['forumid'] == xx) I will be able to make the forum name (shop) appear in the navbar? 2. What do I do when I need to add more forums in the same way? 3. Where can I find "if ($GLOBALS['forumid'] == xx)" Thanks so much |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|