vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   how to auto delete pms older then x time? (https://vborg.vbsupport.ru/showthread.php?t=317597)

MistViper 03-02-2015 05:15 PM

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?

kh99 03-02-2015 06:10 PM

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.

MistViper 03-02-2015 06:21 PM

Quote:

Originally Posted by kh99 (Post 2539260)
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.

Take your time.

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

John Lester 03-02-2015 09:03 PM

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.

kh99 03-02-2015 09:15 PM

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.

MistViper 03-02-2015 09:33 PM

So that means its not possible to do it?

kh99 03-02-2015 09:38 PM

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).

MistViper 03-02-2015 10:00 PM

So what is the next step then? To achieve what I want.

kh99 03-02-2015 10:06 PM

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.

MistViper 03-02-2015 10:12 PM

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. :)


All times are GMT. The time now is 07:18 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
  • Page Generation 0.01476 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete