Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Auto close thread after x days. Details »»
Auto close thread after x days.
Version: 1.00, by trafix trafix is offline
Developer Last Online: Jul 2008 Show Printable Version Email this Page

Version: 3.0.5 Rating:
Released: 01-20-2005 Last Update: 01-20-2005 Installs: 16
 
No support by the author.

Requested by Skyline_GT

This is a simple script that will close all threads where the last post is 30 days or older

Edited script with KirbyDE's code

I got it this time ... and tested and works

Tnx

only 1 variable to edit here .... default is 30 days but you can change it to whatever you want

Please click Install

Supporters / CoAuthors

Show Your Support

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

Comments
  #12  
Old 01-21-2005, 12:48 AM
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
Location: Australia
Posts: 1,021
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fixed and tested
Reply With Quote
  #13  
Old 01-31-2005, 09:26 AM
nintendo's Avatar
nintendo nintendo is offline
 
Join Date: Dec 2001
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about making it so we can give different boards different XX days. On less active boards we might want to do 60 days for example.

Or even better, delete threads after XX days.

And is this XX days after the last reply, or the first post?
Reply With Quote
  #14  
Old 02-05-2005, 11:16 PM
TCattitude's Avatar
TCattitude TCattitude is offline
 
Join Date: Oct 2004
Location: Chile
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can make it to close threads in specific forums by id?
I want this active but not in all forums.

This can be done in a easy way?
Please? Somebody?


By the way, this affect all threads?
Even the sticky ones?
(If it is, how do to not affect sticky?)
Reply With Quote
  #15  
Old 02-05-2005, 11:34 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this;
[sql]$DB_site->query("
UPDATE " . TABLE_PREFIX . "thread
SET open = 0
WHERE forumid IN (1,2,3) AND open = 1 AND sticky = 0 AND lastpost < " . intval(TIMENOW - (86400 * 30))
);
[/sql]
Where (1,2,3) is the list of forum id's you want it to work for, and 30 is the number of days
Reply With Quote
  #16  
Old 02-06-2005, 03:59 AM
TCattitude's Avatar
TCattitude TCattitude is offline
 
Join Date: Oct 2004
Location: Chile
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Try this;
[sql]$DB_site->query("
UPDATE " . TABLE_PREFIX . "thread
SET open = 0
WHERE forumid IN (1,2,3) AND open = 1 AND sticky = 0 AND lastpost < " . intval(TIMENOW - (86400 * 30))
);
[/sql]
Where (1,2,3) is the list of forum id's you want it to work for, and 30 is the number of days
Works like a charm!
Thanks Paul
Reply With Quote
  #17  
Old 02-06-2005, 04:01 AM
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
Location: Australia
Posts: 1,021
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well done guys
Reply With Quote
  #18  
Old 02-07-2005, 08:21 PM
Rebecca217 Rebecca217 is offline
 
Join Date: May 2002
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you. This is very useful! *clicks install*

Rebecca
Reply With Quote
  #19  
Old 02-07-2005, 10:20 PM
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
Location: Australia
Posts: 1,021
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your welcome
Reply With Quote
  #20  
Old 05-16-2005, 02:59 AM
teedizz teedizz is offline
 
Join Date: Jan 2004
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can this be set for one particular forum or is this for ALL threads because I want to have threads auto close after 8 days in 1 particular forum on my site....is that possible with this hack?
Reply With Quote
  #21  
Old 05-18-2005, 05:20 PM
teedizz teedizz is offline
 
Join Date: Jan 2004
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
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:03 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.11231 seconds
  • Memory Usage 2,297KB
  • Queries Executed 26 (?)
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)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
  • (3)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