The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need something that locks threads after 35 posts Any Help?
Anyone have any idea? I basically want something that'll lock each thread in a certain board that will lock a thread after it reaches 35 replies
|
#2
|
||||
|
||||
write a cron job/scheduled task to check all open threads (thread.open = '1') with a post count over 35 (thread.replycount >= 35) and close them (thread.open = '0'). Or, if may be easier to write a plugin that hooks into where the replycount is increased after a thread is made and if you hit 35, also close the thread. Either would work.
|
#3
|
|||
|
|||
Thanks alot Lynne,
I've been working on this and can not figure out the syntax If you (or anyone else) don't midn can you write up an example cron file... i'm assuming its written in PHP ... but I just want to see an example, once I get the catch of writing those whoooa its going to be awesome. |
#4
|
|||
|
|||
This should work for the CRON method...
PHP Code:
|
#5
|
|||
|
|||
Quote:
so basically i create a new php file with the above code in it... then go to scheduled tasks in adminCP and link to it? |
#6
|
|||
|
|||
Yep, that should work just fine.
|
#7
|
|||
|
|||
awesome ...i think this is going to work... but looking at the code, what statement can I add that will delete all posts after post number 35 (when its locked)
|
#8
|
|||
|
|||
That gets a bit more complicated and involves code that checks each thread. Probably not worth the resources to be honest.
|
#9
|
|||
|
|||
Quote:
A 1-liner would do it, right? (in theory) That in conjunction with this cron job should do the trick |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|