The Arcive of vBulletin Modifications Site. |
|
Automatically Lock Old Threads (Via vB Cron) Details »»
|
|||||||||||||||||||||||||||
|
Automatically Lock Old Threads (Via vB Cron)
Developer Last Online: Mar 2009
This vB cron allows you to define a certain period of time for threads to be automatically locked.
PHP Code:
Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
I love the concept however this needs to be revised for last post activity as a lot of members use the same thread as an update thread which can go on for a long time.
|
|
#3
|
|||
|
|||
|
Is the time based on when the thread is created, or when the last reply was?
|
|
#4
|
|||
|
|||
|
I wrote something similar for my board a while back.
What I would do is change the query to: Code:
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET open=0 WHERE forumid IN(". FORUM_IDS .") AND open <> 0 AND FROM_UNIXTIME(lastpost) < DATE_SUB(CURDATE(),INTERVAL ". TIME_SPAN .")");
1) Only locking threads that aren't already locked (saves re-locking already locked threads) 2) Basing it on the lastpost in the thread, so you don't lock active threads that are created within your timespan What I also do is hard delete any that are locked and within another timeframe using the same cron job. Regards, Delphy |
|
#5
|
||||
|
||||
|
Thanks for that...... So when are the sims coming out to psp?
|
|
#6
|
|||
|
|||
|
Something like this has already been released. https://vborg.vbsupport.ru/showthrea...threadid=70302 and it goes by the last post date.
|
![]() |
|
|