Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #46  
Old 18 Nov 2009, 14:36
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by Dave-ahfb View Post
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.
__________________
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
  #47  
Old 18 Nov 2009, 16:01
crazyace's Avatar
crazyace crazyace is offline
 
Join Date: Oct 2009
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 16: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.


Last edited by crazyace; 18 Nov 2009 at 20:59. Reason: Auto-Merged DoublePost
Reply With Quote
  #48  
Old 18 Nov 2009, 16:42
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
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
  #49  
Old 18 Nov 2009, 19:13
crazyace's Avatar
crazyace crazyace is offline
 
Join Date: Oct 2009
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.

Last edited by crazyace; 18 Nov 2009 at 21:00.
Reply With Quote
  #50  
Old 18 Nov 2009, 19:54
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Yes, that looks correct - you have the content of the whole plugin in the condition now.

Hello Kallell! Now I recognize you.
__________________
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
  #51  
Old 18 Nov 2009, 20:57
crazyace's Avatar
crazyace crazyace is offline
 
Join Date: Oct 2009
Originally Posted by Lynne View Post
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.

Reply With Quote
  #52  
Old 18 Nov 2009, 23:45
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by crazyace View Post


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.
__________________
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
  #53  
Old 21 Nov 2009, 10:26
ngkong ngkong is offline
 
Join Date: May 2008
Originally Posted by Lynne View Post
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.

Last edited by ngkong; 21 Nov 2009 at 10:49.
Reply With Quote
  #54  
Old 22 Nov 2009, 13:44
j.steensen j.steensen is offline
 
Join Date: Nov 2009
Real name: John Steensen
Tab to external link?

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.)
Reply With Quote
  #55  
Old 22 Nov 2009, 15:30
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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?
__________________
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
  #56  
Old 22 Nov 2009, 15:56
j.steensen j.steensen is offline
 
Join Date: Nov 2009
Real name: John Steensen
It sure is....and it wasn't activated...

Its always the simplest solution.

Appreciate it!
Reply With Quote
  #57  
Old 25 Nov 2009, 20:46
shadowedsoul's Avatar
shadowedsoul shadowedsoul is offline
 
Join Date: Feb 2009
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?
Reply With Quote
  #58  
Old 25 Nov 2009, 21:11
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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".
__________________
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
  #59  
Old 26 Nov 2009, 09:26
Eric Anderson Eric Anderson is offline
 
Join Date: Oct 2009
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?
Reply With Quote
  #60  
Old 26 Nov 2009, 14:43
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by Eric Anderson View Post
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).
__________________
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
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 08:46.

Layout Options | Width: Wide Color: