Quote
kemper wrote:
Check Mods Site!
Quote
NikonForum wrote:
Too bad this mod even includes threads from ALL forumparts, even the ones that only MOD/ADMINS can see/use :(
<?php
require_once "maincore.php";
header("Content-Type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"".$locale['charset']."\"?>\n\n\n\n\n";
global $settings, $db_prefix;
$result = dbquery("SELECT * FROM ".$db_prefix."news ORDER BY news_datestamp DESC LIMIT 0, 15");
$numrows = dbrows($result);
echo "<rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'>\n";
echo "<channel>\n";
echo "<title>".htmlspecialchars($settings['sitename'])."</title>\n";
echo "<link>".$settings['siteurl']."</link>\n";
echo "<language>en-us</language>\n\n";
for ($i=1;$i < $numrows;$i++){
$data = dbarray($result);
if ($data['news_breaks'] == "y") { $data['news_news'] = nl2br($data['news_news']); }
echo "<item>\n";
echo "<title>".$data['news_subject']."</title>\n";
echo "<link>".stripslashes(htmlspecialchars($settings['siteurl']."news.php?readmore=".$data['news_id']))."</link>\n";
echo "<description>".stripslashes(htmlspecialchars($data['news_news']))."</description>\n";
echo "<pubDate>".date("r",$data['news_datestamp'])."</pubDate>\n";
echo "<guid>".stripslashes(htmlspecialchars($settings['siteurl']."news.php?readmore=".$data['news_id']))."</guid>\n";
echo "</item>\n\n";
}
echo "<atom:link href='http://www.YOUR_URL.com/rss.php' rel='self' type='application/rss+xml' />\n\n";
echo "</channel>\n";
echo "</rss>";
?>
Quote
Studio1031 wrote:
save this as rss.php or whatever you want to call it, and drop it in your root php-fusion 7 folder.. to use it, just link to it.. here's what it looks like coming off of one of my sites:
http://acidplanet.org/rss.php
I hope that helps :)
<?php
require_once "maincore.php";
header("Content-Type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"".$locale['charset']."\"?>\n\n\n\n\n";
global $settings, $db_prefix;
$result = dbquery("SELECT * FROM ".$db_prefix."news ORDER BY news_datestamp DESC LIMIT 0, 15");
$numrows = dbrows($result);
echo "<rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'>\n";
echo "<channel>\n";
echo "<title>".htmlspecialchars($settings['sitename'])."</title>\n";
echo "<link>".$settings['siteurl']."</link>\n";
echo "<language>en-us</language>\n\n";
for ($i=1;$i < $numrows;$i++){
$data = dbarray($result);
if ($data['news_breaks'] == "y") { $data['news_news'] = nl2br($data['news_news']); }
echo "<item>\n";
echo "<title>".$data['news_subject']."</title>\n";
echo "<link>".stripslashes(htmlspecialchars($settings['siteurl']."news.php?readmore=".$data['news_id']))."</link>\n";
echo "<description>".stripslashes(htmlspecialchars($data['news_news']))."</description>\n";
echo "<pubDate>".date("r",$data['news_datestamp'])."</pubDate>\n";
echo "<guid>".stripslashes(htmlspecialchars($settings['siteurl']."news.php?readmore=".$data['news_id']))."</guid>\n";
echo "</item>\n\n";
}
echo "<atom:link href='http://www.YOUR_URL.com/rss.php' rel='self' type='application/rss+xml' />\n\n";
echo "</channel>\n";
echo "</rss>";
?>
Quote
Jock wrote:
Just finished my RSS 2.0 feed. It is also validated, and it have a lot of the things. Even it have more things than sourcforge example.
http://sml2008.free.fr/feeds/index.php
Quote
Studio1031 wrote:
that looks good, Jock.. is it ready for the public?
Category Forum
Content Administration - 8Labels
None yet
Statistics
10 participants
Notifications
You are not receiving notifications from this thread.
Related Questions