• Oi. I didn’t realize until much later that the del.icio.us plugin was generating ugly “lists” with divs. So I ‘fixed it’ with a bit of search and replace before the cache gets saved.

    Original code @ https://www.w-a-s-a-b-i.com/

    my fix (BEFORE echo $response;):

    // Must... make... semantic...
    // lists instead of div"s, people!
    $pattern[0] = "/div/";
    $pattern[1] = "/$bullet/";
    $replace[0] = "li";
    $replace[1] = "";
    $response = preg_replace ( $pattern,
    $replace, $response );

    all this does is changes the div tags to list item tags (which you should surround your call to the plugin with <ul>‘s) and nix the bullet before (as the list item will have one generated for it).

Viewing 1 replies (of 1 total)
  • I have just made a small change. If no bullet is specified, I was getting stray characters at the start of each list item from the variable $bullet, like:

    &; somelink here

    Simple fix: strip the ‘ & ‘ and ‘ ; ‘ characters from the variable $response like so:

    $pattern[0] = "/div/";
    $pattern[1] = "/\&$bullet\;/";
    $replace[0] = "li";
    $replace[1] = "";
    $response = preg_replace ( $pattern,
    $replace, $response );

    Now all is good in the semantic web ??

Viewing 1 replies (of 1 total)
  • The topic ‘semantic fix for del.icio.us plugin’ is closed to new replies.