Birthdays on all Pages ?

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Ideas Centre
Locked
baloo
Registered User
Posts: 70
Joined: Mon Feb 11, 2008 12:32 pm

Birthdays on all Pages ?

Post by baloo » Sat Dec 03, 2011 3:58 pm

I'm trying to move the Birthday message to show on all pages, not just the home page, and at the top of the page.

Getting to thew top is easy and I'm able to position it and format it fine with some CSS. What is driving me absolutely batty is no matter whether I stick the code in overall_header.html or even index_body.html, I can only get the birthdays to display correctly on the home page.

I'm using a simple cut and paste from the prosilver footer template

Code: Select all

<!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST -->
	<!-- IF BIRTHDAY_LIST --><center>{L_CONGRATULATIONS}: <strong>{BIRTHDAY_LIST}</strong></center><!-- ELSE -->{L_NO_BIRTHDAYS} <!-- ENDIF -->
<!-- ENDIF -->
For some reason it doesn't work on the Active Posts search (which is my boards most used entry page). Can someone point me in the right direction as to how to get the birthdays to appear on every page ?

Depending on which IF condition I remove, move, or keep, I can get "No Birthdays" message to come up, even though there is a birthday and it shows correctly on the home page.

If I had any hair left I'd be pulling it out.

User avatar
Rahber
Former Team Member
Posts: 2720
Joined: Tue Feb 12, 2008 3:39 pm
Location: Pakistan
Name: Rahber
Contact:

Re: Birthdays on all Pages ?

Post by Rahber » Sun Dec 04, 2011 5:55 am

You have copied the template code but you forgot to copy the real code behind this :)
open index.php and find the code that generates the values for the template variable and copy that code into your other php files

baloo
Registered User
Posts: 70
Joined: Mon Feb 11, 2008 12:32 pm

Re: Birthdays on all Pages ?

Post by baloo » Sun Dec 04, 2011 7:32 am

Ah, I guess that proves the old saying that a little knowledge can be a dangerous thing.

I guess I could use an include and write my own birthday.html which contains the index.php code. That would save me editing all of the PHPBB core files.

Would would happen if the code was called twice in one page, i.e. birthday.html & index.php ? Would I need to comment out the code in index.php ?

Thanks again for pointing out my obvious stupidity. :oops:

Locked

Return to “[3.0.x] Styles Support & Discussion”