Saturday, February 21, 2009

How to Add StumbleUpon Button to Blogger Posts

This is the how-to for adding another content recommendation service, StumbleUpon, to Blogger blog posts. I had to change the code and instructions from Stumble Upon site slightly because the paragraph tag was not placed around the correct element.
<data:post.body/>
<p>
<a class='timestamp-link'
expr:href='"http://www.stumbleupon.com/submit?url=" +
data:post.url + "&title=" + data:post.title' title='permanent link'>
<img style="padding: 0; border: none;"
src="http://cdn.stumble-upon.com/images/120x20_su_white.gif"
alt="Stumble Upon Toolbar" align=""/></a>
</p>


- Click on Layout and select the "Edit HTML" option
- Check the checkbox to Expand Widget Templates
- Find the following line...
<p><data:post.body/></p>

which in my template is around line number 663
- Replace it with the code above & save your template
- Republish your blog and your are all done

Post a Comment

Note: Only a member of this blog may post a comment.