oracle
committed
on 10 Jan 02
ui chagnges. no more showing of msgs. just a lists of forums or just
a list of communities that have forums in the shaded view.
openacs-4/.../bboard-portlet/www/show.tcl (+16 -37)
1 1 # /packages/portal-creator/www/datasources/bboard/summarize.tcl
2 2
3 3 ad_page_contract {
4 4     Summarizes all bboard applications mounted directly below this node
5 5
6 6     @author Arjun Sanyal (arjun@openforce.net)
7 7     @creation-date Sept 2001
8 8     @cvs-id $Id$
9 9 } {
10       forum_id:integer,notnull
11       {last_n_days:integer,optional,""}
  10     instance_id:integer,notnull
12 11 } -properties {}
13 12
14   #set node_id [ad_conn node_id]
15   #
16   ## get all of the bboard packages mounted under this node
17   #db_multirow bboard select_bboard {
18   #    select b.forum_id,
19   #           b.short_name,
20   #           site_node.url(sn.node_id) as url,
21   #           acs_object.name(sn.object_id) as bboard_name
22   #      from bboard_forums b,
23   #           site_nodes sn,
24   #           apm_packages apm
25   #     where sn.object_id = b.bboard_id(+)
26   #       and sn.parent_id = :node_id
27   #       and sn.object_id = apm.package_id
28   #       and apm.package_key = 'bboard'
29   #     order by lower(bboard_name)
  13 #db_0or1row forum_info forum_info_select {
  14 #    select short_name, moderated_p, bboard_id
  15 #    from bboard_forums
  16 #    where forum_id = :forum_id
30 17 #}
31 18 #
32   #set subsite_url [site_node_closest_ancestor_package_url -package_key acs-subsite]
  19 db_multirow messages messages_select {
  20 #    select message_id, title, num_replies,
  21 #    first_names||' '||last_name as full_name,
  22 #    to_char(last_reply_date,'MM/DD/YY hh12:Mi am') as last_updated
  23 #    from bboard_messages_all b, persons
  24 #    where forum_id = :forum_id
  25 #    and sent_date > decode(:last_n_days, 0, '1976-01-01', sysdate - :last_n_days)
  26 #    and person_id = sender
  27 #    and reply_to is null
  28 #    order by sent_date desc
33 29 #
34  
35   db_0or1row forum_info forum_info_select {
36       select short_name, moderated_p, bboard_id
37       from bboard_forums
38       where forum_id = :forum_id
39 30 }
40 31    
41   db_multirow messages messages_select {
42       select message_id, title, num_replies,
43       first_names||' '||last_name as full_name,
44       to_char(last_reply_date,'MM/DD/YY hh12:Mi am') as last_updated
45       from bboard_messages_all b, persons
46       where forum_id = :forum_id
47       and sent_date > decode(:last_n_days, 0, '1976-01-01', sysdate - :last_n_days)
48       and person_id = sender
49       and reply_to is null
50       order by sent_date desc
51   }
52      
53 32 ad_return_template