Difference between revisions of "Configuring RSS Feeds"

From ARK
Jump to: navigation, search
Line 15: Line 15:
 
                     $conf_field_issuedon,
 
                     $conf_field_issuedon,
 
                     $conf_field_definition,
 
                     $conf_field_definition,
 
 
                 )
 
                 )
 
             ),
 
             ),
Line 33: Line 32:
 
      
 
      
 
   );
 
   );
 +
 +
You will notice a couple of extra things here. Firstly I am creating a new field in the settings file called RSS_short_desc. The RSS specification requires that a tag called <description> is within any RSS file. This is essentially a short bit of text describing each item. In the example here I am creating a copy of the short_desc field, changing its name and and adding in an extra element to the array 'op_tag_RSSExt'. This tells the RSS code what tags to put around the value of that field.
 +
 +
  $RSS_short_desc = $conf_field_short_desc;
 +
  $RSS_short_desc['op_tag_RSSExt'] = 'description';
 +
 +
I then add the the RSSExt array into the wider export_conf array - to ensure that the RSS export code can read it.
 +
 +
In order to access this feed, you need to know the number of the saved filterset (this can be found in cor_tbl_filter) or in later versions of the code a pre-filled link is provided next to an saved filters.
 +
 +
The RSS feed can be accessed directly by pointing your web browser or RSS reader at:
 +
 +
  http://YOUR_WEB_ADDRESS_HERE/data_view.php?vtok=1&retftrset=9&output=RSSExt
 +
 +
Please note the 'retftrset=9' needs to be replaced with the relevant number for whichever saved filterset you want to have the RSS feed of.

Revision as of 18:53, 20 May 2010

It is possible to create an RSS feed of any saved filterset. What this means is that you can save a query (for instance, "What contexts have been assigned to Stuart Eve") - and then Subscribe to the RSS export for that saved filterset - which will update your RSS reader with the latest results.

This is quite easy to set-up, but there are some additions you will need to make to your settings file. This is simply a matter of adding an extra array into your export_conf_array in each of the mod_settings:

 $RSS_short_desc = $conf_field_short_desc;
 $RSS_short_desc['op_tag_RSSExt'] = 'description';
 $cxt_export_conf = 
   array(
   'CSV' =>
       array(
           'op_field_delimiter' => ',',
           'op_text_delimiter' => ' ',
           'export_fields' =>
               array(
                   $conf_field_issuedon,
                   $conf_field_definition,
               )
           ),
   'XMLItemList' =>
       array('empty'
   ),
   'XMLItem' =>
       array('empty'
   ),
   'RSSExt' =>
       array(
           'export_fields' =>
               array(
                   $RSS_short_desc
               )
           ),
   
 );

You will notice a couple of extra things here. Firstly I am creating a new field in the settings file called RSS_short_desc. The RSS specification requires that a tag called <description> is within any RSS file. This is essentially a short bit of text describing each item. In the example here I am creating a copy of the short_desc field, changing its name and and adding in an extra element to the array 'op_tag_RSSExt'. This tells the RSS code what tags to put around the value of that field.

 $RSS_short_desc = $conf_field_short_desc;
 $RSS_short_desc['op_tag_RSSExt'] = 'description';

I then add the the RSSExt array into the wider export_conf array - to ensure that the RSS export code can read it.

In order to access this feed, you need to know the number of the saved filterset (this can be found in cor_tbl_filter) or in later versions of the code a pre-filled link is provided next to an saved filters.

The RSS feed can be accessed directly by pointing your web browser or RSS reader at:

 http://YOUR_WEB_ADDRESS_HERE/data_view.php?vtok=1&retftrset=9&output=RSSExt

Please note the 'retftrset=9' needs to be replaced with the relevant number for whichever saved filterset you want to have the RSS feed of.