Auto Lock Old Posts

  1. 5 years ago
    Edited 5 years ago by Jonah

    Hello,

    First, I'd like to thank @Toby for creating this amazing software. I love it for its simplicity. It really is fat-free!

    I am using ET as an artist critique forum where people upload work to be critiqued every week (every Sunday night) and members are given until Saturday night to critique each others work. The cycle starts all over again the following Sunday night. What I'd like to do is have an automatic auto lock feature where all posts that were created > 6 days ago in a particular channel ("to be critiqued") gets locked and moved to another channel (e.g. "Archive"). In this way, the critique channel will only show the new posts to be critiqued for the following week. This would be a scheduled feature that occurs say, Sunday morning at 3am EST.

    Can someone give me clues on how to do this? I'm not a coder really, but I can learn. I've been researching and it appears that this could be done with sql and a cron job, but I don't know where to start. Ideally, it would be great if this were a plugin, but whatever is the fastest way, that I will investigate. Thank you for any advice anyone can provide.

  2. You will need little to no PHP experience. Basically you would make a cron job look for x days old and then change the thread status from 0 (open) to 1 (closed/locked). Anyway I would suggest going to odesk or freelancer.com and hiring someone to do it for you. You'd be surprised how cheap people will do it for you.

  3. @deathfortress Thank you for the suggestion on freelancer.com. I just did that, and I'm all set up!

  4. @Jonah Can someone give me clues on how to do this? I'm not a coder really, but I can learn. I've been researching and it appears that this could be done with sql and a cron job, but I don't know where to start. Ideally, it would be great if this were a plugin, but whatever is the fastest way, that I will investigate. Thank you for any advice anyone can provide.

    As for the locking - you need to trigger 'locked' and 'channelId' fields of 'et_conversation' table. I think it's possible to do based on MySQL scheduled events (time/date)... http://dev.mysql.com/doc/refman/5.1/en/events-overview.html I would try to do this way.

 

or Sign Up to reply!