vBulletin ModsThe Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=226914 |
1 Attachment(s)
Thanks for the quick reply... Great article. In the attachment you can see that I have it working. What I am looking to do is add a sub menu to the sub menu. I have the Tech Area tab then the sub menu that has Carbs trying to add a sub menu to carbs so it will have Cleaning link and Jetting link. So basically making when you click on carbs it does not take you to Carbs.php but opens a sub menu that would have links to jetting.php and Cleaning.php
Thanks Eric
|
I don't know how to add a submenu to a submenu as I haven't tried to do that. You'll have to play with the css to do that.
|
Is there any way to use vb if statements with this mod?
I tried wrapping certain links under the custom tab in the
(I only wish admins/mods to be able to see a certain link) but it completely breaks this plugin, you get a Quote:
Does perhaps some other function have to be called in either this or the .php page in question? (I'm using the custom php page Lynne posted an article on in conjunction with this plugin) the same vb if statement works if I put it elsewhere within a template that apears on the page, but I would like the link in question to be in the navbar and not in the body. |
This post shows how to use conditions to add the links - http://www.vbulletin.org/forum/showp...6&postcount=28 See if that helps.
|
I actualy tried that way of doing it too, what happens if with is, the if conditional just gets put in the navbar as plain text, as if vb is not seeing it as a conditional. I notice the syntax highlighting on the plug code input page also doesn't color the extra if statement in green like the if statement at the top for the 'this_script ==' one.
Here's my complete code for the navtab plugin:
I tried putting the conditional before the first <li> on the top most popup control, before the <a> just below it, and where you see it now. (with the bracket closed in the appropriate place in each instance. same thing happens on each occasion. Only difference I can see in the example you gave and my version, is I'm trying to hide an entire popup control to non admins, your example just tries to hide a link. |
I'd suggest you start over with the plugin because you've totally messed up the structure of the submenu.
The reason why you are ending up with the condition showing up in the code is because you are putting it there. Look again at the code I wrote. You need to *end* your writing to the variable $tablinks, then do the condition and add to $tablinks if the condition is true, and then continue writing to it later on. But, you need to break out of writing to it in order to do the condition - you just put the condition right in the middle of it! Basically:
|
Quote:
Quote:
Thanks again. |
Quote:
|
I did everything you said in the first post, and it works perfectly. There is only one thing I can't figure out.
If I click the links below the button, link1.php for example, it doesn't keep that button selected. It highlights the forum button again. Is there anyway I can put multiple "yourpage" names in that code so it keeps the button highlighted even when going to a page by clicking a link below the button? if (THIS_SCRIPT == 'yourpage') --------------- Added 02 Dec 2009 at 23:13 --------------- NVM fixed it |
2 Attachment(s)
I fixed the first issue I had, but I have another question. In my images you can see what I mean.
I want the second image, the affiliate one, to show home in front of it as well. Just like in the first image. How can I change that? Like it says: Home > Frontpage And the other one only says: Affiliates |
Quote:
|
I made a new thread about this. If you can help me please go here:
http://www.vbulletin.org/forum/showt...54#post1924354 |
Okay, so I was able to add a link to the navbar with this tutorial. But when I click on the link I just got white page and not the result you have in the screenshot. I tried to add link.php from your other tutorial, but it didn't change anything. What am I doing wrong? Sorry for the noob question (:
Edit: Aah, nevermind. In the link.php I was using caps for the template name like in the test.php. Didn't realize it was the template name I created until now that I rechecked the code. |
This sounds like a problem from your custom page, not this tutorial. You should ask questions about the custom page in the other article, not here (it gets confusing if you mix up articles and problems).
|
Do you have to create your own vBulletin page to use this? I created a section and am trying to use this tutorial to go to that section, yet I can't get the navbar to highlight. Here is the code as I have it now (I removed the submenu link code):
|
All times are GMT. The time now is 22:45. |
Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.