Blogger Hacks, Categories, Tips & Tricks

Saturday, June 25, 2005
One-click posting to del.icio.us
I have added a link to each post so the you can post it to del.icio.us with a single click. (and so can I, when I add it to my category list!!) Excellent. The code for the link came from blog.del.icio.us, & the edits for blogger users are in the comments. This is one of the tools on the Absolutely Del.icio.us complete tool collection, where you'll find all sorts of goodies to help you have even more fun with del.icio.us.

<!--begin post to del.icio.us-->
[<a href="http://del.icio.us/post?url=<$BlogItemPermalinkUrl$>
&title=<$BlogItemTitle$>" target="_blank">to Del.icio.us</a>]
<!--end post to del.icio.us-->


To make space for the link, I've switched my permalink back to the timestamp, after crowing in March about how I'd moved it. Oh, well!!

Have fun posting Freshblog stuff to del.icio.us!!

Update 7/7: Have amended the link code to include my blog title in the post title that appears when you click the link. The original bookmarklet set it up that way, & I like the idea of the site's name going out on my posts. Here's that code:

<!--begin post to del.icio.us-->
[<a href="http://del.icio.us/post?url=<$BlogItemPermalinkUrl$>
&title=<$BlogTitle$>: <$BlogItemTitle$>" target="_blank">to Del.icio.us</a>]
<!--end post to del.icio.us-->


Update 7/25: After finding one of my posts had been Furled, I figured I should add a one-click link for those folks too, so here it is. Thanks to Improbulus at A Consuming Experience for the code. Have fun Furling!!

Update 8/11: See other posts in Blogger Hacks: The Series

Update 11/05: Have added the "post to blinklist" link to Freshblog too.

Final Update 1/28/06: Have upgraded to link to 6 social bookmarking services and use icons for the links.

Posted at 2:22 PM by John.
11 Comments:
<    >
Blogger Melly said...
Oh, cool. I'll try that tomorrow.

May I ask you also, since you're the authority on blogging, how come I can't see all the web pages/blogs that link to my site on Technorati? Would you know? Did you hear about it?

<    >
Blogger Melly said...
Hey John, me again.
It seems telepathy, or a normal statistical probability, was in the works here.
I left you three comments yesterday only to find out later that you left me one as well, updating me about the categories.

So thanks for the update, that was mighty kind of you :)

Melly

<    >
Blogger Melly said...
Thanks for your answer, John.
It's really frustrating though. I know for example that you have a post that links to me and I don't see it on a technorati search (and I know of at least one other link from a bonified Blogger blog that doesn't show up).
And it's not like I have that many links. Each and every one of them counts!

I'm just ranting. Hope you don't mind. I'll stop now, I promise.

<    >
Blogger Greg said...
Hello John,

Thanks for the ideas - I've been looking to implement categories on my blog for a while and your post helped a lot.

I'm new to del.icio.us but I noticed that I can get the link to "pick up" the tags from the post and pre-populate their form. This means I only have to enter the tags once (when I write the blog).

Check it out here (still experimenting, but look for "tag"):

http://ghill.customer.netspace.net.au/vent/vent.html

I pass the tags in using the blogger link hack, but use javascript inside the post to mark them up, instead of the bookmarklet.

Thoughts?

Cheers,

-Greg.

<    >
Blogger Greg said...
Further to the above, I've provided more details and the JavaScript code at this discussion forum:

http://www.bloggerforum.com/modules/newbb/viewtopic.php?topic_id=7042&forum=1&viewmode=flat&order=ASC&start=10

It's also got how I list the categories like the archives.

Cheers,

-Greg.

<    >
Blogger Greg said...
Hi there,

Just an update on the above approach:

I've put the clunky javascript into an external file, and added some more functionality: the list of categories in the sidebar is dynamically generated each day, along with counts and a reverse sort.

So, instead of a static list of categories as above, the drop list gives you the current listing eg:

politics (17)
religion (12)
sport (9)
...
music (3)

Check it out on my vent blog.

I have a batch file that, once a day, scrapes my del.icio.us page for blog posts, updates the external javascript and then ftps it onto my server.

The next step is to include the counts under each post too eg:

[ sex (7) death (11) poetry (3) ]

Feel free to use these ideas and scripts. (It should be fairly straightforward to reverse-engineer what's happening from my page source, but I'll try to package it up nicely soon.)

Cheers,

-Greg.

<    >
Blogger Greg said...
Just an update, but I've implemented the in-post category count described above ...

For an alternate view, compare these two blogs:

Vent - Letters to the Editor

Speccy - AFL Player Spectator

Same backend, just writes out different html.

Cheers,

-Greg.

<    >
Blogger Simon said...
This is very awesome, I used it in my Blog to put categories using del.icio.us tags, I included the code in a How To write up that I did on the method I use, I hope you don't mind too much, I did give credit and links and stuff.

You can see it here if you want to, if you'd rather I didn't use your code or whatever give me a shout.

http://nakedsexmonkey.blogspot.com/2005/11/blogger-tags-and-categories-how-to.html

<    >
Blogger kdsmooth said...
I'm new to blogging & HTML. I trying to add drop down categories to my blog. Is there some one who can assist me in this project?
my blog address is onebrothasmind.blogspot.com
This is a learning experiience for me.
Thank you

<    >
Anonymous Anonymous said...
I realize this is a fairly old post, but nonetheless, I've been having this problem whenever I try to add code (especially related to things like Add to Delicious) to my blogger post template. Whenever i add in the code like you listed here, I keep getting messages similar to this:

We were unable to save your template
Please correct the error below, and submit your template again.
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The value of attribute "href" associated with an element type "a" must not contain the '<' character.

Is there something simple I'm missing somewhere in my template or is there an update to your code for the new version of Blogger? Any help would be GREATLY appreciated...thanks!

<    >
Blogger Greg said...
Hi Patrick,

Yes, this is an old post! This morphed into FreshTags, which is still in use by some. However, it was primarily meant to overcome a Blogger limitation (lack of categories) that is now addressed.

For FreshTags under new Blogger, check out Singpolyma's implementation.


eXTReMe Tracker