![]() |
Disable quickreply if a thread is older than X months
Hello,
I am a admin for a small community, this community is pretty old in web therms (About 7 years). As a result of this we have posts an threads on our forum that date back to 1999. This is not real a problem, but lately we there are some people who get on the forum through google and give answers on threads that are months or even years old. (most of the time the original topic starter isn't even around anymore). In order to prevent this i was thinking of disabling quickreply and showing a warning in the normal reply window if a thread is older than say.... 5 months. Is this possible with a standard board ? Or is there a mod around for doing this ? |
Nice request creesch, I would also be interested in the same type of hack, as our main board is now over seven years old. :)
|
Here's the last reply alert message mod:
https://vborg.vbsupport.ru/showthread.php?t=131350 As to removing the QR box, why not just lock the thread after x number of days? https://vborg.vbsupport.ru/showthread.php?t=130738 |
Thanks a lot for the first mod :D.
About the second one, the idea is that users still can reply if they really feel they need to, but to let them think for a second if it is really necessary. |
You might be able to use an <if> statement with the QR, based on a time setting, but that's a bit beyond my knowledge.
|
im thinking it might be threadinfo[dateline']
You would need to get the current time in unix format. <if condition="currenttime - threadinfo[dateline'] < 1728000"> show QR</if> otherwise you could use the cron and add another column to the table like 1 or 0. Where 1 it would be older than 5 months. Using the cron you could run it once a day or something to find threads that are old than 5 months. |
I have found the solution :)
The first mod uses an if statement for the warning. I have modified it a bit so that it will hide the quickreply instead of showing a warning :) thanks for the suggestions anyway :) |
Since you got some help here, how about adding what you've got incase others would like to use it?
|
Well I already explained it a bit but here some more detailed instructions. It is a bit primitive but it works
download the last reply alert mod here. follow step 1 step 2 can be skipped if you only want to disable quickreply. then edit the vB SHOWTHREAD template: find the following: Code:
<if condition="$show['quickreply'] OR $show['ajax_js']"> Code:
<if condition="$show[closethread] AND $last_reply_alert_phrase"> find: Code:
<!-- end quick reply --> Code:
</if> ________________________________ And you are done, I didn't use the more advanced options of the mod and just typed the text I wanted into the code. Simply because I am not sure how to do this properly. |
cool, thanks for sharing.
Can both be used without conflict? In other words can you still show the last reply alert and disable the QR? |
All times are GMT. The time now is 05:25 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|