Index: openacs-4/contrib/obsolete-packages/bboard/www/attachment-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/Attic/attachment-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/attachment-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,27 @@ + + + + oracle8.1.6 + + + + + select mime_type + from cr_revisions + where revision_id = content_item.get_live_revision(:file_id) + + + + + + + + + select content + from cr_revisions + where revision_id = content_item.get_live_revision($file_id) + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/attachment-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/Attic/attachment-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/attachment-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,26 @@ + + + + postgresql7.1 + + + + + select mime_type + from cr_revisions + where revision_id = content_item__get_live_revision(:file_id) + + + + + + + + select content + from cr_revisions + where revision_id = content_item__get_live_revision($file_id) + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/attachment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/attachment.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/attachment.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/attachment.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -9,7 +9,7 @@ } if [string equal [ad_parameter "AttachmentsEnabledP"] "t"] { - ad_require_permission $file_id bboard_read_message + ad_require_permission $file_id bboard_read_forum db_0or1row get_mime_type { select mime_type Index: openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,17 @@ + + + + oracle8.1.6 + + + + + begin + bboard_category.delete (:category_id); + end; + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,13 @@ + + + + postgresql7.1 + + + + select bboard_category__delete (:category_id); + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -16,7 +16,7 @@ select forum_id from bboard_categories where category_id = :category_id } -db_dml delete_category { +db_exec_plsql delete_category { begin bboard_category.delete (:category_id); end; Index: openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,13 @@ + + + + + + + select forum_id from bboard_categories where category_id = :category_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/category-delete.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-delete.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-delete.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,38 @@ + + + + + + + select f.short_name as forum_name, f.forum_id + from bboard_forums f, bboard_categories c + where c.category_id = :category_id + and c.forum_id = f.forum_id + + + + + + + + + select short_name as category_name + from bboard_categories + where category_id = :category_id + + + + + + + + + select count(*) as message_count + from bboard_category_message_map + where category_id = :category_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/category-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-edit.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-edit.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,16 @@ + + + + + + + select f.short_name as forum_name, f.forum_id, c.short_name + from bboard_forums f, bboard_categories c + where c.category_id = :category_id + and f.forum_id = c.forum_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/category-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-entry.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/category-entry.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-entry.adp 29 Jun 2001 20:37:18 -0000 1.2 @@ -2,7 +2,7 @@ @forum_name@: @title@ @context_bar@ -
+
Index: openacs-4/contrib/obsolete-packages/bboard/www/category-new.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-new.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-new.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + + select short_name as forum_name from bboard_forums + where forum_id = :forum_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/category-subscribe.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-subscribe.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/category-subscribe.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-subscribe.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -22,4 +22,6 @@ -category_id $category_id -subscriber_id [ad_verify_and_get_user_id] } -ad_returnredirect "forum-by-category?category_id=$category_id" \ No newline at end of file +ad_returnredirect "forum-by-category?forum_id=$forum_id&category_id=$category_id" + + Index: openacs-4/contrib/obsolete-packages/bboard/www/category-subscribe.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-subscribe.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-subscribe.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,13 @@ + + + + + + + select forum_id from bboard_categories where category_id = :category_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/category-unsubscribe.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-unsubscribe.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/category-unsubscribe.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-unsubscribe.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -7,13 +7,11 @@ @cvs-id $Id$ } { + forum_id:integer,notnull category_id:integer,notnull,bboard_category_id + {sub_page ""} } -db_1row category_forum { - select forum_id from bboard_categories where category_id = :category_id -} - # Not strictly right ad_require_permission $forum_id bboard_create_message @@ -22,4 +20,8 @@ -category_id $category_id -subscriber_id [ad_verify_and_get_user_id] } -ad_returnredirect "forum-by-category?category_id=$category_id" \ No newline at end of file +if [empty_string_p $sub_page] { + ad_returnredirect "forum-by-category?category_id=$category_id&forum_id=$forum_id" +} else { + ad_returnredirect "subscriptions" +} Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,51 @@ + + + + oracle8.1.6 + + + + + select 1 from dual where 0 = 1 + + + + + + + + + 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_by_category b, persons + where person_id = sender + and reply_to is null + and forum_id = :forum_id + $category_sql + $moderated_sql + order by sent_date desc + + + + + + + + + select 1 from dual where 1 = 0 + + + + + + + + + select 1 from dual where 1 = 0 + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,51 @@ + + + + postgresql7.1 + + + + + select 1 where 0 = 1 + + + + + + + + + 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_by_category b, persons + where person_id = sender + and reply_to is null + and forum_id = :forum_id + $category_sql + $moderated_sql + order by sent_date desc + + + + + + + + + select 1 where 1 = 0 + + + + + + + + + select 1 where 1 = 0 + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -22,21 +22,20 @@ unapproved:multirow rejected:multirow subscribed_p:onevalue - subscribe_p:onevalue } ad_require_permission $forum_id bboard_read_forum set moderator_p 0 -set message_create_p [ad_permission_p $forum_id bboard_create_message] set category_create_p 0 set user_id [ad_verify_and_get_user_id] -set subscribe_p 0 set subscribed_p 0 +set admin_p [ad_permission_p $forum_id admin] + db_1row forum_info { select f.short_name as forum_name, f.moderated_p from bboard_forums f @@ -45,7 +44,7 @@ if ![string eq $category_id ""] { - db_1row category_info { + db_1row forum_info { select f.forum_id, f.short_name as forum_name, f.moderated_p from bboard_categories c, bboard_forums f where c.category_id = :category_id @@ -66,15 +65,10 @@ } -if [ad_permission_p $forum_id bboard_create_message] { - set subscribe_p 1 - - - if { ![string eq $category_id ""] && [string equal [bboard_category_subscribed_p -direct $user_id $category_id] "t"]} { - set subscribed_p 1 - } else { - set subscribed_p 0 - } +if { ![string eq $category_id ""] && [string equal [bboard_category_subscribed_p -direct $user_id $category_id] "t"]} { + set subscribed_p 1 +} else { + set subscribed_p 0 } set context_bar [list [list "forum?[export_url_vars forum_id]" $forum_name] \ @@ -107,12 +101,9 @@ from bboard_messages_by_category b, persons where person_id = sender and reply_to is null + and forum_id = :forum_id $category_sql $moderated_sql - and exists (select 1 from acs_object_party_privilege_map - where object_id = message_id - and party_id in (:user_id, -1) - and privilege = 'bboard_read_message') order by sent_date desc " @@ -136,10 +127,6 @@ and person_id = sender and reply_to is null and status = 'unmoderated' - and exists (select 1 from acs_object_party_privilege_map - where object_id = message_id - and party_id in (:user_id, -1) - and privilege = 'bboard_read_message') } db_multirow rejected rejected_messages_select { @@ -150,10 +137,6 @@ and person_id = sender and reply_to is null and status = 'rejected' - and exists (select 1 from acs_object_party_privilege_map - where object_id = message_id - and party_id in (:user_id, -1) - and privilege = 'bboard_read_message') } } Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,65 @@ + + + + + + + select f.short_name as forum_name, f.moderated_p + from bboard_forums f + where f.forum_id = :forum_id + + + + + + + + + select f.forum_id, f.short_name as forum_name, f.moderated_p + from bboard_categories c, bboard_forums f + where c.category_id = :category_id + and c.forum_id = f.forum_id + + + + + + + + select short_name as category_name from bboard_categories + where category_id = :category_id + + + + + + + + select message_id, title, num_replies, + first_names||' '||last_name as full_name + from bboard_messages_by_category, persons + where category_id = :category_id + and person_id = sender + and reply_to is null + and status = 'unmoderated' + + + + + + + + + select message_id, title, num_replies, + first_names||' '||last_name as full_name + from bboard_messages_by_category, persons + where category_id = :category_id + and person_id = sender + and reply_to is null + and status = 'rejected' + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,39 @@ + + + + oracle8.1.6 + + + + + declare + cursor category_cursor is + select distinct category_id + from bboard_categories c + where c.forum_id = :forum_id; + begin + for category_val in category_cursor loop + + delete from acs_permissions + where object_id = category_val.category_id; + + bboard_category.delete(category_val.category_id); + end loop; + end; + + + + + + + + + begin + bboard_forum.delete (:forum_id); + end; + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,34 @@ + + + + postgresql7.1 + + + + declare + category_val record; + begin + for category_val in select distinct category_id + from bboard_categories c + where c.forum_id = :forum_id + loop + + delete from acs_permissions + where object_id = category_val.category_id; + + perform bboard_category__delete(category_val.category_id); + end loop; + return 0; + end; + + + + + + + select bboard_forum__delete (:forum_id); + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -14,40 +14,24 @@ set user_id [ad_verify_and_get_user_id] -ad_require_permission $forum_id bboard_delete_forum +ad_require_permission $forum_id admin -db_transaction { - db_dml messages_delete { - declare - cursor message_cursor is - select distinct m.message_id - from acs_messages m, bboard_forum_message_map f - where m.message_id = f.message_id - and f.forum_id = :forum_id; - begin - for message_val in message_cursor loop - acs_message.delete(message_val.message_id); - end loop; - end; - } +# postgresql can't do all this in a transaction - db_dml categories_delete { - declare - cursor category_cursor is - select distinct category_id - from bboard_categories c - where c.forum_id = :forum_id; - begin - for category_val in category_cursor loop - bboard_category.delete(category_val.category_id); - end loop; - end; +if {[db_type] == "postgresql"} { + db_dml messages_delete "" + bboard_garbage_collect + db_exec_plsql categories_delete "" + db_dml permissions_delete "" + db_exec_plsql forum_delete "" +} else { + db_transaction { + db_dml messages_delete "" + bboard_garbage_collect + db_exec_plsql categories_delete "" + db_dml permissions_delete "" + db_exec_plsql forum_delete "" } - - db_dml forum_delete { - begin - bboard_forum.delete (:forum_id); - end; - } } + ad_returnredirect "" Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,25 @@ + + + + + + + delete from bboard_forum_message_map + where forum_id = :forum_id + + + + + + + + + + delete from acs_permissions + where object_id = :forum_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -17,8 +17,7 @@ set context_bar {} set user_id [ad_verify_and_get_user_id] -# ad_require_permission $forum_id bboard_read_forum -ad_require_permission $forum_id bboard_delete_forum +ad_require_permission $forum_id admin db_1row forum_info { select short_name as forum_name, charter as forum_charter Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,26 @@ + + + + + + + select short_name as forum_name, charter as forum_charter + from bboard_forums + where forum_id = :forum_id + + + + + + + + + select count(*) as message_count + from bboard_forum_message_map bfmm + where bfmm.forum_id = :forum_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-edit-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/forum-edit-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-edit-2.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -17,7 +17,7 @@ {moderated_p:optional ""} } -ad_require_permission $forum_id bboard_write_forum +ad_require_permission $forum_id admin if [empty_string_p $moderated_p] { set moderated_p "f" Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/forum-edit.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-edit.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -19,7 +19,7 @@ moderated_p:onevalue } -ad_require_permission $forum_id bboard_write_forum +ad_require_permission $forum_id admin db_1row forum_info { select short_name, charter, moderated_p from bboard_forums Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-edit.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-edit.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + + select short_name, charter, moderated_p from bboard_forums + where forum_id = :forum_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-entry.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/forum-entry.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-entry.adp 29 Jun 2001 20:37:18 -0000 1.2 @@ -2,7 +2,7 @@ @context_bar@ @title@ - +
Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-move-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-move-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-move-2.tcl 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,41 @@ +ad_page_contract { + + Move a forum's messages to another forum. + + @author Anukul Kapoor + @creation-date 2001-04-12 + @cvs-id $Id: forum-move-2.tcl,v 1.1 2001/06/29 20:37:18 lukep Exp $ + +} { + forum_id:integer,notnull,bboard_forum_id + dest_forum_id:integer,notnull,bboard_forum_id +} + +ad_require_permission $forum_id admin +ad_require_permission $dest_forum_id admin + +set user_id [ad_conn user_id] + +db_transaction { + db_dml update_bboard_contexts { + update acs_objects + set context_id = :dest_forum_id + where context_id = :forum_id + and (object_type = 'acs_message' or + object_type = 'bboard_category') + } + + db_dml move_bboard_messages { + update bboard_forum_message_map + set forum_id = :dest_forum_id + where forum_id = :forum_id + } + + db_dml move_bboard_categories { + update bboard_categories + set forum_id = :dest_forum_id + where forum_id = :forum_id + } +} + +ad_returnredirect "forum?forum_id=$forum_id" Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-move-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-move-2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-move-2.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,39 @@ + + + + + + + update acs_objects + set context_id = :dest_forum_id + where context_id = :forum_id + and (object_type = 'acs_message' or + object_type = 'bboard_category') + + + + + + + + + update bboard_forum_message_map + set forum_id = :dest_forum_id + where forum_id = :forum_id + + + + + + + + + update bboard_categories + set forum_id = :dest_forum_id + where forum_id = :forum_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-move.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-move.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-move.adp 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,28 @@ + +Move a forum's messages +Move + + + @form_data@ + +
+ + + + +
Forum:@forum_name@
Charter: + @charter@
+

+ +Move to this forum's messages to: forum? +
+This will move all of this forum's messages and categories and is not easily undoable. + + +

+
+ Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-move.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-move.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-move.tcl 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,40 @@ +ad_page_contract { + + Confirmation screem for moving a forum's messages to another forum. + + @author Anukul Kapoor + @creation-date 2001-04-12 + @cvs-id $Id: forum-move.tcl,v 1.1 2001/06/29 20:37:18 lukep Exp $ + +} { + forum_id:integer,notnull,bboard_forum_id +} -properties { + forum_id:onevalue + forum_name:onevalue + charter:onevalue + forums:multirow +} + +ad_require_permission $forum_id admin + +set user_id [ad_conn user_id] + +db_1row forum_info { + select short_name as forum_name, charter, moderated_p from bboard_forums + where forum_id = :forum_id +} + +db_multirow forums allowed_target_forums { + select forum_id, short_name + from bboard_forums + where not forum_id = :forum_id + and exists (select 1 from acs_object_party_privilege_map + where object_id = forum_id + and party_id in (:user_id, -1) + and privilege = 'admin') + +} + +set form_data [export_form_vars forum_id] + +ad_return_template Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-move.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-move.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-move.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,30 @@ + + + + + + + select short_name as forum_name, charter, moderated_p from bboard_forums + where forum_id = :forum_id + + + + + + + + + select forum_id, short_name + from bboard_forums + where not forum_id = :forum_id + and exists (select 1 from acs_object_party_privilege_map + where object_id = forum_id + and party_id in (:user_id, -1) + and privilege = 'admin') + + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-new-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/forum-new-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-new-2.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -17,7 +17,7 @@ {moderated_p:optional ""} } -ad_require_permission [ad_conn package_id] bboard_create_forum +ad_require_permission [ad_conn package_id] admin if [empty_string_p $moderated_p] { set moderated_p "f" Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-new.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/forum-new.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-new.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -16,7 +16,7 @@ charter:onevalue } -ad_require_permission [ad_conn package_id] bboard_create_forum +ad_require_permission [ad_conn package_id] admin set context_bar {"Create a Forum"} set title "Create a Forum" Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,115 @@ + + + + oracle8.1.6 + + + + + select short_name as forum_name, moderated_p, + acs_permission.permission_p(:forum_id, :user_id, 'admin') as admin_p, + acs_permission.permission_p(:forum_id, :user_id, 'bboard_create_category') + as category_create_p + from bboard_forums + where forum_id = :forum_id + + + + + + + + + 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 > case when :last_n_days = 0 then '1976-01-01' else sysdate - :last_n_days end + and person_id = sender + and reply_to is null + order by sent_date desc + + + + + + + + + select c.category_id, short_name, count(m.message_id) as message_count + from bboard_categories c, + bboard_category_message_map m + where c.forum_id = :forum_id + and m.category_id(+) = c.category_id + and (m.message_id is null + or m.message_id in (select f.message_id + from bboard_forum_message_map f + where f.forum_id = :forum_id)) + group by c.category_id, short_name + + + + + + + + + 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 > case when :last_n_days = 0 then '1976-01-01' else sysdate - :last_n_days end + and person_id = sender + and reply_to is null + and status = 'approved' + order by sent_date desc + + + + + + + + + select c.category_id, c.short_name, + count(m.message_id) as message_count + from bboard_categories c, + (select c.category_id, c.message_id + from bboard_category_message_map c, + bboard_forum_message_map f + where c.message_id = f.message_id + and f.status = 'approved' + and f.forum_id = :forum_id) m + where c.forum_id = :forum_id + and m.category_id(+) = c.category_id + and (m.message_id is null + or m.message_id in (select f.message_id + from bboard_forum_message_map f + where f.forum_id = :forum_id)) + group by c.category_id, short_name + + + + + + + + + select 1 from dual where 1 = 0 + + + + + + + + + select 1 from dual where 1 = 0 + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,121 @@ + + + + postgresql7.1 + + + + + select short_name as forum_name, moderated_p, + acs_permission__permission_p(:forum_id, :user_id, 'admin') as admin_p, + acs_permission__permission_p(:forum_id, :user_id, 'bboard_create_category') + as category_create_p + from bboard_forums + where forum_id = :forum_id + + + + + + + + + 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 age(sent_date) < case when :last_n_days = 0 + then interval '99 years' + else interval '$last_n_days days' + end + and person_id = sender + and reply_to is null + order by sent_date desc + + + + + + + + + select c.category_id, short_name, count(m.message_id) as message_count + from bboard_categories c left outer join + bboard_category_message_map m + on c.category_id = m.category_id + where c.forum_id = :forum_id + and (m.message_id is null + or m.message_id in (select f.message_id + from bboard_forum_message_map f + where f.forum_id = :forum_id)) + group by c.category_id, short_name + + + + + + + + + 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 age(sent_date) < case when :last_n_days = 0 + then interval '99 years' + else interval '$last_n_days days' + end + and person_id = sender + and reply_to is null + and status = 'approved' + order by sent_date desc + + + + + + + + + select c.category_id, c.short_name, + count(m.message_id) as message_count + from bboard_categories c left outer join + (select c.category_id, c.message_id + from bboard_category_message_map c, + bboard_forum_message_map f + where c.message_id = f.message_id + and f.status = 'approved' + and f.forum_id = :forum_id) m + on c.category_id = m.category_id + where c.forum_id = :forum_id + and (m.message_id is null + or m.message_id in (select f.message_id + from bboard_forum_message_map f + where f.forum_id = :forum_id)) + group by c.category_id, short_name + + + + + + + + + select 1 where 1 = 0 + + + + + + + + + select 1 where 1 = 0 + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-unsubscribe.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-unsubscribe.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/forum-unsubscribe.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-unsubscribe.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -8,11 +8,16 @@ } { forum_id:integer,notnull,bboard_forum_id + {sub_page ""} } catch { bboard_unsubscribe_forum \ -forum_id $forum_id -subscriber_id [ad_verify_and_get_user_id] } -ad_returnredirect "forum?forum_id=$forum_id" \ No newline at end of file +if [empty_string_p $sub_page] { + ad_returnredirect "forum?forum_id=$forum_id" +} else { + ad_returnredirect "subscriptions" +} Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-view.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/forum-view.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-view.adp 29 Jun 2001 20:37:18 -0000 1.2 @@ -3,53 +3,44 @@ @title@ - - Create a category - - | - - - - + - +
-[ - Post a message + [ Post a message ] - Post a message + [Post a message] - - | + - Subscribe to Category + [Subscribe to Category] - Subscribe to Forum + [Subscribe to Forum] - Unsubscribe from Category + You're subscribed to this category [Unsubscribe] - Unsubscribe from Forum + You're subscribed to this forum [Unsubscribe] - - ] +

+ + -
+

Messages

+ - Last @last_n_days@ days. Show All Messages. + Last @last_n_days@ days. Show All Messages.
-

Messages

-

Not Yet Approved

@@ -66,7 +57,7 @@
- + @@ -81,16 +72,16 @@ + +

By Category

+
-

Categories

+ + [Create a category] +

+

Search

+

+ + +

Admin

+ [Move messages to other forum] + [Set Permissions] + \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/forum.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/forum.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -6,7 +6,7 @@ @creation-date 2000-08-29 @cvs-id $Id$ } { - forum_id:integer,notnull,bboard_forum_id + forum_id:integer,notnull {last_n_days:integer,optional ""} } -properties { forum_write_p:onevalue @@ -21,34 +21,34 @@ unapproved:multirow rejected:multirow subscribed_p:onevalue - subscribe_p:onevalue last_n_days:onevalue uncategorized_count:onevalue } +set user_id [ad_verify_and_get_user_id] + ad_require_permission $forum_id bboard_read_forum db_1row forum_info { - select short_name as forum_name, moderated_p from bboard_forums - where forum_id = :forum_id + select short_name as forum_name, moderated_p, + acs_permission.permission_p(:forum_id, :user_id, 'admin') as admin_p, + acs_permission.permission_p(:forum_id, :user_id, 'bboard_create_category') + as category_create_p + from bboard_forums + where forum_id = :forum_id } -# subscribe_p is whether or not this page allows subscriptions -set subscribed_p 0 +set moderator_p 0 -# subscribed_p is whether or not this particular user is scribed -set subscribe_p 0 +if [string equal $moderated_p "t"] { + set moderator_p [ad_permission_p $forum_id bboard_moderate_forum] +} -set user_id [ad_verify_and_get_user_id] -if [ad_permission_p $forum_id bboard_create_message] { - set subscribe_p 1 - - if [string equal [bboard_forum_subscribed_p $user_id $forum_id] "t"] { - set subscribed_p 1 - } else { - set subscribed_p 0 - } +if [string equal [bboard_forum_subscribed_p $user_id $forum_id] "t"] { + set subscribed_p 1 +} else { + set subscribed_p 0 } if [string equal $last_n_days ""] { @@ -59,15 +59,6 @@ } } -set moderator_p 0 - -if [string equal $moderated_p "t"] { - set moderator_p [ad_permission_p $forum_id bboard_moderate_forum] -} - -set message_create_p [ad_permission_p $forum_id bboard_create_message] -set category_create_p [ad_permission_p $forum_id bboard_create_category] - set context_bar [list $forum_name] set title $forum_name @@ -84,19 +75,11 @@ and sent_date > decode(:last_n_days, 0, '1976-01-01', sysdate - :last_n_days) and person_id = sender and reply_to is null - and exists (select 1 from acs_object_party_privilege_map - where object_id = message_id - and party_id in (:user_id, -1) - and privilege = 'bboard_read_message') order by sent_date desc } db_multirow categories categories_select { - select c.category_id, short_name, count(m.message_id) as message_count, - acs_permission.permission_p(c.category_id, :user_id, - 'bboard_write_category') as write_p, - acs_permission.permission_p(c.category_id, :user_id, - 'bboard_delete_category') as delete_p + select c.category_id, short_name, count(m.message_id) as message_count from bboard_categories c, bboard_category_message_map m where c.forum_id = :forum_id @@ -113,10 +96,6 @@ from bboard_messages_by_category b where category_id is null and forum_id = :forum_id - and exists (select 1 from acs_object_party_privilege_map - where object_id = message_id - and party_id in (:user_id, -1) - and privilege = 'bboard_read_message') } @@ -132,20 +111,12 @@ and person_id = sender and reply_to is null and status = 'approved' - and exists (select 1 from acs_object_party_privilege_map - where object_id = message_id - and party_id in (:user_id, -1) - and privilege = 'bboard_read_message') order by sent_date desc } db_multirow categories categories_select_approved { select c.category_id, c.short_name, - count(m.message_id) as message_count, - acs_permission.permission_p(c.category_id, :user_id, - 'bboard_write_category') as write_p, - acs_permission.permission_p(c.category_id, :user_id, - 'bboard_delete_category') as delete_p + count(m.message_id) as message_count from bboard_categories c, (select c.category_id, c.message_id from bboard_category_message_map c, @@ -167,10 +138,6 @@ from bboard_messages_by_category b where category_id is null and forum_id = :forum_id - and exists (select 1 from acs_object_party_privilege_map - where object_id = message_id - and party_id in (:user_id, -1) - and privilege = 'bboard_read_message') } } @@ -195,10 +162,6 @@ and person_id = sender and reply_to is null and status = 'unmoderated' - and exists (select 1 from acs_object_party_privilege_map - where object_id = message_id - and party_id in (:user_id, -1) - and privilege = 'bboard_read_message') } db_multirow rejected rejected_messages_select { @@ -209,10 +172,6 @@ and person_id = sender and reply_to is null and status = 'rejected' - and exists (select 1 from acs_object_party_privilege_map - where object_id = message_id - and party_id in (:user_id, -1) - and privilege = 'bboard_read_message') } } Index: openacs-4/contrib/obsolete-packages/bboard/www/forum.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,58 @@ + + + + + + + select count(*) as uncategorized_count + from bboard_messages_by_category b + where category_id is null + and forum_id = :forum_id + + + + + + + + + select count(*) as uncategorized_count + from bboard_messages_by_category b + where category_id is null + and forum_id = :forum_id + + + + + + + + + select message_id, title, num_replies, + first_names||' '||last_name as full_name + from bboard_messages_all, persons + where forum_id = :forum_id + and person_id = sender + and reply_to is null + and status = 'unmoderated' + + + + + + + + + select message_id, title, num_replies, + first_names||' '||last_name as full_name + from bboard_messages_all, persons + where forum_id = :forum_id + and person_id = sender + and reply_to is null + and status = 'rejected' + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/index-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/index-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,19 @@ + + + + oracle8.1.6 + + + + + select forum_id, short_name, moderated_p, charter + from bboard_forums f + where bboard_id = :package_id + and acs_permission.permission_p(forum_id,:user_id,'bboard_read_forum') = 't' + order by short_name + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/index-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/index-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,19 @@ + + + + postgresql7.1 + + + + + select forum_id, short_name, moderated_p, charter + from bboard_forums f + where bboard_id = :package_id + and acs_permission__permission_p(forum_id,:user_id,'bboard_read_forum') = 't' + order by short_name + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/index.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/index.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/index.adp 29 Jun 2001 20:37:18 -0000 1.2 @@ -2,9 +2,7 @@ @context_bar@ Forums - - [Create a forum]

- +[Manage Subscriptions] There are no forums available.

@@ -17,10 +15,8 @@ (moderated) - + [edit] - - [delete]
@@ -31,3 +27,11 @@ +

+ + + [Create a forum] + [Set Parameters] + [Admin Permissions] + +

Index: openacs-4/contrib/obsolete-packages/bboard/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/index.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/index.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -10,7 +10,7 @@ context_bar:onevalue package_id:onevalue user_id:onevalue - forum:multirow + forums:multirow } set package_id [ad_conn package_id] @@ -19,15 +19,10 @@ set user_id [ad_verify_and_get_user_id] -set forum_create_p [ad_permission_p $package_id bboard_create_forum] +set admin_p [ad_permission_p $package_id admin] db_multirow forums forums_select { - select forum_id, short_name, moderated_p, charter, - acs_permission.permission_p(forum_id, :user_id, - 'bboard_write_forum') as write_p, - acs_permission.permission_p(forum_id, :user_id, - 'bboard_delete_forum') as delete_p - + select forum_id, short_name, moderated_p, charter from bboard_forums f where bboard_id = :package_id and acs_permission.permission_p(forum_id,:user_id,'bboard_read_forum') = 't' Index: openacs-4/contrib/obsolete-packages/bboard/www/message-approve.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-approve.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-approve.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,13 @@ + + + + + + + select sender from acs_messages where message_id = :message_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-attach.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-attach.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-attach.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-attach.adp 29 Jun 2001 20:37:18 -0000 1.2 @@ -2,7 +2,7 @@ @title@ @context_bar@ -

+ <%= [export_form_vars file_id message_id] %>
Index: openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,24 @@ + + + + oracle8.1.6 + + + + + delete from bboard_forum_message_map bfm + where message_id in (select message_id + from acs_messages m + connect by prior message_id = reply_to + start with message_id = :message_id) + and exists (select 1 from acs_object_party_privilege_map + where object_id = bfm.message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_delete_message') + + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,22 @@ + + + + postgresql7.1 + + + + + delete from bboard_forum_message_map bfm + where message_id in + (select message_id + from acs_messages m + where m.tree_sortkey like + (select tree_sortkey + from acs_messages am + where am.message_id = :message_id) || '/%') + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -12,7 +12,11 @@ {replies ""} } -ad_require_permission $message_id bboard_delete_message +if {[ad_parameter "UserPostsDeletableP"] == "t"} { + ad_require_permission $message_id bboard_write_message +} else { + ad_require_permission $message_id admin +} set user_id [ad_verify_and_get_user_id] Index: openacs-4/contrib/obsolete-packages/bboard/www/message-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-delete.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-delete.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -18,7 +18,11 @@ replies:onevalue } -ad_require_permission $message_id bboard_delete_message +if {[ad_parameter "UserPostsDeletableP"] == "t"} { + ad_require_permission $message_id bboard_write_message +} else { + ad_require_permission $message_id admin +} if ![db_0or1row message_info { select m.message_id, m.reply_to, m.title, @@ -32,6 +36,7 @@ } -column_array message] { # It's not in that forum! ad_returnredirect "forum?forum_id=$forum_id" + ad_script_abort } db_1row forum_short_name { Index: openacs-4/contrib/obsolete-packages/bboard/www/message-delete.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-delete.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-delete.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,30 @@ + + + + + + + select m.message_id, m.reply_to, m.title, + m.sent_date, m.mime_type, m.content, + p.first_names ||' '||p.last_name as full_name + from acs_messages_all m, persons p, bboard_forum_message_map f + where m.message_id = :message_id + and f.message_id = :message_id + and f.forum_id = :forum_id + and p.person_id = m.sender + + + + + + + + + select short_name as forum_name from bboard_forums + where forum_id = :forum_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-edit-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-edit-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-edit-2.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -40,6 +40,7 @@ form_vars:onevalue reply_to:onevalue target:onevalue + msg_mime_type:onevalue } ad_require_permission $message_id bboard_write_message @@ -51,6 +52,8 @@ set target "message-edit-3" +set msg_mime_type $mime_type + db_1row forum_short_name { select short_name as forum_name from bboard_forums where forum_id = :forum_id Index: openacs-4/contrib/obsolete-packages/bboard/www/message-edit-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-edit-2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-edit-2.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,24 @@ + + + + + + + select short_name as forum_name from bboard_forums + where forum_id = :forum_id + + + + + + + + + select short_name as forum_name from bboard_forums + where forum_id = :forum_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-edit.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-edit.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,61 @@ + + + + + + + select message_id, reply_to, title, mime_type, content + from acs_messages_all m + where message_id = :message_id + + + + + + + + + select min(category_id) as category_id from bboard_category_message_map + where message_id = :message_id + group by message_id + + + + + + + + + select short_name as forum_name from bboard_forums + where forum_id = :forum_id + + + + + + + + + select m.reply_to, m.title, m.sent_date, + m.mime_type, m.content, + p.first_names||' '||p.last_name as full_name + from acs_messages_all m, persons p + where message_id = :reply_to + and person_id = sender + + + + + + + + + select c.category_id, c.short_name + from bboard_categories c + where forum_id = :forum_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-entry.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-entry.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-entry.adp 29 Jun 2001 20:37:18 -0000 1.2 @@ -2,7 +2,7 @@ @page_title@ @context_bar@ - + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-list.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-list.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-list.adp 29 Jun 2001 20:37:18 -0000 1.2 @@ -27,8 +27,13 @@ @messages.the_score@ - @messages.title@ - + + @messages.title@ + + + @messages.title@ + + @messages.full_name@ Index: openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,22 @@ + + + + oracle8.1.6 + + + + + begin + acs_message.send ( + message_id => :new_message_id, + to_address => :email, + grouping_id => :new_message_id, + wait_until => sysdate + ); + end; + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,20 @@ + + + + postgresql7.1 + + + + + select acs_message__send ( + :new_message_id, + :email, + :new_message_id, + current_timestamp + ); + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -43,7 +43,7 @@ } # queue it up to be sent - db_dml forward_queue { + db_exec_plsql forward_queue { begin acs_message.send ( message_id => :new_message_id, Index: openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,24 @@ + + + + + + + select email as user_email from parties where party_id = :user_id + + + + + + + + + select reply_to, sender, title, mime_type, content + from acs_messages_all + where message_id = :message_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-mail.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-mail.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-mail.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-mail.adp 29 Jun 2001 20:37:18 -0000 1.2 @@ -2,7 +2,7 @@ Mail to a friend @context_bar@ - + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-mail.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-mail.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-mail.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,38 @@ + + + + + + + select short_name as forum_name from bboard_forums + where forum_id = :forum_id + + + + + + + + + select email as sender_email from parties + where party_id = :user_id + + + + + + + + + select reply_to, title, sent_date, + mime_type, content, + first_names||' '||last_name as full_name + from acs_messages_all m, persons p + where message_id = :message_id + and person_id = sender + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-move-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-move-2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-move-2-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,37 @@ + + + + oracle8.1.6 + + + + + update acs_objects + set context_id = :dest_forum_id + where context_id = :forum_id + and object_type = 'acs_message' + and object_id in (select message_id + from acs_messages m + connect by prior message_id = reply_to + start with message_id = :message_id) + + + + + + + + + update bboard_forum_message_map + set forum_id = :dest_forum_id + where forum_id = :forum_id + and message_id in (select message_id + from acs_messages m + connect by prior message_id = reply_to + start with message_id = :message_id) + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-move-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-move-2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-move-2-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,44 @@ + + + + postgresql7.1 + + + + FIX ME CONNECT BY + + update acs_objects + set context_id = :dest_forum_id + where context_id = :forum_id + and object_type = 'acs_message' + and object_id in + (select message_id + from acs_messages m + where tree_sortkey like + (select tree_sortkey || '%' + from acs_messages m + where message_id = :message_id)) + + + + + + + + + update bboard_forum_message_map + set forum_id = :dest_forum_id + where forum_id = :forum_id + and message_id in + (select message_id + from acs_messages m + where tree_sortkey like + (select tree_sortkey || '%' + from acs_messages m + where message_id = :message_id)) + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-move-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-move-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-move-2.tcl 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,44 @@ +ad_page_contract { + + Moves a message or thread to another forum. + + @author Anukul Kapoor + @creation-date 2001-02-20 + @cvs-id $Id: message-move-2.tcl,v 1.1 2001/06/29 20:37:18 lukep Exp $ + +} { + message_id:integer,notnull,acs_message_id + forum_id:integer,notnull,bboard_forum_id + dest_forum_id:integer,notnull,bboard_forum_id +} + +ad_require_permission $forum_id admin +ad_require_permission $dest_forum_id admin + +set user_id [ad_conn user_id] + +db_transaction { + db_dml update_bboard_contexts { + update acs_objects + set context_id = :dest_forum_id + where context_id = :forum_id + and object_type = 'acs_message' + and object_id in (select message_id + from acs_messages m + connect by prior message_id = reply_to + start with message_id = :message_id) + } + + db_dml move_bboard_messages { + update bboard_forum_message_map + set forum_id = :dest_forum_id + where forum_id = :forum_id + and message_id in (select message_id + from acs_messages m + connect by prior message_id = reply_to + start with message_id = :message_id) + } + +} + +ad_returnredirect "forum?forum_id=$forum_id" \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/message-move.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-move.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-move.adp 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,22 @@ + +Move a message +Move + + + @form_data@ + + +
+ +Move to this message and its replies to which forum?
+ +
+ +
+
+ Index: openacs-4/contrib/obsolete-packages/bboard/www/message-move.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-move.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-move.tcl 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,50 @@ +ad_page_contract { + + Confirmation screem for moving a message to another forum. + + @author Anukul Kapoor + @creation-date 2001-02-20 + @cvs-id $Id: message-move.tcl,v 1.1 2001/06/29 20:37:18 lukep Exp $ + +} { + message_id:integer,notnull,acs_message_id + forum_id:integer,notnull,bboard_forum_id + {replies ""} +} -properties { + message_id:onevalue + forum_id:onevalue + title:onevalue + sender_name:onevalue + content:onevalue + msg_mime_type:onevalue + forums:multirow + form_date:onevalue +} + +ad_require_permission $message_id admin + +set user_id [ad_conn user_id] + +db_1row message_info { + select p.first_names ||' '|| p.last_name as sender_name, b.title, + b.mime_type as msg_mime_type, b.content + from bboard_messages_all b, persons p + where message_id = :message_id + and b.sender = p.person_id +} + + +db_multirow forums allowed_target_forums { + select forum_id, short_name + from bboard_forums + where not forum_id = :forum_id + and exists (select 1 from acs_object_party_privilege_map + where object_id = forum_id + and party_id in (:user_id, -1) + and privilege = 'admin') + +} + +set form_data [export_form_vars message_id forum_id] + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/message-move.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-move.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-move.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,33 @@ + + + + + + + select p.first_names ||' '|| p.last_name as sender_name, b.title, + b.mime_type as msg_mime_type, b.content + from bboard_messages_all b, persons p + where message_id = :message_id + and b.sender = p.person_id + + + + + + + + + select forum_id, short_name + from bboard_forums + where not forum_id = :forum_id + and exists (select 1 from acs_object_party_privilege_map + where object_id = forum_id + and party_id in (:user_id, -1) + and privilege = 'admin') + + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-new-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-new-2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-new-2.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + + select short_name as forum_name from bboard_forums + where forum_id = :forum_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-new-3-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-new-3-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-new-3-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,17 @@ + + + + oracle8.1.6 + + + + + begin + acs_permission.grant_permission(:message_id, :user_id, 'bboard_write_message'); + end; + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-new-3-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-new-3-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-new-3-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,15 @@ + + + + postgresql7.1 + + + + + select acs_permission__grant_permission(:message_id, :user_id, 'bboard_write_message'); + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-new-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-new-3.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-new-3.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-new-3.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -51,7 +51,7 @@ } if [string equal [ad_parameter "UserPostsEditableP"] "t"] { - db_dml grant { + db_exec_plsql grant { begin acs_permission.grant_permission(:message_id, :user_id, 'bboard_write_message'); end; Index: openacs-4/contrib/obsolete-packages/bboard/www/message-new.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-new.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-new.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,50 @@ + + + + + + + select short_name as forum_name from bboard_forums + where forum_id = :forum_id + + + + + + + + + select reply_to, title, sent_date, + mime_type, content, + first_names||' '||last_name as full_name + from acs_messages_all m, persons p + where message_id = :reply_to + and person_id = sender + + + + + + + + + select min(category_id) as category_id from bboard_category_message_map + where message_id = :reply_to + group by message_id + + + + + + + + + select category_id, short_name + from bboard_categories + where forum_id = :forum_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,61 @@ + + + + oracle8.1.6 + + + + + select short_name as forum_name, + acs_permission.permission_p(:forum_id, :user_id, 'admin') as admin_p, + acs_permission.permission_p(:forum_id, :user_id, 'bboard_moderate_forum') + as moderate_p + from bboard_forums + where forum_id = :forum_id + + + + + + + + select message_id, reply_to, title, + to_char(sent_date, 'Month DD, YYYY HH:Mi am') as pretty_date, sender as user_id, + mime_type, content, first_names||' '||last_name as full_name, + acs_permission.permission_p(message_id, :user_id, + 'bboard_write_message') as write_p + from acs_messages_all m, persons p + where message_id = :message_id + and person_id = sender + + + + + + + + + select m.message_id, m.reply_to, m.title, m.mime_type, m.content, + to_char(m.sent_date,'Month DD, YYYY HH:Mi am') as pretty_date, sender as user_id, + p.first_names||' '||p.last_name as full_name, + mt.depth - 1 as thread_depth, rownum, + acs_permission.permission_p(m.message_id, :user_id, + 'bboard_write_message') as write_p + from acs_messages_all m, persons p, + (select message_id, level as depth, rownum as seqnum + from acs_messages + connect by prior message_id = reply_to + start with message_id = :message_id) mt + where m.message_id <> :message_id + and p.person_id = m.sender + and m.message_id = mt.message_id + and m.message_id in (select bfmm.message_id + from bboard_forum_message_map bfmm + where bfmm.forum_id = :forum_id) + order by m.sent_date + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,59 @@ + + + + postgresql7.1 + + + + + select short_name as forum_name, + acs_permission__permission_p(:forum_id, :user_id, 'admin') as admin_p, + acs_permission__permission_p(:forum_id, :user_id, 'bboard_moderate_forum') + as moderate_p + from bboard_forums + where forum_id = :forum_id + + + + + + + + + select message_id, reply_to, title, + to_char(sent_date, 'Month DD, YYYY HH:MI am') as pretty_date, sender as user_id, + mime_type, content, first_names||' '||last_name as full_name, + acs_permission__permission_p(message_id, :user_id, + 'bboard_write_message') as write_p + from acs_messages_all m, persons p + where message_id = :message_id + and person_id = sender + + + + + + + + + select m.message_id, m.reply_to, m.title, m.mime_type, m.content, + to_char(m.sent_date,'Month DD, YYYY HH:MI am') as pretty_date, sender as user_id, + p.first_names||' '||p.last_name as full_name, + tree_level(m.tree_sortkey) - 1 as thread_depth, + acs_permission__permission_p(m.message_id, :user_id, + 'bboard_write_message') as write_p + from acs_messages_all m, persons p + where m.tree_sortkey like (select tree_sortkey + from acs_messages am + where am.message_id = :message_id) || '/%' + and p.person_id = m.sender + and m.message_id in (select bfmm.message_id + from bboard_forum_message_map bfmm + where bfmm.forum_id = :forum_id) + order by m.sent_date + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-preview.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-preview.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-preview.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-preview.adp 29 Jun 2001 20:37:18 -0000 1.2 @@ -2,7 +2,7 @@ @page_title@ @context_bar@ -
+ @form_vars@ Index: openacs-4/contrib/obsolete-packages/bboard/www/message-threaded-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-threaded-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-threaded-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,46 @@ + + + + oracle8.1.6 + + + + + select short_name as forum_name, + acs_permission.permission_p(:forum_id, :user_id, 'admin') as admin_p, + acs_permission.permission_p(:forum_id, :user_id, 'bboard_moderate_forum') + as moderate_p + from bboard_forums + where forum_id = :forum_id + + + + + + + + + select m.message_id, m.reply_to, m.title, m.sent_date, m.mime_type, + to_char(m.sent_date, 'Month DD, YYYY HH:Mi am') as pretty_date, + m.content, p.first_names||' '||p.last_name as full_name, + p.person_id as user_id, + mt.depth - 1 as thread_depth, + acs_permission.permission_p(m.message_id, :user_id, + 'bboard_write_message') as write_p + from acs_messages_all m, persons p, + (select message_id, level as depth, rownum as seqnum + from acs_messages im + connect by prior message_id = reply_to + start with message_id = :message_id) mt + where p.person_id = m.sender + and m.message_id = mt.message_id + and m.message_id in (select bfmm.message_id + from bboard_forum_message_map bfmm + where bfmm.forum_id = :forum_id) + order by seqnum + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-threaded-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-threaded-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-threaded-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,44 @@ + + + + postgresql7.1 + + + + + select short_name as forum_name, + acs_permission__permission_p(:forum_id, :user_id, 'admin') as admin_p, + acs_permission__permission_p(:forum_id, :user_id, 'bboard_moderate_forum') + as moderate_p + from bboard_forums + where forum_id = :forum_id + + + + + + + + + select m.message_id, m.reply_to, m.title, m.sent_date, m.mime_type, + to_char(m.sent_date, 'Month DD, YYYY HH:MI am') as pretty_date, + m.content, p.first_names||' '||p.last_name as full_name, + p.person_id as user_id, + tree_level(m.tree_sortkey) - 1 as thread_depth, + acs_permission__permission_p(m.message_id, :user_id, + 'bboard_write_message') as write_p + from acs_messages_all m, persons p + where m.tree_sortkey like (select tree_sortkey + from acs_messages am + where am.message_id = :message_id) || '/%' + and p.person_id = m.sender + and m.message_id in (select bfmm.message_id + from bboard_forum_message_map bfmm + where bfmm.forum_id = :forum_id) + order by m.sent_date + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.adp 29 Jun 2001 20:37:18 -0000 1.2 @@ -2,31 +2,32 @@ @context_bar@ @forum_name@: @title@ + + +
+ + [Move Thread] + + + [Subscribe to replies] + + + You're subscribed to replies [Unsubscribe] + +

+ - - -
+
- - + +
-
- - [ - - Subscribe to replies - - - Unsubscribe from replies - - - ] - Index: openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -9,38 +9,31 @@ message_id:integer,notnull,acs_message_id forum_id:integer,notnull,bboard_forum_id } -properties { - message_create_p:onevalue context_bar:onevalue forum_name:onevalue forum_id:onevalue message:onerow replies:multirow title:onevalue - subscribe_p:onevalue subscribed_p:onevalue } -ad_require_permission $message_id bboard_read_message +ad_require_permission $message_id bboard_read_forum set user_id [ad_verify_and_get_user_id] -set subscribed_p 0 -set subscribe_p 0 - -if [ad_permission_p $forum_id bboard_create_message] { - set subscribe_p 1 - - if [string equal [bboard_message_subscribed_p -direct $user_id $message_id] "t"] { - set subscribed_p 1 - } else { - set subscribed_p 0 - } +if [string equal [bboard_message_subscribed_p -direct $user_id $message_id] "t"] { + set subscribed_p 1 +} else { + set subscribed_p 0 } -set message_create_p [ad_permission_p $forum_id bboard_create_message] - db_1row forum_short_name { - select short_name as forum_name from bboard_forums + select short_name as forum_name, + acs_permission.permission_p(:forum_id, :user_id, 'admin') as admin_p, + acs_permission.permission_p(:forum_id, :user_id, 'bboard_moderate_forum') + as moderate_p + from bboard_forums where forum_id = :forum_id } @@ -53,16 +46,14 @@ set context_bar [list [list "forum?[export_url_vars forum_id]" $forum_name] \ "One Message"] -db_multirow replies message_replies { +db_multirow replies messages_and_replies { select m.message_id, m.reply_to, m.title, m.sent_date, m.mime_type, to_char(m.sent_date, 'Month DD, YYYY HH:Mi am') as pretty_date, m.content, p.first_names||' '||p.last_name as full_name, p.person_id as user_id, mt.depth - 1 as thread_depth, acs_permission.permission_p(m.message_id, :user_id, - 'bboard_write_message') as write_p, - acs_permission.permission_p(m.message_id, :user_id, - 'bboard_delete_message') as delete_p + 'bboard_write_message') as write_p from acs_messages_all m, persons p, (select message_id, level as depth, rownum as seqnum from acs_messages @@ -73,10 +64,6 @@ and m.message_id in (select bfmm.message_id from bboard_forum_message_map bfmm where bfmm.forum_id = :forum_id) - and exists (select 1 from acs_object_party_privilege_map - where object_id = m.message_id - and party_id in (:user_id, -1) - and privilege = 'bboard_read_message') order by seqnum } Index: openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,15 @@ + + + + + + + select title + from acs_messages_all + where message_id = :message_id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-unsubscribe.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-unsubscribe.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message-unsubscribe.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-unsubscribe.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -9,11 +9,16 @@ } { forum_id:integer,notnull,bboard_forum_id message_id:integer,notnull,acs_message_id + {sub_page ""} } catch { bboard_unsubscribe_thread \ -thread_id $message_id -subscriber_id [ad_verify_and_get_user_id] } -ad_returnredirect "[bboard_message_page]?forum_id=$forum_id&message_id=$message_id" \ No newline at end of file +if [empty_string_p $sub_page] { + ad_returnredirect "[bboard_message_page]?forum_id=$forum_id&message_id=$message_id" +} else { + ad_returnredirect "subscriptions" +} Index: openacs-4/contrib/obsolete-packages/bboard/www/message.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message.adp 29 Jun 2001 20:37:18 -0000 1.2 @@ -2,12 +2,29 @@ @context_bar@ @forum_name@: @message.title@ + +
+ + [Delete Thread] + + + + [Move Thread] + + [Subscribe to replies] + + + You're subscribed to replies [Unsubscribe] + +
+ +

Message:

@@ -18,7 +35,7 @@
@@ -27,20 +44,9 @@ -[ -Post a reply - - | - - Subscribe to replies - - - Unsubscribe from replies - - +
+ + + +
- - | Delete Thread - - -] \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/message.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/message.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/message.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -15,47 +15,40 @@ forum_id:onevalue message:onerow replies:multirow - subscribe_p:onevalue subscribed_p:onevalue + moderate_p:onevalue } -ad_require_permission $message_id bboard_read_message +ad_require_permission $message_id bboard_read_forum set user_id [ad_verify_and_get_user_id] -set subscribed_p 0 -set subscribe_p 0 +if [string equal [bboard_message_subscribed_p -direct $user_id $message_id] "t"] { + set subscribed_p 1 +} else { + set subscribed_p 0 +} -if [ad_permission_p $forum_id bboard_create_message] { - set subscribe_p 1 - - if [string equal [bboard_message_subscribed_p -direct $user_id $message_id] "t"] { - set subscribed_p 1 - } else { - set subscribed_p 0 - } +db_1row forum_short_name { + select short_name as forum_name, + acs_permission.permission_p(:forum_id, :user_id, 'admin') as admin_p, + acs_permission.permission_p(:forum_id, :user_id, 'bboard_moderate_forum') + as moderate_p + from bboard_forums + where forum_id = :forum_id } db_1row message_info { select message_id, reply_to, title, to_char(sent_date, 'Month DD, YYYY HH:Mi am') as pretty_date, sender as user_id, mime_type, content, first_names||' '||last_name as full_name, acs_permission.permission_p(message_id, :user_id, - 'bboard_write_message') as write_p, - acs_permission.permission_p(message_id, :user_id, - 'bboard_delete_message') as delete_p + 'bboard_write_message') as write_p from acs_messages_all m, persons p where message_id = :message_id and person_id = sender } -column_array message -set message_create_p [ad_permission_p $forum_id bboard_create_message] - -db_1row forum_short_name { - select short_name as forum_name from bboard_forums - where forum_id = :forum_id -} - set context_bar [list [list "forum?[export_url_vars forum_id]" $forum_name] \ "One Message"] @@ -65,12 +58,10 @@ p.first_names||' '||p.last_name as full_name, mt.depth - 1 as thread_depth, rownum, acs_permission.permission_p(m.message_id, :user_id, - 'bboard_write_message') as write_p, - acs_permission.permission_p(m.message_id, :user_id, - 'bboard_delete_message') as delete_p + 'bboard_write_message') as write_p from acs_messages_all m, persons p, (select message_id, level as depth, rownum as seqnum - from acs_messages + from acs_messages im connect by prior message_id = reply_to start with message_id = :message_id) mt where m.message_id <> :message_id @@ -79,10 +70,6 @@ and m.message_id in (select bfmm.message_id from bboard_forum_message_map bfmm where bfmm.forum_id = :forum_id) - and exists (select 1 from acs_object_party_privilege_map - where object_id = m.message_id - and party_id in (:user_id, -1) - and privilege = 'bboard_read_message') order by m.sent_date } Index: openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -41,10 +41,6 @@ where sender = :user_id and forum_id = :forum_id and person_id = sender - and exists (select 1 from acs_object_party_privilege_map - where object_id = message_id - and party_id in (:current_user_id, -1) - and privilege = 'bboard_read_message') } } else { db_multirow messages messages_select { @@ -55,11 +51,6 @@ and forum_id = :forum_id and person_id = sender and status = 'approved' - and exists (select 1 from acs_object_party_privilege_map - where object_id = message_id - and party_id in (:current_user_id, -1) - and privilege = 'bboard_read_message') - } } Index: openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,73 @@ + + + + + + + select first_names||' '||last_name as full_name + from persons + where person_id = :user_id + + + + + + + + + select short_name as forum_name, moderated_p from bboard_forums + where forum_id = :forum_id + + + + + + + + + select title, num_replies, message_id, + first_names||' '||last_name as full_name + from bboard_messages_all, persons + where sender = :user_id + and forum_id = :forum_id + and person_id = sender + + + + + + + + + select title, num_replies, message_id, + first_names||' '||last_name as full_name + from bboard_messages_all, persons + where sender = :user_id + and forum_id = :forum_id + and person_id = sender + + + + + + + + + select forum_id, short_name + from bboard_forums bf + where not forum_id = :forum_id + and bboard_id = :package_id + and exists (select 1 + from bboard_messages_all bma + where sender = :user_id + and bma.forum_id = bf.forum_id) + and exists (select 1 from acs_object_party_privilege_map + where object_id = bf.forum_id + and party_id in (:current_user_id, -1) + and privilege = 'bboard_read_forum') + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/search-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/search-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/search-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,33 @@ + + + + oracle8.1.6 + + + + + select bboard_im_convert(:query) as query from dual + + + + + + + + + select score(10) as the_score, message_id, + m.title, m.num_replies, to_char(m.sent_date,'MM/DD/YYYY') as sent_date, + p.first_names||' '||p.last_name as full_name + from bboard_messages_all m, persons p, bboard_forums f + where contains(content, :query, 10) > 0 + and m.sender = p.person_id + and m.forum_id = :forum_id + and f.forum_id = m.forum_id + and f.bboard_id = :package_id + order by score(10) desc + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/search-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/search-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/search-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,31 @@ + + + + postgresql7.1 + + + + + select :query as query + + + + + + + + + select 10 as the_score, message_id, + m.title, m.num_replies, to_char(m.sent_date,'MM/DD/YYYY') as sent_date, + p.first_names||' '||p.last_name as full_name + from bboard_messages_all m, persons p, bboard_forums f + where content like '%' || :query || '%' + and m.sender = p.person_id + and m.forum_id = :forum_id + and f.forum_id = m.forum_id + and f.bboard_id = :package_id + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/search.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/search.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/search.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -34,37 +34,17 @@ # if you're not running context, you'll need to run this by hand # alter index cr_rev_content_index rebuild online parameters('sync memory 45M'); -if [string equal [bboard_forum_moderated_p $forum_id] "f"] { - db_multirow results bboard_search { +db_multirow results bboard_search { select score(10) as the_score, message_id, - m.title, m.num_replies, to_char(m.sent_date,'MM/DD/YYYY') as sent_date, + m.title, m.num_replies, to_char(m.sent_date,'MM/DD/YYYY') as sent_date, p.first_names||' '||p.last_name as full_name from bboard_messages_all m, persons p, bboard_forums f where contains(content, :query, 10) > 0 - and acs_permission.permission_p(message_id, :user_id, - 'bboard_read_message') = 't' and m.sender = p.person_id and m.forum_id = :forum_id and f.forum_id = m.forum_id and f.bboard_id = :package_id order by score(10) desc - } -} else { - db_multirow results bboard_search { - select score(10) as the_score, message_id, - m.title, m.num_replies, to_char(m.sent_date,'MM/DD/YYYY') as sent_date, - p.first_names||' '||p.last_name as full_name - from bboard_messages_all m, persons p, bboard_forums f - where contains(content, :query, 10) > 0 - and acs_permission.permission_p(message_id, :user_id, - 'bboard_read_message') = 't' - and m.sender = p.person_id - and m.forum_id = :forum_id - and f.forum_id = m.forum_id - and status = 'approved' - and f.bboard_id = :package_id - order by score(10) desc - } } ad_return_template Index: openacs-4/contrib/obsolete-packages/bboard/www/simple-message-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/simple-message-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/simple-message-oracle.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,20 @@ + + + + oracle8.1.6 + + + + + select object_id as file_id, cr.title, ci.name + from acs_objects ao, cr_items ci, cr_revisions cr + where object_id = ci.item_id and + live_revision = revision_id and + object_type = 'content_item' and + context_id = :id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/simple-message-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/simple-message-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/simple-message-postgresql.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,20 @@ + + + + postgresql7.1 + + + + + select object_id as file_id, cr.title, ci.name + from acs_objects ao, cr_items ci, cr_revisions cr + where object_id = ci.item_id and + live_revision = revision_id and + object_type = 'content_item' and + context_id = :id + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/simple-message.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/simple-message.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/simple-message.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/simple-message.adp 29 Jun 2001 20:37:18 -0000 1.2 @@ -21,14 +21,14 @@ [edit] - [add attachment] + [attach file] [delete] - [forward as email] + [email] [reply] @@ -65,7 +65,7 @@ Attachment: @attachments.name@ - @attachments.title@ - + [delete]
Index: openacs-4/contrib/obsolete-packages/bboard/www/simple-message.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/simple-message.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/simple-message.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/simple-message.tcl 29 Jun 2001 20:37:18 -0000 1.2 @@ -16,16 +16,24 @@ set mail_friend_p [ad_parameter "MailFriendEnabledP"] set attachments_p [ad_parameter "AttachmentsEnabledP"] +if {[ad_parameter "UserPostsDeletableP"] == "t"} { + if [info exists write_p] { + set delete_p $write_p + } +} else { + if [info exists admin_p] { + set delete_p $admin_p + } +} + set formatted_content [acs_messaging_format_as_html $mime_type $content] # we don't want to stomp on the set current_user_id [ad_conn user_id] if {[string equal $attachments_p "t"] && [info exists id]} { db_multirow attachments get_attachments { - select object_id as file_id, cr.title, ci.name, - acs_permission.permission_p(object_id, :current_user_id, - 'bboard_write_message') as delete_p + select object_id as file_id, cr.title, ci.name from acs_objects ao, cr_items ci, cr_revisions cr where object_id = ci.item_id and live_revision = revision_id and Index: openacs-4/contrib/obsolete-packages/bboard/www/subscriptions.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/subscriptions.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/subscriptions.adp 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,39 @@ + +Subscriptions +Manage Subscriptions + +You have the follow subscriptions:
+ +

