Index: openacs-4/contrib/obsolete-packages/bboard-portlets/bboard-portlets.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard-portlets/bboard-portlets.info,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard-portlets/bboard-portlets.info 28 Jul 2001 23:58:07 -0000 1.1 @@ -0,0 +1,33 @@ + + + + + Bboard portlets + Bboard portlets + t + + + + oracle-8.1.6 + + Phong Nguyen + Creates bboard datasources for portal portlets. + ArsDigita Corporation + + + + + + + + + + + + + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard-portlets/sql/oracle/bboard-portlets-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard-portlets/sql/oracle/bboard-portlets-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard-portlets/sql/oracle/bboard-portlets-create.sql 28 Jul 2001 23:58:07 -0000 1.1 @@ -0,0 +1,31 @@ +-- +-- packages/bboard-portlet/sql/bboard-portlets-create.sql +-- + +-- Creates bboard datasources for portal portlets + +-- Copyright (C) 2001 ArsDigita Corporation +-- @author Phong Nguyen (phong@arsdigita.com) +-- @creation-date 2001-02-26 + +-- $Id: bboard-portlets-create.sql,v 1.1 2001/07/28 23:58:07 donb Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License. Full text of the license is available from the GNU Project: +-- http://www.fsf.org/copyleft/gpl.html + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource.new( + data_type => 'raw', + package_key => 'bboard', + mime_type => 'application/x-ats', + name => 'Summarize bboard applications', + description => 'Summarizes the bboard topics for all instances of bboard mounted below the current node', + content_varchar => '/packages/bboard-portlets/www/summarize', + configurable_p => 'f' + ); +end; +/ +show errors Index: openacs-4/contrib/obsolete-packages/bboard-portlets/sql/oracle/bboard-portlets-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard-portlets/sql/oracle/bboard-portlets-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard-portlets/sql/oracle/bboard-portlets-drop.sql 28 Jul 2001 23:58:07 -0000 1.1 @@ -0,0 +1,37 @@ +-- +-- packages/bboard-portlets/sql/bboard-portlets-drop.sql +-- + +-- Drops bboard datasources for portal portlets + +-- Copyright (C) 2001 ArsDigita Corporation +-- @author Michael Bryzek (mbryzek@arsdigita.com) +-- @creation-date 2001-02-26 + +-- $Id: bboard-portlets-drop.sql,v 1.1 2001/07/28 23:58:07 donb Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License. Full text of the license is available from the GNU Project: +-- http://www.fsf.org/copyleft/gpl.html + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + begin + select datasource_id into ds_id + from portal_datasources + where name = 'Summarize bboard applications' + and package_key = 'bboard'; + exception when no_data_found then + ds_id := null; + end; + + if ds_id is not null then + portal_datasource.delete(ds_id); + end if; + +end; +/ +show errors; + Index: openacs-4/contrib/obsolete-packages/bboard-portlets/sql/postgresql/bboard-portlets-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard-portlets/sql/postgresql/bboard-portlets-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard-portlets/sql/postgresql/bboard-portlets-create.sql 28 Jul 2001 23:58:07 -0000 1.1 @@ -0,0 +1,20 @@ +-- +-- packages/bboard-portlet/sql/bboard-portlets-create.sql +-- + +-- Creates bboard datasources for portal portlets + +-- Copyright (C) 2001 ArsDigita Corporation +-- @author Phong Nguyen (phong@arsdigita.com) +-- @creation-date 2001-02-26 + +-- $Id: bboard-portlets-create.sql,v 1.1 2001/07/28 23:58:07 donb Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License. Full text of the license is available from the GNU Project: +-- http://www.fsf.org/copyleft/gpl.html + +select portal_datasource__new(NULL, 'raw', 'application/x-ats', NULL, 'Summarize bboard applications', + 'Summarizes the bboard topics for all instances of bboard mounted below the current node', + 'f', '/packages/bboard-portlets/www/summarize', 'bboard', 'portal_datasource', + current_timestamp, NULL, NULL, NULL); Index: openacs-4/contrib/obsolete-packages/bboard-portlets/sql/postgresql/bboard-portlets-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard-portlets/sql/postgresql/bboard-portlets-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard-portlets/sql/postgresql/bboard-portlets-drop.sql 28 Jul 2001 23:58:07 -0000 1.1 @@ -0,0 +1,37 @@ +-- +-- packages/bboard-portlets/sql/bboard-portlets-drop.sql +-- + +-- Drops bboard datasources for portal portlets + +-- Copyright (C) 2001 ArsDigita Corporation +-- @author Michael Bryzek (mbryzek@arsdigita.com) +-- @creation-date 2001-02-26 + +-- $Id: bboard-portlets-drop.sql,v 1.1 2001/07/28 23:58:07 donb Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License. Full text of the license is available from the GNU Project: +-- http://www.fsf.org/copyleft/gpl.html + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + begin + select datasource_id into ds_id + from portal_datasources + where name = 'Summarize bboard applications' + and package_key = 'bboard'; + exception when no_data_found then + ds_id := null; + end; + + if ds_id is not null then + portal_datasource.delete(ds_id); + end if; + +end; +/ +show errors; + Index: openacs-4/contrib/obsolete-packages/bboard-portlets/tcl/bboard-portlets-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard-portlets/tcl/bboard-portlets-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard-portlets/tcl/bboard-portlets-procs.tcl 28 Jul 2001 23:58:07 -0000 1.1 @@ -0,0 +1,39 @@ +# /packages/bboard-portlets/tcl/bboard-portlets-procs.tcl + +ad_page_contract { + + Procedures to supports bboard portlets + + @author mbryzek@arsdigita.com + @creation-date 2001-03-01 + @$Id: bboard-portlets-procs.tcl,v 1.1 2001/07/28 23:58:07 donb Exp $ +} + + +ad_proc bboard_portlets_mount_application { + { -object_id "" } + { -node_id "" } + { -package_id "" } +} { + Mounts a bboard application beneath the portal associated with + object_id. If no such portal exists, does nothing. This function is + used as a callback in the acs-subsite group callback system + + @author mbryzek@arsdigita.com + @creation-date Fri Feb 9 18:55:22 2001 + + @return The package id of the newly mounted package, or the empty + string if no package was mounted + +} { + if { [empty_string_p $object_id] } { + error "Object ID must be specified" + } + + # Find the node ID for the portal associated with this object + set node_id [portal_node_id_for_object $object_id] + if { [empty_string_p $node_id] } { + return "" + } + return [subsite::auto_mount_application -node_id $node_id bboard] +} Index: openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize-oracle.xql 28 Jul 2001 23:58:07 -0000 1.1 @@ -0,0 +1,26 @@ + + + + oracle8.1.6 + + + + + select b.forum_id, + b.short_name, + site_node.url(sn.node_id) as url, + acs_object.name(sn.object_id) as bboard_name + from bboard_forums b, + site_nodes sn, + apm_packages apm + where sn.object_id = b.bboard_id(+) + and sn.parent_id = :node_id + and sn.object_id = apm.package_id + and apm.package_key = 'bboard' + order by lower(bboard_name) + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize-postgresql.xql 28 Jul 2001 23:58:07 -0000 1.1 @@ -0,0 +1,25 @@ + + + + postgresql7.1 + + + + + select b.forum_id, + b.short_name, + site_node__url(sn.node_id) as url, + acs_object__name(sn.object_id) as bboard_name + from bboard_forums b left join site_nodes sn on (sn.object_id = b.bboard_id), + site_nodes sn, + apm_packages apm + where sn.parent_id = :node_id + and sn.object_id = apm.package_id + and apm.package_key = 'bboard' + order by lower(bboard_name) + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize.adp 28 Jul 2001 23:58:07 -0000 1.1 @@ -0,0 +1,21 @@ + Index: openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize.tcl 28 Jul 2001 23:58:07 -0000 1.1 @@ -0,0 +1,34 @@ +# /packages/portal-creator/www/datasources/bboard/summarize.tcl + +ad_page_contract { + Summarizes all bboard applications mounted directly below this node + + @author Phong Nguyen (phong@arsdigita.com) + @creation-date 2001-02-26 + @cvs-id $Id: summarize.tcl,v 1.1 2001/07/28 23:58:07 donb Exp $ +} { +} -properties { + context_bar:onevalue +} + +set node_id [ad_conn node_id] + +# get all of the bboard packages mounted under this node +db_multirow bboard select_bboard { + select b.forum_id, + b.short_name, + site_node.url(sn.node_id) as url, + acs_object.name(sn.object_id) as bboard_name + from bboard_forums b, + site_nodes sn, + apm_packages apm + where sn.object_id = b.bboard_id(+) + and sn.parent_id = :node_id + and sn.object_id = apm.package_id + and apm.package_key = 'bboard' + order by lower(bboard_name) +} + +set subsite_url [site_node_closest_ancestor_package_url -package_key acs-subsite] + +ad_return_template