Надыбал тут в инете интересный хак для автоблокировки топика сразу после первого сообщения в определенных категориях. Тема блокируется, и выводится предложение ответы присылать в личку:
This topic has been automatically locked. Please send a pm if you are interested.
Не, ну мало ли кому понадобится. Спешу поделиться, хак совсем простой:
Code:
// automatically lock topic
if ( ($this->parent->catid == ΧΧΧ) && (! $this->parent->id ) ) {
$this->set ( 'locked', 1 );
$message = $this->get ( 'message' );
$message = "[quote]This topic has been automatically locked.
Please send a pm if you are interested[/quote]\r\n" . $message;
$this->set ( 'message', $message);
}
In the code block above, XXX is the category id of the category which will be affected. The category id can be found from Kunena's administration "Category Manager"
Указанные строчки кода размещаются в
Code:
components/com_kunena/lib/kunena.posting.class.php
в функции
сразу после этого участка кода:
Code:
// Fill thread/post related information
$this->set ( 'parent', $this->parent->id );
$this->set ( 'thread', $this->parent->thread );
$this->set ( 'catid', $this->parent->catid );
if (! $this->get ( 'time' ))
$this->set ( 'time', CKunenaTimeformat::internalTime () );