I'm sorry if I'm making this out to be more complicated than it needs to be, but I must be missing something. Here is your code from the first page:
PHP Code:
PHP Code:
|
THIS_SCRIPT is defined at the top of the php page, not some browser page, but in the actual code. Open up the file called forum.php that you downloaded from vbulletin.com to install on your server and you will see the line I am talking about.
I don't think (or rather, I don't know of the condition) you can do this for a CMS page. All those pages are using the content.php page and right now, if you are on a content.php page, the Home link is highlighted. I don't know what the condition is for a particular Article, which is what it sounds like you want to do. You'd have to look in through the code to figure that out and I haven't got that far into the CMS yet. |
So you're saying I do need to create a custom vBulletin page, and this NavBar technique can't work with a CMS created page, right?
|
Quote:
|
1 Attachment(s)
Lovely it works like a charm, lynne to the rescue ;)
:D |
It work in RC2?? because the selected function and the drop down menu doesn't appear for me.
|
Quote:
|
on my RC2 the function selected doesn't work....
|
Quote:
|
This is what i use
PHP Code:
|
I noticed someone else attempting to have the plugin work for multiple pages, they solved it but didn't share how they did so.
I am also attempting to have the same tab be highlighted for multiple pages (the ones linked in the navbar when you click on the tab), but can't seem to figure it out. Any help would be much appreciated! http://www.npac.ca/2010 |
Quote:
Quote:
|
Oh actually they are not all set up just yet. It works as it should for 'Contests' - however I want Contests to remain highlighted when on the pages within that section.
From: http://npac.ca/2010/contests.php Contests -> NPOY 2009 -> Information & Rules Takes you to: http://npac.ca/2010/poy2009.php Above is where I am working on first, and trying to figure out how to get it working for that page before moving on to the rest (which still need to be created). This is my first time working with vBulletin, so am still getting used to conditions. I'm more of a designer than developer, but do have a firm understanding when it comes to the code. |
Quote:
|
Quote:
PHP Code:
PHP Code:
Quote:
|
Lynne,
I am trying to set up a tab, and link it to a forum, basically a section kind like how Vbulletin.org has it. However, when I try to set an array on forums inside the sub, it wont highlight. Here is my condition I have set. Code:
if (in_array($forum['forumid'], array(13,22))) Nevermind...lol figured it out. If anyone else needs this the code is: Code:
if (in_array($foruminfo['forumid'], array(13,22,35,19,24,59,60,93,94,36,61,62,21))) |
Thanks Lynne,
That condition you wrote did not work, but I found a simpler solution: I simply defined THIS_SCRIPT as 'contests' in poy2009.php Not sure if that will cause any conflicting problems, but it seems to be working fine. |
Quote:
Maria |
Quote:
Actually I had to Quote:
|
Thank you Lynne, this is extremely helpful :)
|
Thanks, Lynne! Worked perfectly for me with no issues.
Edit: One quick question, is there a way to use a condition to show the sublinks/dropdown links to just a certain usergroup? I tried a template condition, but that didn't work. |
Quote:
|
Sorry about that, I just read the entire thread and saw that.
Thanks again |
I just want to add in a simple link on the nav bar so I tried this and tried just removing the navlinks section of the code. The result was that my Blogs link disappeared and that was all.
What do I need to do to make this just a link on the nav bar to an external site (the add-on has problems and I'd prefer to have everything done "properly") |
There are mods to just add a simple link with no submenu. You are probably better off just using one of them.
|
Hello!
Ive read through the entire thread, and managed to get it all working by the end!! Thanks Lynne, for all your detailed replies, it really helped me to get it working. Im stuck at one last thing though.......how do I get all the links in the sub menu to stay on the new tab when you click on them? I have all my links in the sub menus going to VB Pages Ive created myself. But when I click on each link, while it takes me to the new VB page Ive created, the tab and submenu returns to the Forum tab. Ive played around with it a bit, but cant figure out how to make it work with multiple pages.....? Please let me know if you need any additional info to help you understand what it is Im trying to do. |
Is there a way to replace tabs with images?
|
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); Code:
// define('CMS_SCRIPT', true); 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 |
Quote:
PHP Code:
PHP Code:
|
1 Attachment(s)
Thanks for the reply Lynne.
I want the tab to stay selected, when I am on any of the pages in the submenu of the new tab. Looks like it might be easier to show you the code? Its only going to make it easier for others trying to do the same thing to understand too :) I have created a new tab called "Site Info'. I have also created my own VB page for it to link to. This is the code for the plug in: PHP Code:
PHP Code:
I have 4 other VB pages I created myself. They are the the ones listed in the submenu of the new tab "Site Info' See first image attached. For these 4 links in the submenu, the condition in each of their VB pages is as follows: Our Philosophy Page: PHP Code:
Sig Advertising Page: PHP Code:
PHP Code:
PHP Code:
|
Try this then (I think I got them all):
PHP Code:
|
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:
PHP Code:
|
Hello,
Why I can't add to the left side? I tried: Code:
$template_hook['navtab_left'] Thank you Maaria |
Quote:
|
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? |
Quote:
|
Thought so. Great! Template edits are just a pain to deal with that's why I love this plguin.
|
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! |
Quote:
This works until you click on a category or article then it reverts back to selecting home. Any idea on a fix? |
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 04:43 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|