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.)


Warning: include(/home/meancode/public_html/breakingwindows/footer.php): failed to open stream: Permission denied in /home/breaking/public_html/2008/12/brightkite_action_stream_by_yv.php on line 202

Warning: include(): Failed opening '/home/meancode/public_html/breakingwindows/footer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/breaking/public_html/2008/12/brightkite_action_stream_by_yv.php on line 202

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