Class ::xowiki::includelet::gravatar (public)
::xowiki::IncludeletClass ::xowiki::includelet::gravatar
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl
Include gravatar picture for the specified email
- Testcases:
- No testcase defined.
Source code: namespace eval ::xowiki::includelet {} ::nsf::object::alloc ::xowiki::IncludeletClass ::xowiki::includelet::gravatar {set :__default_metaclass ::xotcl::Class set :__default_superclass ::xotcl::Object set :aggregating false set :cacheable false set :localized true set :personalized true} ::xowiki::includelet::gravatar proc url {-email {-size 80} {-default mp}} { # 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 } ::xowiki::includelet::gravatar instproc render {} { :get_parameters return "<img src='[gravatar url -email $email -size $size]' alt='[ns_quotehtml $email]'>" } ::xowiki::includelet::gravatar instparametercmd __decoration ::xowiki::includelet::gravatar instparametercmd parameter_declaration ::nsf::relation::set ::xowiki::includelet::gravatar superclass ::xowiki::Includelet ::nx::slotObj -container slot ::xowiki::includelet::gravatar ::xowiki::includelet::gravatar::slot eval {set :__parameter { {__decoration none} {parameter_declaration { {-email:required} {-size 80} }} }} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::gravatar::slot::parameter_declaration {set :accessor public set :configurable true set :convert false set :default { {-email:required} {-size 80} } set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::gravatar set :incremental 0 set :manager ::xowiki::includelet::gravatar::slot::parameter_declaration set :methodname parameter_declaration set :multiplicity 1..1 set :name parameter_declaration set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::gravatar::slot::__decoration {set :accessor public set :configurable true set :convert false set :default none set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::gravatar set :incremental 0 set :manager ::xowiki::includelet::gravatar::slot::__decoration set :methodname __decoration set :multiplicity 1..1 set :name __decoration set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init}XQL Not present: Generic, PostgreSQL, Oracle