Add Digg button to Blogger or Blogspot

       This is a step-by-step guide to automatically place a real-time Digg count and vote button to every single blog post. Digg is a social content website where your readers or you can submit content to. If you have a good story, members will 'digg' the post and write comments. As a blog owner, you may want to make it easy for and encourage your readers to submit and digg your articles.
       Automatic Count and Vote Button

Before you do that though, you would want to take note of the following:-

       1. Your blog should be set to save Post Pages. Post Pages are archived blog posts published to their own web page. Each post will have a unique URL, which is required by Digg for the individual posts to be submitted. To verify or enable it, login to your Blogger Dashboard. Under Settings-> Archiving, set the “Enable Post Pages?” to “Yes” and save the settings.

       2. This template hack will put a Digg button to every post. You are therefore not able to choose which post you want to include or exclude a button. If you would prefer to have a Digg button added only to some posts, read the later part of this article on “Button for selective posts.”

       3. The code reads the URL of the individual blog page and this shall be the URL used for submission of the story to Digg.

       Under “Template”, click the “Edit HTML” tab. Block copy the entire HTML code for your site and save it in a text file. You can also click the "Download Template" link. This is one of the two necessary steps whenever you want to change the template. The second step is of course to “Preview” the new changes, and save the changes only when you are satisfied. The backup you have saved in a text file will come in handy when you accidentally click to save the changes without previewing them. With a backup, you can easily restore the template to the prior state if need be.


       Click the box next to “Expand Widget Templates”. Scroll about two-thirds down the template to look for the code that reads:-
<p><data:post.body/></p>

       If you want the button to show at the top right corner of your post, replace the above code with this.
<div style='float:right; margin-left:10px;'>
<script type='text/javascript'>
digg_url=&quot;<data:post.url/>&quot;;
</script>
<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
</div>
<p><data:post.body/></p>

       This is what you get:-

       If you would like the button to appear at the end of your post, replace with this following code instead.
<p><data:post.body/></p>
<div style='float:right; margin-left:10px;'>
<script type='text/javascript'>
digg_url=&quot;<data:post.url/>&quot;;
</script>
<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
</div>

       The result will be this:-

       If you want to have the button at the top left corner of your post, change the alignment.
<div style='float:left; margin-right:10px;'>
<script type='text/javascript'>
digg_url=&quot;<data:post.url/>&quot;;
</script>
<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
</div>
<p><data:post.body/></p>

       The outcome is this:-

       Digg has another compact button. If you insert this code:-
<div style='float:right; margin-left:10px;'>
<script type='text/javascript'>
digg_url=&quot;<data:post.url/>&quot;;
digg_skin=&quot;compact&quot;;
</script>
<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
</div>
<p><data:post.body/></p>

       You will see a compact Digg count button like this:-

       You can also change the background color of the button to blend with your site. For example, a code like this:-
<div style='float:right; margin-left:10px;'>
<script type='text/javascript'>
digg_url=&quot;<data:post.url/>&quot;;
digg_bgcolor=&quot;#BDEDFF&quot;;
digg_skin=&quot;compact&quot;;
</script>
<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
</div>
<p><data:post.body/></p>

       will give you this:-

       You can insert the color code of your choice into the red portion. For a list of color values to insert, you may refer to the Hexadecimal HTML color code list.

Automatic Count Button in Blog Footer

       [Update] This segment is added in response to user's request to have the Digg button in the Blog footer, i.e., after the labels. If you scroll through your template, you will see this chunk of code which gives the labels in your Blog footer.
<p 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>
</p>

       If you want a Digg button to appear just after the labels, add the appropriate Digg button code right after the above code. For example, if you want the compact Digg button, add this code below the labels code:-
<div style='float:right; margin-left:10px;'>
<script type='text/javascript'>
digg_url=&quot;<data:post.url/>&quot;;
digg_skin=&quot;compact&quot;;
</script>
<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
</div>

       The resulting layout is this:-

       Move the Digg button code above the labels if you'd like. Experiment a little. Just remember to preview the template and not to save it unless you are satisfied.

Digg Button in Blog Footer

       If you do not want to see an Automatic Count button, you can also place a link button into the template. This button will appear at the bottom right corner of every post and readers can click it to submit that post to Digg.

Scroll to this part of the template and insert the lines (in red):-
<div class='post-body'>
<p><data:post.body/></p>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>

<div style="float:right; margin-left:10px;">
<a expr:href='"http://digg.com/submit?phase=2&amp;url=" +
data:post.url + "&amp;title=" + data:post.title'
target='_blank'><img border="0" alt="Digg this" src="http://digg.com/img/badges/91x17-digg-button.gif"/></a></div>


       With the code, this is what you will see at the end of every post.

       You can change the position of this button. Go through what we discussed earlier in this article to understand where to place the code if you should want the button to be at the top of the article.

       The button 91x17-digg-button.gif is simply an example. As the following section explains, there are many buttons you can use. To change the button to another design, replace the image URL with that of the new button.

Button for selective posts

       The methods of manually adding a Digg button to selective posts are rather tedious and complicated. The problem is that Blogger does not allow you to simply insert a JavaScript into a blog post. Since this blog is targeted at the majority of us who are not computer experts, I shall suggest a method that I think is simple enough for us.

First, go to the Digg tools site to select a Digg button that you like. You will see a wide selection of Digg buttons.
DiggDiggDiggDiggDiggDiggDiggDiggDiggDiggDigg

