Count new messages in a 24 hour period?
Posted by M@AATW
Count new messages in a 24 hour period? May 10, 2005 02:45AM |
Registered: 19 years ago Posts: 278 |
I've been using the hack that iBill & others put together to show the total unread/new messages -
<?php list($PHORUM['DATA']["new_messages"], $PHORUM['DATA']["new_threads"]) = phorum_db_newflag_get_unread_count($PHORUM["forum_id"]); ?>
{IF LOGGEDIN true}Welcome back, {USERINFO->username}!<br />Since your last visit, <?php echo $PHORUM['DATA']["new_messages"];?> new messages have been posted!{/IF}
I suppose it must be possible to use this in a way that lists new messages per day, by relating it to the server clock and resetting it to a count of 0 at 12:00am. i.e. it would count the total number of new messages over a 24 hour period and display it as something like - "there have been X new messages posted today."
Anyone have any idea of the best way to achieve this?
<?php list($PHORUM['DATA']["new_messages"], $PHORUM['DATA']["new_threads"]) = phorum_db_newflag_get_unread_count($PHORUM["forum_id"]); ?>
{IF LOGGEDIN true}Welcome back, {USERINFO->username}!<br />Since your last visit, <?php echo $PHORUM['DATA']["new_messages"];?> new messages have been posted!{/IF}
I suppose it must be possible to use this in a way that lists new messages per day, by relating it to the server clock and resetting it to a count of 0 at 12:00am. i.e. it would count the total number of new messages over a 24 hour period and display it as something like - "there have been X new messages posted today."
Anyone have any idea of the best way to achieve this?
Re: Count new messages in a 24 hour period? May 10, 2005 03:40AM |
Admin Registered: 21 years ago Posts: 9,240 |
Re: Count new messages in a 24 hour period? May 10, 2005 03:39PM |
Registered: 19 years ago Posts: 278 |
Yep o.k. thanks.
I suppose some kind of click tracking script then with the SQL query whenever someone clicks on 'post' would be an idea...???
if anyone has any experience of doing this kind of think and could point me in the right direction please post since I'm not too sure how of the best way to formulate this.
Edited 1 time(s). Last edit at 05/10/2005 03:41PM by M@AATW.
I suppose some kind of click tracking script then with the SQL query whenever someone clicks on 'post' would be an idea...???
if anyone has any experience of doing this kind of think and could point me in the right direction please post since I'm not too sure how of the best way to formulate this.
Edited 1 time(s). Last edit at 05/10/2005 03:41PM by M@AATW.
Sorry, only registered users may post in this forum.