vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Miscellaneous Hacks - PS - Delete All Visitor Messages Every 30 Days (https://vborg.vbsupport.ru/showthread.php?t=174737)

Jase2 04-01-2008 04:47 PM

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

BaziCenter 05-31-2008 10:35 AM

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!

PaulSonny 05-31-2008 11:17 AM

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

Thanks, Paul.

BaziCenter 05-31-2008 03:31 PM

Quote:

Originally Posted by PaulSonny (Post 1536967)
Good suggestion, I will try and get it working for you.

Thanks, Paul.

Thanks for your reply and I appreciate your work.;)

jerx 06-01-2008 07:11 AM

Quote:

Originally Posted by BaziCenter (Post 1536947)
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!

Julie 06-02-2008 04:07 AM

Quote:

Originally Posted by jerx (Post 1537607)
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 :D

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

Thanks!

egerci 06-05-2008 01:19 AM

Quote:

Originally Posted by BaziCenter (Post 1536947)
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

;)

EvilJohn 06-08-2008 05:01 AM

Quote:

Originally Posted by egerci (Post 1541155)
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!

saviola8x 07-07-2008 12:57 PM

Installed!
Thanks !

TheInsaneManiac 07-07-2008 02:38 PM

Quote:

Originally Posted by PaulSonny (Post 1479790)
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.


All times are GMT. The time now is 09:32 AM.

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.01191 seconds
  • Memory Usage 1,738KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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