Index: openacs-4/packages/rss-support/tcl/rss-generation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/tcl/rss-generation-procs.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/rss-support/tcl/rss-generation-procs.tcl 29 Sep 2003 19:53:10 -0000 1.11 +++ openacs-4/packages/rss-support/tcl/rss-generation-procs.tcl 24 Feb 2004 11:26:04 -0000 1.12 @@ -21,7 +21,6 @@ {-channel_copyright ""} {-channel_managingEditor ""} {-channel_webMaster ""} - {-channel_pubDate ""} {-channel_rating ""} {-channel_pubDate ""} {-channel_lastBuildDate ""} @@ -59,8 +58,47 @@ append rss {OpenACS 5.0} \n append rss "[ad_quotehtml $channel_lastBuildDate]" \n - append rss "[ad_quotehtml $channel_pubDate]" \n + if { ![empty_string_p $channel_pubDate] } { + append rss "[ad_quotehtml $channel_pubDate]" \n + } + if {[empty_string_p $image]} { + set base images/openacs_logo_rss.gif + set url [ad_url][rss_package_url]$base + set title $channel_title + set link $channel_link + set size [ns_gifsize [get_server_root]/packages/rss-support/www/$base] + + set image [list \ + url $url \ + title $title \ + link $link \ + width [lindex $size 0] \ + height [lindex $size 1]] + } + + # image handling + append rss "\n" + array set iarray $image + + append rss "[ad_quotehtml $iarray(title)]\n" + append rss "$iarray(url)\n" + append rss "[ad_quotehtml $iarray(link)]\n" + if {[info exists iarray(width)]} { + set element [ad_quotehtml $iarray(width)] + append rss "$element\n" + } + if {[info exists iarray(height)]} { + set element [ad_quotehtml $iarray(height)] + append rss "$element\n" + } + if {[info exists iarray(description)]} { + set element [ad_quotehtml $iarray(description)] + append rss "$element\n" + } + + append rss "\n" + # now top level items foreach item $items { array unset iarray @@ -484,15 +522,15 @@ -channel_description $channel_description \ -image $image \ -items $items \ - -channel_language "en-us" \ - -channel_copyright "" \ - -channel_managingEditor "" \ - -channel_webMaster "" \ - -channel_rating "" \ - -channel_pubDate "" \ - -channel_lastBuildDate "" \ - -channel_skipDays "" \ - -channel_skipHours ""] + -channel_language $channel_language \ + -channel_copyright $channel_copyright \ + -channel_managingEditor $channel_managingEditor \ + -channel_webMaster $channel_webMaster \ + -channel_rating $channel_rating \ + -channel_pubDate $channel_pubDate \ + -channel_lastBuildDate $channel_lastBuildDate \ + -channel_skipDays $channel_skipDays \ + -channel_skipHours $channel_skipHours] } 100 - 1.00 -