Index: openacs-4/packages/bboard-portlet/tcl/bboard-portlet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bboard-portlet/tcl/bboard-portlet-procs.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/bboard-portlet/tcl/bboard-portlet-procs.tcl 4 Oct 2001 17:18:27 -0000 1.1
+++ openacs-4/packages/bboard-portlet/tcl/bboard-portlet-procs.tcl 4 Oct 2001 18:17:37 -0000 1.2
@@ -12,7 +12,7 @@
namespace eval bboard_portlet {
- ad_proc -private name {} {
+ ad_proc -private my_name {} {
This datasource's name
@author arjun@openforce.net
@@ -25,13 +25,14 @@
Adds a bboard PE to the given page with the instance key being
opaque data in the portal configuration.
+ @return element_id The new element's id
@param page_id The page to add self to
@param instance_id The bboard instace to show
@author arjun@openforce.net
@creation-date Sept 2001
} {
# Tell portal to add this element to the page
- set element_id [portal::add_element {$page_id [name]}]
+ set element_id [portal::add_element $page_id [my_name]]
# The default param "instance_id" must be configured
set key "instance_id"
@@ -41,6 +42,7 @@
portal::set_element_param $element_id $key $instance_id
+ return $element_id
}
ad_proc remove_self_from_page { portal_id instance_id } {
Index: openacs-4/packages/bboard-portlet/www/show.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bboard-portlet/www/Attic/show.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/bboard-portlet/www/show.adp 4 Oct 2001 17:21:06 -0000 1.1
+++ openacs-4/packages/bboard-portlet/www/show.adp 4 Oct 2001 18:14:44 -0000 1.2
@@ -1,17 +1,12 @@
-
-
-
- - Bad forum_id sent to this datasource, sorry
-
-
+AKS28: instance_id is @instance_id@
There are no messages available.
- @messages.title@ |
+ @messages.title@ |
@messages.full_name@ |
<%= [expr @messages.num_replies@-1] %> |
Index: openacs-4/packages/bboard-portlet/www/show.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bboard-portlet/www/Attic/show.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/bboard-portlet/www/show.tcl 4 Oct 2001 17:20:59 -0000 1.1
+++ openacs-4/packages/bboard-portlet/www/show.tcl 4 Oct 2001 18:14:54 -0000 1.2
@@ -7,47 +7,26 @@
@creation-date Sept 2001
@cvs-id $Id$
} {
- forum_id:integer,notnull
- {last_n_days:integer,optional,""}
+ instance_id:integer,notnull
} -properties {}
-#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)
+#db_0or1row forum_info forum_info_select {
+# select short_name, moderated_p, bboard_id
+# from bboard_forums
+# where forum_id = :forum_id
#}
#
-#set subsite_url [site_node_closest_ancestor_package_url -package_key acs-subsite]
+db_multirow messages messages_select {
+# select message_id, title, num_replies,
+# first_names||' '||last_name as full_name,
+# to_char(last_reply_date,'MM/DD/YY hh12:Mi am') as last_updated
+# from bboard_messages_all b, persons
+# where forum_id = :forum_id
+# and sent_date > decode(:last_n_days, 0, '1976-01-01', sysdate - :last_n_days)
+# and person_id = sender
+# and reply_to is null
+# order by sent_date desc
#
-
-db_0or1row forum_info forum_info_select {
- select short_name, moderated_p, bboard_id
- from bboard_forums
- where forum_id = :forum_id
}
-
-db_multirow messages messages_select {
- select message_id, title, num_replies,
- first_names||' '||last_name as full_name,
- to_char(last_reply_date,'MM/DD/YY hh12:Mi am') as last_updated
- from bboard_messages_all b, persons
- where forum_id = :forum_id
- and sent_date > decode(:last_n_days, 0, '1976-01-01', sysdate - :last_n_days)
- and person_id = sender
- and reply_to is null
- order by sent_date desc
-}
ad_return_template