MyBB Community Forums
determine how old is the thread? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: determine how old is the thread? (/thread-172246.html)



determine how old is the thread? - marcus123 - 2015-06-22

I wanna check if the thread is 60 minutes old and if so show an error but I can't figure how to determine that'

I have dateline form a table fetched and current time but how to create a value that I can use

if ($thread_age > $check_value)
{
error();
}


Thread date-line: 1434998086


RE: determine how old is the thread? - Jones H - 2015-06-22

TIME_NOW - $thread['dateline']

Returns the seconds.


RE: determine how old is the thread? - marcus123 - 2015-06-23

@Jones H thanks big time buddy. I was so close but without your help wouldn't figure it out Wink +1