I'm working on a mod...and I'm stuck at a probably simple theory.
I have these expiration threads...and some of them are set to expire on certain days. What I essentially want to do is, if today is within 3 days of that expiration date, I want it to change a color.
Now I'm not worried about the color change, but just the theory of how to write this code.
PHP Code:
$test = (TIMENOW - (3 * 86400));
$test = vbdate($vbulletin->options['threadexpiration_dateselect'], $test);
//echo $test; echo "<br>";
if ($test <= $thread['thread_expiry']) {
$thread['thread_expiry'] = "nice";
}
I'm stuck there, and I'm probably way off...but if a thread is going to expire within 3 days for example.. I want it to do something. Can anyone somewhat help me out here? The
$thread['thread_expiry'] is already a defined variable and has the timestamp of the expiration