Monday, March 2, 2009

How to Adding a Digg Button

If you open this blog, on the right corner of the article will look a digg button.Do you know digg.com? I am sure you know the exact site digg.com. Digg.com is a social networking site. With digg, you can share your blog content with other people. If you install a Digg button in your blog, and if the article is submitted to digg by visitor, then it will help gain traffic to your blog.

If you want to install a Digg button on your corner of the article, follow the tutorial below.


  1. Log in to Blogger with your blogger account.
  2. After you log in, click on the Layout.
  3. Click on Edit HTML.
  4. Mark on Expand Template Widget.
  5. Download your template before editing. Click Download Full Template.
  6. Find code like this in your template

    <p><data:post.body/></p>

  7. Change the code above into the form like this.

    <p>
    <!-- DIGG -->
    <div style='float:right; margin-left:10px;'>
    <script type='text/javascript'>
    digg_url = '<data:post.url/>';
    </script>

    <script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>

    </div>
    <data:post.body/>
    </p>


  8. Click Save Template.



Tricks above can be used if your template do not use the "Read More" system. If you use a template with "Read More" system, form of the code is like this.

<b:if cond='data:blog.pageType == "item"'>



<style>.fullpost{display:inline;}</style>



<p>

<!-- DIGG -->

<div style='float:right; margin-left:10px;'>


<script type='text/javascript'>

digg_url = '<data:post.url/>';

</script>

<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>

</div>


<data:post.body/>

</p>


<b:else/>

<style>.fullpost{display:none;}</style>

<p>

<!-- DIGG -->
<div style='float:right; margin-left:10px;'>
<script type='text/javascript'>

digg_url = '<data:post.url/>';
</script>
<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
</div>

<data:post.body/>
</p>

<a expr:href='data:post.url'><b>Read More...</b></a>


</b:if>


Save your template



Ok, i think this enough. Happy trying!!

0 comments:

Post a Comment