MyBB Community Forums

Full Version: Cnditional seconds
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using a timeonline conventional and I need to check time online. Days 1, 5, 10, 50, 100, 500, day is in seconds.
What proper format is used for let say 500 days?

I am referring to template conditionals!!!!

<if $something >= 43200000 then>500 days online time</if>
Well, as I said earlier, it's just simple maths.

60*60*24 = 86400 -> 1 day
60*60*24*5 = 432000 -> 5 days
60*60*24*50 = 4320000 -> 50 days
60*60*24*100 = 8640000 -> 100 days
etc.
D666 thanks man but how do I integrate your answer into template conditional expression?
<if $something >= 43200000 then>500 days online time</if>
That depends what and where you want to check. $something has to be time in seconds too. For example this will check if current user registered in 2014:
<if $mybb->user['regdate'] > 1388534400 then>You registered in 2014.</if>
Thanks man very much!