Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

Delicious

Summary: Insert a del.icio.us user's links or tags into PmWiki
Version: 1.1
Prerequisites: PmWiki 2.0.beta25
Status: Stable
Maintainer: JonHaupt
Categories: Includes

Questions answered by this recipe

  • How can I include a tagroll or linkroll from del.icio.us in my wiki?
  • How can I include a tagometer badge?

Description

del.icio.us, the social bookmarking site, offers the use of javascript tagrolls and linkrolls to be used on blogs and other web sites. This script enables you to include those rolls in a PmWiki installation. In addition, the script allows you to include a badge showing how many times a page has been bookmarked using del.icio.us, and offering the opportunity to save the page to the user's del.icio.us bookmarks.

To use this feature, install the delicious.phpΔ script into the cookbook/ directory, then add an include_once("$FarmD/cookbook/delicious.php"); line to a local customization file.

The script can generate linkrolls and tagrolls. The simplest linkroll can be created by using the markup (:linkroll user=foo:) where foo is the desired delicious username, creating a roll of 10 recent links. Similarly (:tagroll user=foo:) creates a complete tag cloud (not a list) of user foo.

In order to produce a tagometer badge, you simply type (:deliciousbadge:).

The recipe is derived from the del.icio.us help pages, specifically those related to tagrolls, linkrolls, and tagometer.

The following is a list of arguments:

For (:linkroll:)

  • user: del.icio.us username (required)
  • number: the number of links you want to display
  • sort: options are recent (default) or alpha
  • tags: Limit the linkroll by tag(s). Multiple tags use the syntax 'tag+tag'
  • icon: large, small, rss, or none
  • label: text to display as a header
  • showtags: true or false - include the tags used with the links

For (:tagroll:)

  • user: del.icio.us username (required)
  • number: number of tags to display
  • sizerange: in the syntax '8-25', the lowest and highest text size used for display
  • label: text to display as a header
  • sort: options are freq (frequency) or alpha
  • flow: cloud or list
  • color1/color2: color1 is the least frequent tag, color2 is the most frequent (colors are used on a gradient between color1 and color2). must use html colors, no # (aka like this: '000099')
  • counts: true or false - include the frequency of each tag

Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

March 2006 (1.0) : Initial release
January 2007 (1.1) : Added the ability to include tagometer badges.

Comments

2006/10/02, Daniel
this addon is great, thanks!
Is there o possibility to define the links to get opened in a new window? Thanks, Daniel

I don't think del.icio.us provides this option; since the links are sent on the fly by del.icio.us's database, we're sort of forced to use whatever code they send. I think the thinking at the moment is that browsers offer the option of opening links in a new window or tab, so it's unnecessary to force the user to do it one way or another. I think using CSS you might be able to tweak it somehow, but I'm really not sure how you'd do that. - JonHaupt

2007/02/14, Tobias
Unfortunately the tagometer badge treats http://mysuperwiki.com(approve links) and http://mysuperwiki.com/index.php/Main/Homepage(approve links) as two different URIs and thus display differing information. Is there a way to prevent this?

I believe this is a limitation of del.icio.us, as it doesn't know how to tell that those two urls are the same thing. I think the only way to avoid this is to make sure that the URI is always one or the other--perhaps by using a rewrite rule. It seems like probably the second one is safer, so you could rewrite all of the first one to the second one. otherwise, it's up to del.icio.us to become a smarter system. -j

2007/04/07, Mark
Very cool. I have been meaning to find add this.

Question though, if I just want to show the tagometer badge but not the tags or person count, just the clickable image. Thanks. Mark

See Also

Contributors

Edit - History - Print - Recent Changes - Search
Page last modified on December 12, 2007, at 02:24 AM