DZone.com is a popular digg-like portal to share interesting and useful links for developers.
It provides two type of buttons to vote a post directly from your site (like digg) with different size: tall and wide:
To add DZone buttons on your blogger template, in each post of your blog, select "modify html" and check "Expand Widget Models" (remember to save your template before!).
Better position to place the big button (tall) is beside the title of post. Find this line of code:
...<data:post.body/>...
Copy and paste the following code below the line above:
<script type="text/javascript">
var dzone_url = '<data:post.url/>';
</script>
<script type="text/javascript">
var dzone_title = '<data:post.title/>';
</script>
<script type="text/javascript">
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"> </script>
var dzone_url = '<data:post.url/>';
</script>
<script type="text/javascript">
var dzone_title = '<data:post.title/>';
</script>
<script type="text/javascript">
var dzone_style = '1';
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"> </script>
In order to choose the small button (wide size) instead of big button change this line:
<script type="text/javascript">
var dzone_style = '1';
</script>
var dzone_style = '1';
</script>
...whit the following:
<script type="text/javascript">
var dzone_style = '2';
</script>
var dzone_style = '2';
</script>
I suggest to place wide size button to the end of post (for example below tags line). Past the code below this line of code in your blogger template:
<p class='post-footer-line post-footer-line-3'>
Save your template and try it!
No comments:
Post a Comment