Class ::xowiki::includelet::gravatar

::xowiki::includelet::gravatar[i] create ... \
           [ -__decoration (default "none") ] \
           [ -parameter_declaration (default " {-email:required} {-size 80} ") ]

Include gravatar picture for the specified email
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::gravatar \
     -superclass ::xowiki::Includelet

Methods (to be applied on the object)

  • url (scripted)

    # reusable helper proc to compute a gravatar URL
    set md5 [string tolower [ns_md5 $email]]
    security::csp::require img-src www.gravatar.com
    return //www.gravatar.com/avatar/$md5?size=$size&d=$default

Methods (to be applied on instances)

  • __decoration (setter)

  • parameter_declaration (setter)

  • render (scripted)

    :get_parameters
    return "<img src='[gravatar url -email $email -size $size]' alt='[ns_quotehtml $email]'>"