NAME
MT::App::ActivityFeeds
DESCRIPTION
Movable Type application for producing activity feeds. Activity feeds are typically produced from the user's log table, but the application relies heavily on the MT callback architecture for generating the feed content.
Plugins can hook into these callbacks to either alter or supplement feed content.
CALLBACKS
- ActivityFeed
- ActivityFeed <view>
callback($eh, $app, $view, $feed)
The ActivityFeed callback drives the generation of the feed. The default handler for this callback executes with a callback priority of 5. Plugins can register with a priority lower than 5 to prepend content to the feed or a priority higher than 5 to append content to the feed (and also manage elements that have already been added to the feed).
METHODS
$app->init
Sets up the Activity Feed application, specifying the template directory and defining the core activity feed callbacks.
$app->init_core_callbacks
Registers the core callbacks for the standard activity feeds.
$app->login
Method to override MT::App-login> to do token based authentication for feed clients.
$app->mode_default
Default application mode handler that handles all feed requests.
$app->process_log_feed
Method that provides the respones for all core feed types that are based on MT::Log records.
$app->session
Provides a MT::Session record where session-based data can be kept for activity feed requests.
$app->feed_entry(\%param)
$app->feed_link(\%param)
This method creates a new "link" feed element that is used to assign to a particular feed entry. The parameters you can supply in the param hashref are:
- type - The MIME type of the link (defaults to "text/html").
- rel - The link relationship (defaults to "alternate").
- href (or 'link') - The URL of the link (required).
- title - The title to use for the link (required).
- rel - The link relationship (defaults to "alternate").
$app->feed_person(\%param)
This method creates a new "person" feed element that is used to assign to a particular feed entry. The parameters you can supply in the param hashref are:
- name - The name for the person (required).
- uri - The URI of the person.
- email - The email address of the person.
- uri - The URI of the person.
$app->feed_properties($feed, \%param)
This method is used to assign the various properties of the feed. This method is provided to abstract the interface to the underlying feed implementation. The parameters you can supply in the param hashref are:
- link - The URL to use for the feed link.
- link_type - The 'type' to assign to the feed link.
- link_rel - The link relationship of the feed link.
- link_title - The title to assign to the feed link.
- title - The title to assign for the feed itself.
- link_type - The 'type' to assign to the feed link.
entity_translate($str)
Changes common HTML named entities into numeric equivalents ('<', '>', '&', '"', '&apos') for the CDATA blocks produced by the activity feeds.
$app->apply_log_filter(\%params)
Returns a set of MT::Log load terms appropriate for the request parameters provided through the \%params.
AUTHOR & COPYRIGHTS
Please see the MT manpage for author, copyright, and license information.