Announcement

Collapse
No announcement yet.

How do I use a Date PHP function in the template?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I use a Date PHP function in the template?

    Hi

    I want to use a php code in my header template to display the date:

    <? echo date("F j, Y"); ?>
    The problem is that this function is disabled by the VBulletin parser. Is there a workaround for me to display a simple date?

    Roy

  • #2
    Go to your:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> PHP Include Code Templates -> phpinclude_start

    Enter this code into that template:

    PHP Code:
    $current_date vbdate('F j, Y'); 
    Now you can use the variable $current_date in your templates to display the date. Incidentally, the vbdate() function account's for the user's time zone setting and then calls PHP's date function.

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X