Class ::xowiki::includelet::rss-client (public)
::xowiki::IncludeletClass ::xowiki::includelet::rss-client
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl
Include RSS content
- Testcases:
- No testcase defined.
Source code: namespace eval ::xowiki::includelet {} ::nsf::object::alloc ::xowiki::IncludeletClass ::xowiki::includelet::rss-client {set :__default_metaclass ::xotcl::Class set :__default_superclass ::xotcl::Object set :aggregating false set :cacheable false set :localized true set :personalized true} ::xowiki::includelet::rss-client instproc render {} { :get_parameters if {[info commands [${:feed} channel]] eq ""} { set detail "" if {[${:feed} exists errorMessage]} {set detail \n[${:feed} set errorMessage]} return "No data available from $url<br>[ns_quotehtml $detail]" } else { set channel [${:feed} channel] #set html "<H1>[ns_quotehtml [$channel title]]</H1>" set html "<ul>\n" set i 0 foreach item [ ${:feed} items ] { append html "<li><b>[ns_quotehtml [$item title]]</b><br> [ns_quotehtml [$item description]] <a href='[ns_quotehtml [$item link]]'>#xowiki.weblog-more#</a>\n" if {[incr i] >= $max_entries} break } append html "</ul>\n" return $html } } ::xowiki::includelet::rss-client instproc initialize {} { :get_parameters set :feed [::xowiki::RSS-client new -url $url -destroy_on_cleanup] if {[info commands [${:feed} channel]] ne ""} { :title [ [${:feed} channel] title] } } ::xowiki::includelet::rss-client instparametercmd parameter_declaration ::xowiki::includelet::rss-client instparametercmd title ::nsf::relation::set ::xowiki::includelet::rss-client superclass ::xowiki::Includelet ::nx::slotObj -container slot ::xowiki::includelet::rss-client ::xowiki::includelet::rss-client::slot eval {set :__parameter { {title "#xowiki.rss_client#"} {parameter_declaration { {-url:required} {-max_entries:integer "15"} }} }} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::rss-client::slot::title {set :accessor public set :configurable true set :convert false set :default #xowiki.rss_client# set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::rss-client set :incremental 0 set :manager ::xowiki::includelet::rss-client::slot::title set :methodname title set :multiplicity 1..1 set :name title set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::rss-client::slot::parameter_declaration {set :accessor public set :configurable true set :convert false set :default { {-url:required} {-max_entries:integer "15"} } set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::rss-client set :incremental 0 set :manager ::xowiki::includelet::rss-client::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}XQL Not present: Generic, PostgreSQL, Oracle