
After a poking around the xml template for my site, and playing around with the Digg code, I’ve figured out how to add a Digg button to my posts.
Listed below is a quick how-to for adding this functionality to your website too.
- Make sure your blog is set to enable Post Pages and you are using the new Blogger, not the classic version
- Go to the customization section of your blog, on the Template tab select Edit HTML
- Make sure to click Download Full Template and save a backup copy to disk – just in case.
- Put a check in Expand Widget Templates.
- Search for
<p><data:post.body/></p>
Update: November 5th, 2008
It has come to my attention that some templates use a slightly different formatting. If you cannot find the text listed above – try searching for <data:post.body/> and follow the rest of the instructions.
- Paste this on the line directly before it:
<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>
- Preview your template to make sure it looks right – the Digg icon should appear at the top right of all your posts. Hover your cursor over it and make sure the link URL matches your post URL.
- If all looks well, click Save Template and then View your blog
Happy DIGGing!
I decided it was time to clean up the page layout, tweak the AdSense to make it less annoying and add some modern features.
One of the things I like is label clouds. It’s a nifty concept which before now I was never able to add to my site. I cannot take credit for coming up with it – I just followed the step-by-step instructions listed here. Note this requires you to be using the new version of blogger and already have some labels configured with your posts.
In case you are not aware, a label cloud is a list of blog labels where the more frequently appearing ones are made larger, thus giving an instant visual indication of the most popular labels.
I’ve also added a Digg button, but I’m still working on figuring out how to code it for individual posts on a blogger.com site.
Edit: I now have this working.
While manually editing and tweaking my video configuration for Ubuntu 7.10 (Gutsy Gibbon) to get better performance for my ATI Radeon 9200 I accidentally butchered the config. (Tee-hee oops!)
Thankfully it reverts to a low setting at least allowing me into the desktop to load a terminal and start correcting my errors.
First off – if you can’t figure out what you did, just blast it and start over with this command:
sudo dpkg-reconfigure -phigh xserver-xorg
This will load the /etc/X11/xorg.conf file back as it was at install. Restart your x-server and things should be operational from a clean slate, unless you get the following message:
md5sum: /etc/X11/xorg.conf: No such file or directory
In which case, something you did wiped out your configuration entirely, and dpkg doesn’t want to reload it. This is easily recoverable:
sudo touch /etc/X11/xorg.conf
sudo dpkg-reconfigure -phigh xserver-xorg
This places an empty file in the location, allowing dpkg to do it’s thing without error.