Announcement

Collapse
No announcement yet.

Custom time phrase

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

  • Custom time phrase

    I am looking to display an extra time phrase down on the bottom of the forum listing, the current phrase looks like this:


    All times are GMT{1}. The time now is <span class="time">{2}</span>.

    If I wanted to show the current time in PST to any user, how would I do this? I've searched all over and can't find any clues!

  • #2
    Sorry, there is no function to do this. This requires modifying the code. We cannot officially support code modifications or forums running modified code, however you can try searching or asking for help with this over at www.vbulletin.org.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      I'm presuming that iRO's server is set for PST.

      1. Define the variable:
      AdminCP -> Plugins & Products -> Add New Plugin:
      Code:
      Product = vBulletin
      Hook Location: Global_Start
      Name: Standard Time
      PHP Code: $server_time = date('h:i:s A');
      Active? Yes
      Click image for larger version

Name:	20101108-server_time_vbc.jpg
Views:	1
Size:	96.6 KB
ID:	3680663

      2. Insert the variable into a template:
      Bring up the Footer template for the selected style. Locate the first </div>, which is on line 5, then add this code just before it:
      Code:
      <br />The server time is now {$server_time}.
      [ATTACH]48964[/ATTACH]

      The forum administrator can then tweak the code in the plugin to output the desired time format. It's the standard PHP date() function.

      Comment

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