Xwab
Форумыnavigate_nextphpBB-WAP

Как обьединить?
Сообщения
Makarov

Короче стукнула мне такая мысль в голову. Есть два мода. Мод вывода последних тем на главную,и мод смены цвета тем. Ламал голову,как их обьединить? Пытался не выходит! Вот смотрите: $full_topic_title = $topic_title = $row['topic_title'];
if ( count($orig_word) )

$topic_title = ( strlen($topic_title) > $cfg_max_topic_length ) ? substr($topic_title, 0, $cfg_max_topic_length) . '…' : $topic_title;

if ( $topic_rowset[$i]['topic_color'] )
{
$topic_color = '#'.$topic_rowset[$i]['topic_color'];
}
else
{
$topic_color = '';
}

$topic_title = "<font color = '" . $topic_color . "'>" . $topic_title . "</color>";

if ( $userdata['user_level'] == MOD | $userdata['user_level'] == ADMIN )
{
$u_topic_color = append_sid("topiccolor.$phpEx?id=".$topic_id);
$a_topic_color = "<a href=" . $u_topic_color . ">(C)</a>";
}
else
{
$u_topic_color = '';
$a_topic_color = '';
это вписал в индех.пшп вышло так. Затем сюда еще строку
$template->assign_block_vars('topicrow', array(
'BOARD_PATH' => $board_path,

'U_TOPIC_COLOR' => $u_topic_color,
'A_TOPIC_COLOR' => $a_topic_color,
'U_LAST_POST' => $viewtopic_url . '?' . POST_POST_URL . '=' . $row['topic_last_post_id'] . '#' . $row['topic_last_post_id'],
'TOPIC_REPLIES' => $row['topic_replies'],
'FULL_TOPIC_TITLE' => str_replace("'", "\'", $full_topic_title),
'U_TOPIC' => $viewtopic_url . '?' . POST_TOPIC_URL . '=' . $row['topic_id'],
'TOPIC_TITLE' => str_replace("'", "\'", $topic_title))
);
}
ну и в индех.тпл это
{topicrow.U_LAST_POST}

">
{topicrow.A_TOPIC_COLOR}{topicrow.TOPIC_TITLE} ТОКО НЕ РОБИТ ЗАРАЗА!

20 Янв 2012, 12:05
Ответить на тему