rendered paste body<?PHP$forum_id = 1;$limit_count = 5;$date_time_format = "%e %b %I:%M %p";$phpbb_root_path = "forum/";if(!defined("IN_PHPBB")){ define("IN_PHPBB", true); include($phpbb_root_path . "extension.inc"); include($phpbb_root_path . "common.".$phpEx); include($phpbb_root_path . "config.".$phpEx);}if($db) {$topics_query = $db->sql_query(" SELECT {$table_prefix}topics.topic_title, {$table_prefix}users.username AS poster_name, {$table_prefix}topics.topic_time, {$table_prefix}posts_text.post_text AS topic_text, {$table_prefix}topics.topic_views, {$table_prefix}topics.topic_replies, {$table_prefix}topics.topic_id, {$table_prefix}posts_text.post_id, {$table_prefix}topics.topic_poster AS poster_id FROM {$table_prefix}topics, {$table_prefix}users, {$table_prefix}posts_text WHERE {$table_prefix}topics.forum_id = {$forum_id} AND {$table_prefix}users.user_id = {$table_prefix}topics.topic_poster AND {$table_prefix}posts_text.post_id = {$table_prefix}topics.topic_first_post_id ORDER BY topic_time DESC LIMIT {$limit_count};");?><h4>forum posts</h4><ul id="forum-posts"> <?PHP if($topics_query && mysql_num_rows($topics_query)) { while($topic_entry = $db->sql_fetchrow($topics_query)) { $topic_time = strftime($date_time_format, $topic_entry["topic_time"]); $poster_name = $topic_entry["poster_name"]; $title = "$topic_entry[topic_title]"; $replies = "$topic_entry[topic_replies]"; $views = "$topic_entry[topic_views]"; $post_id = $topic_entry["post_id"]; $view_link = "{$phpbb_root_path}viewtopic.{$phpEx}?p={$post_id}"; echo "<li><a title=\"$title\" href=\"$view_link\">$title<br>posted by: $poster_name [$replies/$views]</a></li>"; } } ?></ul><?PHP}?>