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 - Automatically close threads after X replies (https://vborg.vbsupport.ru/showthread.php?t=190969)

Marco 09-15-2008 10:03 PM

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.

Forum Lover 09-16-2008 07:12 AM

Copy that chief. :)

Quote:

Originally Posted by Marco (Post 1622921)
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.


Jaxel 09-16-2008 07:14 AM

THANK GOD!

I've been looking for this mod since Ralle's version disappeared last year.

Aren 09-16-2008 08:04 AM

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.

Marco 09-16-2008 10:31 AM

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.

Aren 09-16-2008 11:00 AM

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

Jaxel 09-16-2008 12:50 PM

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.

lostgirl815 12-10-2008 07:38 PM

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

GaiLoan 02-27-2009 06:24 AM

hi, this is nice, can we choose the forum to set this option ?

aquila125 03-23-2009 10:52 AM

Does this also work on 3.8.1?


All times are GMT. The time now is 04:56 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.01037 seconds
  • Memory Usage 1,746KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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