View the large version (quicktime)
Order, a plugin for Movable Type 4 by MarkPasc
Order is used to combine items of different types into a single ordered list.
Action Streams, a plugin for Movable Type 4 by MarkPasc
Action Streams is used to pull content such as status updates or favorites into a stream that can be displayed on your blog.
Here's the code I use for my front page to order different types of content:
<mt:Order limit="16">
<mt:Entries lastn="4" tag="(NOT @featured) AND (NOT @quickie)">
<mt:OrderItem>
<div class="item item-entry"<mt:IfNonEmpty tag="entrydataicon_name"> style="background-image:url(images/icons/<mt:entrydataicon_name>_24.png);"</mt:IfNonEmpty>>
<p class="title"><mt:IfNonEmpty tag="EntryPermalink"><a href="<mt:EntryPermalink>"></mt:IfNonEmpty><mt:EntryTitle><mt:IfNonEmpty tag="EntryPermalink"></a></mt:IfNonEmpty></p>
<p class="text"><mt:EntryExcerpt></p>
<p class="meta"><a href="<mt:EntryPermalink>#comments" class="comment"><mt:EntryCommentCount></a><a href="<mt:EntryPermalink>">Read More</a> ›</p>
</div>
<mt:setvarblock name="order_by"><mt:EntryDate utc="1" format="%Y%m%d%H%M%S"></mt:setvarblock>
</mt:OrderItem>
</mt:Entries>
<mt:Entries lastn="4" tag="@quickie">
<mt:OrderItem>
<div class="item item-quickie" style="background-image:url(images/icons/cloud_24.png);">
<p class="text"><mt:EntryBody></p>
<p class="meta"><a href="<mt:EntryPermalink>#comments" class="comment"><mt:EntryCommentCount></a><a href="<mt:EntryPermalink>">Add a comment</a> ›</p>
</div>
<mt:setvarblock name="order_by"><mt:EntryDate utc="1" format="%Y%m%d%H%M%S"></mt:setvarblock>
</mt:OrderItem>
</mt:Entries>
<mt:Entries lastn="4" offset="1" tag="@featured">
<mt:OrderItem>
<div class="item item-entry"<mt:IfNonEmpty tag="entrydataicon_name"> style="background-image:url(images/icons/<mt:entrydataicon_name>_24.png);"</mt:IfNonEmpty>>
<p class="title"><mt:IfNonEmpty tag="EntryPermalink"><a href="<mt:EntryPermalink>"></mt:IfNonEmpty><mt:EntryTitle><mt:IfNonEmpty tag="EntryPermalink"></a></mt:IfNonEmpty></p>
<p class="text"><mt:EntryExcerpt></p>
<p class="meta"><a href="<mt:EntryPermalink>#comments" class="comment"><mt:EntryCommentCount></a><a href="<mt:EntryPermalink>">Read More</a> ›</p>
</div>
<mt:setvarblock name="order_by"><mt:EntryDate utc="1" format="%Y%m%d%H%M%S"></mt:setvarblock>
</mt:OrderItem>
</mt:Entries>
<mt:MultiBlog include_blogs="4">
<mt:Entries lastn="16">
<mt:OrderItem>
<div class="item item-link">
<p class="text"><strong><a href="<mt:EntryPermalink>"><mt:EntryTitle></a></strong> - <mt:EntryMore></p>
<p class="meta"><mt:IfNonEmpty tag="entrydatavia_url">[<a href="<mt:entrydatavia_url>"><mt:entrydatavia_title></a>]</mt:IfNonEmpty><a href="<mt:EntryPermalink>#comments" class="comment"><mt:EntryCommentCount></a><a href="<mt:EntryBody>"> Go there</a> »</p>
</div>
<mt:setvarblock name="order_by"><mt:EntryDate utc="1" format="%Y%m%d%H%M%S"></mt:setvarblock>
</mt:OrderItem>
</mt:Entries>
</mt:MultiBlog>
<mt:ActionStreams lastn="8">
<mt:OrderItem>
<div class="item item-action-<mt:var name="service_type">">
<p class="text"><mt:StreamAction></p>
</div>
<mt:setvarblock name="order_by"><mt:StreamActionDate utc="1" format="%Y%m%d%H%M%S"></mt:setvarblock>
</mt:OrderItem>
</mt:ActionStreams>
</mt:Order>

Post a comment
Comments
Jason,
Mark (author of Action Streams and Order) made some sample code to select only the last x number of days based on the last y number of posts. It's not quite the same problem but it deals with a lot of similar elements and you might be able use his example code as a base. I would imagine you could use a setvarblock for each day, dumping any header text into it and asking for it once when publishing for each day.
August 26, 2008
2:20 PM
From Nick
This question might be outside the scope of what you've done, but I figure if anyone would know the answer, you would :)
When adding Action Stream items to an index template with blog entries, is there a way to have a single date header for each day?
For example, for today it would have a header of August 21st 2008, and under it would be today's variety of tweets, flickr photos, blog posts, etc. Same for yesterday, etc.
Thanks - any hints or guidance would be appreciated.
Thanks for sharing your template code!
Jason
August 21, 2008
6:47 PM
From berberich.myopenid.com