Forums

+ + + +

Categories

+ + + +

Individual Threads

+ + + +

+ +Add subscriptions from within particular forums. \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/subscriptions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/subscriptions.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/subscriptions.tcl 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,47 @@ +ad_page_contract { + This is the central interface for managing a user's subscriptions. + + @author Anukul Kapoor + @creation-date 2001-03-27 + @cvs-id $Id: subscriptions.tcl,v 1.1 2001/06/29 20:37:18 lukep Exp $ +} { +} -properties { + forum_subs:multirow + category_subs:multirow + thread_subs:multirow +} + +ad_maybe_redirect_for_registration + +set user_id [ad_verify_and_get_user_id] + +# three sorts of subscriptions: +# forums + +db_multirow forum_subs get_forum_subs { + select bfs.forum_id, short_name as name + from bboard_forum_subscribers bfs, bboard_forums bf + where bfs.forum_id = bf.forum_id + and bfs.subscriber_id = :user_id + order by forum_id asc +} + +# categories +db_multirow category_subs get_category_subs { + select bcs.category_id, short_name as name, forum_id + from bboard_category_subscribers bcs, bboard_categories bc + where bcs.category_id = bc.category_id + and bcs.subscriber_id = :user_id + order by category_id asc +} + + +# threads + +db_multirow thread_subs get_thread_subs { + select thread_id, title as name, forum_id + from bboard_thread_subscribers bts, bboard_messages_all bma + where bts.thread_id = bma.message_id + and bts.subscriber_id = :user_id + order by thread_id asc +} \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/subscriptions.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/subscriptions.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/subscriptions.xql 29 Jun 2001 20:37:18 -0000 1.1 @@ -0,0 +1,43 @@ + + + + + + + select bfs.forum_id, short_name as name + from bboard_forum_subscribers bfs, bboard_forums bf + where bfs.forum_id = bf.forum_id + and bfs.subscriber_id = :user_id + order by forum_id asc + + + + + + + + + select bcs.category_id, short_name as name, forum_id + from bboard_category_subscribers bcs, bboard_categories bc + where bcs.category_id = bc.category_id + and bcs.subscriber_id = :user_id + order by category_id asc + + + + + + + + + select thread_id, title as name, forum_id + from bboard_thread_subscribers bts, bboard_messages_all bma + where bts.thread_id = bma.message_id + and bts.subscriber_id = :user_id + order by thread_id asc + + + + + +