Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Automatically close threads after X replies Details »»
Automatically close threads after X replies
Version: 1.0.1, by Marco Marco is offline
Developer Last Online: Oct 2013 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.7.3 Rating:
Released: 09-14-2008 Last Update: 09-14-2008 Installs: 26
Uses Plugins
 
No support by the author.

Product name:
Automatically close threads after X replies

Product description:
As the name implies, this product will allow you to automatically close threads when a certain number of replies (set in the Admin CP) has been reached. Each time a post is made, the plugin checks if the reply limit has been reached, and if so, the topic is closed. Sticky threads may be excluded from this limit.

Product installation:
Just import the product and set the options under vBulletin options, that's all there is to it.

Version compatibility:
Has been tested on vBulletin 3.7.x. May or may not work with earlier versions.

Version history:

1.0.1 -- 09/15/2008
- [Added] Ability to exclude individual threads
- [Added] Version check

1.0.0 -- 09/15/2008
- Initial release

Show Your Support

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

Comments
  #12  
Old 09-15-2008, 10:03 PM
Marco Marco is offline
 
Join Date: Nov 2001
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Right. Don't see myself adding that too, but you can easily modify the plugin to do that. Install the product, go to Plugin Manager, find the plugin that belongs to the product, and find the following line:

PHP Code:
if ($threadinfo['replycount'] >= $vbulletin->options['auto_close_amount'] AND !in_array($threadinfo['threadid'], $exclude)) 
Change to:

PHP Code:
if ($threadinfo['replycount'] >= $vbulletin->options['auto_close_amount'] AND in_array($threadinfo['threadid'], $exclude)) 
So all you need to do is remove the exclamation mark before in_array.
Reply With Quote
  #13  
Old 09-16-2008, 07:12 AM
Forum Lover Forum Lover is offline
 
Join Date: Jun 2007
Location: Sydney
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Copy that chief.

Quote:
Originally Posted by Marco View Post
Right. Don't see myself adding that too, but you can easily modify the plugin to do that. Install the product, go to Plugin Manager, find the plugin that belongs to the product, and find the following line:

PHP Code:
if ($threadinfo['replycount'] >= $vbulletin->options['auto_close_amount'] AND !in_array($threadinfo['threadid'], $exclude)) 
Change to:

PHP Code:
if ($threadinfo['replycount'] >= $vbulletin->options['auto_close_amount'] AND in_array($threadinfo['threadid'], $exclude)) 
So all you need to do is remove the exclamation mark before in_array.
Reply With Quote
  #14  
Old 09-16-2008, 07:14 AM
Jaxel Jaxel is offline
 
Join Date: Sep 2005
Posts: 1,160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THANK GOD!

I've been looking for this mod since Ralle's version disappeared last year.
Reply With Quote
  #15  
Old 09-16-2008, 08:04 AM
Aren Aren is offline
 
Join Date: Mar 2007
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My apologies if it is a dumb question, but I have to make it...

What's the point on closing a thread when it reaches X replies? Performance? And if it is, is there somewhere were I could read about this limit (and others that may apply)?

Thanks a lot in advance.
Reply With Quote
  #16  
Old 09-16-2008, 10:31 AM
Marco Marco is offline
 
Join Date: Nov 2001
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Performance not so much, I think, but in my opinion limiting the amount of replies in a thread makes threads a little easier to manage. Sometimes you get these really huge threads and no one really knows what they're about anymore.
Reply With Quote
  #17  
Old 09-16-2008, 11:00 AM
Aren Aren is offline
 
Join Date: Mar 2007
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the answer, Marco

I see your point now, even if I prefer to manually handle that kind of threads. Anyway, keep up the good work!
Reply With Quote
  #18  
Old 09-16-2008, 12:50 PM
Jaxel Jaxel is offline
 
Join Date: Sep 2005
Posts: 1,160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In an older version of vb we have running... vb235... we noticed that our server is so crappy that if a thread gets too large, and for some reason the thread needs to be updated (moved, deleted, reindexed), the server would crapy out simply because the thread was too large. Then the posts.myi would go haywire and the entire forums would go down. Keeping the post counts down in threads helped fix this problem.
Reply With Quote
  #19  
Old 12-10-2008, 07:38 PM
lostgirl815 lostgirl815 is offline
 
Join Date: Apr 2006
Posts: 228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would I need to put in all the IDs of the forums I wish to exclude, or would I just need to specifify which forum to include? (Are forums excluded by default?)
Reply With Quote
  #20  
Old 02-27-2009, 06:24 AM
GaiLoan GaiLoan is offline
 
Join Date: Dec 2007
Location: California,US
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi, this is nice, can we choose the forum to set this option ?
Reply With Quote
  #21  
Old 03-23-2009, 10:52 AM
aquila125 aquila125 is offline
 
Join Date: Mar 2009
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this also work on 3.8.1?
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 08:03 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.07351 seconds
  • Memory Usage 2,313KB
  • 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
  • (4)bbcode_php
  • (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
  • (2)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