Need help? Check out our Support site, then


DELICIOUS widget

  1. There seem to have been a few people asking about the delicious sidebar widget over the past few (well, years, really) so I thought that I'd share my solution. If you don't use any tags at all, then the widget constructs an incorrect URL (I assume that this wasn't always the case, so this is probably a newish feature of a PHP upgrade, or somesuch). Anyway, If you add a test to see if the first tag is blank, it all works happily. I've also updated the URL to the current delicious.com URL structure, but that's not particularly necessary.

    --- delicious.php.orig 2008-11-04 21:22:47.000000000 +1300
    +++ delicious.php 2008-11-04 21:23:57.000000000 +1300
    @@ -48,8 +48,10 @@
    if ( !isset($options[$key]) )
    $options[$key] = $defaults[$key];

    - $json_url = 'http://del.icio.us/feeds/json/' . rawurlencode($options['username']);
    - $json_url.= count($options['tags']) ? '/' . rawurlencode(implode('+', $options['tags'])) : '';
    + $json_url = 'http://feeds.delicious.com/v1/json/' . rawurlencode($options['username']);
    + if ($options['tags'][0] != '') {
    + $json_url .= count($options['tags']) ? '/' . rawurlencode(implode('+', $options['tags'])) : '';
    + }
    $json_url.= '?count=' . ((int) $options['count']) . ';';
    ?>
    <?php echo $before_widget; ?>

  2. Most likely you intended to post this over at ORG. This is the support forum for COM and we wouldn't be able to use that here.

    http://wordpress.org/support/

Topic Closed

This topic has been closed to new replies.

About this Topic