vbulletin variables?

bluescorpion

New Member
Hello, I am sure that this one has a simple answer, I just don't happen to know it and hope some one here does.

I am trying to display copyright statement in the vboptions. Staight HTML works no problem but if I want the current year to display automagically, it does not work no matter what I put in the line of code.

In php that code that displays correctly is:

echo '<br><br><div style="color: #FF00FF; text-align: center; "><b>Copyright &copy; 1996-'.date('Y').', SomeDomainName - All rights reserved. </b></div><br><br></div>';

The line I have added in the copyright text box is the same without the echo and single quotes, btw.

Of course vBulletin displays the date('Y') instead of the year? I think I am missing some basic step or understanding of the vb code. Any ideas?

TIA,

bs
 

bluescorpion

New Member
Thanks, actually I was trying to do that in the template thinking I could use the same technique I use on other scripts, i.e. <?php echo something ?> but as you say, it did nothing.

I was looking for a predefined vB variable as I am sure somewhere in vb they define the Year as a variable but could find that one either.

thanks for the reply.

bs
 
To be honest i don't think there is a pre-defined variable for just current year. There's ones for full date & time, last visit date and so on.

You would have to define your own variable, but for the sake of a copyright you only update once a year i'd just write "Copyright 2000 - 2008" in plain text.
 

bluescorpion

New Member
I agree, that is the quick and dirty that I have plugged in now.

I found this:

$copyrightyear = vbdate('Y', TIMENOW, false, false);

and vB uses it for their copyright display using {2} but I can not find the associated code definition in the template and if I just use that logical, it displays the logical {2} and not the Year.
 
Top