vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=226914

Eric Anderson 26 Nov 2009 18:50

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

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Lynne 26 Nov 2009 18:53

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.

Anseur 30 Nov 2009 22:33

Is there any way to use vb if statements with this mod?

I tried wrapping certain links under the custom tab in the


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

(I only wish admins/mods to be able to see a certain link)

but it completely breaks this plugin, you get a
Quote:

Parse error: syntax error, unexpected T_STRING in /home/anseur/public_html/vb4test/includes/class_bootstrap.php(386) : eval()'d code on line 23
message from vb at the top of the custom page.

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.

Lynne 30 Nov 2009 22:50

This post shows how to use conditions to add the links - http://www.vbulletin.org/forum/showp...6&postcount=28 See if that helps.

Anseur 01 Dec 2009 10:15

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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.

Lynne 01 Dec 2009 16:34

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Anseur 01 Dec 2009 17:18

Quote:

Originally Posted by Lynne (Post 1923559)
I'd suggest you start over with the plugin because you've totally messed up the structure of the submenu.

Nah, no need. It's not 'messed up' it's layout is exactly how I intend it to look, with multiple drop downs etc. It works perfectly without the condition in it.

Quote:

Originally Posted by Lynne (Post 1923559)
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

From this example I understand. I'm not really a coder so I didn't understand what the $tablinks did, now with that example, I do.

Thanks again.

Lynne 01 Dec 2009 17:27

Quote:

Originally Posted by Anseur (Post 1923575)
Nah, no need. It's not 'messed up' it's layout is exactly how I intent it to look, with multiple drop downs etc. It works perfectly without the condition in it.

Maybe I did something weird on my end, but when I tried it, it did some wacky things.

oooh em geee 02 Dec 2009 23:07

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

oooh em geee 02 Dec 2009 23:59

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

Lynne 03 Dec 2009 00:40

Quote:

Originally Posted by oooh em geee (Post 1924343)
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

That has nothing to do with this article - you are asking about the navbits code. You should ask for help modifying that code out in the main vb4 forums. (And actually, I believe it is a problem with your affiliates page and the way your wrote the navbits code, so you should post that part of your code when you ask for help.)

oooh em geee 03 Dec 2009 00:42

I made a new thread about this. If you can help me please go here:
http://www.vbulletin.org/forum/showt...54#post1924354

JarkkoL 04 Dec 2009 21:31

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.

Lynne 04 Dec 2009 21:45

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).

thunderclap82 08 Dec 2009 01:10

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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View 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.