Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-07-2013, 05:59 AM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 09-07-2013, 06:01 AM
DF031 DF031 is offline
 
Join Date: Nov 2012
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why would you delete those PMs ?
Reply With Quote
  #3  
Old 09-08-2013, 05:00 AM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 09-08-2013, 06:05 AM
DF031 DF031 is offline
 
Join Date: Nov 2012
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 :-)
Reply With Quote
  #5  
Old 09-08-2013, 12:19 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
smirkley
  #6  
Old 09-13-2013, 04:45 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
  #7  
Old 09-13-2013, 05:00 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 09-13-2013, 05:05 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 09-13-2013, 06:17 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 09-13-2013, 06:25 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by snakes1100 View Post
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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:38 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12499 seconds
  • Memory Usage 2,258KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete