Копировать в папку:
/ext/rxu/topicactions/
Расширение позволяет удалять (в стандартную "корзину" или безвозвратно) темы по расписанию.
/ext/rxu/topicactions/
@rxu, how can i add this option? To set to lock the topic between for example 1AM to 7AM everyday.
Yes, it is technically possible, but I have no time to do it in foreseeable future.
sure, maybe someday in the future when you have time. thanks anyway.
Undefined array key
, в том числе и в этом расширении, о чём собственно и сообщаю. Версия 1.2.2Код: Выделить всё
[phpBB Debug] PHP Warning: in file [ROOT]/ext/rxu/TopicActions/event/listener.php on line 170: Undefined array key "archive_forum_id"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/rxu/TopicActions/event/listener.php on line 171: Undefined array key "ftopic_action_type"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/rxu/TopicActions/event/listener.php on line 172: Undefined array key "topic_action_days"
Код: Выделить всё
[phpBB Debug] PHP Warning: in file [ROOT]/ext/rxu/TopicActions/event/listener.php on line 192: Undefined array key "archive_forum_id"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/rxu/TopicActions/event/listener.php on line 193: Undefined array key "ftopic_action_type"
[phpBB Debug] PHP Warning: in file [ROOT]/ext/rxu/TopicActions/event/listener.php on line 194: Undefined array key "topic_action_days"
isset
. Предупреждения пропали.ext/rxu/TopicActions/event/listener.php
Код: Выделить всё
public function acp_manage_forums_initialise_data($event)
{
if($event['action'] !== 'edit' && !$event['update'] && $event['forum_data']['forum_type'] == FORUM_POST)
{
$forum_data = $event['forum_data'];
$forum_data['archive_forum_id'] = $event['row']['archive_forum_id'];
$forum_data['ftopic_action_type'] = $event['row']['ftopic_action_type'];
$forum_data['topic_action_days'] = $event['row']['topic_action_days'];
$event['forum_data'] = $forum_data;
}
}
Код: Выделить всё
public function acp_manage_forums_initialise_data($event)
{
if ($event['action'] !== 'edit' && !$event['update'] && $event['forum_data']['forum_type'] == FORUM_POST)
{
$forum_data = $event['forum_data'];
if (isset($event['row']['archive_forum_id'])) {
$forum_data['archive_forum_id'] = $event['row']['archive_forum_id'];
}
if (isset($event['row']['ftopic_action_type'])) {
$forum_data['ftopic_action_type'] = $event['row']['ftopic_action_type'];
}
if (isset($event['row']['topic_action_days'])) {
$forum_data['topic_action_days'] = $event['row']['topic_action_days'];
}
$event['forum_data'] = $forum_data;
}
}
Код: Выделить всё
public function acp_manage_forums_display_form($event)
{
if($event['forum_data']['forum_type'] == FORUM_POST)
{
$template_data = $event['template_data'];
$template_data['S_ARCHIVE_FORUM_ID_OPTIONS'] = make_forum_select($event['forum_data']['archive_forum_id'], $event['forum_id']);
$template_data['S_FTOPIC_ACTION_TYPE'] = $this->scheduler->topic_action_select(0, 0, $event['forum_data']['ftopic_action_type'], false);
$template_data['TOPIC_ACTION_DAYS'] = $event['forum_data']['topic_action_days'];
$event['template_data'] = $template_data;
}
}
Код: Выделить всё
public function acp_manage_forums_display_form($event)
{
if ($event['forum_data']['forum_type'] == FORUM_POST)
{
$template_data = $event['template_data'];
$archive_forum_id = isset($event['forum_data']['archive_forum_id']) ? $event['forum_data']['archive_forum_id'] : null;
$ftopic_action_type = isset($event['forum_data']['ftopic_action_type']) ? $event['forum_data']['ftopic_action_type'] : 0;
$topic_action_days = isset($event['forum_data']['topic_action_days']) ? $event['forum_data']['topic_action_days'] : 0;
$template_data['S_ARCHIVE_FORUM_ID_OPTIONS'] = make_forum_select($archive_forum_id, $event['forum_id']);
$template_data['S_FTOPIC_ACTION_TYPE'] = $this->scheduler->topic_action_select(0, 0, $ftopic_action_type, false);
$template_data['TOPIC_ACTION_DAYS'] = $topic_action_days;
$event['template_data'] = $template_data;
}
}
Код: Выделить всё
public function acp_manage_forums_initialise_data($event)
{
if ($event['action'] !== 'edit' && !$event['update'] && $event['forum_data']['forum_type'] == FORUM_POST)
{
$forum_data = $event['forum_data'];
$forum_data['archive_forum_id'] = $event['row']['archive_forum_id'] ?? 0;
$forum_data['ftopic_action_type'] = $event['row']['ftopic_action_type'] ?? 0;
$forum_data['topic_action_days'] = $event['row']['topic_action_days'] ?? 0;
$event['forum_data'] = $forum_data;
}
}
Код: Выделить всё
public function acp_manage_forums_display_form($event)
{
if ($event['forum_data']['forum_type'] == FORUM_POST && $event['forum_data']['archive_forum_id'] > 0)
{
$template_data = $event['template_data'];
$template_data['S_ARCHIVE_FORUM_ID_OPTIONS'] = make_forum_select($event['forum_data']['archive_forum_id'], $event['forum_id']);
$template_data['S_FTOPIC_ACTION_TYPE'] = $this->scheduler->topic_action_select(0, 0, $event['forum_data']['ftopic_action_type'], false);
$template_data['TOPIC_ACTION_DAYS'] = $event['forum_data']['topic_action_days'];
$event['template_data'] = $template_data;
}
}