PDA

View Full Version : Administrative and Maintenance Tools - Periodic Prune Pms [ Cron Job - Fully Controlable ]


Omranic
05-19-2008, 10:00 PM
/*================================================* \
|| ################################################ ||
|| # Product Name: Periodic Prune Pms ......................... Version: 1.0.0 # ||
|| # Licence Number: Free License .................................................. .... # ||
|| # --------------------------------------------------------------------------------- # ||
|| # .................................................. .................................................. # ||
|| # ..... Copyright ?2005-2008 PHP KingDom. Some Rights Reserved. ...... # ||
|| # .... This file may be redistributed in whole or significant part under ..... # ||
|| # .. "Creative Commons - Attribution-Noncommercial-Share Alike 3.0 (http://www.phpkd.net/info/license/free)" ... # ||
|| # .................................................. .................................................. # ||
|| # ---------------- 'Periodic Prune Pms' IS FREE SOFTWARE ---------------- # ||
|| # .... http://www.phpkd.net | http://www.phpkd.net/info/license/free .... # ||
|| ################################################ ||
\*================================================ */


Please remember to click Mark as Installed if you use this modification.
Support questions from members who have not marked this as installed will be considered low priority.


Many thanks:

All vBulletin experts.
vBulletin.com (http://www.vbulletin.com) for their professional products and premium support.
vBulletin.org (http://www.vbulletin.org) for their articles, mods [Thanks also to articles' authors & mod coders].



Name: Periodic Prune Pms

Descreption: This mod allows forum administration to specify a period after which all pms of users will be deleted (Per Usergroup).

How it works:
Nothing complex, it's just a cronjob.

Features:

Specific Features:

Can enable/disable mod globally. v1.0.0
Can specify which folders to be pruned (All Folders / Just Inbox / Just Outbox / All folders other that inbox & outbox). v1.0.0
Can specify which PMs to be deleted [Message Status] (Read / Unread / Both). v1.0.0

Default Features:

Supported.
Fully phrased.
Uses Bitfields.
MD5 Hash checked.
Logging cronjob runs.
Fully controllable from AdminCP.
Doesn't require any manual edits.
Fully compatible with vBulletin 3.7.x series.
Will not alter environment of vb or other hacks.
cronjob controlled from Scheduled tasks as normal vB Crons.




Help Us:

With your brilliant suggestions, ideas to develop this mod.
With your appreciated translations (translation credits go to their owners).



Known Isues:

None till now.


History:

v1.0.0 20/5/2008 07:07 AM (EEST): First initial public release.



Notes:

Mod is disabled by default, you should enable it from AdminCP options.
cronjob run once daily (at midnight), you can configure it from 'Scheduled Task Manager'.
Supported languages of this mod is available as a translated product not as language files, each product has an attribution at it's end defines the it's language (ie: -[English]).
This mod is supposed to work with vBulletin 3.5.x & 3.6.x series, but we don't support versions prior 3.7.x series!



Files Tree:

import

product-phpkd_periodic_prune_pms-[Lang Name].xml

upload

includes

cron

prunepms.php

xml

bitfield_phpkd_periodic_prune_pms.xml

md5_sums_phpkd_periodic_prune_pms.php




Screen Shots:

Available down there.



Technical Notes:

Plugins: 0
New Files: 3
File Edits: 0
New Templates: 0
Template Edits: 0
New Database Tables: 0
Database Alterations: 1
New Phrases: 19
New Options: 3
Cron Jops: 1



Installation Procedure:

Import the product file from your AdminCP.
Upload all the content of the upload folder to your forum ROOT.
Done :cool: .



Control:

AdminCP -> vbulletin options -> Periodic Prune PMs Settings
AdminCP -> Usergroups -> Usergroup Manager -> Periodic Prune PMs Permissions
AdminCP -> Scheduled Tasks -> Scheduled Task Manager -> Prune PMs



At the end:

Thanks to all of you for supporting us by installing our products.



Other Products:

Advanced Quick Reply - vB 3.7.x
Advanced Quick Edit - vB 3.7.x



Keep Moving Forward!

bokmade
05-20-2008, 04:59 AM
If It will Send a PM Message to user to inform them we gone to delete there PM's Just to let them get copy of any messages ..

Thanks ..

Omranic
05-20-2008, 05:30 AM
If It will Send a PM Message to user to inform them we gone to delete there PM's Just to let them get copy of any messages ..

Thanks ..
Thanks for your suggestion.
I think it should be an administration notice shown per usergroup if that usergroup's PMs setup to be deleted, may be shown in all pages or in the PM system.

It will be implemented in the next version.

Any other suggestions ...?

redlabour
05-20-2008, 06:16 AM
Works great for me. :)

RedTrinity
05-20-2008, 09:37 AM
Nice! Installed :)

