vBulletin Mods

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

Lynne 18 Nov 2009 15:36

Quote:

Originally Posted by Dave-ahfb (Post 1916579)
How can we change the display order of the navbar. Meaning put new items(per this tutorial), so that they show between "blogs" and "whats new"

There are currently three template_hooks available for adding the tabs (I listed them in the first post). If none of those are located where you want them, then you can just add one into the template where you want it. That will require editing the template though.

crazyace 18 Nov 2009 17:01

Lynne,

Thanks for this awesome guide. So I'm trying to hide the tab from people not logged in. Also I only want some user groups to see it. This is what I have so far.


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

I tried just testing out the if statement first to see if I could only let some user groups see the tab. But that didn't work. Maybe I placed it in the wrong place?

--------------- Added 18 Nov 2009 at 17:07 ---------------

Woot I just fixed it. I put the if statement above the global and it works. Doesn't matter about the member part now. Because if they are not part of the right group it won't even show up. :-)

So here is my answer:

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


Lynne 18 Nov 2009 17:42

You really should have { and } around the whole thing after your if is_member_of statement. Right now, you are basically just saying if is_member_of then make the $template_hook global, which is needed right now for this plugin to work. If they fix the issue of the $template_hook not being global, then suddenly your plugin isn't going to work because it will be made global elsewhere and therefore work.

crazyace 18 Nov 2009 20:13

Ok so something like this?


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

Oh this is the Kallell account by the way :-) With your help we found out how to set up more than one account with access.

Lynne 18 Nov 2009 20:54

Yes, that looks correct - you have the content of the whole plugin in the condition now.

Hello Kallell! Now I recognize you. :)

crazyace 18 Nov 2009 21:57

Quote:

Originally Posted by Lynne (Post 1916773)
Yes, that looks correct - you have the content of the whole plugin in the condition now.

Hello Kallell! Now I recognize you. :)

:)

What about if I want to add two tabs? with one unblocked and the other one set to usergroups. Would it be like this:


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


Lynne 19 Nov 2009 00:45

Quote:

Originally Posted by crazyace (Post 1916824)
:)

What about if I want to add two tabs? with one unblocked and the other one set to usergroups. Would it be like this:

You would copy the plugin and put one after the other, like you did, however just don't wrap the unblocked one with the is_member_of condition AND call $tablinks and $tablselected something different in the second one - like $tablinks2 and $tabselected2.

ngkong 21 Nov 2009 11:26

Quote:

Originally Posted by Lynne (Post 1916271)
I haven't tried many other conditions with this. If you want to do it for a Section, then you would also have to modify the existing navbar to not show the Home tab when you are on that section, otherwise it isn't unique. Right now, the Home tab shows whenever you are in the CMS area of the site. So, you'd have to change that condition to say "in the CMS but NOT in section xx" otherwise both tabs will be highlighted and only one of the submenus will be shown. I'm not sure what the exact condition would be since I'm not that familiar with all the variable names used with the new CMS ($sectionid == 2 ?).

how to find the variable name listing for the CMS? i'm looking anywhere and found nothing. i'm temporary disabling the highlight effect for Home and New Page navigation.

-edit-
i've just removed #navtabs li.selected a.navtab from vbulletin-chrome.css, the navigation structure doesn't make sense. when vbull combined with CMS, features such as calendar, FAQ, photo gallery, friends, group should be global and not under the forum section. they should have it's own link at the parent navigation bar. now i will just manually add navigation links from the template, hope vbull developer will fix this in the future.

Tab to external link?
by j.steensen
22 Nov 2009 14:44

Hello all! I am puzzled. I tried to adopt this with the following code to link to our store on our site.


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

The above doesn't seem to do a thing.

Any help? (I'm not the best in PHP coding...so I appreciate a layman's explaination if possible.)

Lynne 22 Nov 2009 16:30

Is "https://www.scsimulations.com/store/" this a page your wrote yourself? Does it have a line at the top that defines THIS_SCRIPT as STORE like this?

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

When you say it doesn't seem to do anything, are you seeing a tab at all? Do you have the plugin active?

j.steensen 22 Nov 2009 16:56

It sure is....and it wasn't activated...:eek:

Its always the simplest solution.

Appreciate it!

shadowedsoul 25 Nov 2009 21:46

First off, great article it's really helped me in getting my test site going. Is there a way that anyone knows of to have a specific navtab show as selected if a certain article is showing. Basically I guess what i'd need to do is set what the script id is for a specific article. Any ideas?

Lynne 25 Nov 2009 22:11

I am not familiar enough with the new cms to know the answer to that question. You would, however, have to actually do some modifying to some code somewhere since the condition is already set that if you are in the cms, then the Home tab is selected. So, you'd have to change that code to say "if in cms except this article, then the Home tab is selected".

Eric Anderson 26 Nov 2009 10:26

Lynne, I have thehack working but would love to have a sub link on the sub link as you have tab saying Tech with a link saying Carburetors then you have Cleaning Carbs and Jetting. so you would have
Tech>Carbs>cleaning Carbs
and
Tech>Carbs>Jeting
Menu would look like
Carbs
Cleaning
Jetting
What would code be?

Lynne 26 Nov 2009 15:43

Quote:

Originally Posted by Eric Anderson (Post 1921090)
Lynne, I have thehack working but would love to have a sub link on the sub link as you have tab saying Tech with a link saying Carburetors then you have Cleaning Carbs and Jetting. so you would have
Tech>Carbs>cleaning Carbs
and
Tech>Carbs>Jeting
Menu would look like
Carbs
Cleaning
Jetting
What would code be?

I'm not sure I follow you. The article covers how to get submenus. What is your exact plugin, and what is the result and what do you want changed (images would help).


All times are GMT. The time now is 07:42.

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.