Read pm auto delect after 3 days

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Read pm auto delect after 3 days

    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

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

    Comment


      #3
      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

      Comment


        #4
        PHP Code:
        $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'); ?>

        Comment


          #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()-(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.
          have connected with http://adexchat.com ?
          Fun up with
          http://forum.adexchat.com

          Comment


            #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...
            C3 Themes: http://c3themes.wen.ru/index.html
            Find Files: http://mystarter.tk/?goto=X-search

            Comment


              #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

              Comment

              Working...
              X