Index: openacs-4/packages/forums/lib/message/messages-list.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/messages-list.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/message/messages-list.adp 26 Jan 2005 00:47:37 -0000 1.1
@@ -0,0 +1,9 @@
+
+
+
+
+
+none
+
Index: openacs-4/packages/forums/lib/message/messages-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/messages-list.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/message/messages-list.tcl 26 Jan 2005 00:47:37 -0000 1.1
@@ -0,0 +1,12 @@
+set package_id [site_node::get_element -url $url -element package_id]
+
+db_multirow -extend {link} messages messages {
+ select m.subject, count(*) as n, max(m.message_id) as message_id,to_date(max(m.posting_date), 'YYYY-MM-DD HH24:MI:SS') as posted
+ from forums_forums f, forums_messages m
+ where f.package_id = :package_id
+ and m.forum_id = f.forum_id
+ and posting_date > now() - '5 days'::interval group by subject order by max(m.posting_date) desc
+} {
+ set posted [lc_time_fmt $posted "%x %X"]
+ set link "message-view?message_id=$message_id"
+}
Index: openacs-4/packages/forums/tcl/forums-install-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-install-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/forums/tcl/forums-install-procs.tcl 1 Apr 2004 22:44:36 -0000 1.2
+++ openacs-4/packages/forums/tcl/forums-install-procs.tcl 26 Jan 2005 00:47:37 -0000 1.3
@@ -36,3 +36,21 @@
}
}
}
+
+ad_proc -private ::install::xml::action::forum-create { node } {
+ Create a forum instance from an install.xml file
+} {
+ set url [apm_required_attribute_value $node url]
+ set name [apm_required_attribute_value $node name]
+ set presentation [apm_attribute_value -default "flat" $node presentation]
+ set posting_policy [apm_attribute_value -default "open" $node posting-policy]
+
+
+ set charter_node [lindex [xml_node_get_children_by_name [lindex $node 0] charter] 0]
+ set charter [xml_node_get_content $charter_node]
+
+ set package_id [site_node::get_element -url $url -element package_id]
+
+ forum::new -name $name -charter $charter -presentation_type $presentation \
+ -posting_policy $posting_policy -package_id $package_id
+}