Can some one help on pm auto delect, i want my members pm to be delecting 3 days after reading. Thanks
Read pm auto delect after 3 days
Collapse
X
-
lavalair script
Added after 4 minutes:
it is some thing like this
function del($sid){
mysql_query("DELETE FROM ibwf_private WHERE timesent<'".(time()-(3*24*60*60))."' AND unread='0'");
)
or
function del($sid){
$exec = mysql_query("DELETE FROM ibwf_private WHERE timesent<'".(time()-(3*24*60*60))."' AND unread='0'");
)return $exec[0];Last edited by adex3g; 27.11.10, 17:34.
Comment
-
ok, i went about it a little differently...
first in read pm:
SET unread='0', timeread='".time()."'
then in inbox main:
$timeread = time() - (48 * 60 * 60);
$del=mysql_query("DELETE FROM ibwf_private WHERE (toid='".getuid_sid($sid)."') AND archive='0' AND reported='0' AND unread='0' AND timeread < '".$timeread."'");
that will be a bit safer, sinceit will only delete the inboxes 48 hours after they've been opened... i guess the other way works great too, but i'd rather ensure it's after time read, cause working on time sent might give isues if they login over 3 days after inboxes where sent...
Comment
-
Thanks@pmbguy. It right bcos timesent with delect after days, even thus the pmto owner absent for days unread. But timeread will keep till pmto owner online and delect after read days.
But i surgest to ur timeread for auto delect inbox and timesent for auto delect outbox. Thanks@all and i still need your idia lol.
Comment
Comment