Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 03 Jun 2017, 13:32
Mattwhf Mattwhf is offline
 
Join Date: May 2016
Current date in templates?

Hello,

Is there a variable to get current date in vb 4 templates?

for example, I want to show this

June 03, 2017

Thanks
Reply With Quote
  #2  
Old 06 Jun 2017, 13:13
grey_goose grey_goose is offline
 
Join Date: Jun 2009
I've done something similar, by creating a plugin.

Hook Location: global_bootstrap_init_start
Title: Current Timestamp


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You have to register the variable in each template you want to call {vb:raw timeplugin} in. I wanted a UNIX timestamp, but you can either use {vb:date timestamp[, format]} or format it in the plugin with date_format. You can also call it anything you want -- I used "timeplugin" to remind myself of where I was getting the variable from down the road and to avoid any potential conflicts with 'timenow'.

There might be a better way to go about this, but since no one else answered...
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Current Date and Time in Editpost Boofo vBulletin 2.x Full Releases 38 22 May 2003 15:26



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 22:55.

Layout Options | Width: Wide Color: