Can some one help on pm auto delect, i want my members pm to be delecting 3 days after reading. Thanks
have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com
Started on the old forum in November 2010 · view the original in the archive · old links redirect here
Can some one help on pm auto delect, i want my members pm to be delecting 3 days after reading. Thanks
have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com
just make in pm table a column named deltime. Now go to read pm page and put upldate deltime with value time() + 259200. Now put on a page accesed like index an mysql_query to delete from pm where deltime < time() and hasread is yes That means that if pm is read and 3 days old pm will be delete.
PIMP-WAP.NET - PIMP YOUR MOBILE
MASTER-LAND.NET - WAPMASTERS LAND
sounds like an interesting idea mate... If you need it coded, just tell me which script version... ie: lava/ V2 n i'll get it sorted out for ya...
C3 Themes: http://c3themes.wen.ru/index.html Find Files: http://mystarter.tk/?goto=X-search
lavalair script
Added after 4 minutes:
it is some thing like this function del($sid){ mysql_query("DELETE FROM ibwf_private WHERE timesent<'".(time()-(32460*60))."' AND unread='0'"); )
or
function del($sid){
$exec = mysql_query("DELETE FROM ibwf_private WHERE timesent<'".(time()-(32460*60))."' AND unread='0'");
)return $exec[0];
have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com
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...
C3 Themes: http://c3themes.wen.ru/index.html Find Files: http://mystarter.tk/?goto=X-search
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.
have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com