No więc mam taką gazetkę na stronie:
[php]<?php
$conf['how_many_lnews'] = '9';
$sql = 'SELECT
t.topic_id,
t.topic_time,
t.topic_title,
pt.post_text,
u.username,
u.user_id,
u.user_rank,
u.user_posts,
t.topic_replies,
pt.bbcode_uid,
t.forum_id,
t.topic_poster,
t.topic_first_post_id,
t.topic_status,
pt.post_id,
p.post_id,
p.enable_smilies
FROM
' . TOPICS_TABLE . ' AS t,
' . USERS_TABLE . ' AS u,
' . POSTS_TEXT_TABLE . ' AS pt,
' . POSTS_TABLE . ' AS p
WHERE
t.forum_id IN (3) AND
t.topic_time <= ' . time() . ' AND
t.topic_poster = u.user_id AND
t.topic_first_post_id = pt.post_id AND
t.topic_first_post_id = p.post_id AND
t.topic_status <> 2
ORDER BY
t.topic_time DESC LIMIT 0, ' . $conf['how_many_lnews'] . '';
$result = $db->sql_query($sql);
while($row = $db->sql_fetchrow($result)) {
$text = $row['post_text'];
$link = append_sid('viewtopic.' . $phpEx . '?t=' . $row['topic_id']);
if (strlen($text) > 60) {
$text = substr($text, 0, 30).'... <a href="./forum/'.$link.'" class="wiecej">więcej<br></a>';
}
$row_topic_time = $row['topic_time'];
$board_time_zone = $board_config['board_timezone'];
$default_date = $board_config['default_dateformat'];
$row_topic_time = str_replace('Dzisiaj', 'dd', $row_topic_time);
$board_time_zone = str_replace('Dzisiaj', 'dd', $board_time_zone);
$default_date = str_replace('Dzisiaj', 'dd', $default_date);
echo "\r\n".create_date($default_date, $row_topic_time, $board_time_zone)."\r\n";
echo ' - '.$text."\r\n";
}
?>[/php]
Problem jest taki że jak napisze niusa dzisiaj to wyświetla mi date w sensie:
Dzisiaj 21:05 - Due to a technical problem, al... więcej
Jak mogę zmienić Dzisiaj na dd:mm:yy ?
Próbowałem str_relace jak widać ale dalej nic ;| .
www.ddonline.pl <-- Projekt darmowej , polskiej gry Mmorpg . ![Smile :]](http://www.phpbbhelp.pl/forum/images/smilies/icon_smile5.gif)