Rickeo
05-20-2008, 12:03 PM
Genius idea actually should clear up some space on my MYSQL :)

Greek76
05-20-2008, 12:21 PM
Looks good thanks...

tirol07
05-20-2008, 02:09 PM
thanks

Seb@
05-20-2008, 02:11 PM
thanks installed

gothicuser
05-20-2008, 03:35 PM
Great job, thankyou.

Omranic
05-21-2008, 01:39 AM
Works great for me. :)

Nice! Installed :)

Genius idea actually should clear up some space on my MYSQL :)

Looks good thanks...

thanks

thanks installed

Great job, thankyou.


You are welcome :).

msamm
05-24-2008, 11:49 AM
thanks & it in ARABIC

thanks

thanks

Omranic
05-24-2008, 02:23 PM
thanks & it in ARABIC

thanks

thanks
You are welcome.
There is two product in the 'import' folder, one in English & the other in Arabic.

product-phpkd_periodic_prune_pms-[English].xml
product-phpkd_periodic_prune_pms-[Arabic].xml

You can choose what you want.

Mark.B
05-24-2008, 02:26 PM
Does this update the PM total counters afterwards?

Omranic
05-25-2008, 04:39 AM
Does this update the PM total counters afterwards?
Yes, It updates counters for every user undergo this process :).

rapidphim
06-10-2008, 05:21 AM
Good idea... does it work on 3.7.0 or later version?

Omranic
06-13-2008, 01:42 AM
Good idea... does it work on 3.7.0 or later version?
Dear rapidphim, its for 3.7.x series:).

alehawk
06-24-2008, 02:35 AM
Hi!
I was looking for this but can you make a tiny modification?
You'll see, I dont want to empty all users inbox, I just want to prune PM whose date is > today+10 days for example, so every user know that any PM will be deleted when it reaches 10 days old, so I always free space from PM form active and inactive users but it wont prune todays PM.
Tnx!

Omranic
06-28-2008, 10:31 AM
Hi!
I was looking for this but can you make a tiny modification?
You'll see, I dont want to empty all users inbox, I just want to prune PM whose date is > today+10 days for example, so every user know that any PM will be deleted when it reaches 10 days old, so I always free space from PM form active and inactive users but it wont prune todays PM.
Tnx!
Dear alehawk,
Do you checked out the product's features ? :)
It already allow you to determine which usergroups to prune their PMs, and after how much days (how much days old these PMs that should be pruned).

PoetJA-1975
06-28-2008, 05:59 PM
Very nice - I suppose you can disable the automatic cron job via AdminCP and only run whenever you want to manually delete all PMs?

Nice hack though - I requested something like this a while ago - nice to see such a feature - should be good.

Thanx for sharing.

Jacquii.

ps - Install reserved for board upgrade.

alehawk
06-30-2008, 01:08 PM
Dear alehawk,
Do you checked out the product's features ? :)
It already allow you to determine which usergroups to prune their PMs, and after how much days (how much days old these PMs that should be pruned).

