vBulletin Mods

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

cellarius 19 Feb 2010 08:25

Quote:

Originally Posted by samiro (Post 1986170)
hii - i donnt want to make what you do in this articles

If you start a post in an article thread with this sentence, you can be sure that you are off topic. Because article threads are for what is discussed in the article. If you want to do something else, you need to open your own thread.

Bacon Butty 19 Feb 2010 18:03

Thanks very much for this (and your create own page tutorial) Lynne, your work is massively appreciated.

Can I be a pain and ask your advice? I am attempting to include two tabs on my test forum. One works fine, not a problem but the second tab doesn't remain highlighted once clicked. I've read through the thread and fiddled with it for over an hour, any possible chance you could have a look at my code and identify the problem?

Working Tab;


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

Tab that isn't working (and by not working, I mean not highlighted once clicked);


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

;

:confused:

Lynne 19 Feb 2010 21:28

Quote:

Originally Posted by Bacon Butty (Post 1986560)
Thanks very much for this (and your create own page tutorial) Lynne, your work is massively appreciated.

Can I be a pain and ask your advice? I am attempting to include two tabs on my test forum. One works fine, not a problem but the second tab doesn't remain highlighted once clicked. I've read through the thread and fiddled with it for over an hour, any possible chance you could have a look at my code and identify the problem?

:confused:

You have both tabs going to the newsfeed.php page. How is it supposed to know which tab to highlight when the link is the same? It doesn't know which tab you are clicking on to get there. It decides which to highlight based on your condition which is based on THIS_SCRIPT.

Bacon Butty 19 Feb 2010 22:27

Thanks but still having the same problem Lynne after changing the bottom link to a unique page.

Lynne 19 Feb 2010 23:19

Quote:

Originally Posted by Bacon Butty (Post 1986766)
Thanks but still having the same problem Lynne after changing the bottom link to a unique page.

Well, this is you condition in the second plugin:

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

Did you define THIS_SCRIPT in your page? If you didn't define it there, then it will default to the Forum link.

Bacon Butty 21 Feb 2010 12:20

Quote:

Originally Posted by Lynne (Post 1986836)
Well, this is you condition in the second plugin:

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

Did you define THIS_SCRIPT in your page? If you didn't define it there, then it will default to the Forum link.

Doh! Of course I didn't, because that would have been too easy.

Thanks Lynne. All sorted now! :)

esmforum 26 Feb 2010 07:49

I just tried adding a new tab in navtab. I have suceeded adding a tab.
But I still have questions to get it working fully. So please help me out.

I added a new tab called 'product' in navtab.
Q1) Do I have to create a page for product as a php file?
Q2) if so where do I upload the php file? which folder?
Q3) After making the file and link it with the 'product'tab, would submenus show up? Currently 'product' tab is linked to index.php for testing purpose. Therefore it highlights 'home' tab and shows home's submenues.

Lynne 26 Feb 2010 15:34

Quote:

Originally Posted by esmforum (Post 1991808)
I just tried adding a new tab in navtab. I have suceeded adding a tab.
But I still have questions to get it working fully. So please help me out.

I added a new tab called 'product' in navtab.
Q1) Do I have to create a page for product as a php file?
Q2) if so where do I upload the php file? which folder?
Q3) After making the file and link it with the 'product'tab, would submenus show up? Currently 'product' tab is linked to index.php for testing purpose. Therefore it highlights 'home' tab and shows home's submenues.

1) No, but the page should exist or why link to it?
2) Wherever you said it was supposed to link to in your tab (same folder as other vbulletin files?)
3) Only if you write the condition correct about when to show the submenus and make the tab 'selected'. In my example, the condition is based about THIS_SCRIPT, so if you define THIS_SCRIPT in the products.php page, then use it in your condition like in the example.

shooptek 01 Mar 2010 02:22

Hey Lynne,
First off let me say that this guide has been incredibly helpful for me. I love being able to customize the tabs, and your instructions were easy enough to follow.

I have a good amount of experience with VB, but I have hit a snag. I did some reading in this thread, some searching of this thread (as well as google) and still have not been able to find a solution to my problem.

I am using VB 4.0.2 Suite with the CMS as the homepage. I have a number of different "Sections" set up in my CMS, and I would like each section to have its own button on the NavBar Tabs. This causes me problems because when I set it up so that a section (lets call it "Events") has its own button, even though I have set a custom THIS_SCRIPT setting for the plugin, the home button is still "selected" on the navbar. I believe this is because the "Events" page still is generated from the content.php file, and this is causing the problem with the THIS_SCRIPT setting, as they would be the same. Is my thinking correct?

If so, is there anything I can do to work around this?

Thanks in advance!

Lynne 01 Mar 2010 04:55

The conditions for showing the HOME tab to be 'selected' are in the plugin for the Home tab - Navbar: Insert CMS Navbar Entry. You would have to rewrite that condition so the tab is not selected when you want one of your other tabs to be selected.

shooptek 01 Mar 2010 17:22

Is there an easier way to do so or maybe a guide I could follow? I dont have much experience with vBulletin Conditionals.

Thanks

Wilfred1 04 Mar 2010 20:44

1 Attachment(s)
This is great however the only issue I have found is the height of the navbar isn't consistent.

Here is what I mean:
Attachment 113573

This is my plugin code:

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

The other thing is the above code seems very inefficient to me - I will probably have another few more tabs as well so it would need to be stepping through a lot just to create the tabs and sub menus or in the scheme of things going through this code each time a page is displayed is not worth worring about - any thoughts?

Lynne 05 Mar 2010 01:05

Quote:

Originally Posted by Wilfred1 (Post 1997200)
This is great however the only issue I have found is the height of the navbar isn't consistent.

Here is what I mean:
Attachment 113573

The other thing is the above code seems very inefficient to me - I will probably have another few more tabs as well so it would need to be stepping through a lot just to create the tabs and sub menus or in the scheme of things going through this code each time a page is displayed is not worth worring about - any thoughts?

You will have to look at your code using something like firebug to see why it is doing what it is doing. I can't tell from the image.

As for it being inefficient, I wrote this just to add a single tab. I suppose it could be modified slightly to make it more efficient when you add several tabs, but I really don't know that it would make a huge impact.

Wilfred1 05 Mar 2010 01:20

Thanks Lynn - have worked out that if you don't have a sub menu under a tab you will get that inconsistency in the navbar height so I have added a sub menu like "About", "Site Rules" etc and that fixed it.

Any suggestions on how I could make it more efficient so I can have tabs across the page - thanks!

Adan0s 06 Mar 2010 18:12

unfortunately this just doesn't work for me. i added the plugin with the exact things you posted in your entry post (just to see, if it works) and it doesn't even generate a navtab, even though the plugin is activated. I'm on vB 4.0.2 PL1

EDIT: okay nvm. i had to enable the plugins globally. :D


All times are GMT. The time now is 21:54.

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.