vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   delete old visitor messages (https://vborg.vbsupport.ru/showthread.php?t=174819)

VeeDubZ 04-01-2008 05:16 PM

delete old visitor messages
 
there is the "Delete All Visitor Messages Every 30 Days"

but it would be better if you could just delete the visitor messages that are older than a certain date or a certain number of days old.

Jase2 04-01-2008 05:34 PM

That would be too complicated. This is a simple cron job that will automatically delete all visitor messages. Alternatively, you can disable the cron job, then click "Run Now" whenever you wish and boom all visitor messages are gone.

Regards Jason :)

VeeDubZ 04-02-2008 05:14 PM

i mean that i dont want to delete all of the visitor messages just ones that are over a certain age

Jase2 04-02-2008 05:19 PM

Then I suggest you code it yourself. You're trying to make something so simple, complicated.

VeeDubZ 04-02-2008 05:29 PM

I'm pretty sure if i delete all the comments then people will get annoyed with me as they may not have read them or they could be an ongoing conversation or such.

i would like to delete all messages that are over a certain age to avoid the above issues.

coding it myself is not an option as ive no coding knowlege in this area

Jase2 04-02-2008 05:32 PM

It is run of the vB cron system. It can only go as high as that does.

MoT3rror 04-03-2008 02:37 AM

[sql]DELETE FROM visitormessage WHERE dateline < $unixtime_minus_30days[/sql]

Example: $unixtime_minus_30days code
PHP Code:

$unixtime_minus_30days mktime(date('H'), date('i'), date('s'), date("m"), date('d')-30date('Y')); 

There is more ways you can get the 30 days ago in UNIX time so this cannot be the best way to do it.


All times are GMT. The time now is 10:05 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.02101 seconds
  • Memory Usage 1,717KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete