Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 03 Feb 2010, 21:44
Pitman's Avatar
Pitman Pitman is offline
 
Join Date: Dec 2001
Foruminfo variables and conditionals in header template?

Is it still possible to use variables such as $foruminfo[title_clean] and $foruminfo[description] in conditional statements from the header template in 4.x? I've tried several different ways to try to get it to work, but so far have not had much luck.

The following doesn't seem to work from the header template:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

In 3.8.x I used:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


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

How would I go about recreating these conditional statements for the header template 4.x?

Any help would be extremely appreciated!

Thanks
Reply With Quote
  #2  
Old 03 Feb 2010, 21:55
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
I think this has been covered a few times before. If I recall, you will need to preregister the variable for use in that template or use the global variable for it. Try a search to find the other threads about this same issue.
__________________
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 03 Feb 2010, 23:41
Pitman's Avatar
Pitman Pitman is offline
 
Join Date: Dec 2001
Hi Lynne,

Thanks for the suggestion. I looked over all of the threads I could find relating to foruminfo, and even threadinfo, but I wasn't able to figure out how to store the proper value in the preregistered variable.
Reply With Quote
  #4  
Old 28 Dec 2010, 17:26
Pitman's Avatar
Pitman Pitman is offline
 
Join Date: Dec 2001
Bump...

I've still had no luck figuring out how to make the $foruminfo variable available in the header template no matter what I do.

I've tried preregistering the variable in several different hook locations (parse_templates, global_start, etc.) but that doesn't seem to have any affect. The variable always gives a blank value.

I am trying to display the forum title and the description of the forum in the header template when viewing forumdisplay and showthread.

Is there any other advice to possibly help me make this happen?

Thanks again!
Reply With Quote
  #5  
Old 28 Dec 2010, 17:49
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
As I said above, you probably need to use globals - $GLOBALS['forumid']. Try that.
__________________
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
  #6  
Old 31 Jul 2013, 04:01
Muhammad Rahman Muhammad Rahman is offline
 
Join Date: Jun 2012
Originally Posted by Lynne View Post
As I said above, you probably need to use globals - $GLOBALS['forumid']. Try that.
---old discussion--

work fine Lynne ...
__________________
none_
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 04:02.

Layout Options | Width: Wide Color: