![]() |
Prune Private Messages - Age Based
I recommend that anyone interested in this add-on install Periodic Prune PMs instead.
WORKAROUND:I have been unable to find the time to update this or to fix the incorrect counts problem. For those having this issue, use one of the "Send PM to all members" add-ons and send a message similar to the following: Quote:
WARNING: I have discovered that, at present, the individual PM counts (user.pmtotal and user.pmunread) are not updated by this script and therefore running the script will leave members with inaccurate PM counts. I am currently seeking a way to fix this. This add-on prunes old private messages based on age, and cleans up message receipts. The add-on was adapted for vBulletin 3.6x from amykhar's Mass Delete Old Private Messages for vBulletin 2.2x (see https://vborg.vbsupport.ru/showthread.php?t=27421). Thanks to Jacqueline at the http://www.vbulletin.org forum, and Sarah and Jorrit787 at the http://www.theadminzone.com forum for assistance with the MySQL queries. This is designed to run as a cron job. Upload to your ./includes/cron/ folder. Then set up a new scheduled task as Prune PMs with your preferences as to frequency. The attached prunepms.php file deletes PMs after 60 days: PHP Code:
PHP Code:
I'll support this add-on to the extent that I can but be aware I am not expert at either PHP or MySQL. |
I have not yet figured out how to make this a product for upload. Any help in doing this would be appreciated.
|
I'll definitely install this once it becomes a product. ;)
|
Thanks for the release, I have this installed but having a product for same will be great.
|
Looks promising! :up:
|
I just realized there is an issue with user.pmtotal and user.pmumread counts. The current script does not update those.
Can this be done automatically through a MySQL update query? |
Nice mod thank you.
|
WORKAROUND TO PM COUNTS ISSUE: Update the counts from your Admin CP, especially thread and post counts. This seems to fix the PM counts as well.
I'm still looking for a way to automate this. |
Maintenance > Update Counters
|
Quote:
|
*Edit NVM
Im working on it now.. |
Worked great, installed!
|
Will this MOD delete any private messages that are saved in created pm folders?
|
I'm not 100% certain but, unless they are stored in the database somewhere other than the pm and pmtext tables, the answer is probably yes.
|
Cool! Digitalpoint forums have this on their board and I would love to have it.
|
Schdule task time for some reason never wants to update this
have to always click *Run now* Tested on 2 sites and not working :( [high]* Shazz uninstalls[/high] |
How did you determine it's not running? Please note it's not writing to a log file.
|
Quote:
|
Hmmm.... okay. You can still run it manually for now - we're working on a new version of this, in any case.
|
Would you consider adding an option to exclude certain usergroups, by ID #? This would allow the Admin and Moderators (and others if chosen) to be immune from the pruning activity, which is appropriate on many forums, and would be worth the control level, in my opinion.
|
Quote:
If anyone would like to have input on this or any other issue, I will happily acknowledge and share credit. :) |
Quote:
|
Any updates on this mod? Looking forward to it, but need the ability to exclude Admins and Mods (and any other group # needed).
|
I'm working on it. My kids and my day job keep getting in the way. :(
|
Quote:
|
Quote:
I have a tweak for the private messages not displaying right. but cron still dosen't run right :( |
My current version has a MySQL error... :(
Shazz, would you care to collaborate? |
Thanks for a great hack, hell and I was thinking of coming up with something like this, but you took the cake with this one!
:rolleyes: Should I use the search function in here? :D All the best! |
If you can help to debug it, I'd welcome all help. :)
I'll PM the latest buggy version to anyone who can help with debugging. I've been swamped with more pressing projects these last few weeks, |
I am guessing that this has "died on the vine"
|
Quote:
As stated above, though, if anyone with more time would like to have a look at it, I'd welcome the assistance. I have two versions - the published one which works with some limitations, and a subsequent version which gives me MySQL errors. |
Quote:
Quote:
In another words if he supports it, I think he'll fix what you are reporting.... |
Quote:
PHP Code:
|
Quote:
It will: 1. prune private messages over a certain age if run manually, which you can do from the ACP It won't: 1. run successfully as a cron job/scheduled task, or at least it doesn't work for all configurations 2. correctly recount stored PMs for members after delteing old PMs I apologize. I've had a series of issues - medical issues, then a death in the family, then surgery with home recovery and complications. It's still on my to-do list. I just haven't been able to get to it yet. If anyone would like to take this and make it work the way it should, please feel free. Alternatively, feel free to make suggestions on altering the code. |
Quote:
Thanx, Jacquii. |
Quote:
The first time a member manually deletes a PM, the count is correctly updated. I haven't yet found a way to do it successfully from the Admin CP. I try to work on a new version periodically as I get time but between work, family, and 4 and a half months recovering from three bouts of surgery this year I haven't yet got to a version which doesn't create some errors. What's required is that the script correctly updates three variables: one for the PM, one for the PM text, and one for the count decrement. I have said more than once that if there's anyone out there with more time to devote to the issue, I'll willingly turn over all credit and the current versions I have so far to them. |
All times are GMT. The time now is 03:13 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|