Currently it supports the following:
- RSS 0.92
- RSS 2
Adding a feed is simple. Here you can see the news feed. Below is where the magic happens.
$feeds = array('link' => $settings['site_url'] . '/news/&readmore=' . $fetch,
'title' => html_entity_decode(htmlspecialchars_decode($fetch, ENT_QUOTES), ENT_QUOTES),
'description' => $fetch,
'category' => $fetch,
'date' => $fetch,
'guid' => $settings['site_url'] . '/news/&readmore=' . $fetch);
As you can see, all the data is assigned to a variable named $feeds inside an array. Inside $feeds we need 5 keys: link, title, description, category, date and guid. Usually guid and link will be the same. Link/guid is the location of where the item exists. In this case it is:
The title is the text to go above the description; the description is what you want the content to be. The category is to allow browsers to sort each item, this is optional but must be set so if you do not have a category, then leave category as:
The date is the unixtimestamp which is then formatted by eoCMS into the appropriate date.
You may have noticed that we have $fetch[number here]. This you may not have seen before. The number represents the column in the query; note: these start at 0.
Here is the query:
As you can see, n.id is the first column we select therefore to use that data we use $fetch. n.subject is the second so it will be $fetch and so on. This must be done due to the nature of joins with SQLite. Which adds the table name or the name you set I.E: n to the key in the array. MySQL does not do this and so the numbers are used by your feed to work with both databases.
Lastly, we have the $atom_link which is required by RSS 2. This goes after the while().
The $atom_link is the URL of the location of the feed. It will always be
With type= after. The type is the name of your file. For example if the feed's file name is "hello.php" then type=hello. This means you must be careful about what characters you use in the filename.
Formatted by: Jake