PDA

View Full Version : adding date at top with global_start


Slapyo
09-30-2005, 12:42 AM
$topdate = date("F j, Y");
i put that in a plugin hooked to global_start. then i just call $topdate in my header template. it doesn't work. :/

i used to have that code in the phpinclude_start template, but since that is gone i moved it. can't get it to work.

Kirk Y
09-30-2005, 01:06 AM
It worked for me. I'm using 3.5.0 Gold. Did you activate it? I know sometimes I'm in a hurry and forget to...

Slapyo
09-30-2005, 01:11 AM
Ya I did activate it. Here is what I have.

HEADER TEMPLATE:
<td height="30" align="right" bgcolor="#2d356e" class="white">$topdate</td>
PLUGIN:
Product: vBulletin
Hook Location: global_start
Title: Header date
Plugin PHP Code: $topdate = date("F j, Y");
Plugin is active: YES

I've tried calling the variable in the template with $GLOBAL[topdate] and $GLOBALS[topdate] as well but neither of those work. I am aware of $datenow but it is not in the format that I want.

Kirk Y
09-30-2005, 01:55 AM
I've got the same on my board, everything shows up fine. That's strange... you're running 3.5.0 Gold?

Slapyo
09-30-2005, 02:38 AM
Yup, I just downloaded it and upgraded my boards.

OK, nevermind ... complete moron. I didn't know you had to turn the plugin system on until just now. :/ Works perfect.