Adding custom variables to header

Discussion forum for MOD Writers regarding MOD Development.
Locked
Schwpz
Registered User
Posts: 335
Joined: Wed May 07, 2003 1:33 pm
Location: Planet Zot
Contact:

Adding custom variables to header

Post by Schwpz »

Please excuse my newbie question, but in what file can I add variables so that they are parsed throughout a forum page?

Let's say I wish to include $pizza in my header and let it be remembered all through the entire page.

Since I couldn't find the phpbb3 equivalent of the old header.php file I tried adding

Code: Select all

<!-- PHP -->
$pizza = 'awesome';			  					  
<!-- ENDPHP -->
in the overall_header.html template, but that way even if I call it later on in, it won't get parsed, regardless if I called it in the header template or later (say, the index template).

What file should I edit in order to make $pizza parsed and remembered everywhere on my forums?

Thank you for reading this and have a great day! :D
..:: PlanetZot.com - Your ultimate source for animation! ^^
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52018
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Adding custom variables to header

Post by Brf »

I am not sure what you mean by "remembered everywhere".
Each webpage is a separate object.
Schwpz
Registered User
Posts: 335
Joined: Wed May 07, 2003 1:33 pm
Location: Planet Zot
Contact:

Re: Adding custom variables to header

Post by Schwpz »

Sorry by my poor explanation and thank you for taking the time to reply me!
After lots of trial and error, I think I've managed to achieve what I wanted.

I wanted $pizza to be stated once in the header and picked up wherever I wanted on the page, including the footer. In the end I managed to achieve something similar by adding $pizza in the overall_header and overall_footer bits in functions.php file. Not really sure why I had to add $pizza in the footer bit too when I already included it in the header, but at least it works now :)

Thanks again for your time!
..:: PlanetZot.com - Your ultimate source for animation! ^^
Locked

Return to “[3.0.x] MOD Writers Discussion”