if (is_array($folder_info) && sizeof($folder_info) > 0) { echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"; echo " <tr>\n"; echo " <td align=\"left\">\n"; echo " <table class=\"box\" width=\"100%\">\n"; echo " <tr>\n"; echo " <td align=\"left\" class=\"posthead\">\n"; echo " <table class=\"subhead\" width=\"100%\">\n"; echo " <tr>\n"; echo " <td align=\"left\">", gettext("Recent threads"), "</td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " <table class=\"posthead\" width=\"100%\">\n"; echo " <tr>\n"; echo " <td align=\"center\">\n"; if ($thread_array = threads_get_most_recent()) { foreach ($thread_array as $thread) { $tid = $thread['TID']; echo " <table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\n"; echo " <tr>\n"; if ($thread['LAST_READ'] == 0 || $thread['LAST_READ'] < $thread['LENGTH']) { echo " <td valign=\"top\" align=\"center\" style=\"white-space: nowrap\" width=\"25\"><img src=\"", html_style_image('unread_thread.png'), "\" name=\"t{$thread['TID']}\" alt=\"", gettext("Unread Messages"), "\" title=\"", gettext("Unread Messages"), "\" /></td>\n"; } else { echo " <td valign=\"top\" align=\"center\" style=\"white-space: nowrap\" width=\"25\"><img src=\"", html_style_image('bullet.png'), "\" name=\"t{$thread['TID']}\" alt=\"", gettext("Read Thread"), "\" title=\"", gettext("Read Thread"), "\" /></td>\n"; } if ($thread['LAST_READ'] == 0) { if ($thread['LENGTH'] > 1) { $number = "<a href=\"discussion.php?webtag={$webtag}&msg={$thread['TID']}.1\" target=\"" . html_get_frame_name('main') . "\" title=\"" . gettext("Go to first post in thread") . "\">[</a>"; $number .= sprintf(gettext("%d new"), $thread['LENGTH']); $number .= "<a href=\"discussion.php?webtag={$webtag}&msg={$thread['TID']}." . thread_get_last_page_pid($thread['LENGTH'], $posts_per_page) . "\" target=\"" . html_get_frame_name('main') . "\" title=\"" . gettext("Go to last post in thread") . "\">]</a>"; } else {
header('Content-type: text/xml; charset=UTF-8'); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; echo "<rss xmlns:dc=\"http://purl.org/dc/elements/1.1/\" version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n"; echo "<channel>\n"; echo "<title>{$feed_title} - ", gettext("RSS Feed"), "</title>\n"; echo "<link>{$forum_location}/</link>\n"; echo "<description>{$forum_name} - {$forum_location}/</description>\n"; echo "<lastBuildDate>{$build_date}</lastBuildDate>\n"; echo "<generator>Project Beehive Forum - www.beehiveforum.co.uk</generator>\n"; echo "<image>\n"; echo "<title>{$forum_name}</title>\n"; echo "<url>", html_style_image('rss_icon.png', true, true), "</url>\n"; echo "<link>{$forum_location}/</link>\n"; echo "</image>\n"; // Get the 20 most recent threads if ($threads_array = threads_get_most_recent($limit, $fid, $sort_created == 'Y')) { foreach ($threads_array as $thread) { $t_title = $thread['TITLE']; // Make the date human readable and fetch the content of the last // post in the thread. Can easily change this if it isn't right // by making it fetch post 1. $modified_date = gmdate("D, d M Y H:i:s", $thread['MODIFIED']); // Get the post content and author if ($sort_created == 'Y') { $t_content = message_get_content($thread['TID'], 1); $t_user_array = message_get_user_array($thread['TID'], 1); } else { $t_content = message_get_content($thread['TID'], $thread['LENGTH']); $t_user_array = message_get_user_array($thread['TID'], $thread['LENGTH']); } // Strip signatures from the RSS feed