View Full Version : Automatically Close Threads after X Replies
SFishy
06-03-2005, 03:30 AM
Not per forum, not per day, not per week, not per member...
just a generic setting for the whole board... close any thread once it exceeds X number of replies -- or better -- when a member tries to reply to a post with X (the limit) number of replies already, it puts their reply as a new thread (and maybe gives them a message on screen that says it's doing so)...
Anyone know if something likes this exists?
Andreas
06-03-2005, 04:04 AM
just a generic setting for the whole board... close any thread once it exceeds X number of replies
This is easy.
In functions_newpost.php
FIND
// update the thread if there are any conditions to update
ABOVE that ADD
if ($threadinfo['replycount'] == X])
{
$threadupdate[] = 'open = 0';
}
SFishy
06-03-2005, 04:42 AM
This is easy.
In functions_newpost.php
FIND
// update the thread if there are any conditions to update
ABOVE that ADD
if ($threadinfo['replycount'] == X])
{
$threadupdate[] = 'open = 0';
}
Okay, that's easy enough...
but how about a message at the bottom of the page, or something, that indicates the post can't be replied to anymore?
Your code didn't exactly work... when I hit "reply" on a post that had reached the limit of X, all I got was a blank page.
Andreas
06-03-2005, 11:28 AM
Hmm, does work just fine for me.
As for the message, put
<if condition="!$thread['open']">
This thread is closed and you cannot post any further replies
</if>
in Template SHOWTHREAD.
SFishy
06-03-2005, 01:20 PM
I'm using version 3.0.7 and I tried it again and your code doesn't work. I cut and paste it exactly as per your instructions and when I hit "reply" on the post that has reached the limit I just get a blank white page.
I still like the idea of the thread splitting into a new thread .... someone has posted a while back they were going to try that hack... did anyone ever?
Andreas
06-03-2005, 03:13 PM
I am also using 3.0.7 and as said it works fine for me.
Anyone else to try?
SFishy
06-03-2005, 04:11 PM
I tried it again, but it definitely doesn't work. I do have some hacks, but none of them include any modifications at all to the functions_newpost.php file. I tried putting your code ABOVE the "// update the thread if there are any conditions to update line", and even just to give it a shot, below that line. Same result both ways. Are you sure you cut and paste it here correctly? I'm not a php guru (by far) so if you had a little typo in there I might not notice it.
(and yes, I replaced "X" with the number I want to be the limit)
VirtualBurn
08-30-2005, 09:53 PM
could this be implemented to auto close a specific thread or threads in a category after 'x' amount of replies? maybe as a choice in forum manager.
In other words not a default setting for the whole board. Only certain Categories will be affected by this.
peanut666
01-08-2006, 12:33 PM
if i want to make this only work on certian forums can i change if ($threadinfo for if ($forumid 1,3,4
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.