Read pm auto delect after 3 days

Started on the old forum in November 2010 · view the original in the archive · old links redirect here

6 replies · 575 views · started 16 years ago · 1 min read

4 participants
ionutvmi Junior · 45 posts #2

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

i0nutzxp Developer · 150 posts #4
$exec = mysql_query("DELETE FROM ibwf_private WHERE timesent<'".(time()-(3*24*60*60))."' AND unread='0'");  

put it on functions file

<?php unlink('World/Europe/Romania.country'); ?>
adex3g Developer · 181 posts #5

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

pmbguy Senior · 344 posts #6

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...

adex3g Developer · 181 posts #7

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

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close