Index: openacs-4/packages/faq-portlet/faq-portlet.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/faq-portlet.info,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/faq-portlet/faq-portlet.info 20 Jan 2002 19:18:45 -0000 1.5
+++ openacs-4/packages/faq-portlet/faq-portlet.info 25 Feb 2002 20:37:51 -0000 1.6
@@ -28,6 +28,10 @@
+
+
+
+
Index: openacs-4/packages/faq-portlet/tcl/faq-portlet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/tcl/faq-portlet-procs.tcl,v
diff -u -r1.21 -r1.22
--- openacs-4/packages/faq-portlet/tcl/faq-portlet-procs.tcl 11 Jan 2002 21:31:26 -0000 1.21
+++ openacs-4/packages/faq-portlet/tcl/faq-portlet-procs.tcl 25 Feb 2002 20:37:51 -0000 1.22
@@ -17,9 +17,14 @@
ad_proc -private my_name {
} {
- return "faq_portlet"
+ return "faq_portlet"
}
+ ad_proc -private my_package_key {
+ } {
+ return "faq-portlet"
+ }
+
ad_proc -public get_pretty_name {
} {
return "Frequently Asked Questions"
@@ -75,60 +80,11 @@
@author arjun@openforce.net
@creation-date Sept 2001
} {
-
- array set config $cf
-
- set query "select f.faq_id,
- f.faq_name,
- entry_id,
- question
- from acs_objects o, faqs f, faq_q_and_as qa
- where object_id = f.faq_id
- and context_id = :package_id
- and qa.faq_id(+) = f.faq_id"
-
- # Should be a list already!
- set list_of_package_ids $config(package_id)
-
- if { $config(shaded_p) == "t" } {
- set data ""
- set template ""
- } else {
- # not shaded
- set template "
-
- "
-
- foreach package_id $list_of_package_ids {
-
- if { [db_string count_faqs "select count(*) as count from faq_q_and_as, acs_objects where context_id = :package_id and object_id=faq_id" ] != 0 } {
-
- # aks fold into site_nodes:: or dotlrn_community
- set comm_object_id [db_string select_name "select object_id from site_nodes where node_id= (select parent_id from site_nodes where object_id=:package_id)" ]
-
- set name [db_string select_pretty_name "
- select instance_name
- from apm_packages
- where package_id= :comm_object_id "]
-
- append template "$name FAQs |
"
- db_foreach select_faqs $query {
- append template " $faq_name |
"
- }
- } else {
- # workspace no faqs
- set template "No FAQs available |
"
- }
- }
- append template "
"
- }
-
- set code [template::adp_compile -string $template]
-
- set output [template::adp_eval code]
-
- return $output
-
+ # no return call required with the helper proc
+ portal::show_proc_helper \
+ -package_key [my_package_key] \
+ -config_list $cf \
+ -template_src "faq-portlet"
}
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.1 -r1.2
--- openacs-4/packages/news-portlet/news-portlet.info 11 Nov 2001 18:22:59 -0000 1.1
+++ openacs-4/packages/news-portlet/news-portlet.info 25 Feb 2002 20:37:43 -0000 1.2
@@ -7,23 +7,30 @@
f
t
-
+
oracle
+ postgresql
- url="mailto:arjun@openforce.net">Arjun Sanyal
+ url="mailto:arjun@openforce.net">Arjun Sanyal
Creates news datasource for portal portlets.
OpenForce, Inc.
-
+
+
+
+
+
+
+
Index: openacs-4/packages/news-portlet/tcl/news-portlet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/tcl/news-portlet-procs.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/news-portlet/tcl/news-portlet-procs.tcl 11 Jan 2002 21:31:46 -0000 1.9
+++ openacs-4/packages/news-portlet/tcl/news-portlet-procs.tcl 25 Feb 2002 20:37:43 -0000 1.10
@@ -17,9 +17,15 @@
ad_proc -private my_name {
} {
- return "news_portlet"
+ return "news_portlet"
}
+ ad_proc -private my_package_key {
+ } {
+ return "news-portlet"
+ }
+
+
ad_proc -public get_pretty_name {
} {
return "News"
@@ -74,69 +80,11 @@
@author arjun@openforce.net
@creation-date Sept 2001
} {
-
- array set config $cf
-
- # things we need in the config
- # community_id
-
- # get user_id from the conn at this point
- set user_id [ad_conn user_id]
-
- # a modified query from news/www/index.tcl
- set query "
- select item_id,
- package_id,
- publish_title,
- publish_date
- from news_items_approved
- where publish_date < sysdate
- and (archive_date is null or archive_date > sysdate)
- and package_id = :instance_id
- order by publish_date desc, item_id desc"
-
- set data ""
- set rowcount 0
-
- if { $config(shaded_p) == "f" } {
-
- # Should be a list already! XXX rename me!
- set list_of_instance_ids $config(community_id)
-
- foreach instance_id $list_of_instance_ids {
-
- # aks fold into site_nodes:: or dotlrn_community
- set comm_object_id [db_string select_name "select object_id from site_nodes where node_id= (select parent_id from site_nodes where object_id=:instance_id)" ]
-
- set name [db_string select_pretty_name "
- select instance_name
- from apm_packages
- where package_id= :comm_object_id "]
-
- append data "$name News |
"
- db_foreach select_news_items $query {
- append data " $publish_title | $publish_date |
"
- incr rowcount
- }
-
- set template "$data
"
-
- if {!$rowcount} {
- set template ""
- }
- }
- } else {
- # shaded
- set template ""
- }
-
-
- set code [template::adp_compile -string $template]
-
- set output [template::adp_eval code]
-
- return $output
-
+ # no return call required with the helper proc
+ portal::show_proc_helper \
+ -package_key [my_package_key] \
+ -config_list $cf \
+ -template_src "news-portlet"
}
ad_proc -public edit {