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

  • Now on YouTube

    Once in while, when answering questions on the Movable Type IRC channel or the support forums I find it easier to show rather than tell,...

  • Using jQuery with Movable Type

    Introduction jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development Today...

  • HashTag now on GitHub

    I have moved the source code for HashTag from my private SVN over to GitHub. If you want to contribute any changes you can find...

  • HashTag 2.5 Released

    Version 2.5 of my HashTag plugin has now been released. See the Hash Tag Plugin project page for more information. The major change in 2.5...

  • Hash Tag Beta 2.5 Now With Scheduled Post Support

    I have now added support for scheduled publishing in my HashTag plugin. It is currently a beta and can be downloaded from this link HashTag...

Close