• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[RIKE] Old Thread Warning (require user to tick to reply to old threads)

RickM

Well-known member
#1
Old Thread Warnings provides a way of preventing very old threads from being bumped back to the top of a forum. It allows you to set a number of days as a cut-off for when a thread is deemed old. Anyone who try to reply after this date will be shown a warning message, and will have to check a box to confirm that they understand its an old thread. All buttons on the page are disabled to prevent them posting without first checking the box.

From the XenForo Admin CP you can control the cutoff days (Default is 90) as well as enable/disable the whole addon.

Please note that this mod is inspired by Andreas vB 3.x modification. Credits are listed in the readme.

CHANGELOG

1.0.0 BETA 2
- Fixed a minor bug where a redirecting thread would warn you that there was no last thread ID. It is now set to the current time so as not to run the old thread warning message.

1.0.0 BETA 1
- First release!
 

Attachments

CyberAP

Well-known member
#4
Great addon! Please could you add an option to exclude active users? (for e.x. we can set how much time should go after user registered, 90 days).
 

RickM

Well-known member
#9
It'll apply it to everyone but only if the last reply to a thread is older than the number of days specified in your AdminCP options.
 

RickM

Well-known member
#14
Hmm not to sure - I cant replicate the issue. All I can really advise is that you check your Options to ensure its both enabled and you've got posts older than the number of days you've set.
 

makdeniss

Active member
#15
Hmm not to sure - I cant replicate the issue. All I can really advise is that you check your Options to ensure its both enabled and you've got posts older than the number of days you've set.
Everything is according to your instructions.
Can you please tell me the templates where it inserts the data and what kind of calls it uses - so I can manually add this?
 

RickM

Well-known member
#16
Everything is according to your instructions.
Can you please tell me the templates where it inserts the data and what kind of calls it uses - so I can manually add this?
Sure, assuming you did the template edit correctly, your quick_reply template should look like the one I've attached to this post.

its a simple 1 line include to include the entire template/style for the script. The data from this script is fetched via the addon which should be installed and activated via your AdminCP. The entire script's php code is in the 'OldThreadWarning.php' file and it simply calls into the actionIndex of a thread, and parses through the data required. It then continues loading the thread by calling its parent function inside the XenForo thread public controller.

I can guarantee that this is not an issue with the script. Its most certainly a problem on your end.

Confirmed working perfectly fine on RC2 (haven't tested earlier versions and wont support them as you should have already upgraded). As long as you follow the instructions correctly, it will work. All I can suggest is that you may have another addon conflicting with it, however thats still fairly unlikely given the way XenForo works.
 

Attachments

makdeniss

Active member
#19
When clicking on a re-direct thread we find this error:
Undefined property: XenForo_ControllerResponse_Reroute::$params
  1. XenForo_Application::handlePhpError() in OldThreadWarning/ControllerPublic/OldThreadWarning.php at line 25
  2. OldThreadWarning_ControllerPublic_OldThreadWarning->actionIndex() in XenForo/FrontController.php at line 310
  3. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  4. XenForo_FrontController->run() in htdocs/forum/index.php at line 15
 

fattony69

Well-known member
#20
When clicking on a re-direct thread we find this error:
Undefined property: XenForo_ControllerResponse_Reroute::$params
  1. XenForo_Application::handlePhpError() in OldThreadWarning/ControllerPublic/OldThreadWarning.php at line 25
  2. OldThreadWarning_ControllerPublic_OldThreadWarning->actionIndex() in XenForo/FrontController.php at line 310
  3. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  4. XenForo_FrontController->run() in htdocs/forum/index.php at line 15
Tried to replicate, but I was unable to. I did realize that the warning does go away, but I assume that if you are moving an old thread, it wouldn't be old anymore...