Not a developer? Go to MovableType.com

Documentation

ActionStreams

This tag is a part of the Action Streams plugin bundled with Movable Type 4.25 and higher.

This block template tag shows the specified actions collected for the specified authors from their Action Stream profiles.

Example:

<mt:ActionStreams>
<mt:DateHeader>
<div>
<h3><$mt:StreamActionDate format="%b %d, %Y"$></h3>
<ul>
</mt:DateHeader>
<li class="service-<$mt:var name="service_type"$>">
<mt:StreamActionDate format="%H:%M"> - <$MTStreamAction$>
</li>
<mt:DateFooter>
</ul>
</div>
</mt:DateFooter>
</mt:ActionStreams>

Attributes:

author (optional)

Limits displayed actions to only those collected for specific users. Use an author’s login account name (username) here.

For example, with this code only actions by the author with the username “Melody” will be shown:

<mt:ActionStreams author="Melody">

To show actions from several users, separate their usernames with commas:

<mt:ActionStreams author="Melody,Serge">

display_name (optional)

Limits actions to those collected for the specified authors. Use an author’s profile display name here.

For example, with this code only actions for the author with the display name “Melody Nelson” are shown:

<mt:ActionStreams display_name="Melody">

To show actions for several authors, separate their display names with commas:

<mt:ActionStreams display_name="Melody Nelson, Serge Gainsbourg">

author_id (optional)

Limits actions to those collected for specified authors. Use an author’s numeric ID here.

For example, with this code only actions for author #3 are shown:

<mt:ActionStreams author_id="3">

To show actions for several authors, separate their IDs with commas:

<mt:ActionStreams author_id="3,4,7">

Only one of authorid, displayname and author should be used at a time. If none are given, the authors for whom to show actions are inferred from context: if the tag is used in an author context (such as on an author archive page, inside an <mt:Authors> tag, in an entry context, or on an MT Pro profile page), that one author is selected; otherwise, if the tag is used in a blog context (most of the time), all the authors who can post to that blog are selected.

limit (optional)

Limits the actions shown to the given number (at most). If fewer actions are available in the selected set of actions, fewer will be shown.

days (optional)

Limits the actions shown to those that occurred the specified number of days ago, at the oldest. If fewer actions are available in the selected set of actions, fewer will be shown.

<mt:ActionStreams days="10">

Only one of days and limit should be used. If neither is specified, at most 20 actions are shown.

service (optional)

The ID of the service from which to show actions. Service IDs are the keys used in their service definitions; for example, Twitter’s ID is twitter, and Delicious’ ID is delicious.

For services with multiple streams, limiting only by service without a stream will list all actions from all of those streams. For example, service="flickr" will list both Flickr photos and Flickr favorites.

<mt:ActionStreams service="flickr">
    <!-- Flickr photos, favorites, etc -->
</mt:ActionStreams>

stream (optional)

The ID of the stream from which to show actions. Stream IDs are the keys used in their recipe definitions; for example, the stream of Delicious links has the ID links, and the stream of Flickr photos has the ID photos.

Because similar streams for all services use the same stream IDs, you can use the stream attribute independent of service to slice for similar actions across services. For example, you can specify stream="photos" with no service attribute to get photo events across services, or stream="favorites" for a multi-source list of favorites.

<mt:ActionStreams stream="photos">
    <!-- Photos from all services -->
</mt:ActionStreams>

To list actions from one particular stream only, use both service and stream.

<mt:ActionStreams service="flickr" stream="favorites">
    <!-- Flickr favorites only -->
</mt:ActionStreams>

sort_by (optional)

Determines the field by which to order the selected actions. By default, actions are ordered by the created_on field (that is, the time when the action occurred or was first found). The available fields to sort by are:

  • authorid, the numeric author ID of the author whose action it is
  • createdon, the date and time when the action occurred or was first found
  • modified_on, the date and time when the action last changed

You cannot sort by any of your streams’ special additional per-stream fields, even when limiting actions to those streams.

direction (optional)

Determines the direction in which to order the selected actions. Possible values are descend (highest to lowest, latest to earliest) and ascend (lowest to highest, earliest to latest). By default, actions are ordered in descending order (descend).

<mt:ActionStreams sortby="authorid" direction="ascend">
    <!-- Actions ordered by author ID, lowest to highest -->
</mt:ActionStreams>

Back

1 Comment

sxwang

sxwang on April 30, 2010, 1:20 a.m. Reply

sortby (optional), is it possible to sortby (commentedon + createdon). I want any entries with new comments to display at the top of the list. Thanks