Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Prune old PMs + optimize DB v1.0.0
#11
It is only the first "beta" version Smile more things will be added in future, but I will leave pruning globally not only for some groups/users... you can add this by yourself, it shouldnt be difficult.

New v0.5 added
- automatically optimizes only PM table after cleaning old PMs
- optimize all tables in database is disabled by default (enable it manually in task manager)
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#12
New v0.7 added
- optimize code (less code) - thx @Supryk
- add recounting for inbox+sentbox+drafts+trash box
- db optimization deleted -> use separate task
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#13
Thank you very much, I think the mybb group would add a default prune system to PM's Wink

Thanks for this plugin.
Reply
#14
You are welcome. I have same opinion about this in mybb core...
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#15
Dude, When I try to activate your pluggin I've got this error message:
Parse error: syntax error, unexpected $end in /home/****/public_html/inc/tasks/task_prunepms.php on line 31

Could you help me?
Reply
#16
I will check it. Thanks for a report.

EDIT: No problem for me. Could you try this version?


Attached Files
.zip   v0.7.zip (Size: 2.27 KB / Downloads: 153)
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#17
I open task_prunepms.php in notepad++ and I show you how I see it:
   

It that ok?
Before line 31 all code are gray such commented.  Sad

Could be the problem?

_________
Note: this capture it is not from version 0.7 you upload here: http://community.mybb.com/thread-162704-...pid1130776

(2015-01-08, 11:57 PM)Eldenroot Wrote: EDIT: No problem for me. Could you try this version?

I downloaded and uploaded the 0.7 version and everything is OK.
Pluggin installed Big Grin

Thanks
Reply
#18
You are missing a " (double quote) there.
$db->delete_query("mybb_privatemessages", "(dateline<".(TIME_NOW-$secs)." AND readtime>0) OR dateline<".(TIME_NOW-$usecs)." AND (folder='1' OR folder='2' OR folder='3' OR folder='4')");
Soporte en Español

[Image: signature.png]

Discord at omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply
#19
@Omar G. - thx, I will fix it.
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#20
Is it working fine for everybody? I will upload a new version soon with @Omar fix and some improvements.
[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: 13 Guest(s)