![]() |
how to auto delete pms older then x time?
Its to prevent members their inbox from getting full and not emptying themselves.
So I'm looking for some sort of automation tool that will delete messages from users who don't empty their own inbox. Maybe only when their inbox is full or in general when their message is older then x time. How could I set that up? I tried to find a setting for this in the ACP but couldn't find anything. Is there a plugin for it? |
A plugin wouldn't be difficult. It just needs to execute one query, and you could put it on one of the cleanup hooks. But I hesitate to post code that deletes from the database without a chance to do at least a little testing, and I can't do that right now.
|
Quote:
Just need a query that deletes PM's from send and inbox that are older then x days. Also I just need clear and understandble instructions on how to add the code. A small plugin import file would be ideal ofc |
I'm not able to confirm this right now, but I thought there was an option in the acp through the query area to clear out old pms.
|
It's possible. I'm always forgetting about something in there. But I looked and couldn't find anything except the ability to delete all of a user's PMs.
|
So that means its not possible to do it?
|
No, I just meant that I couldn't find an existing way to do it in the admincp either. But even if there is one, that wouldn't make it happen automatically (assuming that's what you meant).
|
So what is the next step then? To achieve what I want.
|
Oh, well, I was going to try to find time to test it, and maybe make it in to a product with options and everything. Because it takes some time to set up a test and make fake PMs, and probably adjust the timestamps to look old, etc. I guess maybe I wasn't clear, when I said I didn't have time right now, I meant I wouldn't today.
|
That is fine I got time. I think others might have a use for this to.
Its good to know you plan on doing this though. Say in a month do you think it should be ready by then? Or is it hard to give an estimate on this? Once again thank you, can't express my gratitude enough if I haven't done so already. :) |
I was thinking more like sometime this week. But I have to admit that I often don't get to thigs as soon as I'd like.
|
If ozzy was here he would of made a plugin for you
|
Quote:
|
Quote:
|
Quote:
I see you found a DBTech mod that seems to have that feature. Are you going to go with that? |
Quote:
It is a great plugin, no doubt in that but the 3 links we need to have present in the footer make it far less appealing. So I would choose your way. |
Yeah, I know what you mean. OK, then I'll do it. Just thought I'd check.
|
You can get a mod that does this here, http://ozzmodz.com/showthread.php/7210 works on vB4 and vB3.8
|
Quote:
|
Quote:
But I'm surprised the attention this request gets. That someone else has also made a mod or from what I read released code Ozzy wrote himself for DBTech. |
Yeah, it goes that way sometimes. You either get no response or more than one. But it's OK, mine's going to have a few different features, and I've looked in to some interesting things while working on it.
|
Dang, meant to reply to this the other night then my youngest ran into the room with a toy to fix (Barbies head was off) and the rest is history as they say UNTIL now :p.
Release yours Kevin, will be nice to see other features but for those of you curious this already existed: https://vborg.vbsupport.ru/showthread.php?t=179879 ^ Link taken directly from: https://vborg.vbsupport.ru/showthread.php?t=269719 and remember to check the other 3.x mods out that work for 4.x too some of them are quite nice. |
Quote:
Looks very old and it isn't always easy to tell when a 3.x mod works for 4.x or not. But thank you for sharing it here. |
Quote:
|
How is the progress going @kh99?
|
Quote:
Oh, BTW, is the ability to prune only certain folders important? I see a few of the others have that, but I hadn't thought about it. |
Quote:
Well no I was waiting on yours. Truly. I plan to use your mod. Well if you have an important folder made with certain PM's in it you don't want deleted I think so yeah. Very important to choose what folders like send and inbox folder get cleaned up if getting filled up to 80% for example or just when they are full. Maybe it would be a good idea not to shock the user by just cleaning out 50% of the oldest PM's or so. Not the whole inbox and send out box. And repeat this process in a cron job. So the ability to choose what folders gets cleaned is important. Now I don't know how you plan to handle this though as a user can create some custom folders and store PM's in that to. So how could we handle that? |
Quote:
Hmm...so are you saying it should only ever clear out inbox and sent, or you want each user to be able to choose whether or not to prune a folder? The first one I could do, the second one I don't think I'd want to get in to (not to mention the fact that users probably don't want anything pruned anyway, if given a choice). And are you also sayng the percentage should apply to each folder separately? |
Quote:
inbox: 50% cleaned out oldest first custom made folders only cleared out if full - < 90% for 50% like inbox oldest first. could that work? |
Quote:
|
Quote:
Just thinking out load. I'm sure you know how to make this mod perfect. |
Quote:
|
Quote:
Just curious that is all. |
Well, I found out pretty quickly that it wasn't quite the one query that I thought at first, because the users' pm counts have to be updated. Also, adding options like the %quota and excluding certain groups complicated things. So I'd say I was maybe 80% done the basics, but the total % done will depend on what features I try to include. As for ETA, I have to admit that I haven't done any vb stuff in about a week, other than trying to help out on the forum, so it's hard to predict. Hopefully within the next week (I know, that's what I said last time :) )
Anyway, thanks for being patient. I realize that, while I'm sure it's not critical, you don't want to wait months. |
Quote:
|
Quote:
|
Quote:
|
No, sorry, and it's been two weeks, so if you give up I understand. This is still on my list though. It's more than half done so I will be finishing it. Maybe I'll look at it today.
|
All times are GMT. The time now is 03:05 PM. |
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:
|