The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
UNIX time?
Hi.
I am making a news system and integrating it into vb. Now, when someone makes a comment the date is stamped in UNIX time format, how do i determine if it was posted say 12 or 24 hours ago? this is what i am trying to do.. get the unix time stamp from database with $row[3] Code:
$hrs_before_old = 24; $today = mktime(); if($row[3] + $hrs_before_old * 60 * 60 > $today) { $posted = "<br>New!"; } else { $posted = ""; } |
#2
|
||||
|
||||
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|