Index: openacs-4/packages/news-portlet/news-portlet.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/news-portlet.info,v diff -u -r1.16 -r1.16.2.1 --- openacs-4/packages/news-portlet/news-portlet.info 24 Feb 2005 13:33:24 -0000 1.16 +++ openacs-4/packages/news-portlet/news-portlet.info 24 Sep 2005 05:00:56 -0000 1.16.2.1 @@ -7,18 +7,21 @@ f t - + OpenACS 2004-03-10 OpenACS - + + + + Fisheye: Tag 1.1.4.1 refers to a dead (removed) revision in file `openacs-4/packages/news-portlet/catalog/news-portlet.en_AU.ISO-8859-1.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1.4.1 refers to a dead (removed) revision in file `openacs-4/packages/news-portlet/catalog/news-portlet.es_CO.ISO-8859-1.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4.2.1 refers to a dead (removed) revision in file `openacs-4/packages/news-portlet/catalog/news-portlet.ms_my.utf-8.xml'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/news-portlet/www/news-portlet-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/Attic/news-portlet-oracle.xql,v diff -u -r1.7 -r1.7.8.1 --- openacs-4/packages/news-portlet/www/news-portlet-oracle.xql 4 Dec 2002 09:55:27 -0000 1.7 +++ openacs-4/packages/news-portlet/www/news-portlet-oracle.xql 24 Sep 2005 05:00:56 -0000 1.7.8.1 @@ -12,16 +12,36 @@ where site_nodes.object_id = news_items_approved.package_id) as url, news_items_approved.item_id, news_items_approved.publish_title, - to_char(news_items_approved.publish_date, 'YYYY-MM-DD HH24:MI:SS') as publish_date_ansi + to_char(news_items_approved.publish_date, 'YYYY-MM-DD HH24:MI:SS') as publish_date_ansi, + item_creator, + creation_user + $content_column from news_items_approved where news_items_approved.publish_date < sysdate and (news_items_approved.archive_date >= sysdate or news_items_approved.archive_date is null) and news_items_approved.package_id in ([join $list_of_package_ids ", "]) - order by parent_name, + order by package_id, + parent_name, news_items_approved.publish_date desc, news_items_approved.publish_title + + + select package_id + from apm_packages p, + (select object_id, + parent_id + from site_nodes n + where (object_id is null + or acs_permission.permission_p(object_id, :user_id, 'read') = 't') + start with node_id = :root_id + connect by prior node_id = parent_id) site_map + where site_map.object_id = p.package_id (+) + and package_key = 'news' + + + Index: openacs-4/packages/news-portlet/www/news-portlet-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/Attic/news-portlet-postgresql.xql,v diff -u -r1.3 -r1.3.8.1 --- openacs-4/packages/news-portlet/www/news-portlet-postgresql.xql 4 Dec 2002 09:55:27 -0000 1.3 +++ openacs-4/packages/news-portlet/www/news-portlet-postgresql.xql 24 Sep 2005 05:00:56 -0000 1.3.8.1 @@ -12,16 +12,38 @@ where site_nodes.object_id = news_items_approved.package_id) as url, news_items_approved.item_id, news_items_approved.publish_title, - to_char(news_items_approved.publish_date, 'YYYY-MM-DD HH24:MI:SS') as publish_date_ansi + to_char(news_items_approved.publish_date, 'YYYY-MM-DD HH24:MI:SS') as publish_date_ansi, + item_creator, + creation_user + $content_column from news_items_approved where news_items_approved.publish_date < current_timestamp and (news_items_approved.archive_date >= current_timestamp or news_items_approved.archive_date is null) and news_items_approved.package_id in ([join $list_of_package_ids ", "]) - order by parent_name, + order by package_id, + parent_name, news_items_approved.publish_date desc, news_items_approved.publish_title + + + select package_id + from apm_packages p right outer join + (select n.object_id, + n.parent_id, + tree_level(n.tree_sortkey) as mylevel + from site_nodes n, site_nodes root + where (n.object_id is null + or acs_permission__permission_p(n.object_id, :user_id, 'read') = 't') + and root.node_id = :root_id + and n.tree_sortkey + between root.tree_sortkey and tree_right(root.tree_sortkey)) site_map + on site_map.object_id = p.package_id + where package_key = 'news' + + + Index: openacs-4/packages/news-portlet/www/news-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/news-portlet.adp,v diff -u -r1.13.2.1 -r1.13.2.2 --- openacs-4/packages/news-portlet/www/news-portlet.adp 6 Sep 2005 06:12:37 -0000 1.13.2.1 +++ openacs-4/packages/news-portlet/www/news-portlet.adp 24 Sep 2005 05:00:56 -0000 1.13.2.2 @@ -34,34 +34,32 @@ - - - @news_items.parent_name@ - - -
@news_items.notification_chunk;noquote@ - -
#rss-support.Syndication_Feed# Subscribe via RSS -
- - - +

@news_items.parent_name@

+ +
@news_items.notification_chunk;noquote@ + +
#rss-support.Syndication_Feed# Subscribe via RSS +
-
- #news-portlet.No_News# -   Index: openacs-4/packages/news-portlet/www/news-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/news-portlet.tcl,v diff -u -r1.17.2.1 -r1.17.2.2 --- openacs-4/packages/news-portlet/www/news-portlet.tcl 6 Sep 2005 06:12:37 -0000 1.17.2.1 +++ openacs-4/packages/news-portlet/www/news-portlet.tcl 24 Sep 2005 05:00:56 -0000 1.17.2.2 @@ -30,6 +30,8 @@ set news_url [ad_conn package_url] set comm_id [dotlrn_community::get_community_id_from_url -url $news_url] if {[exists_and_not_null comm_id]} { + set root_id [ad_conn node_id] + set user_id [ad_conn user_id] set inside_comm_p 1 } else { set inside_comm_p 0 @@ -40,10 +42,37 @@ set one_instance_p [ad_decode [llength $list_of_package_ids] 1 1 0] db_multirow -extend { publish_date view_url rss_exists rss_url notification_chunk} news_items select_news_items {} { + set display_item_content_p [parameter::get_from_package_key -package_key news-portlet -parameter display_item_content_p -default 0] + set display_subgroup_items_p [parameter::get_from_package_key -package_key news-portlet -parameter display_subgroup_items_p -default 0] + + set display_item_attribution_p [parameter::get_from_package_key -package_key news-portlet -parameter display_item_attribution_p -default 1] + + if { $inside_comm_p && $display_subgroup_items_p } { + db_foreach select_subgroup_package_ids {} { + set one_instance_p 0 + lappend list_of_package_ids $package_id + } + } + + if { $display_item_content_p } { + #Only pull out the full content if we have to. + set content_column " , content as publish_body, html_p " + } else { + set content_column "" + } + set publish_date [lc_time_fmt $publish_date_ansi "%x"] set view_url [export_vars -base "${url}item" { item_id }] set rss_exists [rss_support::subscription_exists -summary_context_id $package_id -impl_name news] set rss_url "[news_util_get_url $package_id]rss/rss.xml" # add news email notification set notification_chunk [notification::display::request_widget -type one_news_item_notif -object_id $package_id -pretty_name "News" -url [ad_return_url] ] + + # text-only body + if {$display_item_content_p && [string equal $html_p "f"]} { + set publish_body "[ad_text_to_html $publish_body]" + } + if { $display_item_attribution_p } { + set creator_url [acs_community_member_url -user_id $creation_user] + } } \ No newline at end of file Index: openacs-4/packages/news-portlet/www/summary.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/summary.adp,v diff -u -r1.6 -r1.6.2.1 --- openacs-4/packages/news-portlet/www/summary.adp 29 Jun 2004 10:18:40 -0000 1.6 +++ openacs-4/packages/news-portlet/www/summary.adp 24 Sep 2005 05:00:56 -0000 1.6.2.1 @@ -3,5 +3,7 @@
@publish_body;noquote@ @more_link;noquote@ +

Contributed by @item_creator@ +

Index: openacs-4/packages/news-portlet/www/summary.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/summary.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/news-portlet/www/summary.tcl 29 Jun 2004 10:18:40 -0000 1.4 +++ openacs-4/packages/news-portlet/www/summary.tcl 24 Sep 2005 05:00:56 -0000 1.4.2.1 @@ -80,3 +80,4 @@ set publish_body [ad_convert_to_html -html_p $html_p $publish_body] +set display_item_attribution_p [parameter::get_from_package_key -package_key news-portlet -parameter display_item_attribution_p -default 1]