vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Foruminfo variables and conditionals in header template? (https://vborg.vbsupport.ru/showthread.php?t=234927)

Pitman 02-03-2010 08:44 PM

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:
Code:

<vb:if condition="$foruminfo['description']">{vb:raw foruminfo.description}</vb:if>
In 3.8.x I used:
Code:

<if condition="$foruminfo[title_clean]">
Code:

<if condition="$foruminfo[description]">
How would I go about recreating these conditional statements for the header template 4.x?

Any help would be extremely appreciated! :)

Thanks

Lynne 02-03-2010 08:55 PM

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.

Pitman 02-03-2010 10:41 PM

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.

Pitman 12-28-2010 04:26 PM

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!

Lynne 12-28-2010 04:49 PM

As I said above, you probably need to use globals - $GLOBALS['forumid']. Try that.

Muhammad Rahman 07-31-2013 03:01 AM

Quote:

Originally Posted by Lynne (Post 2140225)
As I said above, you probably need to use globals - $GLOBALS['forumid']. Try that.

---old discussion--

work fine Lynne ...:D


All times are GMT. The time now is 09:38 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01000 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete