It's better when it's simple

User Tools

Site Tools


DokuWiki Plugin :

Compatible with DokuWiki


plugin Displays a list of links

Last updated on

The missing download url means that this extension cannot be installed via the Extension Manager. Please see Publishing a Plugin on Recommended are public repository hosts like GitHub, GitLab or Bitbucket.

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with !experimental, bookmark, embed, links, listing, tags


Updated 2009-02-09
Updated 2009-01-24
Updated 2009-01-20
Updated 2008-12-31


Using this plugin, you can display a list of your bookmarks inside a DokuWiki page. It makes use of' JSON feed and fetches all bookmarks of your account for tags given. You can even combine tags using Boolean operators.


{{delicious>[[a|o|n]?]TAG1 [TAG2 TAG3]}}
  • a, o, n are optional:
    • a = AND: all bookmarks tagged with each tag
    • o = OR: all bookmarks tagged with any of the tags
    • n = NOT: all bookmarks tagged with TAG1, but not TAG2, TAG3 etc.
      • if you omit a, o or n, a will be presumed
      • if you use a, o or n, don't forget the question mark!
  • You can use as many tags as you want, delimited by a white space (' ')


To make it easier to get into the usage of this plugin, I registered a demo account at Username is dokuwiki. It is set as the default account when you install the plugin. After installation, try these:

one tag


which is the same as

{{delicious>a?dokuwiki}} or {{delicious>o?dokuwiki}} or {{delicious>n?dokuwiki}}

The result should be this:

AND, multiple tags

Now let's search all posts that are tagged 'dokuwiki' and 'reference':

{{delicious>dokuwiki reference}}

which is the same as

{{delicious>a?dokuwiki reference}}

OR, multiple tags

We're searching for all bookmarks tagged either 'web2.0' or '' or both 'web2.0' and '':


NOT, multiple tags

Now we want to list all bookmarks tagged 'web2.0' but not tagged 'dokuwiki':


I think you see the point. You can use as many tags as you want, but be careful: For OR and NOT queries, a set of results is pulled from for every tag and then merged or reduced respectively. That might be a performance and/or bandwidth issue, though most probably not.


  1. Install the plugin using the plugin manager from FIXME URL is forbidden
  2. If you installed the previous version via plugin manager, you should be able to simply update it from the interface.


what it means default
Username Your username dokuwiki
Update Interval how long are local files valid? 60*60*3
Interwiki Icon To add delicious Interwiki link icon 0
Links description What to show after the links (description, tags or none) tags
Items to show Maximum of item to show in a listing (between 1 and 100) 20
urlencode() tag query string disable if you have trouble with AND not working as it should 1

To make the plugin render lists bulleted with little logos, add this line to your /conf/interwiki.conf:


and move/copy the file /lib/plugins/delicious/images/delicious.gif to /lib/images/interwiki/

If you set up interwiki.conf, put the icon in place and set Interwiki Icon to 1, then a post might look like this:

Neat, huh? :-) It has the additional benefit, that you can now link to sets of bookmarks on with interwiki syntax: [[delicious>|Bookmarks tagged **dokuwiki** and **** on]].

Note: This is not necessary to use the plugin. It's just stylistic sugar.

Description instead of tags

If you change Links description to desc you get something like this:

Known Bugs / Troubleshooting

  • Amount of bookmarks is limited to 100 per request, i.e. per tag.
  • Characters in tags that can't conveniently be URL-encoded (e.g. '?' and '&') will break the matching pattern. :?:

To Do

  • understand and use DokuWiki's caching function (done, mostly :-) )
  • add switch for recent/all bookmarks (who needs this?)
  • save the combined XML-responses to disk (like rss OR dokuwiki.txt) (obsolete)
  • improve match function (improved)
  • implement the cURL patch by jordan (added as option in 2008-01-20)
  • make it not choke on question marks in URLs (not reproducible - if you have a consistent test case for this problem, please write me a mail!)
  • improve the error messages even more
  • understand what the problem with urlencode is



  • adapted the JSON parser to the new structure (delicious now saves the user name in a new field). (thanks Marco Garcês)


  • added configuration option to disable urlencode()-ing of tag string
  • removed both the get_file_contents and cURL download method in favour of DokuWiki's native HTTPClient (thanks Andi)


  • changed getType() to 'baseonly' (now it should be valid XHTML)
  • _external_link respects $conf['target']['extern'] (thanks to Laurence Diver)
  • implemented optional cURL support for those php installations with disabled file_get_contents (thanks to jakub!)


  • reworked to fit' new JSON format
  • added option to set limit on amount of links per listing
  • made the error messages more specific
  • should be XHTML-compliant now


  • rewrite using JSON interface
  • should be PHP4-compatible now
  • uses DokuWiki's cache validity options properly (thanks to Chris Smith!)


  • Initial release


to all those who commented or wrote me mails, reported bugs and everything :-)



echo( "Please download the archive, the source contains < code > tags which messes up DokuWiki's parser apparently. Also, it's pretty long and relies on configuration files. Thanks." );


I just like those round corners. :-) If you like to keep it simple, just delete the whole style.css.

If you habe a dark theme, you might want to change url(“images/delicious_big_light.png”) to url(“images/delicious_big_light.png”) for a dark version of the background logo.

