Firefox PHP

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
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,&nbsp;<?php echo $PHORUM['DATA']["new_messages"];?>&nbsp;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
no, you can't "change" it this way.
you have to write some own sql-queries to achieve that.

the function above works on the newflags-data.


Thomas Seifert
Re: Count new messages in a 24 hour period?
May 10, 2005 03:39PM
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.
Sorry, only registered users may post in this forum.

Click here to login