Take note of the image URL. For example, the image URL of this button Digg is
http://digg.com/img/badges/91x17-digg-button.gif

       Write a post and publish it. Next, refresh the page and click on the title of your post. This will bring you to the post page. Take note of the new URL of your story. Insert it into the red portion of this HTML code. If you want a different image, insert the image URL into the blue portion of the code.
<a href="http://digg.com/submit?phase=2&url=URLofyourstory" target="_blank"><img border="0" alt="Digg my article" src="http://digg.com/img/badges/91x17-digg-button.gif"/></a>

       Now, go back to your article and Edit it. Choose the “Edit HTML” mode and not “Compose” mode. Copy the above code and paste it into whichever part of your blog article. “Preview” it, and if you are happy with it, “Publish” it.

       For this article, I have manually inserted the Digg button. If you would like to Digg this article, or just to see how it works, click this button. Add Digg button to Blogger or Blogspot

0 ความคิดเห็น:

Post a Comment

Categories

25 Tips for Marketing Your Blog (1) 7 Tips (2) 7 ขั้นตอนง่ายๆ ที่จะทำให้ Search Engine (1) Add Adsense inside Blogger (1) Add Copy To (1) Add Favicon (1) Add Favicon on Blog (1) Adding a Favicon on Blogger (1) AdSense in the Middle or Anywhere of Blogger (1) Adsense Parser to blogger (1) Affiliate Programs (1) AI RoboForm (1) Amazon (2) Amazon Associate (1) Amazon Associates (2) Auto Slider to Blogger (1) Automatically Refresh Your Blog (1) Best Adsense Secrets (1) Best Adsense Tips (1) Best Adsense Tips And Secrets (1) Blog (2) Blog and Make Money (1) Blog Tips (4) blog to make money (1) Blogads.com (1) Blogger (1) Blogger Dummies (1) Blogger Guide (1) blogger hack (1) Blogger Hacks (1) Blogger Help (1) Blogger Instructions (1) Blogger Make Me Rich (3) Blogger Tag (1) Blogger Tips (2) Blogger Tricks (1) Blogging (1) Blogs Tools (3) Boost Traffic (1) Change Template (2) Change the Width of Your Blog (1) cloud (1) Cloud Widget (1) Comments Below Posts (1) Complete SEO Guide For Blogger|Blogspot (1) Create a Blogger Tag Cloud Widget (1) Crispads.com (1) CSS (1) Customization Blogger (1) Customization Quotes in Blogger (1) Customize (2) Customizing Comments Below Posts (1) Digg (1) Digg Button (1) Disable Your computer might be at risk (1) Embed Adsense add unit in Left or Right corner of post content (1) Favicon on Blogger (1) fill forms (1) Footer (1) form filler (1) form filling software (1) Google Adsense (1) How Add META TAGS to Blogger (1) How Add META TAGS to Blogger(blogspot) blogs (1) How To Add 728×90 leaderboard Adsense ads between Header and Post Section in blogger (1) How to Add Adsense ads inside Blogger blog posts or between blog posts (1) How To Add Adsense Parser to blogger (1) How To Add Different Meta Tags to Different Blogger Posts (1) How To Add One Click Sitemaps Submitter to blogger (1) How to blog to make money (2) How to Embed Adsense add unit in Left or Right corner of post content (1) How To Insert Adsense Ads In Blogger Post (1) How To Make Money With Adsense (1) How To Make Money With Adsense Without Your Website (1) How to put AdSense in the Middle or Anywhere of Blogger posts (1) How To Refresh Your Blog (1) How To Remove AdSense Ads from the Homepage (1) How To Remove Low paying Adsense Ads (1) How To Use Adsense Section (1) How To Use Adsense Section Targeting on Blogger (1) Insert Ads In Blogger Post (1) Insert Adsense In Blogger Post (1) JavaScript (1) Keyword (1) label (1) Label cloud (1) Labels (1) Link in Footer (1) Make the Blog Wider (1) Meta Tag (1) meta tags (2) Mootools Featured Posts Auto Slider (1) Move To to (1) Newer + Older Posts (1) newerPageTitle (1) nextprev (1) Numbered Page Blog (1) Numbered Page Navigation Hack For Bloggers (1) olderPageTitle (1) password management (1) password manager (1) Poly Wi-Fi (1) Posts Auto Slider (1) Promote Blog (2) Quotes in Blogger (1) Read More (1) Read More in blogger (2) ReadMore blogger (1) Refresh Your Blog (1) Relate Post (2) Relate Post Widget (1) Remove AdSense Ads from the Homepage (1) Remove Blogger Navbar (1) Remove the NavBar (1) RoboForm (1) Search Engine Friendly (1) Search Engine Optimization (1) SEO (8) SEO (Search Engine Optimization) (2) SEO เคล็ดลับ โปรโมท (1) Slider to Blogger (1) Successful Blogging (1) Tag Blogger (1) Template (1) Tip Adsense (2) Tips (3) Tips Ads (1) Tips Adsense (3) Tips and Tricks (1) Tips for Marketing (1) widget (1) widget label (1) XP Tweaks (1) Your Blog (1) ขั้นตอนการทำ SEO (2) เคล็ดลับ (1) เคล็ดลับ โปรโมท (1) โปรโมท (2) โปรโมทเวบ (1) เรื่องอื่นๆที่ใกล้เคียง ใน Blogger (1) วิธีการทำ Label cloud (1) วิธีทำ Relate Post (1) วิธีทำลิงค์ Read More... ใน blogger (1) วิธีทำเว็บให้น่าใช้งาน (1) วิธีลับในการหาข้อมูลจาก Google (1) เว็บให้ดัง (1)
 
Copyright © 2009 Blogger Template Designed by All about Blogger Tips