Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 13 Aug 2010, 06:20
Kyle55155 Kyle55155 is offline
 
Join Date: Mar 2010
the define('THIS_SCRIPT', 'vbcms);

Its getting late and I'm tired. I must be doing something really dumb here.

I have a custom page that when selected I was the CMS button to show as active. I've set the define('THIS_SCRIPT', 'vbcms);

But when I choose that it ignores my setting and instead makes the forums button active. I can get one of my added home button to show as active but can't seem to get the cms button to show as active.

Anybody know what I'm doing wrong here?
Reply With Quote
  #2  
Old 13 Aug 2010, 15:20
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You want the Home button to show as active when you click on your custom script? Take a look at the actual condition that makes the Home button active - you'll find it in the plugin "Navbar: Insert CMS Navbar Entry". Nowhere in there does it have anything regarding THIS_SCRIPT being equal to "vbcms", so that isn't going to 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
  #3  
Old 13 Aug 2010, 19:29
Kyle55155 Kyle55155 is offline
 
Join Date: Mar 2010
Originally Posted by Lynne View Post
You want the Home button to show as active when you click on your custom script? Take a look at the actual condition that makes the Home button active - you'll find it in the plugin "Navbar: Insert CMS Navbar Entry". Nowhere in there does it have anything regarding THIS_SCRIPT being equal to "vbcms", so that isn't going to work.
Thanks Lynn,

Boy I must have been tired. I just read what I posted and it doesn't even make sense! Ok I'm awake now.

on the CMS part of my site http://roadbikefever.com/content/

I have a link (Publish my article) to a custom page. When you go to http://roadbikefever.com/publish.php I want the CMS button (articles and reports) to remain selected.

I know how to do this when I want one of my custom buttons to be selected when you choose one of my custom pages but its not working for the CMS button. I thought I could just populate the "this_script=" value on the publish.php page to vbcms.

I have temporarily set the this_script value to my added home button.
Is that the wrong value? Is there another way to do this?

Thanks
Reply With Quote
  #4  
Old 13 Aug 2010, 20:52
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Did you look at the plugin code I told you to look at? Nowhere in there does it use THIS_SCRIPT to decide if the home tab should be highlighted or not. So, you either need to change your code to use what is in the plugin, or change the plugin condition to work with your 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
  #5  
Old 13 Aug 2010, 21:05
Kyle55155 Kyle55155 is offline
 
Join Date: Mar 2010
Lynn,

I misspoke in my first post in this thread.

I have created lots of additional tabs before. This is the plugin code for my home tab:

$tabselected = '';
$tablinks = '';
if (THIS_SCRIPT == 'home' or THIS_SCRIPT == 'home2')
{
$vbulletin->options['selectednavtab']='home1';
$tabselected = ' class="selected"';
$tablinks = ' <ul class="floatcontainer">
<li><a href="shoplist.php">Bike Shop Reviews</a></li>
<li></li>

</ul> ';

}
$template_hook['navtab_start'] .= '<li'.$tabselected.'><a class="navtab" href="http://roadbikefever.com">Home</a>'.$tablinks.'</li>' ;

On my custom pages if I set the this_script = value to home or home2 when I select those pages the home button will show as selected.

In this instance I am not using one of my custom tabs instead I am trying to get the default CMS tab (which I have renamed "articles and reports' via phrase manager") to show as selected when I launch another one of my custom pages (publish.php).

Ok I see that the required conditions appear to be:

if (defined('CMS_SCRIPT') AND class_exists('vBCms_Navbar'))

I see that
define('CMS_SCRIPT', true);

is in content.php.


Not sure what other line I need to add to publish.php in order to satisfy the second part of the if statement in Navbar: Insert CMS Navbar Entry

class_exists('vBCms_Navbar'))

Last edited by Kyle55155; 13 Aug 2010 at 21:29.
Reply With Quote
  #6  
Old 13 Aug 2010, 22:33
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
As you posted - these are the conditions that need to be true in order for the CMS tab to be highlighted:

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

Most likely, unless you include the correct files in your custom page, you will not be able to meet the second part of the condition. So, it may be easiest if you modify that condition to add your own... add an OR in there:

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
Reply



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

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 17:56.

Layout Options | Width: Wide Color: