Hi
I want to show latest 3 topics ( not replies ) from a particular forum on my home page. Phpbb is in "forum" sub-folder.
Can I use rss ( from GYM Sitemaps RC4 ) to do this. Many other rss mods have this functionality.
Moderator: Moderators

<?php
// include magpierss
require_once("magpie/rss_fetch.inc");
function parser($url_feed, $nb_items = 10) {
// read the feed
$rss = fetch_rss($url_feed);
if (is_array($rss->items)) {
// limit output, only grabb most recents
$items = array_slice($rss->items, 0, $nb_items);
// list styling
$html = "<ul>\n";
foreach ($items as $item) {
$html .= "<li>";
$html .= "<a href=\"".$item['link']."\">";
$html .= $item['title']."</a><br/>";
$html .= $item['description']."</li>\n";
}
$html .= "</ul>\n";
}
return $html;
}
?><?php
require_once("parser.php");
echo parser("http://www.yoursite.com/rss-m.xml", 3);
?> var $BASE_CACHE = './cache'; // where the cache files are stored
var $MAX_AGE = 3600; // when are files stale, default one hour 
<?php
require_once("parser.php");
echo parser("http://www.phpbb-seo.com/boards/gym-sitemaps-rf44-s-m.xml", 3);
?>
hr {
clear: both;
visibility:hidden;
}
hr {
clear: both;
visibility:hidden;
} // Forum stats
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$l_total_post_s = ( $total_posts >= 0 ) ? $lang['Posted_articles_total'] : $lang['Posted_article_total'];
$l_total_user_s = ( $total_users >= 0 ) ? $lang['Registered_users_total'] : $lang['Registered_user_total'];
$forum_stats = sprintf($l_total_user_s, $total_users) . ' || ' . sprintf($l_total_post_s, $total_posts); // Forum stats
$forum_stats = ""; $forum_stats = $lang['rss_item_stats'] . $forum_data['forum_topics'] . ' ' . (($forum_data['forum_topics'] >= 0) ? $lang['Topics'] : $lang['Topic'] );
$forum_stats .= ' || ' . $forum_data['forum_posts'] . ' ' . (($forum_data['forum_posts'] >= 0) ? $lang['Posts'] : $lang['Post'] ); $forum_stats = ""; $forum_stats = $lang['rss_item_stats'] . $forum_data['forum_topics'] . ' ' . (($forum_data['forum_topics'] >= 0) ? $lang['Topics'] : $lang['Topic'] );
$forum_stats .= ' || ' . $forum_data['forum_posts'] . ' ' . (($forum_data['forum_posts'] >= 0) ? $lang['Posts'] : $lang['Post'] ); $forum_stats = "";
dcz wrote:And if you check "First message" in ACP, you'll be as well outputting the first message content in these.

Users browsing this forum: No registered users and 3 guests