The Delicious tagroll for WordPress plugin adds a new shortcode to WordPress, the
shortcode. The shortcode creates a tag cloud or a list of tags (see parameters below).
Demo: http://soderlind.no/bookmarks/
Plugin: You’ll find the plugin at http://wordpress.org/extend/plugins/delicious-tagroll-shortcode/
Installation: Download the plugin and save it in wp-content/plugins (remember to activate in Plugins) or wp-content/mu-plugins or install it from inside WordPress in Plugins->Add New (search for “delicious tagroll”)
Usage: Add the shortcode to a Page. The shortcode supports the following parameters:
- Mandatory:
- username=”delicious username” (if you forget it, my tagroll is displayed instead
)
- username=”delicious username” (if you forget it, my tagroll is displayed instead
- Optional:
- title=”tagroll title” (default =”My Delicious Tags”, use ” ” if you don’t want a tagroll title)
- count=”number of tags” (default=”100″)
- sort=”alpha or freq” (default = “alpha”)
- showcounts=”true or false” (default = “false”, show tag counts)
- mincount (default mincount=”10″), eg. show only tags with 10 or more links
- minfont=”12″
- maxfont=”35″
- tags (default empty), eg. used to filter which tags you’d like to display eg. tags=”javascript,jquery,nodejs
Change log
v 2.1.2
- Bugfix, you need this one if you are running a version less than PHP 5.3, since $xml->channel->item->count() is only supported in PHP 5.3 and newer.
function ps_delicious_tagroll_get_tags($username = 'soderlind',$count = 10){ $key = 'delicious_tagroll_' . $username; $feed_url = sprintf("http://feeds.delicious.com/v2/rss/tags/%s?count=%s",$username,$count); $rs = get_transient($key); // read "cache" if ($rs != false) return $rs; $data = wp_remote_get($feed_url.''); if (is_wp_error($data)) { return (array)get_option($key); // retrieve fallback } else { $body = wp_remote_retrieve_body($data); $xml = new SimpleXMLElement($body); $rs = json_decode(json_encode($xml->channel),TRUE); // convert xml object to array if (count($rs['item']) > 0) { set_transient($key, $rs, 60*60); //expire after 1 hour update_option($key, $rs); //fallback storage } else { $rs = (array)get_option($key); // retrieve fallback } return $rs; } }
v 2.1.1
- Replaced LastRSS with WordPress built in methods and set/get transient for caching:
function ps_delicious_tagroll_get_tags($username = 'soderlind',$count = 10){ $key = 'delicious_tagroll_' . $username; $feed_url = sprintf("http://feeds.delicious.com/v2/rss/tags/%s?count=%s",$username,$count); $rs = get_transient($key); // read cache if ($rs != false) return $rs; $data = wp_remote_get($feed_url.''); if (is_wp_error($data)) { return (array)get_option($key); // retrieve fallback } else { $body = wp_remote_retrieve_body($data); $xml = new SimpleXMLElement($body); if ($xml->channel->item->count() > 0) { $rs = json_decode(json_encode($xml->channel),TRUE); // convert xml object to array set_transient($key, $rs, 60*60); //save cache, expire after 1 hour update_option($key, $rs); //save fallback } else { $rs = (array)get_option($key); // retrieve fallback } return $rs; } } - Added a new optional attribute:
- tags (default empty), used to filter which tags you’d like to display eg. tags=”javascript,jquery,nodejs”
v 2.0
- Delicious removed their JavaScript feed so I had to do a total rewrite
- Creates the tag cloud server-side (good for SEO) and lets you change the look and feel using the included style sheet.
- Uses the Delicious RSS feed API
- Caches the feed for one hour. Delicious might block you if you access their feed API too often.
- Some attributes are removed from the shortcode (you can change these using the ps_delicious_tagroll.css style sheet in the plugin directory):
- mincolor
- maxcolor
- flow
- Also removed the attributes
- showname
- showadd
- icon
- Added a new attribute:
- mincount (default mincount=”10″), eg. show only tags with 10 or more links
v 1.1
- changed parameter name=”true” to showname=”true”
- added missing parameter showcounts=”false”
v 1.0
- initial release




26.9.2010 at 14:40
Any way to point it to a different stylesheet?
25.10.2011 at 8:30
Is it just me, or did this plug in (and the underlying javascript and/or API from delicious) stop working recently?
25.10.2011 at 9:40
Thank you for telling me. Looks like delicious removed the service my plugin is using. I’ll rewrite the plugin, using their feed service, and post an update as soon as possible.
26.10.2011 at 0:47
I’ve updated the plugin, should be availale at http://wordpress.org/extend/plugins/delicious-tagroll-shortcode/ soon
26.10.2011 at 4:42
Thanks for not only updating the plug in, but doing a total re-write in less than a day! Nice work! My links are back live here: http://tomwayson.com/links/
10.3.2012 at 18:55
Great job
j
Is it possible to add a selection of some tags from my Delicious account?
11.3.2012 at 19:03
You mean, have a filter and only show some of the tags? e.g:
[ delicious_tagroll tags="aaa,bbb,ccc" ]
11.3.2012 at 19:28
Yes, excactly! I didn’t find a syntax or option for that, but may be I didn’t see it…
11.3.2012 at 19:31
It’s not there yet, I’ll see if I find time to add it this week.