%3 ::xowiki::Link::language ::xowiki::Link::language render ::xowiki::Link ::xowiki::Link init link_name lookup_xowiki_package_by_name new_link pretty_link render render_found render_not_found render_target resolve ::xowiki::Link::language->::xowiki::Link ::xowiki::Link::glossary ::xowiki::Link::glossary render_found resolve ::xowiki::Link::glossary->::xowiki::Link ::xowiki::Link::image ::xowiki::Link::image render render_found resolve_href ::xowiki::Link::image->::xowiki::Link ::xowiki::Link::folder ::xowiki::Link::folder link_name pretty_link ::xowiki::Link::folder->::xowiki::Link ::xowiki::BaseLink ::xowiki::BaseLink ::xowiki::Link->::xowiki::BaseLink ::xowiki::Link::localimage ::xowiki::Link::localimage render ::xowiki::Link::localimage->::xowiki::Link::image ::xowiki::Link::file ::xowiki::Link::file align autostart controller controls endtime href loop mastersound name pluginspage pluginurl render_found starttime volume ::xowiki::Link::file->::xowiki::Link::image ::xowiki::Link::js ::xowiki::Link::js render_found ::xowiki::Link::js->::xowiki::Link::file ::xowiki::Link::swf ::xowiki::Link::swf render_found ::xowiki::Link::swf->::xowiki::Link::file ::xowiki::Link::css ::xowiki::Link::css render_found ::xowiki::Link::css->::xowiki::Link::file

Class ::xowiki::Link::image

::xowiki::Link::image[i] create ... \
           [ -border border ] \
           [ -border-width border-width ] \
           [ -bottom bottom ] \
           [ -center center ] \
           [ -float float ] \
           [ -height height ] \
           [ -left left ] \
           [ -margin margin ] \
           [ -margin-bottom margin-bottom ] \
           [ -margin-left margin-left ] \
           [ -margin-right margin-right ] \
           [ -margin-top margin-top ] \
           [ -padding padding ] \
           [ -padding-bottom padding-bottom ] \
           [ -padding-left padding-left ] \
           [ -padding-right padding-right ] \
           [ -padding-top padding-top ] \
           [ -position position ] \
           [ -right right ] \
           [ -top top ] \
           [ -width width ]

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xowiki::Link[i]
  • subclass: ::xowiki::Link::localimage[i], ::xowiki::Link::file[i]
::xotcl::Class create ::xowiki::Link::image \
     -superclass ::xowiki::Link

Methods (to be applied on instances)

  • border (setter)

  • border-width (setter)

  • bottom (setter)

  • center (setter)

  • float (setter)

  • height (setter)

  • left (setter)

  • margin (setter)

  • margin-bottom (setter)

  • margin-left (setter)

  • margin-right (setter)

  • margin-top (setter)

  • padding (setter)

  • padding-bottom (setter)

  • padding-left (setter)

  • padding-right (setter)

  • padding-top (setter)

  • position (setter)

  • render (scripted)

    set item_id [:resolve]
    #:log "-- image resolve for ${:page} returned $item_id (name=${:name}, label=${:label})"
    if {$item_id != 0} {
      set link [::${:package_id} pretty_link  -download true  -query ${:query}  -absolute [expr {[${:page} exists absolute_links] ? [${:page} absolute_links] : 0}]  -parent_id ${:parent_id}  -page $item_id  ${:name}]
      #:log "--l fully quali [${:page} absolute_links], link=$link [info commands ::$item_id]"
      ${:page} references resolved [list $item_id ${:type}]
      :render_found $link ${:label}
    } else {
      set last_page_id [${:page} set item_id]
      set object_type ::xowiki::File
      set name ${:name}
      set link [::${:package_id} make_link ${:package_id} edit-new object_type  [list parent_id ${:parent_id}]  [list title [ad_html_to_text -no_format -- ${:label}]]  [list return_url [::xo::cc url]]  autoname name last_page_id]
      set html [:render_not_found $link ${:label}]
      ${:page} references unresolved  [list parent_id ${:parent_id} name ${:name} link_type ${:type} html $html]
      return $html
    }
  • render_found (scripted)

    set style ""set pre ""set post ""
    foreach a {
      float width height center
      padding padding-right padding-left padding-top padding-bottom
      margin margin-left margin-right margin-top margin-bottom
      border border-width position top bottom left right
    } {
      if {[info exists :$a]} {
        if {$a eq "center"} {set pre "<center>"set post "</center>"continue}
        append style "$a: [set :$a];"
      }
    }
    if {$style ne ""} {
      set style "style='$style'"
    }
    if {[info exists :geometry]} {
      append link "?geometry=${:geometry}"
    }
    #set label [string map [list ' "&#39;"] $label]
    set href [expr {[info exists :href] ? ${:href} : ""}]
    set cls [:mk_css_class_and_id -default [expr {$link ne "" ? "image" : "refused-link"}]]
    if {$href ne ""} {
      set href [:resolve_href $href]
      if {[string match "java*" $href]} {
        set href .
      }
      if {[info exists :revision_id]} {
        append href ?revision_id=${:revision_id}
      }
      return [subst {$pre<a $cls href='[ns_quotehtml $href]'><img $cls src='[ns_quotehtml $link]' alt='$label' title='$label$style></a>$post}]
    } else {
      if {[info exists :revision_id]} {append link ?revision_id=${:revision_id}}
      return [subst {$pre<img $cls src='[ns_quotehtml $link]' alt='$label' title='$label$style>$post}]
    }
  • resolve_href (scripted)

    set l [${:page} create_link $href]
    if {[$l istype ::xowiki::ExternalLink]} {
      set href [$l href]
    } else {
      set href_item_id [$l resolve]
      set href [$l pretty_link $href_item_id]
    }
    return $href
  • right (setter)

  • top (setter)

  • width (setter)