ah ok, I thought it would prume all messages not x day ols msgs
Tnx

coffeefix
07-03-2008, 06:24 PM
Very nice - I suppose you can disable the automatic cron job via AdminCP and only run whenever you want to manually delete all PMs?

This is what I did. Works great. Nice product. installed :)

PoetJA-1975
07-04-2008, 10:11 AM
This is what I did. Works great. Nice product. installed :)

Thanx ;)

Jacquii.

alqosman.net
07-06-2008, 06:39 AM
Thanks for the good job.

It has been installed.

Q: Putting ZERO days at "Prune PMs X days" field of the usergroup settings, Does it disable the mod for a usergroup.


Thanks

Omranic
08-07-2008, 09:40 AM
Very nice - I suppose you can disable the automatic cron job via AdminCP and only run whenever you want to manually delete all PMs?

Nice hack though - I requested something like this a while ago - nice to see such a feature - should be good.

Thanx for sharing.

Jacquii.

ps - Install reserved for board upgrade.

ah ok, I thought it would prume all messages not x day ols msgs
Tnx

This is what I did. Works great. Nice product. installed :)

Thanx ;)

Jacquii.

Thanks for the good job.

It has been installed.

Q: Putting ZERO days at "Prune PMs X days" field of the usergroup settings, Does it disable the mod for a usergroup.


Thanks
You are welcome :up:
Yes, putting "0" days at the "Prune PMs X days" field of the usergroup permissions should disable the mod for this usergroup.

Artes_Marciales
08-13-2008, 06:01 AM
great idea!
** install **

Omranic
08-16-2008, 10:20 PM
great idea!
** install **
You are welcome :).

Chachacha
08-25-2008, 04:49 AM
Just so other 3.6.4 users will know not to waste their time, this mod is not compatible with your version of vbulletin.

BarelyHangingOn
09-02-2008, 10:17 AM
Just so other 3.6.4 users will know not to waste their time, this mod is not compatible with your version of vbulletin.


Thats sucks, I really need to flush the pm system on my board.

qtify.com
10-06-2008, 11:02 PM
Works great for me , Installed :)

