Creating a Buzz with Yahoo Buzz

Recently Yahoo have introduced Yahoo Buzz, a social news site, similar to Digg. Yahoo determines the most popular search topics and then, we showcase the most popular stories within those topics, based on activities like voting and emailing stories to friends.

If you want people to be able to vote, you need to add a button to your page, Yahoo has a list of button code, but to make the system really fly you can add extra post information that will get submitted. This is easy to do in Movable Type, first we need to create a new module template called Yahoo Buzz and past the following code into it.

<script type="text/javascript">
yahooBuzzArticleHeadline = "<mt:EntryTitle>";
yahooBuzzArticleSummary = "<mt:EntryBody words="15">";
yahooBuzzArticleCategory = "<mt:EntryCategory>";
<mt:EntryIfTagged tag="@text">
    yahooBuzzArticleType = "text";
</mt:EntryIfTagged>
<mt:EntryIfTagged tag="@image">
    yahooBuzzArticleType = "image";
</mt:EntryIfTagged>
<mt:EntryIfTagged tag="@video">
    yahooBuzzArticleType = "video";
</mt:EntryIfTagged>
    yahooBuzzArticleId = window.location.href;
</script>

<script type="text/javascript"
    src="http://d.yimg.com/ds/badge2.js"
    badgetype="large-votes">      
</script>

save this and then open the entry template, scroll down until you find

 </mt:EntryIfTagged>

and after that add

 <mt:Include module="Yahoo Buzz">

rebuild your site and each entry should now have a Buzz button at the end, just before any comments.

You set the category as you would normally do in Movable Type and you set the Article Type through the use of private tags (@text, @image, @video).

This is a first draft template and a little rough as stories can only have one category. Ways to improve / change this would be to have custom fields to store Category and Article Type.

Leave a comment

Gallery

Recent Entries

Close