This document gives an overview of the php objects that you can make use of to add aggregated feeds to your web site.
Required
Each Page that will be using Blogroll Z must include mainclude/aggregate.inc.
require_once ('mainclude/aggregate.inc');
Aggregated Posts
foreach (getItems(”family”) as $item) {
added output code here
}
The getItems method
getItems(category, size, limit, desc);
- category
- Optional - If category is specified then it will return the aggregated posts from the given category of feeds, otherwise all feeds in feedConfig.xml will be aggregated. Default value = null
- size
- Optional - A numeric value will overrides the ma.props parameter channelSliceSize(see here.) This will limit the number of posts that will be returned from the aggregated array. A value of 0 will return all of the aggregated posts. Default value = null.
- limit
- Optional - A numeric value will override the ma.props parameter feedSortSliceSize (see here.) This will limit the number of posts that will be aggregated from each feed. A value of 0 will aggregate all posts in each feed. Default value = null.
- desc
- Optional - This defines whether the aggregated posts will sort ascending or descending. Default value = true (descending.)
The ChannelItem Object
The getItems() method returns an array of objects of the type ChannelItem. Each object represents one post in the feed. The following are the values that are collected in this object and are therefore available to your php page.
values
- link
- This is the URI for the post.
- title
- This is the value of the title element in the feed; the post name if it is a blog feed.
- content
- This is the content of the post.
- summary
- If there is a summary included in the feed, then this is the summary reduced to the length set in the ma.props parameter summaryLength. if there is no summary then this is the content reduced to the same length.
- author
- The author_name/creator as supplied by the feed.
- name
- The value of the title element in feedConfig.xml.
- timeStamp
- The date and time that the post originated
- adjustedTimeStamp
- The timeStamp ajusted by the ammount in the offset element in feedConfig.xml.
- fullSummary
- The summary from the feed not limited by the ma.props summaryLength parameter.
- offset
- The value of the offset element in feedConfig.xml.
- styles
- The array of style elements from feedConfig.xml.
- parentTitle
- The title of the parent feed for comment feeds if the parentfeed element is specified in feedConfig.xml.
- feedLink
- The value of the link ellement from feedConfig.xml.
- type
- The value of the type element from feedConfig.xml.
