vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Is there an auto - purge for PM's? (https://vborg.vbsupport.ru/showthread.php?t=301961)

smirkley 09-07-2013 05:59 AM

Is there an auto - purge for PM's?
 
Basically it is like this. I have a bunch of members, many who have gone away and no longer visit.

In order to clean up the database, it occured to me that there are many old pm's in the inbox that could be dumped.

The definitions would be like this....

In Inbox only,
and any pm 30 days or older,
....Auto-delete.

I figure if anyone has a pm they want to keep, they should move it into a different folder in ther pm manager.

Otherwise it should be dumped after a pre-set amount of time.

I have searched but cannot find, is there a mod that does this?

DF031 09-07-2013 06:01 AM

Why would you delete those PMs ?

smirkley 09-08-2013 05:00 AM

Because I have almost 10 years of members, many whom have no longer returned,... and many whom have pms unread and otherwise,... that just fill up database space.

I would not mind setting policy that if given, would inform members that the last 30,45,60 days or whatever, if they have pms they want to keep, they should store in another folder in their acp.

I have identified several thousand pm's that are either unread or read, that just sit in thier pm inbox. And I want to make more effecient the database in that regard.

Look at it this way,... if they havent logged in in 90 days or much more,... it is time to purge the data to make the database take less space.

DF031 09-08-2013 06:05 AM

I see. Still seems more more to prune than just leave it there. The last 15 years we changed / upgraded the forum software a few times and did not transfer the private messages. That was a good way to clean up things :-)

ozzy47 09-08-2013 12:19 PM

There is this mod, https://vborg.vbsupport.ru/showthread.php?t=179879 which has been reported to work on vB4 if you use the xml in this post, https://vborg.vbsupport.ru/showpost....0&postcount=45 , after uploading the files from the OP's zip.

smirkley 09-13-2013 04:45 PM

Thank you ozzy. I did do a search but only for v4, which is why I didnt find it. So serious thanks to you.

Question, I have installed and tested, works like a champ. But in the settings it says you can set for Inbox, Sent Items, or all others except Inbox/Sent Items.

I wish to change option 3 for BOTH Inbox/Sent Items and no other folders that a user may have custom.

The original code in prunepms.php:
Code:

                        case '3':
                                $pms_query_where_clouse .= " AND pm.folderid NOT IN (0, -1)";
                                break;


Would I change the code in prunepms.php to:
Code:

                        case '3':
                                $pms_query_where_clouse .= " AND pm.folderid = (0, -1)";
                                break;

or would this work instead:
Code:

                        case '3':
                                $pms_query_where_clouse .= " AND pm.folderid = '0'";
                                $pms_query_where_clouse .= " AND pm.folderid = '-1'";
                                break;

Obviously I have to be careful, but I am unsure of the syntax to make it work properly.
(I do know I will have to change the acp phrases)

kh99 09-13-2013 05:00 PM

I think you would want:

Code:

                        case '3':
                                $pms_query_where_clouse .= " AND pm.folderid IN (0, -1)";
                                break;


Maybe using = works the same as IN, I don't know, but you could just remove the NOT.

smirkley 09-13-2013 05:05 PM

I had considered that too, thanks.

But if you select the first option, it runs this snippet:
Code:

                        case '1':
                                $pms_query_where_clouse .= " AND pm.folderid = '0'";
                                break;

Which is why I used an = and then the ( 0, -1) in my first suggested example.


This is definetly something I dont really want to screw up and end up deleting all pm's and having to perform a restore of my db lol.

snakes1100 09-13-2013 06:17 PM

That hack doesnt work 100% regardless of changing the xml file, your going to end up with bad results on deleted PM records still showing up for users, which they cant get rid of.

Just a warning, always test old hacks that are reported to work on a test site.

smirkley 09-13-2013 06:25 PM

Quote:

Originally Posted by snakes1100 (Post 2445405)
That hack doesnt work 100% regardless of changing the xml file, your going to end up with bad results on deleted PM records still showing up for users, which they cant get rid of.

Just a warning, always test old hacks that are reported to work on a test site.

Thats the first I had read of that issue, it wasnt reported on the thread that I read.

In my prelim tests it appeared to have operated properly.

Can I ask did you try this mod and have this problem?


All times are GMT. The time now is 06:47 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.01104 seconds
  • Memory Usage 1,739KB
  • 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
  • (5)bbcode_code_printable
  • (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