Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Prune old PMs + optimize DB v1.0.0
#31
Hi Eldenroot
I have a suggestion.
If add a option for set When any of the folder will be deleted?
For Example, i choose Inbox PMs are deleted after 60 days , and Trash PMs are deleted after 10 days, and Sent folder PMs are deleted after 30 days , another like it.
Like this:
Folder Name --> Read ....... Unread
Inbox Folder --> 60 ....... 0 (Not Deleted)
Trash Folder --> 10 ......... 30
Sent Folder --> 20 ........... 0
And 0 is not deleted!
I think this can help anyone for better manage folders Wink
Thanks for work and help Heart
MyBB
ــــــــــــــ

ــــــــــــــ
ــــــــــــــ
Reply
#32
Hi all, v1.0 is out! I recommend to UPDATE to the latest version!

v1.0 changelog:
* fix prunepms task file - now cleans without any issue
* optimize DB tables after cleaning
* better event logging
* code clean up
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#33
hi.
task/prunepms.php


  $queryString  = <<<SQL
    UPDATE mybb_users u SET 
        totalpms = (SELECT COUNT(pmid) FROM mybb_privatemessages pm WHERE pm.uid = u.uid),
        unreadpms = (SELECT COUNT(pmid) FROM mybb_privatemessages pm WHERE
            pm.uid = u.uid AND status='0' AND (folder='1' OR folder='2' OR folder='3' OR folder='4'));

error, because table name not mybb_users and mybb_privatemessage.
Reply
#34
Did you rename your tables in DB? What are their names?
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#35
Hi,
I have question about my suggestion:
http://community.mybb.com/thread-162704-...pid1203679

This is possible or not?
MyBB
ــــــــــــــ

ــــــــــــــ
ــــــــــــــ
Reply
#36
@SAEED.M - yes, it is quite easy. Just add another time interval
https://github.com/Cu8eR/MyBB_Prune-old-...ms.php#L24

and modify this line
https://github.com/Cu8eR/MyBB_Prune-old-...ms.php#L27

folder 1 - inbox
folder 2 - sent items
folder 3 - drafts
folder 4 - trash
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#37
(2016-02-22, 08:17 PM)Eldenroot Wrote: @SAEED.M - yes, it is quite easy. Just add another time interval
https://github.com/Cu8eR/MyBB_Prune-old-...ms.php#L24

and modify this line
https://github.com/Cu8eR/MyBB_Prune-old-...ms.php#L27

folder 1 - inbox
folder 2 - sent items
folder 3 - drafts
folder 4 - trash

Thanks a lot, but this is for read PM or unread PM?
MyBB
ــــــــــــــ

ــــــــــــــ
ــــــــــــــ
Reply
#38
modify readtime - or just delete it. You can also copy paste this code and make it only for specific folders
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#39
Hello, is it possible to have settings on this plugin about "prune old pms, but only for those usergroups" ?
Reply
#40
(2017-01-20, 10:35 PM)Darkrad Wrote: Hello, is it possible to have settings on this plugin about "prune old pms, but only for those usergroups" ?

Hi, I wanted to make this plugin simple so there wont be any extra settings in ACP. There is only a global settings in .php file, it is enough for 99 % of boards. I am sorry Sad
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply


Forum Jump:


Users browsing this thread: 16 Guest(s)