I actually have this nearly finished already for someone else, I will be publising this later this week.A_Jelly_Doughnut wrote:This is fairly easy to accomplish, code-wise. I'll try to get something put together
So?Paul wrote:I actually have this nearly finished already for someone else, I will be publising this later this week.A_Jelly_Doughnut wrote:This is fairly easy to accomplish, code-wise. I'll try to get something put together
does this effect the theme ? btw really thanks. im looking for it too.mtrs wrote:I tried a short code for this, moderators are not affected, topic last post time checked and locked upon reply attempt.
Open
posting.php
FindAdd afterCode: Select all
$current_time = time();
Code: Select all
$current_time = time(); //Check topic last post time and lock if last post is older than 30 days - moderators and posters above 100 post counts are not affected if (($mode == 'reply' || $mode == 'quote') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_') && $user->data['user_posts'] < 100) { // Learn the last post time $sql = 'SELECT topic_last_post_time FROM ' . TOPICS_TABLE . ' WHERE topic_id = ' . $topic_id; $result = $db->sql_query_limit($sql, 1); if ($row = $db->sql_fetchrow($result)) { $topic_age = $row['topic_last_post_time']; } $db->sql_freeresult($result); if ((time() - $topic_age) > 2592000 )//The last topic post 30 days old topics, are locked { //Lock topic and give error warning $sql = 'UPDATE ' . TOPICS_TABLE . " SET topic_status = 1 WHERE topic_id = $topic_id"; $db->sql_query($sql); trigger_error('This topic is too old to reply, so, it\'s locked now. Thanks.'); } } //End of lock topic