All | 43 Folders | Accessibility | BoingBoing | Books | Computer Related | Family | Films | General | Hacking | Hobbies | Humor | Java | Links | Omni | OpenSolaris | Puzzles and Games

« Maker Faire Links -... | Main | Delicious Library... »
20060807 Monday August 07, 2006

Adding "Like this post?" links to your Blog


Yesterday, I experimented with what it would take to add a "Digg it" link to each blog post I publish, so that my loyal readers can tell others how wonderful it is and spread the word.

After looking at the Digg URL Submission Specifications that are almost buried away on the Integrating Digg within your website page, I realized that it could be done, but I wasn't sure exactly how to get all the information I needed.

So I emailed The Man. Dave Johnson. Mr Roller (whose book has just come out this last week).

Coincidentally Dave had just added some code to his _day template to automatically add a nice little strip along the bottom of each of his blog posts. This will easily allow you to:

This was almost what I needed. From my reading of the Digg URL Submission Specifications, I knew that I could make submitting a story so that it could be dugg, a little easier. What I did was adjust his "Digg it" code to go to phase 2 and automatically use the blog summary (if there is one) and the blog category name (this assumes that your category names match the ones that digg.com uses which is probably unlikely). If you don't use a summary or have a valid category, then the first person to "Digg it" will have to fill them in. If the story has already been dugg, then all others who "Digg it" will just get taken to the filled digg entry where they just have to hit the "Digg it" button. Very nice.

If you want to do something similar, and you are using Roller, then you will need to add some code to your _day template. Here's what mine now looks like.

Also, as there doesn't seem to be a global resources repository within Roller for images that a lot of us would each like to use in their blogs, I suggest taking copies of the four small icons, and adding them to your own resources area.

It's probable that the Del.icio.us, SlashDot and Technorati postings could be further automated too. I'll have to investigate that.

As I've done minimal experimenting with this new setup, please let me know if you find any problems.

[]

[]

[]

[]

( Aug 07 2006, 07:46:54 AM PDT ) [Listen] Permalink Comments [1]

Comments:

Here are some more code examples for doing this kind of thing : http://blogs.sun.com/roller/page/sharps?anchor=hacking_roller_templates_tagging_and

Posted by Rich Sharples on August 07, 2006 at 10:23 AM PDT #

Post a Comment:

Comments are closed for this entry.