Index: openacs-4/packages/dotlrn-bboard/www/alerts.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bboard/www/alerts.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-bboard/www/alerts.adp 18 Mar 2002 04:26:46 -0000 1.1 @@ -0,0 +1,64 @@ + +Manage Email Alerts +Bboard Alerts +../../ +1 + +

Bboard Alerts

+ +You have registered for the following email alerts. An email alert +will send you an email whenever an update happens in the given +context. For example, a bboard email alert will notify you by email +whenever a new posting occurs in the specific bboard. A thread email +alert, on the other hand, will only alert you if a posting has been +made within that given thread. +

+ +

Bboards

+ + + +

Categories

+ + + +

Individual Threads

+ + + +

Index: openacs-4/packages/dotlrn-bboard/www/alerts.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bboard/www/alerts.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-bboard/www/alerts.tcl 18 Mar 2002 04:26:46 -0000 1.1 @@ -0,0 +1,53 @@ +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: alerts.tcl,v 1.1 2002/03/18 04:26:46 ben 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, bf.bboard_id + 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, bc.short_name as name, bf.forum_id, bf.bboard_id, bf.short_name as bboard_name + from bboard_category_subscribers bcs, bboard_categories bc, bboard_forums bf + where bcs.category_id = bc.category_id + and bcs.subscriber_id = :user_id + and bc.forum_id = bf.forum_id + order by category_id asc +} + + +# threads + +db_multirow thread_subs get_thread_subs { + select thread_id, title as name, bf.forum_id, bf.bboard_id, bf.short_name as bboard_name + from bboard_thread_subscribers bts, bboard_messages_all bma, bboard_forums bf + where bts.thread_id = bma.message_id + and bts.subscriber_id = :user_id + and bma.forum_id= bf.forum_id + order by thread_id asc +} + +set this_url [ad_conn url] + +ad_return_template Index: openacs-4/packages/dotlrn-bboard/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bboard/www/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-bboard/www/index.adp 18 Mar 2002 04:26:46 -0000 1.1 @@ -0,0 +1 @@ + Index: openacs-4/packages/dotlrn-bboard/www/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bboard/www/master.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-bboard/www/master.adp 18 Mar 2002 04:26:46 -0000 1.1 @@ -0,0 +1,17 @@ + +@text@ + + + +@navbar@ + + + + + + + + +@navbar@ + + Index: openacs-4/packages/dotlrn-bboard/www/master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bboard/www/master.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-bboard/www/master.tcl 18 Mar 2002 04:26:46 -0000 1.1 @@ -0,0 +1,137 @@ +# /www/dotlrn-master.tcl +# +# The dotlrn master template +# +# All adp pages in /dotlrn/www should point to this (local) master +# template by adding the following line at the top of the adp: +# +# +# +# More: This is 1) where the navbar for portal pages gets generated. +# Any CUSTOM CODE for your site should be put in +# " ACS-ROOT/www/site-specific-master" +# +# +# Author: Arjun Sanyal (arjun@openforce.net) +# +# $Id: master.tcl,v 1.1 2002/03/18 04:26:46 ben Exp $ +# + +# Since we're always within a portal +set portal_id [dotlrn::get_workspace_portal_id [ad_get_user_id]] + +# here's a bunch of stuff that an adp may optionally set to alter the +# master's behavior + +# portal_id +if {[exists_and_not_null portal_id]} { + set have_portal_id_p 1 +} else { + set have_portal_id_p 0 +} + +# navbar vars +set show_navbar_p 1 +if {[exists_and_not_null no_navbar_p]} { + set show_navbar_p 0 +} + +if {![info exists link_all]} { + set link_all 0 +} + +if {![info exists return_url]} { + set link [ad_conn -get extra_url] +} else { + set link $return_url +} + +if {![info exists show_control_panel]} { + set show_control_panel 0 +} + +if {![info exists link_control_panel]} { + set link_control_panel 1 +} + +if {![info exists control_panel_text]} { + set control_panel_text "Control Panel" +} + + +if {[ad_parameter community_level_p] == 1} { + # in a community + set community_id [dotlrn_community::get_community_id] + + # The header text is the name of the community + set text [dotlrn_community::get_community_header_name $community_id] + + if { $have_portal_id_p && $show_navbar_p } { + if {$show_control_panel} { + if {$link_control_panel} { + set extra_td_html "   $control_panel_text" + } else { + set extra_td_html "   $control_panel_text" + } + } else { + # don't show control panel + set extra_td_html "" + } + + set navbar [portal::navbar \ + -portal_id $portal_id \ + -link_all $link_all \ + -link $link \ + -pre_html "" \ + -post_html "" \ + -extra_td_html $extra_td_html \ + -table_html_args "class=\"navbar\""] + } else { + set navbar "
" + set portal_id "" + } +} elseif {[ad_parameter community_type_level_p] == 1} { + # in a community type + set text \ + [dotlrn_community::get_community_type_name [dotlrn_community::get_community_type]] + + if {$have_portal_id_p && $show_navbar_p} { + + set navbar [portal::navbar \ + -portal_id $portal_id \ + -link_all $link_all \ + -link $link \ + -pre_html "" \ + -post_html "" \ + -extra_td_html $extra_td_html \ + -table_html_args "class=\"navbar\""] + } else { + set navbar "
" + set portal_id "" + } + +} else { + # under /dotlrn + set community_id "" + set text "" + + if {$have_portal_id_p && $show_navbar_p} { + if {$link_control_panel} { + set extra_td_html "   Control Panel" + } else { + set extra_td_html "   Control Panel" + } + + set navbar [portal::navbar \ + -portal_id $portal_id \ + -link_all $link_all \ + -link $link \ + -pre_html "" \ + -post_html "" \ + -extra_td_html $extra_td_html \ + -table_html_args "class=\"navbar\""] + } else { + set navbar "
" + set portal_id "" + } +}