uwebgg
01-20-2009, 07:31 PM
it does not work with 3.8.x :-(

Mark.B
02-20-2009, 06:45 PM
To me there seems to be on flaw in this, and that's that it only prunes from the pm table. It needs to do pmtext as well, otherwise you're leaving the bulk of the data in the database.

pedroenf
03-29-2009, 04:50 PM
Could it be re-made to work in 3.8.X? It would be great. I have tried in 3.8.1 and no luck :(

pedroenf
03-31-2009, 07:36 AM
Updating:

It does work on 3.8.1.

stamos2003
04-01-2009, 10:32 AM
it's not working on 3.8x
though the pmtext table is not pruned too, this lets a mass of dead text in the database :(

pedroenf
04-01-2009, 11:27 AM
For me it is working fine. It takes a while to get the job done but it does!

My PM tables before pruned (older than 1 year):

VBPM 26,6MB
Format fixed
Collation latin1_swedish_ci
Rows 520,364
Row length ø 21
Row size ø 54 Bytes
Next Autoindex 806,562

VBPMReceipt 21,7KB
Format dynamic
Collation latin1_swedish_ci
Rows 189
Row length ø 58
Row size ø 118 Bytes

VBPMText 63,3MB
Format dynamic
Collation latin1_swedish_ci
Rows 142,364
Row length ø 441
Row size ø 466 Bytes
Next Autoindex 233,864

My tables after pruned:

VBPM 12,6MB
Format fixed
Collation latin1_swedish_ci
Rows 245,613
Row length ø 21
Row size ø 54 Bytes
Next Autoindex 811,408

VBPMReceipt 20,9KB
Format dynamic
Collation latin1_swedish_ci
Rows 173
Row length ø 58
Row size ø 123 Bytes

VBPMText 32,8MB
Format dynamic
Collation latin1_swedish_ci
Rows 55,058
Row length ø 599
Row size ø 624 Bytes
Next Autoindex 236,758

As you can see lots of Mb where gone from my PM tables, and i didn't hand deleted them!!!

masterme
04-24-2009, 12:45 PM
Does it work on 3.6.5?
If not, why is there a redirect from the 3.6 mods to this one telling we must use this one instead the 3.6.x version.

pedroenf
04-24-2009, 11:44 PM
4. This mod is supposed to work with vBulletin 3.5.x & 3.6.x series, but we don't support versions prior 3.7.x series!


Stated above.

masterme
04-26-2009, 01:26 PM
And?
If you read the comments people who use it on older versions than 3.7 should work, but they often don't. And in the older versions of this mod they say we must use this version. So what is so strange about my question? If they say we must use this version, they must also give support. But he, that is my opinion...

Artes_Marciales
08-13-2009, 07:50 AM
Great Mod!!!
¿work with 3.8.3???

Thanks!!

yaku
08-15-2009, 12:13 PM
Nice mod...worked perfectly for me.

z0diac
01-19-2010, 04:47 PM
Anyone know of a PM pruner that will work with vb 3.6.8 ?

redlabour
03-03-2010, 02:12 AM
Any chance to get this for 4.0?

djbaxter
03-06-2010, 11:21 PM
This works just fine in 4.x as is. I've been using it in 4.01 and in 4.02.

djbaxter
07-10-2010, 06:08 AM
To install this on 4.x, you need to update the dependencies for the XML file - attached.

Arie
09-08-2010, 03:01 PM
The only table it reduced was pm, not the (much larger) pmtext table, so on 3.8.6 it doesn't work.

Note: It does work! It's the Hourly Cleanup #2 cron job that cleans the pmtext table

home9000
11-17-2010, 04:41 AM
Is it working with vb 3.6.5 ?

bigtree
07-03-2011, 03:11 PM
Is this working for vb4 at all?

djbaxter
07-03-2011, 04:32 PM
Is this working for vb4 at all?

Yes. It's working on my 4.1.4 forum.

Tyran1
07-13-2011, 07:00 PM
Not works with 3.8.7 ... help me! please!

PS: Not works with 4.1.4

djbaxter
07-13-2011, 08:45 PM
Not works with 3.8.7 ... help me! please!

PS: Not works with 4.1.4

It has worked with me from 3.7 right through to 4.1.4. You're doing something wrong.

Tyran1
07-15-2011, 01:08 AM
It has worked with me from 3.7 right through to 4.1.4. You're doing something wrong.

Yes it works 3.8.7 PL 2!!!! However, not by hand, but only via cron!

Sorry!!

letsjoy
12-21-2011, 07:22 PM
So its fine with vb4.x ?
why not release official 4.x version than ?
:)

Fivestones
10-28-2012, 05:08 AM
Thanks a lot it will free up some space ..

djbaxter
10-28-2012, 02:55 PM
Still works in vBulletin 4.x too if you change the XML product file so it doesn't limit you to 3.7.

karabaja3
11-01-2012, 01:08 AM
great mod. thank you.

Hornstar
03-01-2013, 11:01 AM
My pm database file was 1.4gigs Over the last 8 years it sure has filled up. Is this going to be able to handle deleting everything that is at least a year old with my size?

smirkley
09-12-2013, 10:48 PM
I am currently testing this on my 4.2.0pl3 build, and so far so good.

I wish to change the third option from other than inbox & outbox, to both inbox AND outbox and no others.

The original code in the php file is:
case '3':
$pms_query_where_clouse .= " AND pm.folderid NOT IN (0, -1)";
break;

Would I change the code in prunepms.php to:
case '3':
$pms_query_where_clouse .= " AND pm.folderid = (0, -1)";
break;


I am not sure about the syntax, so if anyone has any input on this I would like that.