Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #76  
Old 08 Dec 2009, 01:59
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
No, you do not need to create your own vB page to use it. Right now, your code shows that your tab should be selected when you are on a page where THIS_SCRIPT is defined as podcast. Perhaps you meant to use something like this instead?

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
  #77  
Old 08 Dec 2009, 02:13
thunderclap82 thunderclap82 is offline
 
Join Date: Dec 2008
Originally Posted by Lynne View Post
No, you do not need to create your own vB page to use it. Right now, your code shows that your tab should be selected when you are on a page where THIS_SCRIPT is defined as podcast. Perhaps you meant to use something like this instead?

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


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

with


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

I tried this but get a PARSE error.

Maybe that's where I'm getting confused. How do you define a page as something like 'podcast'?

Last edited by thunderclap82; 08 Dec 2009 at 02:28.
Reply With Quote
  #78  
Old 08 Dec 2009, 03:17
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
If you replaced it with exactly what you wrote, then yes, you will get a parse error because you are missing the end parenthesis.

At the top of each vb page is something like this:

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

That defines the page name. So, if you are going to have the tab highlight because you are on a specific page, that is the best method to use. But, you can use other valid conditions also as long as they don't interfere with the conditions to have another tab highlighted.
__________________
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
  #79  
Old 08 Dec 2009, 04:28
thunderclap82 thunderclap82 is offline
 
Join Date: Dec 2008
Originally Posted by Lynne View Post
If you replaced it with exactly what you wrote, then yes, you will get a parse error because you are missing the end parenthesis.

At the top of each vb page is something like this:

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

That defines the page name. So, if you are going to have the tab highlight because you are on a specific page, that is the best method to use. But, you can use other valid conditions also as long as they don't interfere with the conditions to have another tab highlighted.
Maybe I wasn't clear. Where do I find the pages where I need to replace the 'define'? I know you said at the top of every vB page, but where do I find those? Sorry if this is a novice question.
Reply With Quote
  #80  
Old 08 Dec 2009, 05:03
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by thunderclap82 View Post
Maybe I wasn't clear. Where do I find the pages where I need to replace the 'define'? I know you said at the top of every vB page, but where do I find those? Sorry if this is a novice question.
Did you look at any of the pages? The line I quoted in my last post is line
17 in the online.php page. And line 17 of the forum.php page defines THIS_SCRIPT for that page to be 'index'. And for content.php, THIS_SCRIPT is defined at 'vbcms'. I believe any page in vb that you can land on has got THIS_SCRIPT defined at the top. And you don't want to replace those lines, I'm not sure why you would think you would want to do that. Those lines are there so you can write conditions like the one I use for when you are on that page. If you wrote your own page, you would give it your own definition for THIS_SCRIPT.
__________________
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
  #81  
Old 08 Dec 2009, 05:15
thunderclap82 thunderclap82 is offline
 
Join Date: Dec 2008
I'm sorry if I'm making this out to be more complicated than it needs to be, but I must be missing something. Here is your code from the first page:


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

I replaced 'yourpage' with 'podcast', and 'unique_name' with 'podcast'. I also changed the 'Nav Link' href and name at the bottom of the script to look like:


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

It appears to me that these are the only changes required. What I don't understand is where I'm suppose to find the define('THIS_SCRIPT', '<name>');. You said it's at the top of the page, so I went to the actual podcast CMS page I created and looked at the Page Source in my browser but this code doesn't exist. So where is it located?
Reply With Quote
  #82  
Old 08 Dec 2009, 06:07
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
THIS_SCRIPT is defined at the top of the php page, not some browser page, but in the actual code. Open up the file called forum.php that you downloaded from vbulletin.com to install on your server and you will see the line I am talking about.

I don't think (or rather, I don't know of the condition) you can do this for a CMS page. All those pages are using the content.php page and right now, if you are on a content.php page, the Home link is highlighted. I don't know what the condition is for a particular Article, which is what it sounds like you want to do. You'd have to look in through the code to figure that out and I haven't got that far into the CMS yet.
__________________
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
  #83  
Old 08 Dec 2009, 15:59
thunderclap82 thunderclap82 is offline
 
Join Date: Dec 2008
So you're saying I do need to create a custom vBulletin page, and this NavBar technique can't work with a CMS created page, right?
Reply With Quote
  #84  
Old 08 Dec 2009, 16:04
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by thunderclap82 View Post
So you're saying I do need to create a custom vBulletin page, and this NavBar technique can't work with a CMS created page, right?
No, you don't need to create a custom page. That condition I posted is an EXAMPLE of a condition to use. Most people will use THIS_SCRIPT as the condition. But, you could use forumids or threadids or who-knows-what-else - as long as the condition is UNIQUE. And, I don't know that it won't work on a CMS created page. It probably could if you find the correct unique condition. I simply don't know what that condition would be since I haven't looked that closely into the CMS pages and the attributes that are passed to them.
__________________
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
  #85  
Old 15 Dec 2009, 11:03
Vaupell's Avatar
Vaupell Vaupell is offline
 
Join Date: Apr 2008
Real name: Martin
Lovely it works like a charm, lynne to the rescue

Attached Images
File Type: jpg spacer.JPG (46.4 KB, 97 views)
__________________
My website Evisystems
- - - Stuff - - -
follow the white rabbit, feed! your head
Reply With Quote
  #86  
Old 16 Dec 2009, 10:37
I.am I.am is offline
 
Join Date: Mar 2009
It work in RC2?? because the selected function and the drop down menu doesn't appear for me.
Reply With Quote
  #87  
Old 16 Dec 2009, 17:33
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by I.am View Post
It work in RC2?? because the selected function and the drop down menu doesn't appear for me.
Worked fine for me in RC2 and in the current version, RC4.
__________________
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
  #88  
Old 16 Dec 2009, 20:09
I.am I.am is offline
 
Join Date: Mar 2009
on my RC2 the function selected doesn't work....
Reply With Quote
  #89  
Old 17 Dec 2009, 00:08
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by I.am View Post
on my RC2 the function selected doesn't work....
Then you probably don't have your condition written correctly, but from the (non-existant) information you've posted, it's hard to say.
__________________
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
  #90  
Old 17 Dec 2009, 09:14
I.am I.am is offline
 
Join Date: Mar 2009
This is what i use


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

But when the page is selected the button doesn't work properly.
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:36.

Layout Options | Width: Wide Color: