Last added post + addon

S

stalker-1989

Гость
Покажи что ты убрал и где
убрал в index.php
Код:
            'URL_NEW_POST'      => append_sid(BB_ROOT ."viewtopic.php?". POST_POST_URL ."=". $new_post['topic_last_post_id'] ."#". $new_post['topic_last_post_id']),
и заменил
Код:
'POST_TIME' => date($new_post['topic_last_post_time'], $bb_cfg['post_date_format']),
на
Код:
$bb_cfg['post_date_format']
и в build_cat_forums.php
Код:
// Новые сообщения с Авой
if($bb_cfg['new_add_post_num'])
{
    //$porno_forums = $bb_cfg['porno_forums'] ? $bb_cfg['porno_forums'] : '0';
    $trash_forums = $bb_cfg['trash_forum_id'] ? $bb_cfg['trash_forum_id'] : '0';
    $ignor_forum = $bb_cfg['new_add_post_ignor_f'];
    $data = DB()->fetch_rowset("SELECT
            tr.topic_id, tr.forum_id, tr.poster_id, tr.post_id,
            t.*, f.*, u.user_id, u.username, u.user_avatar, u.user_avatar_type, u.user_opt, u.user_rank
        FROM
            ". BB_POSTS ." tr
        LEFT JOIN ". BB_TOPICS ." t ON tr.post_id = t.topic_last_post_id
                                      //AND t.forum_id NOT IN($ignor_forum, $porno_forums, $trash_forums)
        LEFT JOIN ". BB_FORUMS ." f ON tr.forum_id = f.forum_id
                                      AND f.auth_read = ". AUTH_ALL ."
        LEFT JOIN ". BB_USERS ." u  ON tr.poster_id = u.user_id
                                      AND u.username = u.username
        ORDER BY
            t.topic_last_post_time DESC
        LIMIT 0,".$bb_cfg['new_add_post_num']);
    $this->store('new_added_post', $data);
}
 

Lange

Легенда
stalker-1989, мда...
PHP:
'URL_NEW_POST'      => "viewtopic.php?". POST_POST_URL ."=". $new_post['topic_last_post_id'] ."#". $new_post['topic_last_post_id'],
PHP:
// Новые сообщения с Авой
if($bb_cfg['new_add_post_num'])
{
 
    $trash_forums = $bb_cfg['trash_forum_id'] ? $bb_cfg['trash_forum_id'] : '0';
    $ignor_forum = $bb_cfg['new_add_post_ignor_f'];
    $data = DB()->fetch_rowset("SELECT
            tr.topic_id, tr.forum_id, tr.poster_id, tr.post_id,
            t.*, f.*, u.user_id, u.username, u.user_avatar, u.user_avatar_type, u.user_opt, u.user_rank
        FROM
            ". BB_POSTS ." tr
        LEFT JOIN ". BB_TOPICS ." t ON tr.post_id = t.topic_last_post_id
                                      AND t.forum_id NOT IN($ignor_forum, $trash_forums)
        LEFT JOIN ". BB_FORUMS ." f ON tr.forum_id = f.forum_id
                                      AND f.auth_read = ". AUTH_ALL ."
        LEFT JOIN ". BB_USERS ." u  ON tr.poster_id = u.user_id
                                      AND u.username = u.username
        ORDER BY
            t.topic_last_post_time DESC
        LIMIT 0,".$bb_cfg['new_add_post_num']);
    $this->store('new_added_post', $data);
}
Про дату, смотри в конфиге
 
S

stalker-1989

Гость
Код:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /public_html/index.php on line 270
строка 270
Код:
            'POST_TIME' => date($new_post['topic_last_post_time'], $bb_cfg['post_date_format']),
 
Сверху