Quote:
Originally Posted by kh99
If you mean "within the past 24 hours" then (assuming the $bbuserinfo[lastpost] is set) you can check it by subtracting $bbuserinfo[lastpost] from TIMENOW and comparing the result to 86400 (seconds in 24 hours).
If you mean "on today's date" then you'd need a plugin with more code to figure that out. Basically get the day-month-year for today and the post time, and see if they're the same, or maybe get the timestamp for midnight at the start of today and see if $bbuserinfo[lastpost] is greater (and you might have to deal with timezones depending on what you mean by "today").
|
Hi Kevin - thanks for the reply. I'm trying this but it doesn't work :/
<if condition="$timenow = TIMENOW">
<if condition="$bbuserinfo[lastpost] > $timenow - 86400">
(Has posted within the last 24 hours)
</if>
</if>
If the
lastpost time is greater than
now-minus-24hours - it should return true?
I am half asleep though so probably doing something wrong