Saturday, February 21, 2009

How to add a small DIGG button to the end of a Blogger Post

I started talking about Digg buttons in a previous post. If you wish to add a smaller Digg button to the end of your Blogger posts, right after the labels in the footer of each post is a popular spot. Under Layout/Edit HTML, expand the widgets and find the markup that shows as blue in the example.
     
<div class='post-footer-line post-footer-line-2'>
<span class='post-labels'>
<b:if cond='data:post.labels'>
<data:postLabelsLabel/>
<b:loop values='data:post.labels' var='label'>
<a expr:href='data:label.url' rel='tag'
><data:label.name/></a><
b:if cond='data:label.isLast != "true"'>,</b:if>
</b:loop>
</b:if>
</span>
</div>

  
<!-- small digg button -->
<div style='float:right;'>
<script type='text/javascript'>
digg_url="<data:post.url/>";
digg_skin="compact";
</script>
<script src='http://digg.com/tools/diggthis.js'
type='text/javascript'/>
</div>

  
<div class='post-footer-line post-footer-line-3'>
<span class='post-location'>

Text that appears blue is to show where you need place the Digg plug; the only lines that are to be inserted into Blogger markup (in expand widget mode) is the text in black. Here's what the new changes will give you:

Post a Comment

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