* Plugin Style
* @author Konstantin Baierer <>
ul.delicious {
    border: 2px solid #666;
    -moz-border-radius: 20px;    
    padding: 10px;
    background-image: url("images/delicious_big_light.png");
    background-position: 99% 10px; 
ul.delicious li {
span.delicious {
    font-size: 70%;

Comments / Discussion

Request bookmarks from multiple delicious accounts


I just needed the possibility to request bookmarks by a specified tag from separate delicious accounts. So I've implemented a little hack which might be useful for everybody.

My modifications in syntax.php (getJSON(); line 201)

    function getJSON($tag) {
        $users  = split( ';', $this->conf['diu_user']);
        if ( $this->conf['diu_urlencode'] ) {
            $tag = urlencode($tag); // to avoid possible encoding problems
        $http_client = new DokuHTTPClient();
        foreach ($users as $user) {
            $url = "$user/$tag?count=100";
            $json .= $http_client->get( $url );
        return $json;

Define the usernames in conf/default.php

$conf['diu_user']            = 'user1;user2';   //Usernames

André König 2009/01/22 00:20

I adapted your modified getJSON() method to use the DokuHTTPClient. The idea is nice, but I hesitate to implement it. While this makes sense for some cases, it might not be what users want as the global default. — konstantin baierer 2009/01/24 14:19


I've written a class to get all bookmarks into my DokuWiki. You can export all bookmarks from under settings → Bookmarks: export / backup. Include both tags and notes. After downloading the class turns that file either into an array or DokuWiki syntax. It creates H3's from tags and puts all bookmarks into an unordered list. It's just a quick and dirty solution but maybe someone will find it useful. — Kai Schaper 2007-07-19 09:12

class Delicious_HTML_Parser {
  private $lines;
  private $linklist;
  private $dw_linklist = '';
  public function __construct($file) {
    $this->lines = file($file);
  private function parse() {
    foreach ($this->lines as $line) {
      if (substr($line, 0, 4) == '<DT>') {
        $line   = str_replace(array('<DT><A ', '</A>', '">'), array('', '', '"'), $line);
        $parts  = explode('"', $line);
        $url          = $parts[1];
        $tags         = isset($parts[7]) ? $parts[7] : 'untagged';
        $description  = isset($parts[8]) ? trim($parts[8]) : trim($parts[6]);       
        $link         = '<a href="'.$url.'">'.$description.'</a>';
        $tag_parts = explode(',', $tags);
        foreach ($tag_parts as $tag) {
          $this->linklist[$tag][] = array('url' => $url, 'description' => $description, 'link' => $link);
  public function getLinklist() {
    return $this->linklist; 
  public function generateDokuWikiList() {
    foreach ($this->linklist as $tag => $links) {
      $num = count($links);
      // Headline
      $this->dw_linklist .= "==== $tag ($num) ====\n\n";
      foreach ($links as $link) {
        // List Item with Bookmark
        $description = str_replace(array('[', ']', '|'), array('(', ')', ','), $link['description']);
        $this->dw_linklist .= '  *[['.$link['url'].'|'.$description.']]'."\n";
      $this->dw_linklist .= "\n";
    return $this->dw_linklist;
$file       = './delicious-20070719-044044.html';
$parser     = new Delicious_HTML_Parser($file);
#$linklist   = $parser->getLinklist();

$dw_linklist = $parser->generateDokuWikiList();
echo $dw_linklist;
in witch file must I put the class and what have it to write into the DokuWiki page?
It's not an extension for the Plugin. It's just a simple stand alone script to turn your exported bookmarks into DokuWiki syntax.

Password-secured account?

Jordan 2007-11-23 15:56
Hello, is there a way to make it work with a private delicious ?
Giving the password in the conf file ?
It would be great !!
I wrote a patch to get private links. But I gave up during my tests. If I want to access private links I must use the API. This API blocks more requests than one every second.
If anyway someone interested in my patch you can contact me. — nougad 2008-07-05 04:13
The first version of this plugin used the API and respected the “one query per second” policy, but parsing XML is complicated for the differences in PHP4 and PHP5 and overkill for a simple functionality like the one this plugin offers. — konstantin baierer 2008/12/31 11:36

"AND" doesn't work

With the patch described above. I submitted a hack below.

For example, if I have

{{delicious>foo bar}}

I don't get anything back. I'm using DokuWiki 2008-05-05 with PHP version 5.2. (I think).

I had to comment out the line that runs urlencode on the tags, because it was messing with the + that is put between the tags when using something like this:

Where you want foo+bar.

Here's the patch, just rem-out the $tags = urlencode($tag) line, and then add a line with $tags=$tag;. I haven't had time to really find out why this is occurring, but I did narrow it down to the urlencode function being called.

function getJSON($tag) {
        // urlencode was causing problem with AND queries to delicious
        // foo+bar+baz
        // $tags = urlencode($tag); // to avoid possible encoding problems
You don't have to put + between the tags you want to combine with AND. Just use spaces! The plugin implements the Boolean set logic internally and your patch will break it. Update to the newest version and everything should work again. — konstantin baierer 2008/12/31 11:36
I've just been looking for a solution to the AND tags problem and I have commented-out the urlencode line as suggested above and that worked. I've got the latest version from this page today. Maybe there's some other reason why this is needed? — Steven Robertson 2009/01/23 15:03
I can't reproduce the issue, but it seems to be an issue nonetheless, so I added a configuration option that disables the offending urlencode($tag) line. Could you give me an example of a tag set that fails with urlencode enabled? — konstantin baierer 2009/01/24 03:56
plugin/delicious.txt · Last modified: 2019-01-14 19:23 by LarsDW223

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki