Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

Reply
 
Thread Tools
PS - Delete All Visitor Messages Every 30 Days Details »»
PS - Delete All Visitor Messages Every 30 Days
Version: 1.00, by PaulSonny PaulSonny is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.7.x Rating:
Released: 03-30-2008 Last Update: 03-30-2008 Installs: 66
DB Changes
Additional Files  
No support by the author.

vBulletin 3.7 Version


This is my third modification.

Any questions asked by members who have not marked this as installed will be considered low priority.

About This Hack: This has been requested from a vBulletin.org member. This will delete all Visitor Messages every 30 days. (1st of Every Month)

Installation Information: 1 Additional File, 1 Scheduled Task.

To install just unzip the download below and import into vB using the ACP Product Manager, further and full instructions are included.

If you wish to make the Scheduled Task run more often you can edit the Scheduled Task.

Go to Admin CP >> Scheduled Tasks >> Scheduled Task Manager >> Visitor Message Del >> Then Edit To Your Choice, for example if you choose Day of Week as Sunday, this will run every Sunday.

Please post your comments or suggestions for this hack. I read ALL posts.

Please remember to click Mark As Installed if you use this modification.
If you use this plug-in, and find it useful, please support us by nominating us for Mod Of The Month (MOTM) in the top right corner of this thread, or feel free to donate.

You will get an email when a new version is released.

History:

Version 1.00:
Initial version for vBulletin 3.7.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 04-01-2008, 04:47 PM
Jase2 Jase2 is offline
 
Join Date: Dec 2007
Location: USA
Posts: 1,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just to let users know:

This is a cron job, you can disable it if you wish, then just click "Run Now" whenever you want and boom all visitor messages are gone!

Regards Jason
Reply With Quote
  #33  
Old 05-31-2008, 10:35 AM
BaziCenter's Avatar
BaziCenter BaziCenter is offline
 
Join Date: Sep 2005
Location: Montreal, QC
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think it's better that this hack only delete the mesasges which has been posted 30 days ago or more. not to delete all of the messages every 30 days.

thanks for this hack anyway!
Reply With Quote
  #34  
Old 05-31-2008, 11:17 AM
PaulSonny PaulSonny is offline
 
Join Date: Dec 2006
Location: Middlesbrough, UK
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good suggestion, I will try and get it working for you.

Thanks, Paul.
Reply With Quote
  #35  
Old 05-31-2008, 03:31 PM
BaziCenter's Avatar
BaziCenter BaziCenter is offline
 
Join Date: Sep 2005
Location: Montreal, QC
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by PaulSonny View Post
Good suggestion, I will try and get it working for you.

Thanks, Paul.
Thanks for your reply and I appreciate your work.
Reply With Quote
  #36  
Old 06-01-2008, 07:11 AM
jerx jerx is offline
 
Join Date: Feb 2006
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BaziCenter View Post
I think it's better that this hack only delete the mesasges which has been posted 30 days ago or more. not to delete all of the messages every 30 days.

thanks for this hack anyway!
I think this would make it more useful for other vb admins. But to make it even more appealing, here are some more suggestions.

1. Visitor messages limit, if possible different settings for each user group.
2. Exclude certain user groups to make it more attractive to subscribe for paid subscriptions or to join the moderator team.

Thank you!
Reply With Quote
  #37  
Old 06-02-2008, 04:07 AM
Julie's Avatar
Julie Julie is offline
 
Join Date: Mar 2005
Location: Oslo, Norway
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jerx View Post
I think this would make it more useful for other vb admins. But to make it even more appealing, here are some more suggestions.

1. Visitor messages limit, if possible different settings for each user group.
2. Exclude certain user groups to make it more attractive to subscribe for paid subscriptions or to join the moderator team.

Thank you!
I second that

And the one about only deleting 30+ old messages, not the newnew ones

Thanks!
Reply With Quote
  #38  
Old 06-05-2008, 01:19 AM
egerci egerci is offline
 
Join Date: Oct 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BaziCenter View Post
I think it's better that this hack only delete the mesasges which has been posted 30 days ago or more. not to delete all of the messages every 30 days.

thanks for this hack anyway!
Hi,

Open visitormessagedelete.php file and

find :
$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "visitormessage");

replace with:

$vbulletin->db->query_write("DELETE FROM ".TABLE_PREFIX."visitormessage where FROM_UNIXTIME(dateline )<SUBDATE(CURDATE(), INTERVAL 30 DAY )");

it will work.

You can change 30 DAY with whatever you want. You can also change cron job to run this script every day

Reply With Quote
  #39  
Old 06-08-2008, 05:01 AM
EvilJohn's Avatar
EvilJohn EvilJohn is offline
 
Join Date: Apr 2006
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by egerci View Post
Hi,

Open visitormessagedelete.php file and

find :
$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "visitormessage");

replace with:

$vbulletin->db->query_write("DELETE FROM ".TABLE_PREFIX."visitormessage where FROM_UNIXTIME(dateline )<SUBDATE(CURDATE(), INTERVAL 30 DAY )");

it will work.

You can change 30 DAY with whatever you want. You can also change cron job to run this script every day

Thanks, and thank you Paul. Installed!
Reply With Quote
  #40  
Old 07-07-2008, 12:57 PM
saviola8x's Avatar
saviola8x saviola8x is offline
 
Join Date: May 2006
Location: Paris
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed!
Thanks !
Reply With Quote
  #41  
Old 07-07-2008, 02:38 PM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by PaulSonny View Post
This was a special request for a user, but I suppose the underlying reason is to keep your database size down.

thanks, Paul.
That and to save you loading time. I have like a hundred messages on my profile and it's slow! Thanks for this.

Also: Is there a way to make it so that certain members/usergroups do not get theirs deleted.
Reply With Quote
Reply

Thread Tools

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:42 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.04576 seconds
  • Memory Usage 2,311KB
  • Queries Executed 25 (?)
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
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete