Announcement

Collapse
No announcement yet.

print strftime('%A, %B %e, %Y %I:%M %p %Z');

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

  • print strftime('%A, %B %e, %Y %I:%M %p %Z');

    How do I get it to work in a templete?????

    I thought you would be able to insert:

    <? print strftime('%A, %B %e, %Y %I:%M %p %Z');?>

    I've tried so many variations of this and can't get it work.

    Any ideas??

  • #2
    You can only use PHP in the PHPINCLUDE template. If you want the value to show in a specific location you need to assign it to a variable in PHPINCLUDE and then use that variable where you want it to show up at.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      I tried what you said (I think) and could still not get it to work. This is what I did:

      1) I put this in the phpinclude templete:
      global $mytime;
      $mytime = strftime('%I:%M %p %Z');

      2) I put this in the header template at the appropriate location:
      $mytime


      I did, however, get it to work. This is how.

      1) I put this in the index.php file:
      global $mytime
      $mytime = strftime('%A, %B %e, %Y %I:%M %p %Z');


      2) Then I put $mytime in the header template at the appropriate location.

      This worked. It would be easier/best to do it as you suggest and not modify system files, if, I knew how to do it correctly so that it would work.
      Last edited by ralph; Mon 1 Apr '02, 11:54am.

      Comment

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