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.

[DS] Auto Lock Threads

Discussion in 'Add-on Releases [Archive]' started by DarkSign, Aug 28, 2011.

Thread Status:
Not open for further replies.
  1. DarkSign

    DarkSign Active Member

    [DS] Auto Lock Threads v2.2 BETA
    Let's your threads being auto locked after a limited number of posts, or after a Date/Time, or even after some Interval.
    Good for games threads, spam threads and event threads.

    It is still a BETA release. Feedbacks are welcomed as always.


    1. Upload the DS folder to your XenForo's /library folder (ex: /www/html/forum/library).
    2. Go to ACP -> Add-ons -> Install Add-on -> Install from Uploaded File
    3. Select the addon-DSAutoLockThreads-x-x.xml file
    4. Click Install add-on
    5. Wait for the system to finish installing it

    1. Upload the folder as explained on item 1 of Install procedure, overwritting the files
    2. Go to ACP -> Add-ons -> Auto Lock Threads -> Upgrade -> Upgrade from Uploaded File
    3. Select the addon-DSAutoLockThreads-x-x.xml file
    4. Click Upgrade add-on
    5. Wait for the system to finish upgrading it

    PHP 5 >= 5.3 version required for it to work.
    Developed using XenForo 1.0.4. Prior versions were NOT tested by me. It may or may not work on them.

    On the file name, x-x corresponds to the released version (1.0, 2.0, etc)


    1. Every thread now will show a new link, Auto Lock Options
    2. By clicking on this link, it will open a form overlay, where you can set the limit for the thread.
    3. Input the maximum number of posts allowed, or fill the date/time accordingly, or fill the interval
    4. From ACP -> Applications -> Node Tree -> List Limited Threads, you can check which threads have the auto lock feature, and you can clean the limit any time, clicking on the red X button
    5. That ACP section now have the View thread link, that will open the referred thread in another tab/window, and that is now better organized, filtering threads limited by posts or by date/time
    6. Threads with an Interval will be showed as limited by date/time as well
    Change log

    • Fixed a bug with the Post limit.
    • Added the Limit by Interval feature, as requested
    • Edited the look and feel of the overlay

    • Added a lot of phrases to the system, all prefixed with ds_
    • Added new templates, as the form overlay
    • Added the Limit by date/time feature as requested
    • Prevents the Auto Lock Options link to appear, if the thread is already locked
    • Edited the ACP section, now with better readability, and thread link opening in new tab/window
    • Added the link to the limited thread on ACP
    • Changed the phrase Delete on the Delete Button to Clear Limit
    • Added the Limit Lower Than Current Posts Count check

    v1.0 - 1.1
    AutoLockThreads_block.jpg Limited_Threads_List.png Clearing_Limit.png AutoLockThread_1_1_low_limit_exception.png

    Auto Lock Options link.png Auto Lock Options Edit Overlay.png ACP Limited Threads List.png



    The Date/Time limit is based on the current SERVER time!! So please test it properly.

    It's my first add-on. It's here so you can test it, so it may not work so well on your forum as it worked on mine. I know it's not perfect, but got easy on me. If that interests you, then test it and post some feedback. Suggestions and critics are all welcomed. I hope to do more works in the future.
    Also, thank you all the development community here, for sharing all your experiences and tips on developing for XenForo. That helps a lot. And a special thanks for Syndol, the one who always listens to my newbies questions.

    The add-on is still on beta stage. But if you want to support it, and the future add-ons, you can donate any value clicking here.


    Attached Files:

    M@rc, Veer, Syndol and 2 others like this.
  2. Sylar

    Sylar Well-Known Member

    Wow, that's a neat little add-on! Perfect for forum games and such! I will try it out soon ;)
  3. Syndol

    Syndol Guest

    Congratulations on your first add-on., Very nice indeed.
  4. James

    James Well-Known Member

    You even got a mention in ControllerPublic:
    Nice add-on, people have been asking for this.
  5. ragtek

    ragtek Guest

    Will it also be possible to set a date/time when the post will be locked?
  6. DarkSign

    DarkSign Active Member

    Thank you for the comments so far :)

    That is a good feature. I will add to my to-do list for it ;)
    ArnyVee and ragtek like this.
  7. Mythotical

    Mythotical Well-Known Member

    Gratz on this, you beat me to it though. I was thinking of something similar but using a countdown as well. So thread closing can be done after so many days or posts.
  8. DarkSign

    DarkSign Active Member

    Steve: yeah, the date/time limit is planned.

    Updated to v1.1. Some small changes requested.
    Lu Kas likes this.
  9. Mythotical

    Mythotical Well-Known Member

    Very nice, I noticed that after I posted but figured I would leave it to give some support. Throw up a paypal email in your first post and I'll throw you a donation for doing this.
  10. DarkSign

    DarkSign Active Member

    Thank you for the support. I added the donation link :)
  11. DarkSign

    DarkSign Active Member

    Updated to v2.0. Yes, you have the date/time option now! Please test it and send me your feedbacks. Thank you!
    ragtek likes this.
  12. ragtek

    ragtek Guest

    thx for the fast including:)
  13. Mufasa

    Mufasa Active Member

    Nice mod. Im getting this error tho:

    Any ideas?
  14. James

    James Well-Known Member

    Check the JavaScript console to see what the error is.
  15. Mufasa

    Mufasa Active Member

    How do i do that?
  16. DarkSign

    DarkSign Active Member

    That depends on which browser you are using.

    Anyway, what where you doing when you got this error? So I can try to reproduce it.

    And I think I found a bug, so if you guys are using it and are having some weird behaviours, please let me know, while I try to catch that. Thank you.
  17. Mufasa

    Mufasa Active Member

    Im using Chrome.

    I was setting an auto-lock on a topic to end on the 1st November 2011 @ 12:00
  18. DarkSign

    DarkSign Active Member

    So, here is how to open the JS console there: Click the wrench button > Tools > Javascript console > On the window, click the Console button (my browser is pt-br, sorry if the instructions is not accurate). Then you input the same value, and check that console window. Post the error founded. I will try to replicate it here too.
  19. Mufasa

    Mufasa Active Member

    Ok done, here is the error i got:

  20. DarkSign

    DarkSign Active Member

    Oh? It says that the method is not found. Maybe some expert can tell me if that is related to the PHP version itself?
Thread Status:
Not open for further replies.

Share This Page