Brightkite Action Stream by Yves Luther

Yves Luther has created a Brightkite plugin for Action Streams. If you are using the very basic LI code to create an entire Action Streams block of code:

<li class="hentry service-icon service-<mt:var name="service_type">"> <span class="entry-content">
<mt:StreamAction smarty_pants="1">
</span> </li>

The Brightkite plugin produces this:

„meancode checked in @ 133 N Prospect St“

Keep reading to see my way of changing it.

Here is a full mt:if statement that will display the 3 types of Brightkite posts, and then an mt:else to display all the others. It is based off of the example on Yves's site with some changes to make things look prettier - and I don't speak German :P

<mt:If name="service_type" eq="brightkite">
<mt:SetVarBlock name="type">
<mt:StreamActionVar name="type" />
</mt:SetVarBlock>
<mt:If name="type" eq="checkin">
<li class="hentry service-icon service-<mt:var name="service_type">"><span class="entry-content">Ken Edwards checked in @
<mt:StreamActionVar name="place" decode_html="1" />
(<a href="<mt:StreamActionURL />"class="social-link" target="_blank">View Marker</a>).</span></li>
<mt:ElseIf name="type" eq="photo">
<li class="hentry service-icon service-<mt:var name="service_type">"><span class="entry-content">Ken Edwards photographed @
<mt:StreamActionVar name="place" decode_html="1" />
(<a href="<mt:StreamActionURL />" class="social-link" target="_blank">View Marker</a>).</span></li>
<div class="thumbnail"> <a href="<mt:StreamActionURL />" title="<mt:StreamActionVar name="caption" />"><img src="" /><span class="photo"> </span></a> </div>
<mt:ElseIf name="type" eq="message">
<li class="hentry service-icon service-<mt:var name="service_type">"><span class="entry-content">Ken Edwards posted a message @
<mt:StreamActionVar name="place" decode_html="1" />
(<a href="<mt:StreamActionURL />" class="social-link" target="_blank">View Marker</a>).</span></li>
<p>
<mt:StreamActionVar name="message" />
</p>
</mt:If>
<mt:Else>
<li class="hentry service-icon service-<mt:var name="service_type">"> <span class="entry-content">
<mt:StreamAction smarty_pants="1">
</span> </li>
</mt:If>

With that code in place, you will get something like this. Please note I hard coded my name in there instead of using a variable for display_names.

Ken Edwards checked in @ 133 N Prospect St (View Marker).

Blah, photo does not work yet, still need to work on that.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Blog Hosting by Meancode Media



Breaking Windows is © 2003
by Ken Edwards and Matt Paprocki. Some Rights Reserved.
Contact Ken: ken [at] meancode [dot] com
Contact Matt: videogamer [at] bex [dot] net

Disclaimer: The opinions expressed on this website are solely those of the author and do not reflect those of any corporation, business entity, group or club the author has ever been associated with. Feel free to quote anything I say but do me the courtesy of a link back (see Creative Commons license).

Blogcritics Magazine

Social Networking

Mac Headlines

Read up-to-date headlines on everything Mac.

Content provided by prMac.

ESRB Search

Creative Commons License
This weblog is licensed under a Creative Commons License.
Enhanced with Snapshots