I have created my own RSS that I use to publish ads on Facebook via RSS Grafiti.
The reason I use my own is that I wanted to have the images included in the RSS and therefore pushed to Facebook.
This is just standard PHP code and does not use the Os Class stuff but I you can put it into your system, add your dataase connection details and it should work for you too
If someone wants to change this to os Class code go ahead, it could be a good plugin or the core RSS could be updated to have the image included. One thing to note is that the query used is not optimized for large databases, and could use some re-writing even adding a limit clause would help, but hope it helps some
You will need to edit the database, username, password and host as well as changing the image URL to your own
You can see this at
http://herveybaybuysell.com/rss.php and on the facebook page
http://www.facebook.com/pages/herveybaybuysellcom/101483139942926 to see the results once it is pushed through
<?php
$rssfeed = '<?xml version="1.0" encoding="UTF-8"?>
';
$rssfeed .= ' <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
';
$rssfeed .= ' <channel>
';
$rssfeed .= ' <title>herveybaybuysell.com latest items</title>
';
$rssfeed .= ' <link>http://www.herveybaybuysell.com</link>
';
$rssfeed .= ' <description>This feed shows the latest items posted on herveybaybuysell.com</description>
';
$rssfeed .= ' <language>en-us</language>
';
$rssfeed .= ' <copyright>Copyright (C) 2011 herveybaybuysell.com</copyright>
';
$connection = @mysql_connect('<host>', '<databaseUser>', '<password>')
or die('Could not connect to database');
mysql_select_db('<database>')
or die ('Could not select database');
$query = "SELECT DISTINCT i.pk_i_id AS id, i.dt_pub_date AS pubdate, i.f_price AS price, i.s_contact_name AS contact_name, id.s_title AS title, id.s_description AS description, il.s_city_area AS location, ir.s_path AS impath, ir.pk_i_id AS imname, ir.s_extension AS sextension, ir.s_content_type AS icont_type
FROM oc_t_item i
JOIN oc_t_item_description id ON i.pk_i_id = id.fk_i_item_id
LEFT JOIN oc_t_item_location il ON i.pk_i_id = il.fk_i_item_id
LEFT JOIN oc_t_item_resource ir ON i.pk_i_id = ir.fk_i_item_id
WHERE i.b_active = 1
GROUP BY i.pk_i_id
ORDER BY i.dt_pub_date DESC";
$result = mysql_query($query) or die ("Could not execute query");
while($row = mysql_fetch_array($result)) {
extract($row);
$link = "http://herveybaybuysell.com/".$title."_".$id;
if($imname){
$item_image = 'http://herveybaybuysell.com/'.$impath.$imname.'_thumbnail.'.$sextension;
}
else
{
$item_image = 'http://herveybaybuysell.com/oc-content/themes/hbs/images/no_photo.gif';
$icont_type = 'image/gif';
}
$rssfeed .= ' <item>
';
$rssfeed .= ' <title>' . $title . '</title>
';
$rssfeed .= ' <description>' . $description . '</description>
';
$rssfeed .= ' <enclosure url="'.$item_image.'" type="'.$icont_type.'" />
';
$rssfeed .= ' <link>' . $link . '</link>
';
$rssfeed .= ' <pubDate>' . date("D, d M Y H:i:s O", strtotime($pubdate)) . '</pubDate>
';
$rssfeed .= ' </item>
';
}
$rssfeed .= '</channel>
';
$rssfeed .= '</rss>
';
echo $rssfeed;