- Kod: Tümünü seç
// yeni konular
$sql = 'SELECT topic_title, forum_id, topic_id
FROM ' . TOPICS_TABLE . '
WHERE topic_status <> ' . FORUM_LINK . '
AND topic_approved = 1
AND topic_type = ' . POST_NORMAL . '
' . $sql_where . '
ORDER BY topic_time DESC';
$result = $db->sql_query_limit($sql, $config['portal_max_topics']);
while( ($row = $db->sql_fetchrow($result)) && ($row['topic_title']) )
{
if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
{
$template->assign_block_vars('latest_topics', array(
'TITLE' => character_limit($row['topic_title'], $config['portal_recent_title_limit']),
'FULL_TITLE' => censor_text($row['topic_title']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'])
));
}
}
$db->sql_freeresult($result);
bu yukarıda verdiğim kodlarda assing_block_vars bölümünün altına nasıl bir kod eklemem lazım ki?
templatede bulunan html dosyamda
- Kod: Tümünü seç
{latest_topics.TIME}
kodu ile konu zamanını da gösterebileyim.
ben şunu denedim. en üstte verdiğim kodda
'TITLE' => character_limit($row['topic_title'], $config['portal_recent_title_limit']),
satırının hemen altına
- Kod: Tümünü seç
'TIME' => $fetch_latest_topic[$i]['topic_time'],
kodunu ekledim ama sonuç alamadım.