Skip to content

Available data for entries

Lucas Verney edited this page Jul 19, 2014 · 1 revision

Entries are represented as associative arrays. The following elements can be used:

  • id which is the id of the entry in the database.

  • feed_id which is the id of the associated feed.

  • authors which is an array to represent all the available authors for an article. it is represented as:

[{'name': AUTHOR1_NAME, 'email': AUTHOR1_EMAIL, 'uri': AUTHOR1_URI}, {'name': AUTHOR2_NAME, 'email': AUTHOR2_EMAIL, 'uri': AUTHOR2_URI}]
  • title which is the entry title

  • links is an array of arrays for each available links. So, basically, links is:

[{'url': SOME_URL, 'rel': SOME_REL_ATTRIBUTE, 'title': SOME_TITLE_PROVIDED}, {'url': SOME_URL2, 'rel': SOME_REL_ATTRIBUTE2, 'title': SOME_TITLE_PROVIDED2}, …]
  • description is a description provided by the feed itself (basically a summary of the entry content).

  • content is the full content of the entry.

  • enclosures is a list of associative arrays representing each enclosures. It is basically (in JSON notation for conveniency):

[{'url'=>ENCLOSURE_URL, 'type'=>ENCLOSURE_MIME_TYPE, 'size'=>ENCLOSURE_SIZE}, …]
  • comments is an URL to the comment page for this entry.

  • guid is the guid of the entry (either a permalink, or some special tag syntax).

  • pubDate is the timestamp of publication.

  • lastUpdate is the timestamp of the last modification of this entry (from the feed infos).

The above elements are stored directly in the database, and they correspond to the database fields. Please note that some elements may be empty, as explained in the RSS and ATOM specifications. Some extra keys are available in the templates:

  • origLink which is the original link to the entry, provided by Feedburner (Feedburner overwrites the link tag with its own address, using feedproxy). This link, if not empty, is better for privacy concerns.

  • displayed_content contains the preferred content according to user preferences (the content if he chooses to display the full articles, the description if he chooses to display only summaries, and nothing if he chooses to have only title).

TODO : Tags (for now, I think it will be a list of tags, as an array associated to the tags key for each entry.

Note: I use JSON notation for arrays for ease of notation, but it is actually a PHP array. Note: All the arrays are available as PHP arrays in the script, but are stored as JSON strings in the database.