Adding a del.icio.us link/icon to your Document Actions

by LiquidShaneo last modified Dec 30, 2008 03:02 PM

This howto will explain how to add an icon to your Document Actions, so that users can add your page to their del.icio.us bookmarks.

For the website I'm working on, I wanted to make it easy for people to add our pages to their del.icio.us bookmarks.  In order to do this you need to do three things:

  1. Find an icon to use for the new action
  2. Add the icon to your portal_actionicons
  3. Add the reference to portal_actions

Step 1:

A small icon from del.icio.us is available from here: http://images.del.icio.us/static/img/delicious.small.gif
Upload it to the portal_skins/custom folder with the ID: delicious_icon.gif

Step 2:

Drop into your portal root in the ZMI and navigate to portal_actions.  At the bottom of the long page, you'll see an entry form.  Fill it in with the following information:

  • Name: Post to del.icio.us
  • Id: delicious
  • Action:

    string:javascript:(function(){open('http://del.icio.us/post?v=3&noui=
    yes&jump=close&url='+encodeURIComponent(location.href)+'&title='
    +encodeURIComponent(document.title),'delicious','toolbar=no,width=
    700,height=250')})()

  • Condition: (leave this one blank; don't enter anything)
  • Permission: View
  • Category: document_actions
  • Visible? (check the checkbox)

and click the Save button.

NOTE: the javascript above is all one line!

Step 3:

While in the ZMI root, navigate to portal_actionicons.  At the bottom of that page, enter the following information:

  • Category: plone
  • Action ID: delicious
  • Action Title: Post to del.icio.us
  • Priority: 0
  • Icon URL Expression: delicious_icon.gif

And then click the Add button.

That's it!

References: del.icio.us' website