DemonXT писал(а):Уважаемые Гуру!
Помогите!
Отличный получился мод, но почему-то выводит темы и сообщения не прошедшие модерации. У меня на форуме таких бывает очень много и мне совсем не хотелось чтоб они попадали в паблик, особенно если там СПАМ. Помогите исключить такие сообщения.
FROM ' . TOPICS_TABLE . "
WHERE forum_id=$forum"; FROM ' . TOPICS_TABLE . "
WHERE forum_id=$forum
AND topic_approved = 1"; fwrite($w, $html_content);
fclose($w);
break;
case "generate_all":
$url = generate_board_url();
$sql = 'SELECT forum_id, forum_name
FROM ' . FORUMS_TABLE . "";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$html_content = '<li><b><a href="' . $url . '/viewforum.' . $phpEx . '?f=' . $row['forum_id'] . '">' . $row['forum_name'] . '</a></b></li>';
$html_content .= '<ul>';
$sql1 = 'SELECT topic_id, forum_id, topic_title, topic_type, topic_replies, topic_approved
FROM ' . TOPICS_TABLE . '
WHERE forum_id = ' . $row['forum_id'] . "
AND topic_approved = 1";
$result1 = $db->sql_query($sql1);
while ($row2 = $db->sql_fetchrow($result1))
{
$pages = $row2['topic_replies'] / $config['posts_per_page'];
$pages = (int) $pages;
if ($pages <= 1)
{
$html_content .= '<li><a href="' . $url . '/viewtopic.' . $phpEx . '?f=' . $row2['forum_id'] . '&t=' . $row2['topic_id'] . '">' . $row2['topic_title'] . '</a></li>';
}
else
{
$html_content .= '<li><a href="' . $url . '/viewtopic.' . $phpEx . '?f=' . $row2['forum_id'] . '&t=' . $row2['topic_id'] . '">' . $row2['topic_title'] . '</a><br />[ ';
for ($i=1; $i<=$pages; $i++)
{
$html_content .= '<a href="' . $url . '/viewtopic.' . $phpEx . '?f=' . $row2['forum_id'] . '&t=' . $row2['topic_id'] . '&start=' . $i * $config['posts_per_page'] . '">' . ($i+1) . '</a> ';
}
$html_content .= ']</li>';
}
}
$db->sql_freeresult($result1);
$html_content .= '</ul>';
$w = fopen('../topiclist/' . $row['forum_id'] . '.html', 'w');
fwrite($w, $html_content);
fclose($w);
}
$db->sql_freeresult($result);
break;
$url = $this->u_action . "&f={$row['forum_id']}"; $template->assign_var('U_GENERATE_ALL', append_sid($url . '&action=generate_all'));
'TOPICLIST_SETTINGS_CHANGED' => 'Настройки Topiclist успешно изменены.', 'SYNCHRONIZE_ALL' => 'Синхронизировать все форумы', <!-- IF .forums --> <form method="post" action="{U_GENERATE_ALL}">
<table cellspacing="1">
<col class="row1" />
<tbody>
<tr>
<td style="text-align: center;">
<input class="button2" type="submit" id="submit" name="submit" value="{L_SYNCHRONIZE_ALL}" />
</td>
</tr>
</tbody>
</table>
</form>
<br /> $sql = 'SELECT forum_id, forum_name
FROM ' . FORUMS_TABLE . ""; $sql = 'SELECT forum_id, forum_name
FROM ' . FORUMS_TABLE . "
WHERE forum_type > 0
AND forum_topics > 0";Shredder писал(а):Кнопка синхронизации сразу всех форумов, тестируйте.
FladeX писал(а):В includes/acp/acp_topiclist.php найдите поиском <br /> и замените на пробел.
Shredder писал(а):Само собой, нужно очистить кеш. Кнопка появится вверху над форумами в настройках мода.
if (file_exists('topiclist/' . $row['forum_id'] . '.html')) if (file_exists('topiclist/' . $row['forum_id'] . '.html') && $auth->acl_get('f_list', $row['forum_id']))maggg2 писал(а):Хотелось бы получить постраничную разбивку для листа тем. В случае, если тем очень много, — это полезно.
y0ung5eo писал(а):Хотелось бы получить постраничную разбивку для листа тем. В случае, если тем очень много, — это полезно.
[phpBB Debug] PHP Notice: in file /includes/acp/acp_topiclist.php on line 80: fopen(../topiclist/32.html) [function.fopen]: failed to open stream: Permission denied
[phpBB Debug] PHP Notice: in file /includes/acp/acp_topiclist.php on line 81: fwrite(): supplied argument is not a valid stream resource
[phpBB Debug] PHP Notice: in file /includes/acp/acp_topiclist.php on line 82: fclose(): supplied argument is not a valid stream resource
[phpBB Debug] PHP Notice: in file /adm/index.php on line 150: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3583)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3583)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3583)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3583)
[phpBB Debug] PHP Notice: in file /includes/acp/acp_topiclist.php on line 80: fopen(../topiclist/31.html) [function.fopen]: failed to open stream: Permission denied
[phpBB Debug] PHP Notice: in file /includes/acp/acp_topiclist.php on line 81: fwrite(): supplied argument is not a valid stream resource
[phpBB Debug] PHP Notice: in file /includes/acp/acp_topiclist.php on line 82: fclose(): supplied argument is not a valid stream resource
[phpBB Debug] PHP Notice: in file /adm/index.php on line 150: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3584)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3584)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3584)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3584)
rek01 писал(а):Permission denied

Вернуться в Бета-версии модов для phpBB 3.0.x
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0