Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #61  
Old 26 Nov 2009, 18:50
Eric Anderson Eric Anderson is offline
 
Join Date: Oct 2009
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.

Attached Images
File Type: jpg Techhelp.JPG (37.1 KB, 98 views)

Last edited by Eric Anderson; 26 Nov 2009 at 18:57.
Reply With Quote
  #62  
Old 26 Nov 2009, 18:53
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #63  
Old 30 Nov 2009, 22:33
Anseur's Avatar
Anseur Anseur is offline
 
Join Date: Jun 2004
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
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.
Reply With Quote
  #64  
Old 30 Nov 2009, 22:50
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
This post shows how to use conditions to add the links - http://www.vbulletin.org/forum/showp...6&postcount=28 See if that helps.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #65  
Old 01 Dec 2009, 10:15
Anseur's Avatar
Anseur Anseur is offline
 
Join Date: Jun 2004
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.
Reply With Quote
  #66  
Old 01 Dec 2009, 16:34
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.

__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #67  
Old 01 Dec 2009, 17:18
Anseur's Avatar
Anseur Anseur is offline
 
Join Date: Jun 2004
Originally Posted by Lynne View Post
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.

Originally Posted by Lynne View Post
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.

Last edited by Anseur; 01 Dec 2009 at 17:41.
Reply With Quote
  #68  
Old 01 Dec 2009, 17:27
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by Anseur View Post
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #69  
Old 02 Dec 2009, 23:07
oooh em geee oooh em geee is offline
 
Join Date: Nov 2009
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

Last edited by oooh em geee; 02 Dec 2009 at 23:57. Reason: Auto-Merged DoublePost
Reply With Quote
  #70  
Old 02 Dec 2009, 23:59
oooh em geee oooh em geee is offline
 
Join Date: Nov 2009
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
Attached Images
File Type: jpg ref1.jpg (19.9 KB, 55 views)
File Type: jpg ref2.jpg (20.1 KB, 47 views)
Reply With Quote
  #71  
Old 03 Dec 2009, 00:40
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by oooh em geee View Post
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.)
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #72  
Old 03 Dec 2009, 00:42
oooh em geee oooh em geee is offline
 
Join Date: Nov 2009
I made a new thread about this. If you can help me please go here:
http://www.vbulletin.org/forum/showt...54#post1924354
Reply With Quote
  #73  
Old 04 Dec 2009, 21:31
JarkkoL JarkkoL is offline
 
Join Date: Nov 2009
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.

Last edited by JarkkoL; 04 Dec 2009 at 21:42.
Reply With Quote
  #74  
Old 04 Dec 2009, 21:45
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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).
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #75  
Old 08 Dec 2009, 01:10
thunderclap82 thunderclap82 is offline
 
Join Date: Dec 2008
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.

Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 02:52.

Layout Options | Width: Wide Color: