vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Auto close thread after x days. (https://vborg.vbsupport.ru/showthread.php?t=74764)

trafix 01-21-2005 12:48 AM

Fixed and tested

nintendo 01-31-2005 09:26 AM

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?

TCattitude 02-05-2005 11:16 PM

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? :rolleyes:
(If it is, how do to not affect sticky?)

Paul M 02-05-2005 11:34 PM

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

TCattitude 02-06-2005 03:59 AM

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

trafix 02-06-2005 04:01 AM

well done guys :)

Rebecca217 02-07-2005 08:21 PM

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

Rebecca

trafix 02-07-2005 10:20 PM

Your welcome :)

teedizz 05-16-2005 02:59 AM

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?

teedizz 05-18-2005 05:20 PM

bump


All times are GMT. The time now is 04:54 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.01005 seconds
  • Memory Usage 1,729KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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