MyBB Community Forums

Full Version: {myPHP} Anyone know how to close....
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Anyone know of a way to close a thread after _x # of replies?
Or any really easy way to shut down posting automatically (based on number of posts), even if it's through the whole forum.

I'm thinking of several ways, but need to save time coding.
Thank you very much.
You can grab the plugin I made that moves threads after X hours and just edit the code to instead of moving the thread (change the fid in the database) you can have it close the thread (not sure what to change in the database off hand but compare and open thread to a closed thread and see what fields are different) and instead of after X hours (checks the current time to the time the thread was created) you can have it check the number of replies and compare it to the number you specify.
^^^
Sounds like something I'll be able to do.
THANK YOU.

Edit:
FYI: For anyone, this plugin looks really useful: AutoMove
It's quite simple, grab the thread id, count how many posts, if it reaches X amount, close it.