Class ::xowiki::includelet::delicious

::xowiki::includelet::delicious[i] create ... \
           [ -__decoration (default "none") ] \
           [ -parameter_declaration (default " {-description ""} {-tags ""} {-url} ") ]

Add a button to submit article to delicious.
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl

Class Relations

  • class: ::xowiki::IncludeletClass[i]
  • superclass: ::xowiki::Includelet[i]
::xowiki::IncludeletClass create ::xowiki::includelet::delicious \
     -superclass ::xowiki::Includelet

Methods (to be applied on instances)

  • __decoration (setter)

  • parameter_declaration (setter)

  • render (scripted)

    :get_parameters
    
    # The following snippet opens a window, where a user can edit the
    # posted info.  However, it seems not possible to add tags this
    # way automatically.  Alternatively, one could use the API as
    # described below; this supports tags, but no editing...
    # http://farm.tucows.com/blog/_archives/2005/3/24/462869.html#adding
    
    set delicious_link [export_vars -base "http://del.icio.us/post" {
      {v 4}
      {url   $url}
      {title "[string range [${:__including_page} title] 0 79]"}
      {notes "[string range $description 0 199]"}
      tags
    }]
    return "<a class='image-button' href='[ns_quotehtml $delicious_link]'><img src='http://i.i.com.com/cnwk.1d/i/ne05/fmwk/delicious_14x14.gif' width='14' height='14' alt='Add to your del.icio.us' />del.icio.us</a>"