I have seen sites that have embedded DNPL in Joomla, but I'm sorry, I have no information on doing so.
I did however finally get a simple RSS routine together.. It's pretty short so I'll just paste it here. I named mine latestrss.php and it is in the same directory as the "directory" file, above the /include and /admin directories.
| Code: |
<?php
// CONFIG
// set the count number to the number to the number of entries to show
// Then edit the feed <title>, <link> and <description> tags.
$count = 25;
header("Content-Type: application/xml; charset=UTF-8");
echo '<'.'?xml version="1.0"'.'?'.'>'.'
<rss versioin="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">
<channel>
<title>Your feed title</title>
<link>http://www.YOURWEBSITE.com</link>
<description>Your site description </description>
<language>en-us</language>
';
// END CONFIG
// get DB connect info and table names
require("./include/config.php");
// connect to db
if(mysql_connect($dbhost, $dbuser, $dbpasswd)){
mysql_select_db($dbname);
} else {
echo mysql_error();
echo 'Could not connect to the database';
exit;
}
// get latest entries
$query = "SELECT * FROM `".$tb_links ."` ORDER BY Added DESC LIMIT ".$count;
$result = mysql_query("$query");
while ($row = mysql_fetch_assoc($result)) {
echo "\r\n\t".'<item>
<title>'.htmlentities(stripslashes($row['SiteName'])) .'</title>
<link>'.htmlentities($row['SiteURL']).'</link>
<description>
'.htmlentities(stripslashes($row['Description'])) .'
</description>
<pubDate>Sun, 29 Sep 2002 11:13:10 GMT</pubDate>
</item>'."\r\n";
}
?>
</channel>
</rss>
|
Not particularly elegant, but it works