View Full Version : Block replies to old threads and prompt for new thread instead
calorie
10-02-2004, 10:00 PM
The purpose of this mini mod is to block replies to old threads, prompting the user to start a new thread instead. There is a similar mod at https://vborg.vbsupport.ru/showthread.php?t=69591 but the difference is that this mod does not place the post in a moderation queue. Instead, if a user tries to reply to an old thread, with or without quoting, this mod shows the user a message with a link to start a new thread in the same forum. If you use this mod, a click of the install button is appreciated.
SaN-DeeP
10-03-2004, 07:21 PM
seems a very easily done mod..
but a small question -> we have some forums which runs some jokes threads which are running since 4 months.. (over 2600 replies and still on)
how can we take care of them ?
moley
10-03-2004, 07:56 PM
a nice idea i'll install this tomorrow. Thanks for sharing.
calorie
10-03-2004, 08:05 PM
seems a very easily done mod..
but a small question -> we have some forums which runs some jokes threads which are running since 4 months.. (over 2600 replies and still on)
how can we take care of them ?
This mod has the following line:
if ($threadinfo['lastpost'] < TIMENOW - 2592000) // 30 days in seconds
so when the last post in a thread is over 30 days old, the user will be prompted to start a new thread.
If you want to prompt the user to start a new thread when the first post in a thread is over 30 days old, then use:
if ($threadinfo['dateline'] < TIMENOW - 2592000) // 30 days in seconds
If you want to prompt the user to start a new thread when the first or last post in a thread is over 30 days old, then use:
if (($threadinfo['lastpost'] < TIMENOW - 2592000) OR ($threadinfo['dateline'] < TIMENOW - 2592000))
Of course, you could also use something like:
if (($threadinfo['lastpost'] < TIMENOW - 2592000) OR ($threadinfo['dateline'] < TIMENOW - 5184000))
to prompt the user to start a new thread when the last post is over 30 days old or the first post is over 60 days old.
Johnny
10-03-2004, 08:31 PM
pretty cool hack, i think its useful for those big boards where their are new ignorent users who just post in really old threads just to get in a higher rank
nexialys
10-03-2004, 08:37 PM
i would suggest a different approach on this hack, as it's using a template for nothing:
simplier, but as efficient:
/////////////////////////// step 1 ///////////////////////////
/*
Add new Phrase:
Type : Front-End Errors
Varname : zzzz_oldthread
Text: This thread is old. Consider starting a <a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]">new thread</a> instead.
*/
/////////////////////////// step 2 ///////////////////////////
//In forum/newreply.php at about line 108 find:
// ### CHECK IF ALLOWED TO POST ###
//And afterwards add the following:
if ($threadinfo['lastpost'] < TIMENOW - 2592000) // 30 days in seconds
{
eval(print_standard_error('zzzz_oldthread'));
}
Logikos
10-03-2004, 08:48 PM
Damm i just finished my hack vB Expired Threads, same thing as this. But its ACP. Turn on/off, Change the days till closed and the forums you want to lock, blank for all forums. :( beat me to it! :p
nexialys
10-03-2004, 08:49 PM
@LiveWire... i prefer the settings you have... but more.. . per-forum activation based.. ;) -- i really love per-forum stuff.. lol
Logikos
10-03-2004, 08:59 PM
Per forum as in, only use this hack in specified forum ids?
nexialys
10-03-2004, 09:03 PM
no... a setting in forum.php to enable/disable... so you enable by writing a delay, and disable by writing 0 ... ;) two verifs in one.
...damn, i just gave how i build my tools.. lol
Logikos
10-03-2004, 09:05 PM
I could do that, i'll see about releasing it tonight. :) Another thing to add is staff don't see this error, and when a staff member post, it reopens the thread.
calorie
10-03-2004, 09:07 PM
Per forum as in, only use this hack in specified forum ids?
You could use something like:
if (($threadinfo['forumid'] == XX) AND (($threadinfo['lastpost'] < TIMENOW - 2592000) OR ($threadinfo['dateline'] < TIMENOW - 5184000)))
where XX is the forumid that should be affected by this hack.
Logikos
10-03-2004, 09:08 PM
But it wouldn't be using the settings in forum.php, i don't want to have to add a number every time i delte/add a new forum, rather click yes/no when im creating the forum.
calorie
10-03-2004, 09:20 PM
I could do that, i'll see about releasing it tonight. :) Another thing to add is staff don't see this error, and when a staff member post, it reopens the thread.
The if statement could use the following:
$bbuserinfo['usergroupid'] != X
$bbuserinfo['userid'] != Y
where X and Y are usergroup and userid respectively.
BTW, this hack doesn't actually close the thread. Rather, it blocks a user from making new posts to a thread after a certain amount of time has past. I made it this way because I didn't want the threads to actually close.
Freezerator
10-04-2004, 06:33 AM
Tonight i will test it, looks great
spence2
10-04-2004, 11:04 AM
Could there possibly be a way to keep the first post in the thread?
I have stickies that I post to start discussions. Would there be a way to keep the original sticky and start new threads with the sticky intact?
calorie
10-04-2004, 04:13 PM
Could there possibly be a way to keep the first post in the thread?
I have stickies that I post to start discussions. Would there be a way to keep the original sticky and start new threads with the sticky intact?
The if statement could use the following:
if ($threadinfo['sticky'] == 1)
so when the thread is stuck the user is prompted to start a new thread.
SaN-DeeP
10-04-2004, 05:19 PM
hey calorie, why not update the instructions will all the suggestions posted above :)
will be very helpful for new users checking ur instructions file
Regards,
spence2
10-04-2004, 05:53 PM
hey calorie, why not update the instructions will all the suggestions posted above :)
will be very helpful for new users checking ur instructions file
Regards,
If you do, calorie ... could you include how to combine the if statement like so:
"if the thread is sticky" & "if the posts exceed..."
so that users are prompted to begin a new set of comments without losing the original sticky post.
Thank you again.
calorie
10-04-2004, 06:15 PM
hey calorie, why not update the instructions will all the suggestions posted above :)
will be very helpful for new users checking ur instructions file
Regards,
Maybe I'll update when I get some extra free time, and after the how-to questions are done should this thread grow large.
If you do, calorie ... could you include how to combine the if statement like so:
"if the thread is sticky" & "if the posts exceed..."
so that users are prompted to begin a new set of comments without losing the original sticky post.
Thank you again.
The if statement could use the following:
if (($threadinfo['sticky'] == 1) AND ($threadinfo['replycount'] > X))
where X is the maximun number of replies to a stuck thread you allow, so when the thread is stuck and the number of replies exceeds X, the user is prompted to start a new thread.
spence2
10-04-2004, 08:11 PM
Thanks, calorie! Your support is greatly appreciated.
Borgs8472
10-04-2004, 09:50 PM
Any chance of turning this on per forum?
E.g I have one forum with loads more traffic than the others I'd like to stop bumping of old threads, other forums I wouldn't mind...
calorie
10-05-2004, 02:46 AM
<a href="https://vborg.vbsupport.ru/showpost.php?p=558584&postcount=12" target="_blank">https://vborg.vbsupport.ru/showp...4&postcount=12</a>
Freezerator
10-07-2004, 01:51 PM
Is it possible to give the user a option to still reply?
The way i see it now, he can only create a new thread. It would be logical, if he still has something usefull to say, to let him still reply, rather then starting a new one.
Logikos
10-07-2004, 02:09 PM
Then that would complely defet the purpose of this hack
Freezerator
10-07-2004, 02:39 PM
Mostly on our forums, when users search, they reply in a thread, without knowing that is _that_ old. Now you can give them a hint or warning, and a option.
Logikos
10-07-2004, 02:45 PM
Well i just released a simlar hack. And adding an option for the user to beable to bypass the error wouldn't seem right. I for one hate seeing thread diggers digging up some old thread to put his $0.02 in. If he wants to do it that bad, then he could start a new thread about it.
But thats just my view, though adding an option for the user wouldn't be all that hard maybe calorie will add it.
nautiqeman
01-13-2005, 12:55 PM
Is there a way to change this to a number of posts rather than a time period?? If so, how, I'd really appreciate any suggestions. Thanks
KJA4U
08-20-2006, 07:37 PM
i need a product or a plugin that stops members from adding new replies to threads after they get a certain period of time old.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.