Log in

View Full Version : Disable quickreply if a thread is older than X months


creesch
02-17-2007, 01:42 PM
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 ?

rolfw1
02-17-2007, 03:42 PM
Nice request creesch, I would also be interested in the same type of hack, as our main board is now over seven years old. :)

Smoothie
02-17-2007, 10:43 PM
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

creesch
02-17-2007, 11:12 PM
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.

Smoothie
02-17-2007, 11:57 PM
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.

Kungfu
02-18-2007, 01:02 AM
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.

creesch
02-18-2007, 02:39 PM
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 :)

Smoothie
02-18-2007, 05:30 PM
Since you got some help here, how about adding what you've got incase others would like to use it?

creesch
02-18-2007, 08:46 PM
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 (https://vborg.vbsupport.ru/showthread.php?t=131350).

follow step 1
step 2 can be skipped if you only want to disable quickreply.

then edit the vB SHOWTHREAD template:

find the following:

<if condition="$show['quickreply'] OR $show['ajax_js']">
<!-- ajax errors table -->


before add:

<if condition="$show[closethread] AND $last_reply_alert_phrase">
<span class="highlight"><br />Quick reply disabled</span>

<else />

_______________________________
find:

<!-- end quick reply -->
</if>


after add:

</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.

Smoothie
02-18-2007, 10:39 PM
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?

creesch
02-18-2007, 11:21 PM
yeah, in fact you can use the code everywhere in showthread.

I used it to show a warning under each reply button and offcourse disabling quickreply