Имам следния код:
Как да показвам датата на пускането на всяко едно мнение, което се показва.
Благодаря.
Код:
<?php
$date_time = 'long';
$phpbb_root_path ='forum/';
if ( !defined('IN_PHPBB') )
{
define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.php');
include($phpbb_root_path . 'config.php');
}
$grab_topics = $db->sql_query("SELECT * FROM phpbb_topics, phpbb_posts,phpbb_posts_text WHERE
phpbb_posts.topic_id=phpbb_topics.topic_id and phpbb_posts.post_id=phpbb_posts_text.post_id and
phpbb_posts.topic_id=$tema");
while ($echo_topic = $db->sql_fetchrow($grab_topics))
{
if($date_time == "long") // Way to display date and time? long
{
$echo_post['post_time'] = strftime("%A %e %B %H:%M",$echo_post['post_time']);
}
echo "<table class=\"forumline\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" width=\"100%\"><tbody><tr><td class=\"rowpic\" align=\"left\" valign=\"top\" style=\"background-color: #F0F0F0\"><img src=\"index.php_files/news.gif\" alt=\"news\" /><font size='1'><b> ".$echo_topic['post_subject']."</b></font></td></tr></tbody></table><table class=\"forumline\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" width=\"100%\"><tbody><tr><td class=\"rowpic\" align=\"justify\" valign=\"top\" style=\"background-color: #F3F3F3\">";
$echo_text=$echo_topic['post_text'];
$bbcode_uid=$echo_topic['bbcode_uid'];
$echo_text=str_replace(":".$bbcode_uid,'',$echo_text);
$echo_text = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $echo_text);
$echo_text = str_replace("[b]","<strong>",$echo_text);
$echo_text = str_replace("[/b]","</strong>",$echo_text);
$echo_text = str_replace("[i]","<em>",$echo_text);
$echo_text = str_replace("[/i]","</em>",$echo_text);
$echo_text = str_replace("[u]","<u>",$echo_text);
$echo_text = str_replace("[/u]","</u>",$echo_text);
$echo_text=preg_replace("/\[quote\=\"(.+?)\"](.+?)\[\/quote\]/s","<small><b>$1 написа:</b></small><table border=\"0\" width=\"0\" class=\"table1\" style=\"border-style: dotted; border-width: 2px; padding: 0\"><tr><td>$2</td></tr></table>",$echo_text);
$echo_text=preg_replace("/\[size\=(.+?)\](.+?)\[\/size\]/s","<font size=\"$1\">$2</font>",$echo_text);
$echo_text=preg_replace("/\[color\=(.+?)\](.+?)\[\/color\]/s","<font color=\"$1\">$2</font>",$echo_text);
$echo_text = str_replace("[quote]","<small><b>Цитат:</b></small><table border=\"0\" width=\"0\" class=\"table1\" style=\"border-style: dotted; border-width: 2px; padding: 0\"><tr><td>",$echo_text);
$echo_text = str_replace("[/quote]","</td></tr></table>",$echo_text);
$echo_text=preg_replace("/\[code\](.+?)\[\/code\]/s","<small><b>Код:</b></small><table border=\"0\" width=\"0\" class=\"table1\" style=\"border-style: dotted; border-width: 2px; padding: 0\"><tr><td>$1</td></tr></table>",$echo_text);
$echo_text = str_replace("[img]","<img src=\"",$echo_text);
$echo_text = str_replace("[/img]","\" border=\"0\" alt=\"image\" />",$echo_text);
$echo_text = preg_replace('/\[list\](.*)\[\/list\]/si',"<center>$1</center>",$echo_text);
$echo_text = preg_replace('/\[list=(.*)\](.*)\[\/list\]/si',"<center>$1</center>",$echo_text);
$echo_text = preg_replace('/\[url\](.*)\[\/url\]/Usi','<a class="gensmall" target="_blank" href="$1">$1</a>',$echo_text);
$echo_text = preg_replace('/\[url=(.*)\](.*)\[\/url\]/Usi','<a class="gensmall" target="_blank" href="$1">$2</a>',$echo_text);
$echo_text = str_replace("\n", "\n<br />\n", $echo_text);
echo
$echo_text."</td></tr></tbody></table>
<table class=\"forumline\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" width=\"100%\">
<tbody>
<tr>
<td class=\"rowpic\" align=\"center\" valign=\"top\" style=\"background-color: #F3F3F3\">
</td>
</tr>
</tbody>
</table><br />";
}
?>
Благодаря.