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

  • Creating a Clickable Header in Movable Type

    A question that comes up every so often on the Movable Type message boards is how to create a clickable banner that links back to...

  • So You Want To Write A Movable Type Plugin?

    One of the great things about Movable Type is it's flexibility. Behind the scenes is a powerful system that can be used to expand the...

  • Learning to Share

    Today I have added functionality to this site and to Darren Kenny Paralympic Cyclist that makes it easier for visitors to share the love and...

  • What has been happening

    The last week or so I have spent time on upgrading by brother's site to run on Movable Type 4.2. The previous site was still...

  • Almost Recent Entries

    There are some things about blogging that just doesn't make sense, take recent entries as an example. On the front page you have maybe your...

Close