The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Hi.
I'm trying to write a script that blocks news into daily digests. Since vbulletin uses a timestamp instead of a date field I need to find a way to query for the last seven days, one at a time (since doing them together confuses the sorting no matter how I try). I've been searching through the code to try to find such a function, no luck. I'm getting angry because I wouldn't have to do all this work if vbulletin would either use a proper date field MySQL can manipulate or at least include on in addition to the timestamp... Rephrase -- I need to find out the time range for today, then yesterday, then the day before yesterday and so on back 7 days. Each time will be a query. |
#2
|
||||
|
||||
![]()
Timestamps are in seconds. They're much more convenient to use, from my experience, then the inflexible SQL date format. Plus, they contain time, not merely the date.
So if you want days, take (60 x 60) x 24, giving you 86,400. 86,400 x 2, 3, ... 7 will give you those timestamps for that duration of days. PHP Code:
PHP Code:
|
#3
|
||||
|
||||
![]() Quote:
I found something that I *think* will work, the MySQL UNIX_TIMESTAMP function... |
#4
|
|||
|
|||
![]()
Hi,
Sorry to but in but could someone tell me or send me a link to how I can display the timestamp "Yesterday" "Today" in bold? I think they would stand out better in bold. Thanks, Greg |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|