The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How can I tell with a date string if the last activity # is two+ weeks old? Is there a number that can show two weeks?
LIke if I have the number: 988515692 How can I check to see if that number is two or more weeks old? Like what would the if statement look like and what else do I need? |
#2
|
|||
|
|||
Basicially my question is: is that # above in seconds? And when from? If I minus 1209600 from it will that be two weeks ago?
Ahh, this is getting a bit confusing... how is the lastactivity string formatted? If I do Code:
$postsresult = mysql_query("SELECT userid,username,email,icq,posts,lastactivity FROM user WHERE usergroupid=9 ORDER BY lastactivity desc") or die("Unable to complete query"); while ($topposters = mysql_fetch_array($postsresult)): if (($counter++ % 2) != 0) { $bc=$bc1; } else { $bc=$bc2; } $lasta = $topposters[lastactivity]; $date = date("D, F j, G:i:s",$lasta); $datea = date("Y-m-d",$lasta); if(($datea) < ((date("Y-m-d", mktime(0,0,0, date(m), date(d)-7,date(Y))))) { $bc=$wa; } if(($datea) < ((date("Y-m-d", mktime(0,0,0, date(m), date(d)-14,date(Y))))) { $bc=$wb; } |
#3
|
||||
|
||||
I believe it's seconds since 01-01-1970 and subtracting seconds should work.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|