1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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)

Discussion in 'Add-on Releases [Archive]' started by RickM, Feb 11, 2011.

  1. RickM

    RickM Well-Known Member

    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.


    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!

    Attached Files:

    Mutt, DarkSign, Alien and 28 others like this.
  2. John L.

    John L. Well-Known Member

    Awesome, I was looking for this a few days ago :).
  3. Alluidh

    Alluidh Well-Known Member

    Very nice ... Thank you
  4. CyberAP

    CyberAP Well-Known Member

    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).
  5. M@rc

    M@rc Well-Known Member

    Although this add-on isn't for my current forum, it's a nice addition to the list we have here. Thanks!
  6. fattony69

    fattony69 Well-Known Member

    I still currently use this addon on my vBulletin forum and it is definitely one of my must need modifications!
  7. SchmitzIT

    SchmitzIT Well-Known Member

    Thanks for this. Perhaps this can be made a part of the XenForo core?
  8. makdeniss

    makdeniss Active Member

    Does this apply to admin or only regular users? It doesn't seem to work for me (admin).
  9. RickM

    RickM Well-Known Member

    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.
  10. dutchbb

    dutchbb Well-Known Member

    Nice work, will install this.
  11. makdeniss

    makdeniss Active Member

    Then it doesn't work on my forum for some reason :(
  12. RickM

    RickM Well-Known Member

    If you are using a custom style you'll need to make sure you have created the warning templates and css files for that style.
  13. makdeniss

    makdeniss Active Member

    I am using the standard style.
  14. RickM

    RickM Well-Known Member

    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.
  15. makdeniss

    makdeniss Active Member

    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?
    fattony69 likes this.
  16. RickM

    RickM Well-Known Member

    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.

    Attached Files:

  17. makdeniss

    makdeniss Active Member

    I am so sorry, it was totally my fault. VERY SORRY. Everything seems to work now :D
    RickM likes this.
  18. RickM

    RickM Well-Known Member

    No problem - glad you got it working in the end! [​IMG]
  19. makdeniss

    makdeniss Active Member

    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
  20. fattony69

    fattony69 Well-Known Member

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

Share This Page