Configuring RSS Feeds
For configuring the feeds, you will have to edit the $RSS array which is defined in the backend/common/rss.setting.inc.php in the following way:
$RSS['feeds'][0]['title'] = "The title of your feed";
$RSS['feeds'][0]['link'] = "http://www.link.to.your.frontend";
$RSS['feeds'][0]['language'] = "en"; // or de, fr, it, ...
$RSS['feeds'][0]['description'] = "A description of your feed";
$RSS['feeds'][0]['rights'] = "If you want to set rights/licenses for your feed put it here";
$RSS['feeds'][0]['publisher'] = "The publisher of your feed – may be your frotend URL";
$RSS['feeds'][0]['creator'] = "spunQ RSS-generator";
$RSS['feeds'][0]['subject'] = "The subject(s) of your feed";
$RSS['feeds'][0]['extension'] = "xml";
$RSS['feeds'][0]['linkcode'] = "\$link = sprintf(\"http://URL/view/%s\", \$item->id);";
$RSS['feeds'][0]['img'] = "URL to feed icon";
$RSS['feeds'][0]['file'] = "rc_works";
$RSS['feeds'][0]['query'] = " SELECT
object_id as id,
[classtable]_title as title,
[classtable]_description as abstract
FROM [classtable], object
WHERE object_ref =[classtable]_id AND
object_class_ref = [classid] AND
............[your personal conditions]...........”;
Some comments:
-
In the field 'linkcode', the URL for each feed item is created using PHP's sprintf() function. As a first parameter set the link including the wild card '%s' which refers to the second variable which will probably be a property of the icon object (id, title). As the sprintf() command will be passed to an eval() function, all dollars and double quotes will have to be escaped as shown in the example.
-
The SQL query creates the properties of the icon object so be sure that you use the three aliases 'id', 'title' and 'abstract' for your result columns. Apart from that rule, you may select any data you want. One frequently used query structure is shown above being the selection of an object title and description with the according object id.
-
Rights for your feed may be e.g. CreativeCommons licenses.
-
You can define as many feeds as you want by repeating the procedure and incrementing the original [0] key.
