Index: openacs-4/packages/dotlrn-jabber/dotlrn-jabber.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-jabber/dotlrn-jabber.info,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-jabber/dotlrn-jabber.info 20 Oct 2004 19:42:11 -0000 1.1 @@ -0,0 +1,27 @@ + + + + + DotLrn Jabber Applet + DotLrn Jabber Applets + f + f + + + Bjoern Kiesbye + Malte Sussdorff + This Package integrats the Jabber Portlet into DotLrn. + Bjoern Kiesbye + DotLrn integration. + 2 + + + + + + + + + + + Index: openacs-4/packages/dotlrn-jabber/sql/dotlrn-jabber-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-jabber/sql/dotlrn-jabber-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-jabber/sql/dotlrn-jabber-create.sql 20 Oct 2004 19:42:12 -0000 1.1 @@ -0,0 +1,152 @@ +-- Copyrigth (C) 2003 Bjoern Kiesbye +-- Author Bjoern Kiesbye +-- email: Kiesbye@theservice.de Bjoern_kiesbye@web.de +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html + +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- /jabber-portlet/sql/postgresql/calendar-full-portlet-create.sql +-- + +-- Creates Jabber portlet + +-- Copyright (C) 2004 Bjoern Kiesbye +-- @author Bjoern Kiesbye (kiesbye@theservice.de bjoern_kiesbye@web.de) +-- @creation-date 2004-07-18 +-- ported to postres 2004-07-18 + + +create function jabber_inline_0() +returns integer as ' +begin + + perform acs_sc_impl__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''dotlrn_jabber'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''GetPrettyName'', + ''dotlrn_jabber::get_pretty_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''AddApplet'', + ''dotlrn_jabber::add_applet'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''RemoveApplet'', + ''dotlrn_jabber::remove_applet'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''AddAppletToCommunity'', + ''dotlrn_jabber::add_applet_to_community'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''RemoveAppletFromCommunity'', + ''dotlrn_jabber::remove_applet_from_community'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''AddUser'', + ''dotlrn_jabber::add_user'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''RemoveUser'', + ''dotlrn_jabber::remove_user'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''AddUserToCommunity'', + ''dotlrn_jabber::add_user_to_community'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''RemoveUserFromCommunity'', + ''dotlrn_jabber::remove_user_from_community'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''AddPortlet'', + ''dotlrn_jabber::add_portlet'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''RemovePortlet'', + ''dotlrn_jabber::remove_portlet'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''Clone'', + ''dotlrn_jabber::clone'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''ChangeEventHandler'', + ''dotlrn_jabber::change_event_handler'', + ''TCL'' + ); + + perform acs_sc_binding__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'' + ); + + return 0; + +end;' language 'plpgsql'; + +select jabber_inline_0(); +drop function jabber_inline_0(); + + Index: openacs-4/packages/dotlrn-jabber/sql/oracle/dotlrn-jabber-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-jabber/sql/oracle/dotlrn-jabber-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-jabber/sql/oracle/dotlrn-jabber-create.sql 20 Oct 2004 19:42:12 -0000 1.1 @@ -0,0 +1,142 @@ +-- This is the sql code to integrate a Jabber applet into dotlrn +-- author Bjoern Kiesbye bkiesbye@sussdorff-roy.com + + +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl.new ( + 'dotlrn_applet', + 'dotlrn_jabber', + 'dotlrn_jabber' + ); + + -- add all the hooks + + -- GetPrettyName + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_jabber', + 'GetPrettyName', + 'dotlrn_jabber::get_pretty_name', + 'TCL' + ); + + -- AddApplet + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_jabber', + 'AddApplet', + 'dotlrn_jabber::add_applet', + 'TCL' + ); + + -- RemoveApplet + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_jabber', + 'RemoveApplet', + 'dotlrn_jabber::remove_applet', + 'TCL' + ); + + -- AddAppletToCommunity + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_jabber', + 'AddAppletToCommunity', + 'dotlrn_jabber::add_applet_to_community', + 'TCL' + ); + + -- RemoveAppletFromCommunity + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_jabber', + 'RemoveAppletFromCommunity', + 'dotlrn_jabber::remove_applet_from_community', + 'TCL' + ); + -- AddUser + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_jabber', + 'AddUser', + 'dotlrn_jabber::add_user', + 'TCL' + ); + + -- RemoveUser + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_jabber', + 'RemoveUser', + 'dotlrn_jabber::remove_user', + 'TCL' + ); + + -- AddUserToCommunity + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_jabber', + 'AddUserToCommunity', + 'dotlrn_jabber::add_user_to_community', + 'TCL' + ); + + -- RemoveUserFromCommunity + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_jabber', + 'RemoveUserFromCommunity', + 'dotlrn_jabber::remove_user_from_community', + 'TCL' + ); + + -- AddPortlet + foo := acs_sc_impl.new_alias ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_jabber', + impl_operation_name => 'AddPortlet', + impl_alias => 'dotlrn_jabber::add_portlet', + impl_pl => 'TCL' + ); + + -- RemovePortlet + foo := acs_sc_impl.new_alias ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_jabber', + impl_operation_name => 'RemovePortlet', + impl_alias => 'dotlrn_jabber::remove_portlet', + impl_pl => 'TCL' + ); + + -- Clone + foo := acs_sc_impl.new_alias ( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_jabber', + impl_operation_name => 'Clone', + impl_alias => 'dotlrn_jabber::clone', + impl_pl => 'TCL' + ); + + -- Change Event Handler + + foo := acs_sc_impl.new_alias( + impl_contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_jabber', + impl_operation_name => 'ChangeEventHandler', + impl_alias => 'dotlrn_jabber::change_event_handler', + impl_pl => 'TCL' + ); + + + -- Add the binding + acs_sc_binding.new ( + contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_jabber' + ); +end; +/ +show errors; Index: openacs-4/packages/dotlrn-jabber/sql/postgresql/dotlrn-jabber-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-jabber/sql/postgresql/dotlrn-jabber-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-jabber/sql/postgresql/dotlrn-jabber-create.sql 20 Oct 2004 19:42:12 -0000 1.1 @@ -0,0 +1,152 @@ +-- Copyrigth (C) 2003 Bjoern Kiesbye +-- Author Bjoern Kiesbye +-- email: Kiesbye@theservice.de Bjoern_kiesbye@web.de +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html + +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- /jabber-portlet/sql/postgresql/calendar-full-portlet-create.sql +-- + +-- Creates Jabber portlet + +-- Copyright (C) 2004 Bjoern Kiesbye +-- @author Bjoern Kiesbye (kiesbye@theservice.de bjoern_kiesbye@web.de) +-- @creation-date 2004-07-18 +-- ported to postres 2004-07-18 + + +create function jabber_inline_0() +returns integer as ' +begin + + perform acs_sc_impl__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''dotlrn_jabber'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''GetPrettyName'', + ''dotlrn_jabber::get_pretty_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''AddApplet'', + ''dotlrn_jabber::add_applet'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''RemoveApplet'', + ''dotlrn_jabber::remove_applet'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''AddAppletToCommunity'', + ''dotlrn_jabber::add_applet_to_community'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''RemoveAppletFromCommunity'', + ''dotlrn_jabber::remove_applet_from_community'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''AddUser'', + ''dotlrn_jabber::add_user'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''RemoveUser'', + ''dotlrn_jabber::remove_user'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''AddUserToCommunity'', + ''dotlrn_jabber::add_user_to_community'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''RemoveUserFromCommunity'', + ''dotlrn_jabber::remove_user_from_community'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''AddPortlet'', + ''dotlrn_jabber::add_portlet'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''RemovePortlet'', + ''dotlrn_jabber::remove_portlet'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''Clone'', + ''dotlrn_jabber::clone'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'', + ''ChangeEventHandler'', + ''dotlrn_jabber::change_event_handler'', + ''TCL'' + ); + + perform acs_sc_binding__new ( + ''dotlrn_applet'', + ''dotlrn_jabber'' + ); + + return 0; + +end;' language 'plpgsql'; + +select jabber_inline_0(); +drop function jabber_inline_0(); + + Index: openacs-4/packages/dotlrn-jabber/tcl/dotlrn-jabber-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-jabber/tcl/dotlrn-jabber-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-jabber/tcl/dotlrn-jabber-procs.tcl 20 Oct 2004 19:42:12 -0000 1.1 @@ -0,0 +1,219 @@ + namespace eval dotlrn_jabber { + + ad_proc -public applet_key { + } { + What's my applet key? + } { + return dotlrn_jabber + } + + ad_proc -public my_package_key { + } { + What's my package key? + } { + return "dotlrn-jabber" + } + + ad_proc -public package_key { + } { + What package does this applet deal with? + } { + return jabber + } + + ad_proc -public get_pretty_name { + } { + return the pretty name of this applet. + } { + return Jabber + } + + ad_proc -public add_applet { + } { + Add the forums applet to dotlrn - for one-time init + Must be repeatable! + } { + if {![dotlrn_applet::applet_exists_p -applet_key [applet_key]]} { + + db_transaction { + dotlrn_applet::mount \ + -package_key [my_package_key] \ + -url jabber \ + -pretty_name [get_pretty_name] + + dotlrn_applet::add_applet_to_dotlrn \ + -applet_key [applet_key] \ + -package_key [my_package_key] + } + + } + } + + ad_proc -public remove_applet { + } { + remove the applet from dotlrn + } { + ad_return_complaint 1 "[applet_key] remove_applet not implemented!" + } + + +######################################################################################### +# I'll try to trick dotlrn and always just return the same package_id # +######################################################################################### + + + ad_proc -public add_applet_to_community { + community_id + } { + Add the forums applet to a dotlrn community + } { + # Just Mount the Jabber package under this communities URL + +# set community_package_id [dotlrn_community::get_package_id $community_id] + + # set node_id [db_string get_node_id "SELECT node_id FROM site_nodes WHERE object_id = :community_package_id" ] + + # set new_jabber_node_id [site_node::new -name jabber -parent_id $node_id] + #$community_package_id + # site_node::mount -node_id $new_jabber_node_id -object_id [apm_package_id_from_key jabber] + + # Create and Mount the Jabber package + set package_id [dotlrn::instantiate_and_mount \ + -mount_point "jabber" \ + $community_id \ + [package_key] \ + ] + + + # Now add this Community to our jb_conference_patry_map and create a default conference room + + #set room_name [jb_get_default_room_for_group $community_id ] + set room_name "abvcfdr" + #Just a hack for some reason the dotlrn routins leave the dbatabase (postgres only) in an insecure + #state we are not able to create new acs_objects (we can but the call won't return) + + if {[db_0or1row get_room_id "SELECT room_id FROM jb_conference_rooms WHERE name = :room_name"]} { + + set new_room_id $room_id + + } else { + + set new_room_id null + + } + + #db_dml add_community_to_conference_party_list "INSERT INTO jb_conference_groups + # (group_id , conference_only_p , default_room_id) + # values (:community_id , 'f' , $new_room_id)" + + + set members [dotlrn_community::get_rel_segment_id \ + -community_id $community_id \ + -rel_type dotlrn_member_rel \ + ] + + permission::grant -party_id $members -object_id $package_id -privilege write + permission::grant -party_id $members -object_id $package_id -privilege write + + + + + # Set up the jabber portlet for this portal/community + + set portal_id [dotlrn_community::get_portal_id \ + -community_id $community_id \ + ] + + + jabber_portlet::add_self_to_page -portal_id $portal_id -package_id $package_id + } + + + + + + ad_proc -public remove_applet_from_community { + community_id + } { + remove the applet from the given community + } { + ad_return_complaint 1 "[applet_key] remove_applet_from_community not implemented!" + } + + ad_proc -public add_user { + user_id + } { + Called when the user is initially added as a dotlrn user. + For one-time init stuff. + } { + } + + ad_proc -public remove_user { + user_id + } { + called when a user is removed from dotlrn. + } { + } + + ad_proc -public add_user_to_community { + user_id community_id + } { + called when a user is added to a dotlrn community. + } { + } + + + + ad_proc -public remove_user_from_community { + user_id community_id + } { + called when a user is removed from a dotlrn community. + } { + } + + + ad_proc -public add_portlet { + portal_id + } { + A helper proc to set up default params for templates. + + @param portal_id + } { + + #we don't need this stuff here. + # set args [ns_set create] + # ns_set put $args package_id 0 + # ns_set put $args display_group_name_p f + # ns_set put $args param_action overwrite + + # set type [dotlrn::get_type_from_portal_id -portal_id $portal_id] + + #if {[string equal $type user]} { + # portal_id is a user portal template + # ns_set put $args display_group_name_p t + #} + + jabber_portlet::add_self_to_page -portal_id $portal_id -package_id 0 + # we don't need a package_id here , this call makes the portlet availabel inside the admin space of dotlrn + # adding a available portlet to a community actully creates a new instance. + + } + + ad_proc -public remove_portlet { + {-portal_id:required} + } { + + jabber_portlet::remove_self_from_page -portal_id $portal_id -package_id 0 + return + } + + ad_proc -public clone { + old_community_id + new_community_id + } { + Clone this applet's content from the old community to the new one + } { + dotlrn_jabber::add_applet_to_community $new_community_id + } + +} Index: openacs-4/packages/jabber/README =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/README,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/README 20 Oct 2004 19:36:44 -0000 1.1 @@ -0,0 +1,17 @@ + +In the extra c directory you find the tarballs for the nsjabber module , a admin patch for the Jabber Server 1.4.x and a patched conference-0.4.1+ component for the Jabber Server. + + + +Instalation: +The package for openacs can be pre installed. + +The tarballs (in the c dir.) include README files with further instructions in their head directorys, the jabber package for openacs has a complet instalation documentation, for all parts of needed to let the jabber package work properly. + + +Bjoern Kiesbye +email:bkiesbye@sussdorff-roy.com +jid:bjoern_open@intranet.sussdorff-roy.com + +copyright Sussdorff & Roy 2003 + \ No newline at end of file Index: openacs-4/packages/jabber/jabber.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/jabber.info,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/jabber.info 20 Oct 2004 19:36:44 -0000 1.1 @@ -0,0 +1,28 @@ + + + + + Jabber + Jabbers + f + f + + + Kiesbye Kiesbye + Malte Sussdorff + jabber + 2004-07-22 + Bjoern Kiesbye + jabber + 2 + + + + + + + + + + + Index: openacs-4/packages/jabber/nsjabber-patch-1.tar.gz =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/nsjabber-patch-1.tar.gz,v diff -u Binary files differ Index: openacs-4/packages/jabber/c/conference-0.4.1+.tar.gz =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/c/conference-0.4.1+.tar.gz,v diff -u Binary files differ Index: openacs-4/packages/jabber/c/mod_acs-0.1.0.0.tar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/c/mod_acs-0.1.0.0.tar,v diff -u Binary files differ Index: openacs-4/packages/jabber/c/nsjabber-0.1.0.1.tar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/c/nsjabber-0.1.0.1.tar,v diff -u Binary files differ Index: openacs-4/packages/jabber/sql/oracle/jabber-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/sql/oracle/jabber-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/sql/oracle/jabber-create.sql 20 Oct 2004 19:36:47 -0000 1.1 @@ -0,0 +1,817 @@ +-- +-- +-- package/jabber/sql/oracle/jabber-create.sql +-- @author Luis Mosteiro Fernandez +-- +-- + +create table jb_services ( + service varchar2(255) primary key, + pretty_name varchar2(255), + -- active_check_p to control whether service is avaiable (t) or not (f) + active_check_p char check(active_check_p in ('t','f')) + ); + + +insert into jb_services (service , pretty_name , active_check_p) values ('jabber' , 'Jabber' , 't'); +insert into jb_services (service , pretty_name , active_check_p) values ('aim' , 'AIM' , 't'); +insert into jb_services (service , pretty_name , active_check_p) values ('yahoo' , 'Yahoo' , 't'); +insert into jb_services (service , pretty_name , active_check_p) values ('msn' , 'MSN' , 't')'; +insert into jb_services (service , pretty_name , active_check_p) values ('icq' , 'ICQ' , 't'); + + + +-- Screen +-- Definition as an object +-- Screen saves every screenname, it can be taken as a buddylist +-- users within the OACS System can have several screens, because they can be member in different im-systems +-- moreover the screens of external users are stored in this table +-- implementation as object, because it is imaginable to put a permission +-- on the screenname so not everyone can add this screen to his buddylist + +begin +acs_object_type.create_type ( +supertype => 'acs_object', +object_type => 'jb_screen', +pretty_name => 'Screen', +pretty_plural => 'Screens', +table_name => 'JB_SCREENS', +id_column => 'SCREEN_ID' +); +end; +/ +show errors; + + +declare + attr_id acs_attributes.attribute_id%TYPE; +begin + attr_id := acs_attribute.create_attribute ( + object_type => 'jb_screen', + attribute_name => 'user_id', + pretty_name => 'User ID', + pretty_plural => 'User IDs', + datatype => 'integer' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'jb_screen', + attribute_name => 'im_screen_name', + pretty_name => 'IM Screen Name', + pretty_plural => 'IM Screen Names', + datatype => 'string' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'jb_screen', + attribute_name => 'service', + pretty_name => 'Service', + pretty_plural => 'Services', + datatype => 'string' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'jb_screen', + attribute_name => 'status', + pretty_name => 'Status', + pretty_plural => 'Status', + datatype => 'string' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'jb_screen', + attribute_name => 'away_msg', + pretty_name => 'Away_Message', + pretty_plural => 'Away_Messages', + datatype => 'string' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'jb_screen', + attribute_name => 'resourc', + pretty_name => 'Resource', + pretty_plural => 'Resources', + datatype => 'string' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'jb_screen', + attribute_name => 'refcount', + pretty_name => 'Reference_Count', + pretty_plural => 'Reference_Counts', + datatype => 'integer' + ); +end; +/ +show errors; + +create table jb_screens ( + screen_id integer primary key references acs_objects(object_id), + -- user_id is null, if the user is not member of the OACS + user_id integer references users(user_id), + im_screen_name varchar2(255), + service varchar2(255) references jb_services(service) , + status varchar2(255), + away_msg varchar2(4000), + resourc varchar2(255), + refcount integer, + unique (im_screen_name , service) + ); + +create or replace package jb_screen +as + +function new ( + screen_id in jb_screens.screen_id%TYPE default null, + user_id in jb_screens.user_id%TYPE default null, + im_screen_name in jb_screens.im_screen_name%TYPE default null, + service in jb_screens.service%TYPE default null, + status in jb_screens.status%TYPE default null, + away_msg in jb_screens.away_msg%TYPE default null, + resourc in jb_screens.resourc%TYPE default null, + refcount in jb_screens.refcount%TYPE default null, + object_type in acs_object_types.object_type%TYPE default 'jb_screen', + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null +) return jb_screens.screen_id%TYPE; + +procedure delete ( + screen_id in jb_screens.screen_id%TYPE +); +end jb_screen; +/ +show errors + + + + + +create or replace package body jb_screen +as + +function new ( + screen_id in jb_screens.screen_id%TYPE default null, + user_id in jb_screens.user_id%TYPE default null, + im_screen_name in jb_screens.im_screen_name%TYPE default null, + service in jb_screens.service%TYPE default null, + status in jb_screens.status%TYPE default null, + away_msg in jb_screens.away_msg%TYPE default null, + resourc in jb_screens.resourc%TYPE default null, + refcount in jb_screens.refcount%TYPE default null, + object_type in acs_object_types.object_type%TYPE default 'jb_screen', + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null +) return jb_screens.screen_id%TYPE +is + v_screen_id integer; +begin + v_screen_id := acs_object.new ( + object_id => screen_id, + object_type => object_type, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + context_id => context_id + ); + + +insert into jb_screens + (screen_id, user_id, im_screen_name, service, status, away_msg, resourc, refcount) +values + (v_screen_id, user_id, im_screen_name, service, status, away_msg, resourc, refcount); + + +return v_screen_id; +end new; + +procedure delete ( + screen_id in jb_screens.screen_id%TYPE +) +is +begin + delete from jb_screens + where screen_id = jb_screen.delete.screen_id; + + acs_object.delete(screen_id); +end delete; + +end jb_screen; +/ +show errors; + + +-- jb_user_jabber_information +-- this table stores jabber login information for each user + +create table jb_user_jabber_information ( + user_id integer primary key references users(user_id), + jabber_regstate char(2), + jabber_passwd varchar2(16), + autologin char(2) check (autologin in ('t','f')) + ); + +-- jb_subscription_request + + +create table jb_subscription_requests ( + -- screen is a full Jabber-ID + screen varchar2(255) primary key, + asked date + ); +-- jb_message_log +-- log table for messages + +create sequence jb_message_log_seq start with 1; + +create table jb_message_log ( + message_id integer primary key, + user_id integer references users(user_id), + message VARCHAR2(4000), + send date, + conn_state varchar(2), + -- receive jabber_id + receive_jid varchar2(1000) + ); + +-- jb_xml_to_send + +create table jb_xml_to_send ( + xml blob, + stored date + ); + + + + +-- jb_friends +-- this table stores information for all user friends (whether external or internal friends) + +create table jb_friends ( + user_id integer references users(user_id), + friend_screen_id integer references jb_screens(screen_id), + friend_first_name varchar2(255), + friend_last_name varchar2(255), + primary key(user_id , friend_screen_id) + ); + + +-- Conference Room +-- implementation as object to use the permissioning system + + +begin +acs_object_type.create_type ( +supertype => 'acs_object', +object_type => 'jb_conference_room', +pretty_name => 'Conference Room', +pretty_plural => 'Conference Rooms', +table_name => 'JB_CONFERENCE_ROOMS', +id_column => 'room_id' +); +end; +/ +show errors; + + + +declare +attr_id acs_attributes.attribute_id%TYPE; +begin + attr_id := acs_attribute.create_attribute ( + object_type => 'jb_conference_room', + attribute_name => 'creator_jabber_id', + pretty_name => 'Creator Jabber ID', + pretty_plural => 'Creator Jabber IDs', + datatype => 'string' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'jb_conference_room', + attribute_name => 'name', + pretty_name => 'Name', + pretty_plural => 'Names', + datatype => 'string' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'jb_conference_room', + attribute_name => 'description', + pretty_name => 'Description', + pretty_plural => 'Descriptions', + datatype => 'string' + ); +end; +/ +show errors; + +create table jb_conference_rooms ( + room_id integer primary key references acs_objects(object_id), + creator_jabber_id varchar2(255), + -- jabber_id of the creator + -- only users having a jabber_id can create a conference room + -- jabber_ids look like: screen_name_of_the_service@service_name.jabber_server + -- therefore it has to be varchar + name varchar(100) unique, + description varchar(1000), + type varchar2(15) + ); + + +create or replace package jb_conference_room +as + +function new ( + room_id in jb_conference_rooms.room_id%TYPE default null, + creator_jabber_id in jb_conference_rooms.creator_jabber_id%TYPE default null, + name in jb_conference_rooms.name%TYPE default null, + description in jb_conference_rooms.description%TYPE default null, + object_type in acs_object_types.object_type%TYPE default 'jb_conference_room', + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null +) return jb_conference_rooms.room_id%TYPE; + +procedure delete ( + room_id in jb_conference_rooms.room_id%TYPE +); +end jb_conference_room; +/ +show errors + + +create or replace package body jb_conference_room +as + +function new ( + room_id in jb_conference_rooms.room_id%TYPE default null, + creator_jabber_id in jb_conference_rooms.creator_jabber_id%TYPE default null, + name in jb_conference_rooms.name%TYPE default null, + description in jb_conference_rooms.description%TYPE default null, + object_type in acs_object_types.object_type%TYPE default 'conference_room', + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null +) return jb_conference_rooms.room_id%TYPE +is +v_room_id integer; +begin +v_room_id := acs_object.new ( + object_id => room_id, + object_type => object_type, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + context_id => context_id + ); + + +insert into jb_conference_rooms + (room_id, creator_jabber_id, name, description) +values + (v_room_id, creator_jabber_id, name, description); + + +return v_room_id; +end new; + +procedure delete ( + room_id in jb_conference_rooms.room_id%TYPE +) +is +begin + delete from jb_conference_rooms + where room_id = jb_conference_room.delete.room_id; + +acs_object.delete(room_id); +end delete; + +end jb_conference_room; +/ +show errors; + + + + + + +-- Conference Room Thread +-- no implementation as object +-- user permission controlled for entire room, not for a single thread + + + + +create sequence jb_conference_room_threads_seq start with 1; + +create table jb_conference_room_threads ( + thread_id integer primary key, + room_id integer not null references jb_conference_rooms(room_id), + start_time date, + end_time date, + subject varchar2(200), + description varchar2(1000), + creator_jabber_id varchar2(255), + creator_user_id integer references users(user_id) + ); + + +-- Maps Rooms to the threads where the dicussion Started, for storing the structure of a discussion on an major topic, that maybe +-- displayed later . + + + +create table jb_room_start_from_thread ( + thread_id not null references jb_conference_room_threads(thread_id), + room_id not null references jb_conference_rooms(room_id), + primary key(thread_id , room_id) + ); + + + +-- maps a Room to a Party so oher users/groups can posibly browes the discussions. + +create table jb_room_party_map ( + party_id not null references parties(party_id), + room_id not null references jb_conference_rooms(room_id), + primary key (party_id , room_id) + ); + +-- stores the group_id's that have access to the conference system +-- conference_only_p indicates if this group was created for conferencing ('t') and we (jabber admin) may be allowed to change it, +-- or if this groups originated some where else in the package. + + +create table jb_conference_groups ( + group_id primary key references groups(group_id), + conference_only_p char(1) default 't' check (conference_only_p in ('t' , 'f') ), + default_room_id unique references jb_conference_rooms(room_id) + ); + + +create table jb_groups_blocked_conference( + group_id primary key references groups(group_id) + ); + + +-- IMPORTANT +-- creation of a dummy conference room and conference room thread, so the C-module can work! +-- C-module has an own sequence for the threads, but it needs to have a start point, so the database has to provide this start point + + + + +create table jb_conference_protocols ( + jabber_id varchar2(100), + user_id integer references users(user_id), + message varchar2(1000), + stored date, + room_id integer references jb_conference_rooms(room_id), + thread_id integer references jb_conference_room_threads(thread_id) + ) ; + +create index jb_conference_protocols_id on jb_conference_protocols(room_id, thread_id); + + + + + +-- Now come some PL/SQL procedures and functions, which are used by the c-modules + +-- validate whether user is registered + +create or replace procedure jb_reg_validation(screen_in IN varchar2 , regstate IN varchar2) is + v_user_id jb_screens.user_id%TYPE; + BEGIN + v_user_id := v_user_id; + + END; + + +/ + +show errors + +-- Update the online state of a user +create or replace procedure jb_update_status (status_in IN varchar2 , resourc_in IN varchar2 , screen_in IN varchar2 , service_in IN varchar2) +IS +service_long varchar2(255); +BEGIN + + IF service_in = 'a' THEN + service_long := 'aim' ; + END IF; + IF service_in = 'j' THEN + service_long := 'jabber' ; + END IF; + IF service_in = 'm' THEN + service_long := 'msn' ; + END IF; + IF service_in = 'r' THEN + service_long := 'irc' ; + END IF; + IF service_in = 'i' THEN + service_long := 'icq' ; + END IF; + IF service_in = 'y' THEN + service_long := 'yahoo' ; + END IF; + + + update jb_screens SET status = status_in , resourc= resourc_in WHERE LOWER(im_screen_name)=LOWER(screen_in) and service = service_long; + + commit; + +END; + +/ + +show errors + + +-- Clear the online states of every one on Login or Logout + +create or replace procedure jb_clear_status +IS +Begin +update jb_screens SET status='offline' , resourc='offline'; +commit; +End; +/ +show errors + + + + +--checks if jid_in is in the table of the subscription requests , we store them in ther because we may have to wait +--for a while till some one (jid_in) answers the request, it returns 0 in case there is nothing known about jid_in +--or n > 0 in case there is something known about jid_in + +create or replace function jb_subscription_check (jid_in IN varchar2) +return integer +AS r_exists integer; +BEGIN + r_exists := 0; + select count(screen) into r_exists from jb_subscription_requests where lower(screen) = lower(jid_in) ; + + return r_exists; +END; + +/ + +show errors + + + + +--inserts a new subscription request + +create or replace procedure jb_subscription_insert(jid_in IN varchar2) +IS +BEGIN + insert into jb_subscription_requests (screen , asked ) values ( jid_in , sysdate); + commit; +END; + +/ +show errors + +--removes a certain subscription request + +create or replace procedure jb_subscription_del (jid_in IN varchar2) +IS +BEGIN + delete from jb_subscription_requests where lower(screen) = lower(jid_in); + commit; +END; + +/ +show errors + + + + +--Find the user_id to a given jid, when someone invites us through sending a jabber invite from his jabber client: + +create or replace function jb_get_user_id (screen_in IN varchar2) return integer AS r_user_id integer; + +BEGIN + + Select persons.person_id INTO r_user_id + FROM persons, jb_screens + WHERE persons.person_id = jb_screens.user_id + AND jb_screens.service = 'jabber' + AND jb_screens.im_screen_name = screen_in; + + return r_user_id; + +END; + +/ + +show errors + + + + + +--Get the jid from a given user_id + +create or replace function jb_get_jid (user_id_in IN integer) return VARCHAR2 AS r_jid varchar2(150); +BEGIN + + Select sn.im_screen_name INTO r_jid + FROM jb_screens sn + WHERE sn.user_id = user_id_in + AND sn.service = 'jabber'; + + return r_jid; + +END; +/ +show errors + + + + +--if a room is destroyed or the topic changes, the discussion on the last topic (thread) ends ,insert this time as thread end time: + + +create or replace procedure jb_conference_thread_finish(thread_id_in IN integer) +IS +BEGIN + update jb_conference_room_threads set end_time = sysdate where thread_id = thread_id_in; + commit; +END; +/ +show errors + + + + + +--When a room starts or the topic changes a new Thread is created : + + +create or replace procedure jb_conference_thread_new (thread_id_in IN integer , room_id_in IN integer , subject_in IN varchar2 , creator_jid_in IN varchar2 , creator_user_id_in IN integer) +IS + +BEGIN + + IF creator_user_id_in = 0 THEN + + insert into jb_conference_room_threads (thread_id , room_id , start_time , subject , creator_jabber_id ) + values (thread_id_in , room_id_in , sysdate , subject_in , creator_jid_in ); + + ELSE + + insert into jb_conference_room_threads (thread_id , room_id , start_time , subject , creator_jabber_id , creator_user_id ) + values (thread_id_in , room_id_in , sysdate , subject_in , creator_jid_in , creator_user_id_in); + + END IF; + + commit; + +END; + +/ +show errors + + + +--When a message is received from a conference room it is stored in the db: + + +create or replace procedure jb_conference_message(jid_in IN varchar2 , message_in IN varchar2 , room_id_in IN integer , thread_id_in IN integer , user_id_in IN integer) +IS +BEGIN + + IF user_id_in = 0 THEN + + insert into jb_conference_protocols (jabber_id , message , stored , room_id , thread_id ) + values (jid_in , message_in , sysdate , room_id_in , thread_id_in ); + + ELSE + + insert into jb_conference_protocols (jabber_id , user_id , message , stored , room_id , thread_id) + values (jid_in , user_id_in , message_in , sysdate , room_id_in , thread_id_in ); + + END IF; + + COMMIT; + +END; +/ +show errors; + + + + + + +-- When a room is created (it is maybe recreated every Monday at 8:00 ) see if we already have a room_id for that room. + +create or replace function jb_conference_room_check(room_name_in IN varchar2 ) return integer AS r_room_id integer; +BEGIN + r_room_id := -1; + + select room_id INTO r_room_id from jb_conference_rooms where lower(name)=lower(room_name_in); + + return r_room_id; + +END; +/ +show errors + + + + + +-- When a room is fully new created , create a new Table entry. We do not use the room_id given by the c-module due to the fact that +-- conference_room is implemented as object + + +create or replace procedure jb_conference_rooms_new ( user_id_in IN integer , creator_jid_in IN varchar2 , name_in IN varchar2 , description_in IN varchar2) +IS + +BEGIN + + + IF user_id_in = 0 THEN + + + declare + id integer; + begin + id := jb_conference_room.new ( + creator_jabber_id => creator_jid_in , + name => name_in , + description => description_in , + object_type => 'jb_conference_room' + ); + end; + + + ELSE + + declare + id integer; + begin + id := jb_conference_room.new ( + creator_jabber_id => creator_jid_in , + name => name_in , + description => description_in , + object_type => 'jb_conference_room' , + creation_user => user_id_in + ); + end; + + + + END IF; + + + COMMIT; + +END; + +/ +show errors + + + +-- Get the next room_id. This procedure is used in the database to get a new room_id, but it takes the ACS3.x datamodel as basis +-- In the OACS4.x datamodel conference_room is implemented as object, so we do not have a sequence, but we do not want the c-module +-- generate an error, so we give him an integer back, but we do not use this room_id (look above) + +create or replace function jb_conference_next_room_id return integer AS r_room_id integer; +BEGIN + SELECT count(*) INTO r_room_id FROM jb_services; + + return r_room_id; +END; +/ +show errors + + + +-- Get the next thread_id + +create or replace function jb_conference_next_thread_id return integer AS r_thread_id integer; +BEGIN + + SELECT jb_conference_room_threads_seq.nextval INTO r_thread_id from dual; + + return r_thread_id; + +END; + +/ +show errors + +@jabber-notification-create.sql \ No newline at end of file Index: openacs-4/packages/jabber/sql/oracle/jabber-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/sql/oracle/jabber-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/sql/oracle/jabber-drop.sql 20 Oct 2004 19:36:47 -0000 1.1 @@ -0,0 +1,42 @@ + +drop table jb_xml_to_send; +drop table jb_message_log; +drop table jb_subscription_requests; +drop table jb_user_jabber_information; +drop table jb_conference_protocols; +drop table jb_friends; +drop table jb_room_start_from_thread; +drop table jb_room_party_map; +drop table jb_conference_room_threads; +drop table jb_conference_groups; + +drop package jb_screen; +drop table jb_screens; +execute acs_object_type.drop_type('jb_screen'); +show errors + + + +drop package jb_conference_room; +drop table jb_conference_rooms; +execute acs_object_type.drop_type('jb_conference_room'); +show errors + +drop table jb_services; +drop sequence jb_message_log_seq; + +drop procedure jb_reg_validation; +drop procedure jb_update_status; +drop procedure jb_clear_status; +drop function jb_subscription_check; +drop procedure jb_subscription_insert; +drop procedure jb_subscription_del; +drop function jb_get_user_id; +drop function jb_get_jid; +drop procedure jb_conference_thread_finish; +drop procedure jb_conference_thread_new; +drop procedure jb_conference_message; +drop function jb_conference_room_check; +drop procedure jb_conference_rooms_new; +drop function jb_conference_next_room_id; +drop function jb_conference_next_thread_id; Index: openacs-4/packages/jabber/sql/oracle/jabber-notification-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/sql/oracle/jabber-notification-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/sql/oracle/jabber-notification-create.sql 20 Oct 2004 19:36:47 -0000 1.1 @@ -0,0 +1,100 @@ + +-- +-- package/jabber/sql/oracle/jabber-notification-create.sql +-- @author Bjoern Kiesbye +-- @email bkiesbye@sussdorff-roy.com +-- + + + + +-- This function calls register the jabber package with the service-contracts as implementation +-- for the DeliveryMethod interface of the notification package. + + +-- implemeting the notification::imessage::send_or_mail function. + +declare + impl_id integer; + foo integer; +begin + + impl_id := acs_sc_impl.new ( + 'NotificationDeliveryMethod', + 'notification_imessage_or_email', + 'jabber' + ); + + + foo := acs_sc_impl_alias.new ( + 'NotificationDeliveryMethod', + 'notification_imessage_or_email', + 'Send', + 'notification::imessage::send_or_email', + 'TCL' + ); + + + acs_sc_binding.new ( + contract_name => 'NotificationDeliveryMethod', + impl_name => 'notification_imessage_or_email' + ); + + + foo:= notification_delivery_method.new( + short_name => 'imessage_or_email', + sc_impl_id => impl_id, + pretty_name => 'Instant Message or Email', + creation_user => null, + creation_ip => null + ); + + +end; +/ +show errors + +-- implemeting the notification::imessage::send_and_mail function. + +declare + impl_id integer; + foo integer; +begin + + impl_id := acs_sc_impl.new ( + 'NotificationDeliveryMethod', + 'notification_imessage_and_email', + 'jabber' + ); + + + foo := acs_sc_impl_alias.new ( + 'NotificationDeliveryMethod', + 'notification_imessage_and_email', + 'Send', + 'notification::imessage::send_and_email', + 'TCL' + ); + + + acs_sc_binding.new ( + contract_name => 'NotificationDeliveryMethod', + impl_name => 'notification_imessage_and_email' + ); + + + foo:= notification_delivery_method.new( + short_name => 'imessage_and_email', + sc_impl_id => impl_id, + pretty_name => 'Instant Message and Email', + creation_user => null, + creation_ip => null + ); + + +end; +/ +show errors + +@jabber-notification-forum-create.sql + Index: openacs-4/packages/jabber/sql/oracle/jabber-notification-forum-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/sql/oracle/jabber-notification-forum-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/sql/oracle/jabber-notification-forum-create.sql 20 Oct 2004 19:36:47 -0000 1.1 @@ -0,0 +1,51 @@ +-- +-- package/jabber/sql/oracle/jabber-notification-forum-create.sql +-- @author Bjoern Kiesbye +-- @email bkiesbye@sussdorff-roy.com +-- + + + + +-- This code registers the forum (package) with the +-- new NotificationMethodImplementations from the jabber package. +-- When the forum (package is re/installed after the jabber package) +-- the code from this from this file should run after the forum instalation. +-- This hack should be part of the forums package. +-- Comment: it should not be a hack like this anyway , the service contract is responsible +-- ,to let every App., that is interested in making use of the NotificationDeliveryMethod interface, +-- get access to all implementations of this interface. The Notification package is able to handle +-- more then one implementation of it's interface (like it schould by openacs definition) +-- but the service contract package dosn't seem to be able to properly populate multiple implementations +-- of the same interface (service contract). Even if it alowes multiple implementations to exist + +declare +v_type_id_message int; +v_delivery_method_id_and notification_types_del_methods.delivery_method_id%TYPE; +v_type_id_thread notification_types_del_methods.type_id%TYPE; +v_delivery_method_id_or notification_types_del_methods.delivery_method_id%TYPE; +begin + SELECT delivery_method_id INTO v_delivery_method_id_and FROM notification_delivery_methods WHERE short_name like('imessage_and_email'); + + + SELECT delivery_method_id INTO v_delivery_method_id_or FROM notification_delivery_methods WHERE short_name like('imessage_or_email'); + + SELECT type_id INTO v_type_id_message FROM notification_types WHERE short_name like('forums_message_notif'); + + + SELECT type_id INTO v_type_id_thread FROM notification_types WHERE short_name like('forums_forum_notif'); + + insert into notification_types_del_methods (type_id, delivery_method_id) + values ( v_type_id_thread ,v_delivery_method_id_and); + + insert into notification_types_del_methods (type_id, delivery_method_id) + values ( v_type_id_thread , v_delivery_method_id_or ); + + insert into notification_types_del_methods (type_id, delivery_method_id) + values ( v_type_id_message , v_delivery_method_id_and); + + insert into notification_types_del_methods (type_id, delivery_method_id) + values ( v_type_id_message , v_delivery_method_id_or); +end; +/ +show errors Index: openacs-4/packages/jabber/sql/postgresql/jabber-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/sql/postgresql/jabber-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/sql/postgresql/jabber-create.sql 20 Oct 2004 19:36:47 -0000 1.1 @@ -0,0 +1,1007 @@ +-- +-- +-- package/jabber/sql/oracle/jabber-create.sql +-- @author Luis Mosteiro Fernandez +-- +-- + +create table jb_services ( + service varchar(255) primary key, + pretty_name varchar(255), + -- active_check_p to control whether service is avaiable (t) or not (f) + active_check_p char check(active_check_p in ('t','f')) + ); + + +insert into jb_services (service , pretty_name , active_check_p) values ('jabber' , 'Jabber' , 't'); +insert into jb_services (service , pretty_name , active_check_p) values ('aim' , 'AIM' , 't'); +insert into jb_services (service , pretty_name , active_check_p) values ('yahoo' , 'Yahoo' , 't'); +insert into jb_services (service , pretty_name , active_check_p) values ('msn' , 'MSN' , 't'); +insert into jb_services (service , pretty_name , active_check_p) values ('icq' , 'ICQ' , 't'); + +-- Screen +-- Definition as an object +-- Screen saves every screenname, it can be taken as a buddylist +-- users within the OACS System can have several screens, because they can be member in different im-systems +-- moreover the screens of external users are stored in this table +-- implementation as object, because it is imaginable to put a permission +-- on the screenname so not everyone can add this screen to his buddylist + +create function inline_jab () +returns integer as' +begin +perform acs_object_type__create_type ( + ''jb_screen'' , + ''Screen'' , + ''Screens'' , + ''acs_object'' , + ''JB_SCREENS'' , + ''SCREEN_ID'' , + ''jabber'' , + ''f'' , + null , + null +); + +return null; +end;' language 'plpgsql'; + +select inline_jab(); +drop function inline_jab(); + + +select acs_attribute__create_attribute ( + 'jb_screen', -- object_type + 'user_id', -- attribute_name + 'integer', -- datatype + 'User ID', -- pretty_name + 'User IDs', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + null, -- storage + 'f' -- static_p +); + + +select acs_attribute__create_attribute ( + 'jb_screen', -- object_type + 'im_screen_name', -- attribute_name + 'string', -- datatype + 'IM Screen Name', -- pretty_name + 'IM Screen Names', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + null, -- storage + 'f' -- static_p +); + + +select acs_attribute__create_attribute ( + 'jb_screen', -- object_type + 'service', -- attribute_name + 'string', -- datatype + 'Service', -- pretty_name + 'Services', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + null, -- storage + 'f' -- static_p +); + + +select acs_attribute__create_attribute ( + 'jb_screen', -- object_type + 'status', -- attribute_name + 'string', -- datatype + 'Status', -- pretty_name + 'Status', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + null, -- storage + 'f' -- static_p +); + + +select acs_attribute__create_attribute ( + 'jb_screen', -- object_type + 'away_msg', -- attribute_name + 'string', -- datatype + 'Away_Message', -- pretty_name + 'Away_Messages', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + null, -- storage + 'f' -- static_p +); + + +select acs_attribute__create_attribute ( + 'jb_screen', -- object_type + 'resourc', -- attribute_name + 'string', -- datatype + 'Resource', -- pretty_name + 'Resources', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + null, -- storage + 'f' -- static_p +); + + +select acs_attribute__create_attribute ( + 'jb_screen', -- object_type + 'refcount', -- attribute_name + 'integer', -- datatype + 'Reference_Count', -- pretty_name + 'Reference_Counts', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + null, -- storage + 'f' -- static_p +); + + +create table jb_screens ( + screen_id integer primary key references acs_objects(object_id), + -- user_id is null, if the user is not member of the OACS + user_id integer references users(user_id), + im_screen_name varchar(255), + service varchar(255) references jb_services(service) , + status varchar(255), + away_msg varchar(4000), + resourc varchar(255), + refcount integer, + unique (im_screen_name , service) + ); + + +-- Defining the jb_screen package functions + + +create or replace function jb_screen__new (integer , integer , varchar , varchar , varchar , varchar , varchar , integer , varchar , timestamp with time zone , integer , varchar , integer) +returns integer as ' +declare + + p_screen_id alias for $1; + p_user_id alias for $2; + p_im_screen_name alias for $3; + p_service alias for $4; + p_status alias for $5; + p_away_msg alias for $6; + p_resourc alias for $7; + p_refcount alias for $8; + p_object_type alias for $9; + p_creation_date alias for $10; + p_creation_user alias for $11; + p_creation_ip alias for $12; + p_context_id alias for $13; + v_screen_id integer; + v_refcount integer; + v_object_type varchar(255); +begin + + +if p_object_type is null then + v_object_type := ''jb_screen''; +else + v_object_type := p_object_type; +end if; + +if p_refcount is null then + v_refcount := 0; +else + v_refcount := p_refcount; +end if; + + +v_screen_id := acs_object__new ( + p_screen_id, + v_object_type, + p_creation_date, + p_creation_user, + p_creation_ip, + p_context_id , + ''t'' + ); + + + +insert into jb_screens + (screen_id, user_id, im_screen_name, service, status, away_msg, resourc, refcount) +values + (v_screen_id, p_user_id, p_im_screen_name, p_service, p_status, p_away_msg, p_resourc, p_refcount); + +return v_screen_id; +end;' language 'plpgsql'; + + + + + + +create function jb_screen__delete(integer) +returns integer as ' +declare + p_screen_id alias for $1; +begin + + + + delete from jb_screens + where screen_id = p_screen_id; + + perform acs_object__delete(p_screen_id); + +return p_screen_id; +end;' language 'plpgsql'; + + + +-- jb_screen Package definition end + + +-- jb_user_jabber_information +-- this table stores jabber login information for each user + +create table jb_user_jabber_information ( + user_id integer primary key references users(user_id), + jabber_regstate char(2), + jabber_passwd varchar(16), + autologin char(2) check (autologin in ('t','f')) + ); + +-- jb_subscription_request + + +create table jb_subscription_requests ( + -- screen is a full Jabber-ID + screen varchar(255) primary key, + asked date + ); +-- jb_message_log +-- log table for messages + + +create sequence jb_message_log_seq start 1; + +create table jb_message_log ( + message_id integer primary key, + user_id integer references users(user_id), + message VARCHAR(4000), + send date, + conn_state varchar(2), + -- receive jabber_id + receive_jid varchar(1000) + ); + +-- jb_xml_to_send + +create table jb_xml_to_send ( + xml bytea, + stored date + ); + + + + +-- jb_friends +-- this table stores information for all user friends (whether external or internal friends) + +create table jb_friends ( + user_id integer references users(user_id), + friend_screen_id integer references jb_screens(screen_id), + friend_first_name varchar(255), + friend_last_name varchar(255), + primary key(user_id , friend_screen_id) + ); + + +-- Conference Room +-- implementation as object to use the permissioning system + +create or replace function inline_jab () +returns integer as' +begin +perform acs_object_type__create_type ( + ''jb_conference_room'' , + ''Conference Room'' , + ''Conference Rooms'' , + ''acs_object'' , + ''JB_CONFERENCE_ROOMS'' , + ''room_id'' , + ''jabber_conference'' , + ''f'' , + null , + null +); + +return null; +end;' language 'plpgsql'; + +select inline_jab(); +drop function inline_jab(); + + +select acs_attribute__create_attribute ( + 'jb_conference_room', -- object_type + 'creator_jabber_id', -- attribute_name + 'string', -- datatype + 'Creator Jabber ID', -- pretty_name + 'Creator Jabber IDs', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + null, -- storage + 'f' -- static_p +); + + + +select acs_attribute__create_attribute ( + 'jb_conference_room', -- object_type + 'name', -- attribute_name + 'string', -- datatype + 'Name', -- pretty_name + 'Names', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + null, -- storage + 'f' -- static_p +); + + +select acs_attribute__create_attribute ( + 'jb_conference_room', -- object_type + 'description', -- attribute_name + 'string', -- datatype + 'Description', -- pretty_name + 'Descriptions', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + null, -- storage + 'f' -- static_p +); + + + +select acs_attribute__create_attribute ( + 'jb_conference_room', -- object_type + 'room_id', -- attribute_name + 'integer', -- datatype + 'Room ID', -- pretty_name + 'Room IDs', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + null, -- storage + 'f' -- static_p +); + + + +select acs_attribute__create_attribute ( + 'jb_conference_room', -- object_type + 'type', -- attribute_name + 'string', -- datatype + 'Type', -- pretty_name + 'Types', -- pretty_plural + null, -- table_name + null, -- column_name + null, -- default_value + 1, -- min_n_values + 1, -- max_n_values + null, -- sort_order + null, -- storage + 'f' -- static_p +); + + + + +create table jb_conference_rooms ( + room_id integer primary key references acs_objects(object_id), + creator_jabber_id varchar(255), + -- jabber_id of the creator + -- only users having a jabber_id can create a conference room + -- jabber_ids look like: screen_name_of_the_service@service_name.jabber_server + -- therefore it has to be varchar + name varchar(100) unique, + description varchar(1000), + type varchar(15) + ); + + + + + + +create or replace function jb_conference_room__new (integer , varchar , varchar , varchar , varchar , timestamp with time zone , integer , varchar , integer) +returns integer as ' +declare + p_room_id alias for $1; + p_creator_jabber_id alias for $2; + p_name alias for $3; + p_description alias for $4; + p_object_type alias for $5; + p_creation_date alias for $6; + p_creation_user alias for $7; + p_creation_ip alias for $8; + p_context_id alias for $9; + v_room_id integer; + v_object_type varchar; +begin + + +IF p_object_type is null then + + v_object_type := ''jb_conference_room''; + +ELSE + + v_object_type := p_object_type; + +END IF; + + +v_room_id := acs_object__new ( + p_room_id, + v_object_type, + p_creation_date, + p_creation_user, + p_creation_ip, + p_context_id + ); + + +insert into jb_conference_rooms + (room_id, creator_jabber_id, name, description) +values + (v_room_id, p_creator_jabber_id, p_name, p_description); + + +return v_room_id; + +end; +' language 'plpgsql'; + + + + + +create or replace function jb_conference_room__delete (integer ) +returns integer as' +declare + p_room_id alias for $1; +begin + delete from jb_conference_rooms + where room_id = p_room_id; + + +perform acs_object__delete(p_room_id); +return p_room_id; +end; +' language 'plpgsql'; + + + + + + + + +-- Conference Room Thread +-- no implementation as object +-- user permission controlled for entire room, not for a single thread + + + + +create sequence jb_conference_room_threads_seq start 1; +create sequence jb_conference_rooms_seq start 1; + +create table jb_conference_room_threads ( + thread_id integer primary key, + room_id integer not null references jb_conference_rooms(room_id), + start_time date, + end_time date, + subject varchar(200), + description varchar(1000), + creator_jabber_id varchar(255), + creator_user_id integer references users(user_id) + ); + + +-- Maps Rooms to the threads where the dicussion Started, for storing the structure of a discussion on an major topic, that maybe +-- displayed later . + + + +create table jb_room_start_from_thread ( + thread_id integer not null references jb_conference_room_threads(thread_id), + room_id integer not null references jb_conference_rooms(room_id), + primary key(thread_id , room_id) + ); + + + +-- maps a Room to a Party so oher users/groups can posibly browes the discussions. + +create table jb_room_party_map ( + party_id integer not null references parties(party_id), + room_id integer not null references jb_conference_rooms(room_id), + primary key (party_id , room_id) + ); + +-- stores the group_id's that have access to the conference system +-- conference_only_p indicates if this group was created for conferencing ('t') and we (jabber admin) may be allowed to change it, +-- or if this groups originated some where else in the package. + + +create table jb_conference_groups ( + group_id integer primary key references groups(group_id), + conference_only_p char(1) default 't' check (conference_only_p in ('t' , 'f') ), + default_room_id integer unique references jb_conference_rooms(room_id) + ); + + +create table jb_groups_blocked_conference( + group_id integer primary key references groups(group_id) + ); + + +-- IMPORTANT +-- creation of a dummy conference room and conference room thread, so the C-module can work! +-- C-module has an own sequence for the threads, but it needs to have a start point, so the database has to provide this start point + + + + +create table jb_conference_protocols ( + jabber_id varchar(100), + user_id integer references users(user_id), + message varchar(1000), + stored timestamp, + room_id integer references jb_conference_rooms(room_id), + thread_id integer references jb_conference_room_threads(thread_id) + ) ; + +create index jb_conference_protocols_id on jb_conference_protocols(room_id, thread_id); + + + + + +-- Now come some PL/SQL procedures and functions, which are used by the c-modules + +-- validate whether user is registered + +create or replace function jb_reg_validation(varchar , varchar) returns integer as' +declare + screen_in alias for $1; + regstate alias for $2 + v_user_id jb_screens.user_id%TYPE; + BEGIN + v_user_id := v_user_id; + return 1; + END; +' language 'plpgsql'; + + + + + + + + +-- Update the online state of a user +create or replace function jb_update_status (varchar , varchar , varchar , varchar) returns integer as' +declare + status_in alias for $1; + resourc_in alias for $2; + screen_in alias for $3; + service_in alias for $4; + service_long varchar(255); + aim varchar; + jabber varchar; +BEGIN + +aim := ''a''; +jabber := ''j''; + + + IF service_in = ''a'' THEN service_long := ''aim''; END IF; + + IF service_in = ''j'' THEN service_long := ''jabber''; END IF; + + IF service_in = ''m'' THEN service_long := ''msn''; END IF; + IF service_in = ''r'' THEN service_long := ''irc''; END IF; + IF service_in = ''i'' THEN service_long := ''icq''; END IF; + + +--IF service_in = ''j'' THEN service_long := ''jabber''; END IF; + + update jb_screens SET status = status_in , resourc= resourc_in WHERE LOWER(im_screen_name)=LOWER(screen_in) and service = service_long; + + return 1; + +END; +' language 'plpgsql'; + + + + +-- Clear the online states of every one on Login or Logout + +create or replace function jb_clear_status() returns integer as' +Begin +update jb_screens SET status=''offline'' , resourc=''offline''; +return 1; +End; +' language 'plpgsql'; + + + + + + +--checks if jid_in is in the table of the subscription requests , we store them in ther because we may have to wait +--for a while till some one (jid_in) answers the request, it returns 0 in case there is nothing known about jid_in +--or n > 0 in case there is something known about jid_in + +create or replace function jb_subscription_check (varchar) +returns integer as' +decalre +jid_in alias for $1; +r_exists integer; +BEGIN + r_exists := 0; + select count(screen) into r_exists from jb_subscription_requests where lower(screen) = lower(jid_in) ; + + return r_exists; +END; +' language 'plpgsql'; + + + + + + + +--inserts a new subscription request + +create or replace function jb_subscription_insert(varchar) returns integer as' +declare + jid_in alias for $1; +BEGIN + insert into jb_subscription_requests (screen , asked ) values ( jid_in , sysdate); + +return 1; +END; +' language 'plpgsql'; + + +--removes a certain subscription request + +create or replace function jb_subscription_del (varchar) returns integer as' +DECLARE + jid_in alias for $1; +BEGIN + delete from jb_subscription_requests where lower(screen) = lower(jid_in); + +return 1; +END; +' language 'plpgsql'; + + + + + + +--Find the user_id to a given jid, when someone invites us through sending a jabber invite from his jabber client: + +create or replace function jb_get_user_id (varchar) returns integer AS' +DECLARE + screen_in alias for $1; + r_user_id integer; + +BEGIN + + Select persons.person_id INTO r_user_id + FROM persons, jb_screens + WHERE persons.person_id = jb_screens.user_id + AND jb_screens.service = ''jabber'' + AND jb_screens.im_screen_name = screen_in; + + return r_user_id; + +END; +' language 'plpgsql'; + + + + + + + + +--Get the jid from a given user_id + +create or replace function jb_get_jid (integer) returns VARCHAR AS' +DECLARE + user_id_in alias for $1; + r_jid varchar(150); +BEGIN + + Select sn.im_screen_name INTO r_jid + FROM jb_screens sn + WHERE sn.user_id = user_id_in + AND sn.service = ''jabber''; + + return r_jid; + +END; +' language 'plpgsql'; + + + +--if a room is destroyed or the topic changes, the discussion on the last topic (thread) ends ,insert this time as thread end time: + + +create or replace function jb_conference_thread_finish(integer) returns integer as' +DECLARE + thread_id_in alias for $1; +BEGIN + update jb_conference_room_threads set end_time = sysdate where thread_id = thread_id_in; +return 1; +END; +' language 'plpgsql'; + + + + + +--When a room starts or the topic changes a new Thread is created : + + +create or replace function jb_conference_thread_new (integer , integer , varchar , varchar , integer) returns integer as' +DECLARE + thread_id_in alias for $1; + room_id_in alias for $2; + subject_in alias for $3; + creator_jid_in alias for $4; + creator_user_id_in alias for $5; + +BEGIN + + IF creator_user_id_in = 0 THEN + + insert into jb_conference_room_threads (thread_id , room_id , start_time , subject , creator_jabber_id ) + values (thread_id_in , room_id_in , CURRENT_TIMESTAMP , subject_in , creator_jid_in ); + + ELSE + + insert into jb_conference_room_threads (thread_id , room_id , start_time , subject , creator_jabber_id , creator_user_id ) + values (thread_id_in , room_id_in , CURRENT_TIMESTAMP , subject_in , creator_jid_in , creator_user_id_in); + + END IF; + + return 1; + +END; +' language 'plpgsql'; + + + + +--When a message is received from a conference room it is stored in the db: + + +create or replace function jb_conference_message(varchar , varchar , integer , integer , integer) returns integer as' +DECLARE + jid_in alias for $1; + message_in alias for $2; + room_id_in alias for $3; + thread_id_in alias for $4; + user_id_in alias for $5; +BEGIN + + IF user_id_in = 0 THEN + + insert into jb_conference_protocols (jabber_id , message , stored , room_id , thread_id ) + values (jid_in , message_in , CURRENT_TIMESTAMP , room_id_in , thread_id_in ); + + ELSE + + insert into jb_conference_protocols (jabber_id , user_id , message , stored , room_id , thread_id) + values (jid_in , user_id_in , message_in , CURRENT_TIMESTAMP , room_id_in , thread_id_in ); + + END IF; + + return 1; + +END; +' language 'plpgsql'; + + + + + + +-- When a room is created (it is maybe recreated every Monday at 8:00 ) see if we already have a room_id for that room. + +create or replace function jb_conference_room_check(varchar) returns integer AS' +DECLARE + room_name_in alias for $1; + r_room_id integer; +BEGIN + r_room_id := -1; + + select room_id INTO r_room_id from jb_conference_rooms where lower(name)=lower(room_name_in); + + return r_room_id; + +END; +' language 'plpgsql'; + + + + + + +-- When a room is fully new created , create a new Table entry. We do not use the room_id given by the c-module due to the fact that +-- conference_room is implemented as object + + +create or replace function jb_conference_rooms_new ( integer , varchar , varchar , varchar) returns integer as' +DECLARE + user_id_in alias for $1; + creator_jid_in alias for $2; + name_in alias for $3; + description_in alias for $4; + v_id integer; + +BEGIN + + + IF user_id_in = 0 THEN + + + v_id := jb_conference_room__new ( + null , + creator_jid_in , + name_in , + description_in , + ''jb_conference_room'' , + current_timestamp , + null , + null , + null + ); + + + + ELSE + + + v_id := jb_conference_room__new ( + null , + creator_jid_in , + name_in , + description_in , + ''jb_conference_room'' , + current_timestamp , + user_id_in , + null , + null + ); + + + + END IF; + +return 1; + + +END; +' language 'plpgsql'; + + + + +-- Get the next room_id. This procedure is used in the database to get a new room_id, but it takes the ACS3.x datamodel as basis +-- In the OACS4.x datamodel conference_room is implemented as object, so we do not have a sequence, but we do not want the c-module +-- generate an error, so we give him an integer back, but we do not use this room_id (look above) + +create or replace function jb_conference_next_room_id() returns integer AS' +DECLARE + r_room_id integer; +BEGIN + SELECT nextval(''jb_conference_rooms_seq'') INTO r_room_id; + + return r_room_id; +END; +' language 'plpgsql'; + + + +-- Get the next thread_id + +create or replace function jb_conference_next_thread_id() returns integer AS' +DECLARE + r_thread_id integer; +BEGIN + + SELECT nextval(''jb_conference_room_threads_seq'') INTO r_thread_id; + + return r_thread_id; + +END; +' language 'plpgsql'; + + + +create or replace function jb_make_group_conference_group(varchar , integer) returns integer AS' +DECLARE + p_room_name alias for $1; + p_group_id alias for $2; + v_room_id integer; +BEGIN + + SELECT room_id INTO v_room_id + FROM jb_conference_rooms + WHERE lower(name) = lower(p_room_name); + + UPDATE jb_conference_groups + SET default_room_id = v_room_id + WHERE group_id = p_group_id; + + return 1; + +END; +' language 'plpgsql'; + + + +--\i jabber-notification-create.sql Index: openacs-4/packages/jabber/sql/postgresql/jabber-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/sql/postgresql/jabber-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/sql/postgresql/jabber-drop.sql 20 Oct 2004 19:36:47 -0000 1.1 @@ -0,0 +1,119 @@ + +create function inline_0() returns integer +as ' +declare + +tmp_id integer; + +begin + +select delivery_method_id into tmp_id from notification_delivery_methods where short_name = ''imessage_or_email''; +perform notification_delivery_method__delete(tmp_id); +select delivery_method_id into tmp_id from notification_delivery_methods where short_name = ''imessage_and_email''; +perform notification_delivery_method__delete(tmp_id); + +perform acs_sc_binding__delete ( + ''NotificationDeliveryMethod'', + ''notification_imessage_or_email'' + ); + +perform acs_sc_binding__delete ( + ''NotificationDeliveryMethod'', + ''notification_imessage_and_email'' + ); + +perform acs_sc_impl_alias__delete ( + ''NotificationDeliveryMethod'', + ''notification_imessage_and_email'', + ''Send'' + ); +perform acs_sc_impl_alias__delete ( + ''NotificationDeliveryMethod'', + ''notification_imessage_and_email'', + ''ScanReplies'' + ); + +perform acs_sc_impl_alias__delete ( + ''NotificationDeliveryMethod'', + ''notification_imessage_or_email'', + ''ScanReplies'' + ); + +perform acs_sc_impl_alias__delete ( + ''NotificationDeliveryMethod'', + ''notification_imessage_or_email'', + ''Send'' + ); + +perform acs_sc_impl__delete ( + ''NotificationDeliveryMethod'', + ''notification_imessage_or_email'' + ); + +perform acs_sc_impl__delete ( + ''NotificationDeliveryMethod'', + ''notification_imessage_and_email'' + ); + +return 0; + +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + +drop table jb_xml_to_send; +drop table jb_message_log; +drop table jb_subscription_requests; +drop table jb_user_jabber_information; +drop table jb_conference_protocols; +drop table jb_friends; +drop table jb_room_start_from_thread; +drop table jb_room_party_map; +drop table jb_conference_room_threads; +drop table jb_conference_groups; + +drop table jb_screens; + +-- select acs_attribute__drop_attribute ('jb_screen', 'user_id'); +-- select acs_attribute__drop_attribute ('jb_screen', 'im_screen_name'); +-- select acs_attribute__drop_attribute ('jb_screen', 'service'); +-- select acs_attribute__drop_attribute ('jb_screen', 'status'); +-- select acs_attribute__drop_attribute ('jb_screen', 'away_msg'); +-- select acs_attribute__drop_attribute ('jb_screen', 'resourc'); +-- select acs_attribute__drop_attribute ('jb_screen', 'refcount'); +select acs_object_type__drop_type ('jb_screen', 't'); + +drop table jb_conference_rooms; + +-- select acs_attribute__drop_attribute ('jb_conference_room', 'creator_jabber_id'); +select acs_object_type__drop_type ('jb_conference_room', 't'); + +drop table jb_services; +drop sequence jb_message_log_seq; + +drop sequence jb_conference_room_threads_seq; +drop table jb_groups_blocked_conference; + +drop function jb_screen__new (integer, integer, varchar, varchar, varchar, varchar, varchar, integer, varchar,timestamptz,integer,varchar,integer) ; +drop function jb_screen__delete (integer) ; +drop function jb_conference_room__new ( integer, varchar, varchar, varchar, varchar, timestamptz,integer,varchar,integer); +drop function jb_conference_room__delete (integer); +drop function jb_reg_validation(varchar, varchar) ; +drop function jb_update_status (varchar, varchar, varchar, varchar); +drop function jb_clear_status (); +drop function jb_subscription_check (varchar); +drop function jb_subscription_insert(varchar); +drop function jb_subscription_del (varchar); +drop function jb_get_user_id (varchar); +drop function jb_get_jid (integer); +drop function jb_conference_thread_finish(integer); +drop function jb_conference_thread_new (integer, integer, varchar, varchar, integer); +drop function jb_conference_message(varchar, varchar, integer, integer, integer); +drop function jb_conference_room_check(varchar); +drop function jb_conference_rooms_new (integer, varchar, varchar, varchar); +drop function jb_conference_next_room_id (); +drop function jb_conference_next_thread_id (); + + + Index: openacs-4/packages/jabber/sql/postgresql/jabber-notification-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/sql/postgresql/jabber-notification-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/sql/postgresql/jabber-notification-create.sql 20 Oct 2004 19:36:47 -0000 1.1 @@ -0,0 +1,130 @@ + +-- +-- package/jabber/sql/oracle/jabber-notification-create.sql +-- @author Bjoern Kiesbye +-- @email bkiesbye@sussdorff-roy.com +-- + + + + +-- This function calls register the jabber package with the service-contracts as implementation +-- for the DeliveryMethod interface of the notification package. + + +-- implemeting the notification::imessage::send_or_mail function. + + +create function inline_1() returns integer as ' +declare + impl_id integer; + foo integer; +begin + + impl_id := acs_sc_impl__new ( + ''NotificationDeliveryMethod'', + ''notification_imessage_or_email'', + ''jabber'' + ); + + + foo := acs_sc_impl_alias__new ( + ''NotificationDeliveryMethod'', + ''notification_imessage_or_email'', + ''Send'', + ''notification::imessage::send_or_email'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''NotificationDeliveryMethod'', + ''notification_imessage_or_email'', + ''ScanReplies'', + ''notification::imessage::scan_replies'', + ''TCL'' + ); + + + +PERFORM acs_sc_binding__new ( + ''NotificationDeliveryMethod'', + ''notification_imessage_or_email'' + ); + + foo:= notification_delivery_method__new( + NULL, + impl_id, + ''imessage_or_email'', + ''Instant Message or Email'', + now(), + null, + null, + null + ); + + return(0); + +end; +' language 'plpgsql'; + + + +create function inline_1() returns integer as ' +declare + impl_id integer; + foo integer; +begin + + impl_id := acs_sc_impl__new ( + ''NotificationDeliveryMethod'', + ''notification_imessage_and_email'', + ''jabber'' + ); + + + foo := acs_sc_impl_alias__new ( + ''NotificationDeliveryMethod'', + ''notification_imessage_and_email'', + ''Send'', + ''notification::imessage::send_and_email'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''NotificationDeliveryMethod'', + ''notification_imessage_or_email'', + ''ScanReplies'', + ''notification::imessage::scan_replies'', + ''TCL'' + ); + + + + perform acs_sc_binding__new ( + ''NotificationDeliveryMethod'', + ''notification_imessage_and_email'' + ); + + + foo:= notification_delivery_method__new( + NULL, + impl_id, + ''imessage_and_email'', + ''Instant Message and Email'', + now(), + null, + null, + null + ); + + return(0); + +end; +' language 'plpgsql'; + +select inline_1(); +drop function inline_1(); + + +-- @jabber-notification-forum-create.sql + Index: openacs-4/packages/jabber/tcl/jabber-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/tcl/jabber-procs-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/tcl/jabber-procs-oracle.xql 20 Oct 2004 19:36:47 -0000 1.1 @@ -0,0 +1,22 @@ + + + + oracle8.1.6 + + + + declare + id integer; + begin + id := jb_screen.new( + user_id => :user_id, + im_screen_name => :jscreen, + service => 'jabber', + status => 'offline', + refcount => '1' + ); + end; + + + + Index: openacs-4/packages/jabber/tcl/jabber-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/tcl/jabber-procs-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/tcl/jabber-procs-postgresql.xql 20 Oct 2004 19:36:47 -0000 1.1 @@ -0,0 +1,14 @@ + + + + postgresql7.1 + + + + + + Select jb_screen__new (null , :user_id , :user_screen_name , :service , + 'offline' , '' , '' , '1' , 'jb_screen' , null , null , null , null) + + + Index: openacs-4/packages/jabber/tcl/jabber-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/tcl/jabber-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/tcl/jabber-procs.tcl 20 Oct 2004 19:36:47 -0000 1.1 @@ -0,0 +1,794 @@ +# /tcl/jabber-procs + +ad_library { + Procedures for Jabber Module + + @author Bjoern Kiesbye + @creation-date 2002/08/15 22:00:00 + + changed name to jabber-procs, 2002/09/24 luis mosteiro fernandez + changes made by Luis Mosteiro Fernandez, 2002/10/08 +} + + +ad_proc jb_get_transport_id_from_symbol { service } "this func returns the transport_id and takes the services stored in the db" { + + switch $service { + "jabber" { return 1} + "aim" { return 2} + "icq" { return 3} + "msn" { return 4} + "yahoo" { return 5} + "irc" { return 6} + default {return 0} + } + +} + + +ad_proc jb_get_link_color_from_state { state } "this func returns the color for a chat link , it takes the state stored in the db" { + + switch $state { + + "online" { return "green" } + "chat" { return "green" } + "away" { return "yellow" } + "dnd" { return "navy" } + "xa" { return "mediumslateblue"} + "offline" { return "black" } + default {return "black" } + } + +} + + +ad_proc jb_get_colored_link { state jid scope } "this func returns a the colored chat link , it takes the state stored in the db and a full jid" { + + set link_to_return "Message" } + "chat" { append link_to_return "\"green\">Message" } + "away" { append link_to_return "\"yellow\">Message" } + "dnd" { append link_to_return "\"navy\">Message" } + "xa" { append link_to_return "\"mediumslateblue\">Message"} + "offline" { set link_to_return "Offline" } + default {set link_to_return "Offline" } + } + + return $link_to_return + +} + + + +ad_proc jb_get_pritty_name_from_symbol { service } "this func returns a pritty name to be displayed , takes a service symbol from the Table jb_screens" { + + switch $service { + + "aim" { return "AIM" } + "icq" { return "ICQ" } + "yahoo" { return "Yahoo" } + "msn" { return "MSN" } + "irc" { return "IRC" } + "conference" { return "Conference" } + "jabber" { return "Jabber" } + default {return "" } + } + + + +} + +ad_proc jb_smart_get_colored_link { jabber_state state frinds_user_id display_online display_offline } "this func returns a the colored chat link , it takes the state stored in the db and a user_id to chat with and a string to be displayed" { + + set link_to_return "$display_online" } + "chat" { append link_to_return "\"green\">$display_online" } + "away" { append link_to_return "\"yellow\">$display_online" } + "dnd" { append link_to_return "\"navy\">$display_online" } + "xa" { append link_to_return "\"mediumslateblue\">$display_online"} + "offline" { set link_to_return "$display_offline" } + default {set link_to_return "$display_offline" } + } + + return $link_to_return + +} + + +ad_proc jb_register_aprove { user_id jscreen passwd } "This func registers a user with the Jabber server, it asumes that the user has ben approved already. If the tabel entrys for the user doesn't exist they will be created , Returns 0 on succes , -1 if the IM System isn't available (will be proccesed as soon as it becomes available, -2 if the jscreen already exists" { + + if {![db_0or1row check_if_user_has_contacts "select (user_id) as dummy from jb_screens where user_id = :user_id"]} { + db_dml create_a_contacts_table_entry "insert into jb_user_jabber_information (user_id) values (:user_id)" + } + + if {![db_0or1row does_screen_exist "select screen_id from jb_screens where im_screen_name = :jscreen and service = 'j'"]} { + + + db_exec_plsql new_screen {} + + + db_dml register_with_user "update jb_user_jabber_information SET jabber_regstate = 'a' , jabber_passwd = :passwd where user_id = :user_id" + + set success [jb_register $jscreen $passwd] + + return $success + + } else { + return "-3" + } + +} + + +ad_proc jb_subscribe_transport { screen service } "This function takes screenname and a service symbol, it returns the screen_id from jb_screens. If it doesn't exist jet it subscribes this screenname with the service identified by the service symbol" { + + set group "online_trace" + regsub -all "@" $screen "%" screen + + if {[db_0or1row does_screen_exist_2 "select screen_id from jb_screens where lower(im_screen_name) = lower(:screen) and lower(service) = lower(:service)"]} { + + db_dml update_ref_count {update jb_screens set refcount = refcount + 1 where screen_id = :screen_id} + return $screen_id + + } else { + + db_dml add_to_jb_screens {insert into jb_screens (screen_id , im_screen_name , service ,status , refcount ) values (acs_object_id_seq.nextval , lower(:screen) , lower(:service) , 'offline' , '1')} + + set success [jb_addtransportbuddy $screen $group [jb_get_transport_id_from_symbol $service] ] + + db_1row get_the_new_screen_id {select (screen_id) as new_screen_id from jb_screens where im_screen_name = lower(:screen) and service = lower(:service)} + + return $new_screen_id + + } + + +} + + +ad_proc jb_best_chat { user_id_friend } "This function gives back a link to start a chat" { + + + set user_id [ad_get_user_id] + + + + set trans_symbol [list j a i m y r] + + set jabber_user [list "dumy" "offline" ] + set aim_user [list "dumy" "offline" ] + set msn_user [list "dumy" "offline" ] + set icq_user [list "dumy" "offline" ] + set yahoo_user [list "dumy" "offline" ] + set irc_user [list "dumy" "offline" ] + + db_foreach find_m_all "select (sn.im_screen_name) as screen, (sn.service) as service ,(sn.status) as status + FROM jb_screens sn + WHERE sn.user_id = :user_id " { + + + switch $service { + + "jabber" {set jabber_user [list $screen $status $service]} + "aim" {set aim_user [list $screen $status $service]} + "msn" {set msn_user [list $screen $status $service]} + "icq" {set icq_user [list $screen $status $service]} + "yahoo" {set yahoo_user [list $screen $status $service]} + "irc" {set irc_user [list $screen $status $service]} + } + + + } + + + + + + set jabber_friend [list "dumy" "offline" ] + set aim_friend [list "dumy" "offline" ] + set msn_friend [list "dumy" "offline" ] + set icq_friend [list "dumy" "offline" ] + set yahoo_friend [list "dumy" "offline" ] + set irc_friend [list "dumy" "offline" ] + + + + db_foreach find_m_all_friend {select (sn.im_screen_name) as screen, (sn.service) as service ,(sn.status) as status FROM jb_screens sn + WHERE sn.user_id = :user_id_friend } { + + + + switch $service { + + "jabber" {set jabber_friend [list $screen $status $service]} + "aim" {set aim_friend [list $screen $status $service]} + "msn" {set msn_friend [list $screen $status $service]} + "icq" {set icq_friend [list $screen $status $service]} + "yahoo" {set yahoo_friend [list $screen $status $service]} + "irc" {set irc_friend [list $screen $status $service]} + } + + + } + + set best_state [list] + set notifyable 0 + set jabberable 0 + + for {set i 0} {$i < 5} {incr i} { + + + switch $i { + + 0 { if {[lindex $jabber_user 1] != "offline" && [lindex $jabber_friend 1] != "offline" } { + return "chat.tcl?user_id_friend=$user_id_friend" + break + } elseif { [lindex $jabber_friend 1] != "offline"} { + lappend best_state 1.2 + } elseif { [lindex $jabber_user 1] != "offline"} { + set jabberable 1 + } + } + + 1 { if {[lindex $aim_user 1] == "offline" && [lindex $aim_friend 1] != "offline"} { + return "aim:goim?screenname=[jb_get_aim_screen_from_friend_id $user_id_friend]&message=Hello" + } elseif {[lindex $aim_user 1] != "offline" && [lindex $aim_friend 1] != "offline"} { + return "aim:buddyicon?message=Aiesec+Chat+Invite&listofscreennames=[jb_get_aim_screen_from_friend_id $user_id_friend]" + lappend best_state 2 + set notifyable 1 + } else {lappend best_state 0} + } + + 2 { if {[lindex $msn_user 1] != "offline" && [lindex $msn_friend 1] != "offline"} { + lappend best_state 2 + set notifyable 1 + } elseif { [lindex $msn_friend 1] != "offline"} { + lappend best_state 1 + set notifyable 1 + } else { lappend best_state 0} + } + + 3 { if {[lindex $yahoo_user 1] != "offline" && [lindex $yahoo_friend 1] != "offline"} { + lappend best_state 2 + set notifyable 1 + } elseif {[lindex $yahoo_friend 1] != "offline"} { + lappend best_state 1 + set notifyable 1 + } else {lappend best_state 0} + } + + 4 { if { [lindex $icq_user 1] != "offline" && [lindex $icq_friend 1] != "offline"} { + lappend best_state 2 + set notifyable 1 + } elseif {[lindex $icq_friend 1] != "offline"} { + lappend best_state 1 + set notifyable 1 + } else { lappend best_state 0} + } + + 5 { if {[lindex $irc_user 1] != "offline" && [lindex $irc_friend 1] != "offline"} { + lappend best_state 2 + } elseif {[lindex $icq_friend 1] != "offline"} { + lappend best_state 1 + } else {lappend best_state 0} + } + + + } + } + set hiest 0 + set trans_symbols_2 [list jabber aim msn yahoo icq irc] + for {set j 0} {$j <= 5 } {incr j} { + if {[expr [lindex $best_state $j] - $hiest] > 0 } { + set hiest [lindex $best_state $j] + set trans [lindex $trans_symbols_2 [expr $j + 1]] + } + + } + if {$hiest == 2 } { return "display-name.tcl?user_id_friend=$user_id_friend&trans_symbol=$trans" } + if {$hiest == 1.2} { return "go-to-jabber?user_id_friend=$user_id_friend&trans_symbol=$trans"} + if {$hiest == 1 && $jabberable } { return "ask-to-jabber?user_id_friend=$user_id_friend&trans_symbol=$trans"} + if {$hiest == 1 } { return "notify-only?user_id_frind=$user_id_friend&trans_symbol=$trans"} + + return "[lindex $best_state 0 ] $hiest" + + +} + +ad_proc jb_create_jid {screen service} "This function takes a screen_name and a service Symbol and returns a full jid " { + + append screen "@" + append screen [jb_get_transport_url_from_id [jb_get_transport_id_from_symbol $service]] + return $screen + +} + + +ad_proc jb_get_aim_screen_from_friend_id {user_id_friend } "This func returns the Aim Screenname that belongs to a friend id " { + + if {[db_0or1row get_screen "SELECT (sn.im_screen_name) as screen FROM jb_screens sn WHERE sn.user_id = :user_id_friend AND sn.service = 'aim' "]} { + + return $screen + + } else { + + return "error" + + } + +} + + + + +ad_proc jb_invite_user { room_name version return_url } { This funktion returns the URL (href for a link) to invite the user him self (entering a Room) to a Conference Room , the parameters are the 1. name of the room 2. wich version of the invite shuold be used (1 or2) , 3. the url of the page the user schould be redirected to after the invite has been send , 4. display will be what the browser shows to the user (diplayed name of the Link) } { + + set user_id [ad_get_user_id] + set jid_to "" + + if {[db_0or1row get_user_jid "SELECT im_screen_name FROM jb_screens WHERE user_id = :user_id AND service = 'jabber'" ]} { + + set jid_to $im_screen_name + append jid_to "@" + append jid_to [jb_get_transport_url_from_id [jb_get_transport_id_from_symbol jabber ]] + + set return_val "/jabber/conference/invite.tcl?room_name=$room_name&version=$version&jid=$jid_to&room_subject=Self&msg=Invite&return_url=$return_url" + + return $return_val + +} + + return test + +} + + + + + +ad_proc jb_get_room_thread_tree { thread_id party_id active_rooms last_visit max_depth} {try to build up a tree structure of conference Rooms} { + + set return_val "
    " + + if { $max_depth == 5} { + return "" + } + + if {$active_rooms != -1} { + + set room_count [ns_set size $active_rooms] + + } else { + + + set room_count -1 + } + + set rooms_list [list] + set rooms_count 0 + + + db_foreach get_rooms_started_at_thread " SELECT (jcr.room_id) as room_id , (jcr.name) as room_name + FROM jb_room_start_from_thread jrsft , jb_conference_rooms jcr + WHERE jrsft.thread_id = :thread_id + AND jrsft.room_id = jcr.room_id" { + + set cache [list $room_id $room_name] + lappend rooms_list $cache + set rooms_count [expr $rooms_count +1] + + } if_no_rows { + set rooms_count -1 + + } + + + + # multirow -local create test test_value + # set room_rows [multirow size multi_rooms] + + + + if { $rooms_count > 0} { + + for {set k 0} {$k < $rooms_count} {incr k} { + + + + set room_name [lindex [lindex $rooms_list $k] 1] + # room_array(room_name) + set room_id [lindex [lindex $rooms_list $k] 0] + #room_arry(room_name) + ns_log notice "for dem false 1" + + set active "false" + + + if {$room_count != -1} { + + set active "false" + set active_value "-1" + ns_log notice "for dem false 2.1" + for {set i 0 } {$i < $room_count} {incr i} { + if { [ns_set key $active_rooms $i ] == $room_name } { + set active "true" + set active_value [jb_invite_user $room_name 2 index.tcl] + ns_log notice "for dem false 2.2" + } + } + + } + + + + append return_val "
  1. $room_name " + + + ns_log notice "for dem false 3" + if {$active == "false"} { + append return_val " Restart " + ns_log notice "for dem false 4.1" + } else { + append return_val " Enter " + ns_log notice "for dem false 4.2" + } + + + + + set thread_table "" + set thread_list [list] + set thread_count 0 + + db_foreach get_new_conference_threads "SELECT (thread_id) as cur_thread_id , subject , start_time + FROM jb_conference_room_threads + WHERE room_id = :room_id " { + + + set cache [list $cur_thread_id $subject $start_time] + lappend thread_list $cache + set thread_count [expr $thread_count + 1 ] + + } + + if { $thread_count > 0 } { + set thread_table "
      " + for {set j 0} {$j < $thread_count} {incr j} { + + set cur_thread_id [lindex [lindex $thread_list $j] 0] + set subject [lindex [lindex $thread_list $j] 1] + set start_time [lindex [lindex $thread_list $j] 2] + + ns_log debug "for dem false 5.1" + append thread_table "
    1. $subject $start_time View Log" + + set sub_table "" + set sub_table "[jb_get_room_thread_tree $cur_thread_id $party_id $active_rooms $last_visit [expr $max_depth + 1]]" + append thread_table " $sub_table
    2. " + + + if {![empty_string_p $sub_table]} { + append thread_table "
    " + } + + + } + append thread_table "
" + } else { + + ns_log debug "for dem false 5.2" + set thread_table "" + + + } + + + ns_log notice "for dem false ENDE" + + append return_val "$thread_table" + + + + + + + } + } else { + + set return_val "" + } + + + + ns_log notice "for dem false ENDE 2 " + + return $return_val + + + +} + + + +ad_proc jb_get_conference_url_for_group {group_id} {This function gets passed a group_id and returns, the url of the Conferencing main-page for this Group. } { + + #set url [apm_package_url_from_key jabber] + set url "conference/make-group-conference-group.tcl?group_id=$group_id&type=main" + +} + +ad_proc jb_start_conference_room_for_group_url {group_id} {This function gets passed a group_id and returns, the url to start the default Conferencing room of this Group. } { + + #set url [apm_package_url_from_key jabber] + set url "conference/make-group-conference-group.tcl?group_id=$group_id&type=start_room" + +} + + +ad_proc jb_get_default_room_for_group { group_id } { This function returns the default room name for a group, if their is now default room yet it creates one.} { + + if {![db_0or1row get_default_room "SELECT (jcr.name) as room_name FROM jb_conference_groups jcg , jb_conference_rooms jcr + WHERE jcg.group_id = :group_id + AND jcg.default_room_id = jcr.room_id"]} { + + + # no default name yet + if {[db_0or1row get_group_name "SELECT group_name FROM groups WHERE group_id = :group_id"]} { + + # remove all white spaces + + regsub -all {\ } $group_name "-" group_name +ns_log notice "anfang: group_name = $group_name" + # got the groupname, try to create a room_name with it + if {[string length $group_name] <= 16} { + + set room_name $group_name + ns_log notice "A: group_name = $group_name , room_name = $room_name" + } else { + set room_name $group_name + set room_name [string range $group_name 0 15 ] + ns_log notice "B: group_name = $group_name , room_name = $room_name" + } + + set count 0 + + while {1} { + ns_log notice "jb_get_default_room_for_group 1 group_id = $group_id" + if {[db_0or1row check_if_room_exists "SELECT room_id FROM jb_conference_rooms WHERE lower(name) = lower(:room_name)"]} { + + ns_log notice "jb_get_default_room_for_group 2 room_id = $room_id" + #the room exists already , so try to figure out a different name + +set dummy "empty" + if {$count == 0} { + + set room_name [string range $room_name 0 12] + } else { + + regsub -all {[0-9]+} $room_name "" room_name + } + ns_log notice "jb_get_default_room_for_group 3 room_name = $room_name , count = $count ,dummy = $dummy" + + set count [expr $count + 1] + append room_name "$count" + ns_log notice "jb_get_default_room_for_group 3 room_name = $room_name , count = $count ,dummy = $dummy" + + + if {$count > 999} {return -1} + + } else { + + # we have a name so create the room + + set suc [jb_createconferenceroom $room_name [ad_conn user_id] "First Start" "$room_name@[jb_get_transport_url_from_id [jb_get_transport_id_from_symbol jabber]]" "This Room is"] + ns_log notice "jb_get_default_room_for_group 4 suc = $suc" + + if {$suc != "-1"} { + + if {[db_0or1row get_room_id "SELECT (room_id) as new_room_id FROM jb_conference_rooms WHERE name = :room_name"]} { + + db_dml map_new_room_to_group "INSERT INTO jb_room_party_map (room_id , party_id) VALUES (:new_room_id , :group_id)" + db_dml update_the_room_type "UPDATE jb_conference_rooms SET type = 'master' WHERE room_id = :new_room_id " + + + } + + db_exec_plsql insert_new_room_as_default "" + + + return $room_name + } else { + + return "-1" + } + + } + + + + + + } + } else { + return "-1" + } + } else { + + return $room_name + } + } + + +ad_proc -public jb_get_leagel_screen {cur_user_id} "this func returns a automatic created screen_name like firstname.lastname" { + + if {[db_0or1row get_user_names {SELECT first_names , last_name FROM persons + WHERE person_id = :cur_user_id}]} { + + set names_available 1 + string trim $first_names + string trim $last_name + set screen_name "$first_names.$last_name" + + + regsub -all {([^A-z^0-9.]*[`]*[\^]*)} $screen_name "" screen_name + + set screen_name [string range $screen_name 0 15] + set screen_name [string tolower $screen_name] + + set count 0 + + + while {[db_0or1row check_jid_exists {Select (user_id) as check1 From jb_screens Where im_screen_name = :screen_name And service = 'jabber'}]} { + + if {$count > 1000} { + #error + } + + + if {$count > 0} { + + while {1} { + # remove all trailing digits + set lastchar [string range $screen_name [string length $screen_name] [string length $screen_name]] + + if {[regexp {[0-9]} $lastchar lastchar] == 1} { + set screen_name [string range $screen_name 0 [expr [string length $screen_name] -2]] + } else { + break + } + } + } + + incr count + + if {[expr [string length $screen_name] + [string length $count]] > 16} { + + set screen_name [string range $screen_name 0 [expr 15 - [string length $count]]] + append screen_name "$count" + + } else { + + + set screen_name "$screen_name$count" + } + } + } + + return $screen_name + +} + + + + +namespace eval notification { + + + namespace eval imessage { + + ad_proc send_and_email { to_user_id reply_object_id notification_type_id subject content } {This procedure Sends a IM-msg to the user user_id, it figures out wich system to use by User preferences and his current online state (the mesage will be trunct to 500 charackters), and sends an email } { + + ns_log notice "notification::imessage::send_and_mail 1" + set suc [ notification::imessage::send $to_user_id $reply_object_id $notification_type_id "$subject" "$content"] + + ns_log notice "notification::imessage::send_and_mail 2 suc = $suc" + + notification::email::send $to_user_id $reply_object_id $notification_type_id "$subject" "$content" + + ns_log notice "notification::imessage::send_and_mail 3" + + } + + + ad_proc -public send_or_email { to_user_id reply_object_id notification_type_id subject content } { This procedure Sends a IM-msg to the user user_id, it figures out wich system to use by User preferences and his current online state (the content will be trunct to 50 charackters). Or in case the user is offline it will send an email } { + ns_log notice "notification::imessage::send_or_mail 1" + set suc 0 + set suc [ notification::imessage::send $to_user_id $reply_object_id $notification_type_id "$subject" "$content"] + ns_log notice "notification::imessage::send_or_mail 2 suc = $suc" + + if {$suc == "-1"} { + ns_log notice "notification::imessage::send_or_mail 3" + notification::email::send $to_user_id $reply_object_id $notification_type_id "$subject" "$content" + } + + ns_log notice "notification::imessage::send_or_mail 4" + + + } + + + ad_proc send { to_user_id reply_object_id notification_type_id subject content } { This procedure Sends a IM-msg to the user user_id, it figures out wich system to use by User preferences and his current online state } { + + ns_log notice "notification::imessage::sendbb" + set state 0 + set cur_screen "" + set cur_service "" + db_foreach get_user_screens_and_state "SELECT im_screen_name , status , service FROM jb_screens WHERE user_id = :to_user_id" { + + + switch $status { + + "online" {set cur_state 5 } + "chat" {set cur_state 4 } + "away" {set cur_state 3 } + "dnd" {set cur_state 2 } + "xa" {set cur_state 1 } + "offline" {set cur_state 0 } + default {set cur_state 0 } + } + + if {$cur_state > $state} { + + set state $cur_state + set cur_screen $im_screen_name + set cur_service $service + } + + + + + } if_no_rows { + + return -1 + } + + + if {$state == 0 } {return -1} + + # we have our best im_screen_name an service create jid + + set jid "$cur_screen@[jb_get_transport_url_from_id [jb_get_transport_id_from_symbol $cur_service]]" + + set sub_len [string length $subject] + + set content_len [string length $content] + + if { $sub_len < 500 } { + + set left_len [expr 500 - $sub_len] + + if { $content_len < $left_len } { + + set msg "$subject $content" + + } else { + + set msg "$subject [string range $content 0 [expr $left_len - 6]] . ." + } + + } else { + + set msg "[string range $subject 0 492] . . . " + } + + + + return [jb_message $jid $msg] + + } + } +} Index: openacs-4/packages/jabber/tcl/jabber-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/tcl/jabber-procs.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/tcl/jabber-procs.xql 20 Oct 2004 19:36:47 -0000 1.1 @@ -0,0 +1,168 @@ + + + + + + select (user_id) as dummy from jb_screens where user_id = :user_id + + + + + + + insert into jb_user_jabber_information (user_id) values (:user_id) + + + + + + + select screen_id from jb_screens where im_screen_name = :jscreen and service = 'j' + + + + + + + update jb_user_jabber_information SET jabber_regstate = 'a' , jabber_passwd = :passwd where user_id = :user_id + + + + + + + select screen_id from jb_screens where lower(im_screen_name) = lower(:screen) and lower(service) = lower(:service) + + + + + + + update jb_screens set refcount = refcount + 1 where screen_id = :screen_id + + + + + + + insert into jb_screens (screen_id , im_screen_name , service ,status , refcount ) values (acs_object_id_seq.nextval , lower(:screen) , lower(:service) , 'offline' , '1') + + + + + + + select (screen_id) as new_screen_id from jb_screens where im_screen_name = lower(:screen) and service = lower(:service) + + + + + + + select (sn.im_screen_name) as screen, (sn.service) as service ,(sn.status) as status + FROM jb_screens sn + WHERE sn.user_id = :user_id + + + + + + + select (sn.im_screen_name) as screen, (sn.service) as service ,(sn.status) as status FROM jb_screens sn + WHERE sn.user_id = :user_id_friend + + + + + + + SELECT (sn.im_screen_name) as screen FROM jb_screens sn WHERE sn.user_id = :user_id_friend AND sn.service = 'aim' + + + + + + + SELECT im_screen_name FROM jb_screens WHERE user_id = :user_id AND service = 'jabber' + + + + + + + SELECT (jcr.room_id) as room_id , (jcr.name) as room_name + FROM jb_room_start_from_thread jrsft , jb_conference_rooms jcr + WHERE jrsft.thread_id = :thread_id + AND jrsft.room_id = jcr.room_id + + + + + + + SELECT (thread_id) as cur_thread_id , subject , start_time + FROM jb_conference_room_threads + WHERE room_id = :room_id + + + + + + + SELECT (jcr.name) as room_name FROM jb_conference_groups jcg , jb_conference_rooms jcr + WHERE jcg.group_id = :group_id + AND jcg.default_room_id = jcr.room_id + + + + + + + SELECT group_name FROM groups WHERE group_id = :group_id + + + + + + + SELECT room_id FROM jb_conference_rooms WHERE lower(name) = lower(:room_name) + + + + + + + SELECT (room_id) as new_room_id FROM jb_conference_rooms WHERE name = :room_name + + + + + + + INSERT INTO jb_room_party_map (room_id , party_id) VALUES (:new_room_id , :group_id) + + + + + + + UPDATE jb_conference_rooms SET type = 'master' WHERE room_id = :new_room_id + + + + + + + Select jb_make_group_conference_group(:room_name , :group_id) + + + + + + + SELECT im_screen_name , status , service FROM jb_screens WHERE user_id = :to_user_id + + + + + Index: openacs-4/packages/jabber/www/E4-neu.jar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/E4-neu.jar,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/E4.jar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/E4.jar,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/JabberApplet.jar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/JabberApplet.jar,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/WebStart.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/WebStart.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/WebStart.html 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + \ No newline at end of file Index: openacs-4/packages/jabber/www/add-external-contact-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/add-external-contact-2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/add-external-contact-2-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,63 @@ + + + + oracle8.1.6 + + + + Select service from jb_services where active_check_p = 't' + + + + + + + + declare + id integer; + begin + id := jb_screen.new( + im_screen_name => :user_screen_name, + service => :service, + status => 'offline', + refcount => '1', + object_type => 'jb_screen' + ); + end; + + + + + + + +Select screen_id from jb_screens where im_screen_name = :user_screen_name and service = :service + + + + + + +update jb_screens SET refcount = refcount + 1 where screen_id = :screen_id + + + + + + insert into jb_friends + (user_id, friend_screen_id, friend_first_name, friend_last_name) + values (:user_id, :screen_id, :first_names, :last_name) + + + + + + + Select screen_id from jb_screens + where im_screen_name = :user_screen_name and service = :service + + + + + + Index: openacs-4/packages/jabber/www/add-external-contact-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/add-external-contact-2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/add-external-contact-2-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,57 @@ + + + + postgresql7.1 + + + + + + Select service from jb_services where active_check_p = 't' + + + + + + Select jb_screen__new (null , null , :user_screen_name , :service , + 'offline' , '' , '' , '1' , 'jb_screen' , null , null , null , null) + + + + + + + +Select screen_id from jb_screens where im_screen_name = :user_screen_name and service = :service + + + + + + + +update jb_screens SET refcount = refcount + 1 where screen_id = :screen_id + + + + + + + insert into jb_friends + (user_id, friend_screen_id, friend_first_name, friend_last_name) + values (:user_id, :screen_id, :first_names, :last_name) + + + + + + + + + Select screen_id from jb_screens + where im_screen_name = :user_screen_name and service = :service + + + + + \ No newline at end of file Index: openacs-4/packages/jabber/www/add-external-contact-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/add-external-contact-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/add-external-contact-2.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,68 @@ +ad_page_contract { + + add new contact to IM-Adressbook + inserts new rows in jb_friends + @author Luis Mosteiro Fernandez + @creation-date 2002-10-22 + @param first_names first names of the new contact + @param last_name last name of the new contact + @param screen_name array of screen_names , which should be added + +} { + + first_names:notnull + last_name:notnull + screen_name:array + +} + + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + + +db_foreach get_services "" { + + set user_screen_name $screen_name($service) + + if {$service == "msn"} { + regsub -all "@" $user_screen_name "%" user_screen_name + + } + + + if {![empty_string_p $user_screen_name]} { + + if {![db_0or1row check_screen_id ""]} { + + db_exec_plsql new_screen {} + + + + db_1row get_new_screen_id {} + db_transaction { + + db_dml update_reference {} + db_dml insert_into_friends {} + } + + + set success [jb_addtransportbuddy $user_screen_name "online-trace" [jb_get_transport_id_from_symbol $service]] + + + + } else { + + db_1row get_new_screen_id {} + + db_transaction { + + db_dml update_reference {} + db_dml insert_into_friends {} + } + +} + } +} + +ns_returnredirect "index" Index: openacs-4/packages/jabber/www/add-external-contact-confirm-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/add-external-contact-confirm-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/add-external-contact-confirm-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,14 @@ + + + + oracle8.1.6 + + + + Select service , pretty_name from jb_services where + active_check_p = 't' + + + + + Index: openacs-4/packages/jabber/www/add-external-contact-confirm-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/add-external-contact-confirm-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/add-external-contact-confirm-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,14 @@ + + + + postgresql7.1 + + + + + Select service , pretty_name from jb_services where + active_check_p = 't' + + + + Index: openacs-4/packages/jabber/www/add-external-contact-confirm.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/add-external-contact-confirm.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/add-external-contact-confirm.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,35 @@ + + + +Edit Contact Information + + +

Please confirm your Entrys!

+Or backup your Browser to coreckt your Entrys! + +

+First Name: @first_names@ +

+

+Last Name: @last_name@ +

+ +
+ + + + + + +

+@new_im_contacts.pretty_name@ : @new_im_contacts.im_screen_name@ +

+
+ +
+ +
+
+ +Back to index page + Index: openacs-4/packages/jabber/www/add-external-contact-confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/add-external-contact-confirm.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/add-external-contact-confirm.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,41 @@ +ad_page_contract { + + add new contact + @author Bjoern Kiesbye + @creation-date 2003-01-05 + +} { + + screen_name:array + first_names:notnull + last_name:notnull + +} -properties { + + get_services:multirow + context:onevalue + +} + +set context [list "Add external contact"] + +multirow create new_im_contacts im_screen_name service pretty_name display + +db_foreach get_services "" { + + set im_screen_name $screen_name($service) + + + if {![empty_string_p $im_screen_name]} { + + multirow append new_im_contacts $im_screen_name $service $pretty_name true + + } else { + + multirow append new_im_contacts $im_screen_name $service $pretty_name false + } + + +} + +ad_return_template Index: openacs-4/packages/jabber/www/add-external-contact-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/add-external-contact-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/add-external-contact-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,12 @@ + + + + oracle8.1.6 + + + + Select service , pretty_name from jb_services where active_check_p = 't' + + + + Index: openacs-4/packages/jabber/www/add-external-contact-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/add-external-contact-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/add-external-contact-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,14 @@ + + + + postgresql7.1 + + + + + Select service , pretty_name from jb_services where active_check_p = 't' + + + + + Index: openacs-4/packages/jabber/www/add-external-contact.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/add-external-contact.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/add-external-contact.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,16 @@ + +Add new Contact to IM-Adressbook +@context@ + + +

Add new Contact to IM-Adressbook

+ +

Please fill in the following textareas. You have to fill in one of +the textareas for the IM-Services.

+ + + +
+ +Back to index page + Index: openacs-4/packages/jabber/www/add-external-contact.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/add-external-contact.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/add-external-contact.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,26 @@ +ad_page_contract { + + add new contact + @author Luis Mosteiro Fernandez + @creation-date 2002-10-22 + +} -properties { + + context:onevalue + +} + +set context [list "Add external contact"] + +ad_form -name add-external -action add-external-contact-confirm -form { + {first_names:text(text) {label "First Names:
"}} + {last_name:text(text) {label "Last Name:
"}} +} + +db_foreach get_services "" { + + template::element create add-external screen_name.$service -datatype text -widget text -label "$pretty_name screen:
" + +} + +ad_return_template Index: openacs-4/packages/jabber/www/aim.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/aim.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/aim.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,51 @@ + +Jabber Aim + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Aim Utils:
+ This section works with Internet Explorer and Aim installed only +
+ Send a Chat Invite +
+ Add this Buddy to your Aim Roster +
+ Send a Buddy Icon +
+ This Section works with any Browser +
+ Insert a Message and send it to your Friend ! +
+ +
+ Back +
+ + + + Index: openacs-4/packages/jabber/www/aim.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/aim.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/aim.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,32 @@ +ad_page_contract { + + aim.tcl + @author Luis Mosteiro Fernandez + @creation-date 2002-10-16 + @param return_url to which url do you want to send the information + @param screen + +} { + + {return_url "index"} + screen:notnull + +} -properties { + + screen:onevalue + return_url:onevalue + aim_value:onevalue + +} + +set aim_value $screen +regsub -all {[@][^ ]+} $screen "" screen +ns_log notice "AIM PAGE $screen $aim_value" + +ad_form -name message -action message-2 -form { + {screen:text(hidden) {value $aim_value}} + {return_url:text(hidden) {value $return_url}} + {message:text(textarea) {html {cols 25}} {html {rows 5}} {label "Message:"}} +} + +ad_return_template \ No newline at end of file Index: openacs-4/packages/jabber/www/ask-to-jabber-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/ask-to-jabber-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/ask-to-jabber-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,29 @@ + + + + oracle8.1.6 + + + + + + SELECT (sn.im_screen_name) as screen FROM jb_screens sn WHERE sn.user_id = :user_id_friend AND sn.service = :trans_symbol + + + + + + + select first_names , last_name from persons where person_id =:user_id + + + + + + Select (sn.im_screen_name) as screen, (sn.user_id) as cur from jb_screens sn WHERE (sn.user_id = :user_id or sn.user_id = :user_id_friend) AND sn.service = 'jabber' + + + + + + Index: openacs-4/packages/jabber/www/ask-to-jabber-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/ask-to-jabber-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/ask-to-jabber-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,27 @@ + + + + postgresql7.1 + + + + + + SELECT (sn.im_screen_name) as screen FROM jb_screens sn WHERE sn.user_id = :user_id_friend AND sn.service = :trans_symbol + + + + + + + select first_names , last_name from persons where person_id =:user_id + + + + + + Select (sn.im_screen_name) as screen, (sn.user_id) as cur from jb_screens sn WHERE (sn.user_id = :user_id or sn.user_id = :user_id_friend) AND sn.service = 'jabber' + + + + Index: openacs-4/packages/jabber/www/ask-to-jabber.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/ask-to-jabber.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/ask-to-jabber.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,31 @@ +ad_page_contract { + +} { + + user_id_friend:notnull,integer + trans_symbol:notnull + {return_url "index.tcl"} + +} + +set user_id [ad_conn user_id] + +db_0or1row get_name_to_notify "" + +set notify_screen "$screen@[jb_get_transport_url_from_id [jb_get_transport_id_from_symbol $trans_symbol]]" + +db_0or1row get_name "" + +set message "$first_names $last_name would like you to come to Jabber at ([jb_get_transport_url_from_id 1]) {You cant respond to this Message!}" + +jb_message $notify_screen $message + +db_foreach get_screens "" { + if {$cur == $user_id} { + set user_a $screen + } else {set user_b $screen} +} + +set suc [jb_chat $user_a $user_b] + +ns_returnredirect $return_url Index: openacs-4/packages/jabber/www/buddy-add-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/buddy-add-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/buddy-add-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,37 @@ + + + + oracle8.1.6 + + + + + + + select (sn.user_id) as user_id_cur, (sn.im_screen_name) as jabber_screen from jb_screens sn where (sn.user_id = :user_id or sn.user_id = :user_id_friend) and sn.service = 'jabber' + + + + + + + + + select screen_id from jb_screens where user_id = :friend_id + + + + + + + insert into jb_friends (user_id , friend_screen_id) values (:user_id , :screen_id) + + + + + + UPDATE jb_screens set refcount = (refcount +1) where screen_id = :screen_id + + + + Index: openacs-4/packages/jabber/www/buddy-add-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/buddy-add-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/buddy-add-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,37 @@ + + + + postgresql7.1 + + + + + + select (sn.user_id) as user_id_cur, (sn.im_screen_name) as jabber_screen from jb_screens sn where (sn.user_id = :user_id or sn.user_id = :user_id_friend) and sn.service = 'jabber' + + + + + + + + select screen_id from jb_screens where user_id = :friend_id + + + + + + insert into jb_friends (user_id , friend_screen_id) values (:user_id , :screen_id) + + + + + + + UPDATE jb_screens set refcount = (refcount +1) where screen_id = :screen_id + + + + + + Index: openacs-4/packages/jabber/www/buddy-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/buddy-add.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/buddy-add.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,59 @@ +ad_page_contract { + + add a user as buddy of logged-in user + + @param friend_id + @param groupe + @param return_url + +} { + friend_id:integer,notnull + {return_url "/"} + {groupe "aiesec"} +} + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration +set user_id_friend $friend_id + +#if {[db_0or1row is_blocked "select blocked from jb_friends where user_id = :user_id and user_id_friend= :user_id_friend"]} { + + # if { $blocked == "t" } { + # set html "

You can't add this Member!

Back

" + # ns_return 200 text/html $html + # } else { + # ad_returnredirect "$return_url" + # } +#} else { + +set both 0 + +db_foreach get_jids "" { + if {$user_id == $user_id_cur } { + set jid_a [list $jabber_screen $jabber_screen $groupe] + set both [expr $both + 1] + } + + if {$user_id_friend == $user_id_cur } { + set jid_b [list $jabber_screen $jabber_screen $groupe] + set both [expr $both + 1] + + } + +} + + +if {$both == 2} { + set success [jb_addbuddy $jid_a $jid_b] +} + +db_foreach get_screen_ids "" { + + db_dml add_buddy "" + db_dml update_refcount "" + +} + +ad_returnredirect $return_url + +} Index: openacs-4/packages/jabber/www/buddy-remove-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/buddy-remove-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/buddy-remove-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,36 @@ + + + + oracle8.1.6 + + + + + + select (sn.user_id) as user_id_cur, (sn.im_screen_name) as jabber_screen from jb_screens sn where (sn.user_id = :user_id or sn.user_id = :user_id_friend) and sn.service = 'jabber' + + + + + + + select screen_id from jb_screens where user_id = :friend_id + + + + + + + delete from jb_friends where user_id = :user_id and friend_screen_id = :screen_id + + + + + + + UPDATE jb_screens set refcount = (refcount -1) where screen_id = :screen_id + + + + + Index: openacs-4/packages/jabber/www/buddy-remove-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/buddy-remove-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/buddy-remove-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,36 @@ + + + + postgresql7.1 + + + + + + select (sn.user_id) as user_id_cur, (sn.im_screen_name) as jabber_screen from jb_screens sn where (sn.user_id = :user_id or sn.user_id = :user_id_friend) and sn.service = 'jabber' + + + + + + + select screen_id from jb_screens where user_id = :friend_id + + + + + + + + delete from jb_friends where user_id = :user_id and friend_screen_id = :screen_id + + + + + + + UPDATE jb_screens set refcount = (refcount -1) where screen_id = :screen_id + + + + Index: openacs-4/packages/jabber/www/buddy-remove.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/buddy-remove.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/buddy-remove.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,49 @@ +ad_page_contract { + + remove a user as buddy of logged-in user + + @param friend_id +} { + friend_id:integer,notnull + {return_url "/"} +} + + + + +if {![info exists grupe]} { + set groupe aiesec +} + +set user_id [ad_conn user_id] +set user_id_friend $friend_id +set both 0 + +db_foreach get_jids "" { + if {$user_id == $user_id_cur } { + set jid_a [list $jabber_screen $jabber_screen $groupe] + set both [expr $both + 1] + } + + if {$user_id_friend == $user_id_cur } { + set jid_b [list $jabber_screen $jabber_screen $groupe] + set both [expr $both + 1] + + } + +} + + +if {$both == 2} { + set success [jb_removebuddy $jid_a $jid_b] +} + +db_foreach get_screen_ids "" { + + db_dml remove_buddy "" + db_dml update_refcount "" +} + +ad_returnredirect $return_url + + Index: openacs-4/packages/jabber/www/chat-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/chat-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/chat-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,12 @@ + + + + oracle8.1.6 + + + + Select (sn.im_screen_name) as screen, (sn.user_id) as cur from jb_screens sn WHERE (sn.user_id = :user_id or sn.user_id = :user_id_friend) AND service = 'jabber' + + + + Index: openacs-4/packages/jabber/www/chat-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/chat-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/chat-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,13 @@ + + + + postgresql7.1 + + + + + + Select (sn.im_screen_name) as screen, (sn.user_id) as cur from jb_screens sn WHERE (sn.user_id = :user_id or sn.user_id = :user_id_friend) AND service = 'jabber' + + + Index: openacs-4/packages/jabber/www/chat.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/chat.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/chat.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,23 @@ +ad_page_contract { + + @param return_url + @param user_id_friend +} { + + user_id_friend:notnull,integer + {return_url "index.tcl"} +} + + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + +db_foreach get_screens "" { + if {$cur == $user_id} { + set user_a $screen + } else {set user_b $screen} +} + +set suc [jb_chat $user_a $user_b] + +ns_returnredirect $return_url Index: openacs-4/packages/jabber/www/chat1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/chat1.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/chat1.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,23 @@ + +Jabber Chat + +

Jabber Chat

+ +

Please insert the following varaibles!

+ +
+

Buddy1: +
+

+

Buddy2: +
+

+ +
+ + + + + + + Index: openacs-4/packages/jabber/www/current-users-online-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/current-users-online-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/current-users-online-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,37 @@ + + + + oracle8.1.6 + + + + select pr.first_names , pr.last_name , + (pr.person_id) as any_user_id , sn.screen_id, sn.status, sn.service, sn.im_screen_name + from persons pr , jb_screens sn + where pr.person_id = sn.user_id + and lower(pr.last_name) like(lower('$prefix%')) + and sn.user_id != :user_id + and sn.user_id NOT IN [template::util::tcl_to_sql_list $all_invisible] + and status != 'offline' + and sn.screen_id not in (Select friend_screen_id from jb_friends where user_id = :user_id) + ORDER BY any_user_id + + + + + + + select pr.first_names , pr.last_name , + (pr.person_id) as any_user_id , sn.screen_id, sn.status, sn.service, sn.im_screen_name + from persons pr , jb_screens sn + where pr.person_id = sn.user_id + and sn.user_id != :user_id + and sn.user_id NOT IN [template::util::tcl_to_sql_list $all_invisible] + and status != 'offline' + and sn.screen_id not in (Select friend_screen_id from jb_friends where user_id = :user_id) + ORDER BY last_name + + + + + Index: openacs-4/packages/jabber/www/current-users-online-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/current-users-online-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/current-users-online-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,38 @@ + + + + postgresql7.1 + + + + + + select pr.first_names , pr.last_name , + (pr.person_id) as any_user_id , sn.screen_id, sn.status, sn.service, sn.im_screen_name + from persons pr , jb_screens sn + where pr.person_id = sn.user_id + and lower(pr.last_name) like(lower('$prefix%')) + and sn.user_id != :user_id + and sn.user_id NOT IN ([template::util::tcl_to_sql_list $all_invisible]) + and ( (sn.status != 'offline') OR sn.user_id IN ([template::util::tcl_to_sql_list $onliners]) ) + and sn.screen_id not in (Select friend_screen_id from jb_friends where user_id = :user_id) + ORDER BY any_user_id + + + + + + + select pr.first_names , pr.last_name , + (pr.person_id) as any_user_id , sn.screen_id, sn.status, sn.service, sn.im_screen_name + from persons pr , jb_screens sn + where pr.person_id = sn.user_id + and sn.user_id != :user_id + and sn.user_id NOT IN ([template::util::tcl_to_sql_list $all_invisible]) + and ( (sn.status != 'offline') OR sn.user_id IN ([template::util::tcl_to_sql_list $onliners]) ) + and sn.screen_id not in (Select friend_screen_id from jb_friends where user_id = :user_id) + ORDER BY last_name + + + + Index: openacs-4/packages/jabber/www/current-users-online.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/current-users-online.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/current-users-online.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,47 @@ + +Current users online +@context@ + +

Here you can see all users online, who are not in your buddy list yet sorted by the prefix of their last name!

+ +

+ + +@prefix_links.prefix@ |  + + +@prefix_links.prefix@ |  + + +

+ + + + + + + +
+ + + + + + + + + + + + + + +
Other Community Users Online
@other_status.first_names@ @other_status.last_name@Add to friends
+ +
+
+
+
+ +

There are no users with the prefix @prefix@, who are online now and not in your list!

+
\ No newline at end of file Index: openacs-4/packages/jabber/www/current-users-online.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/current-users-online.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/current-users-online.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,56 @@ +ad_page_contract { + + site to display all users online + @author Luis Mosteiro Fernandez, lmosteiro@sussdorff-roy.com + @author Bjoern Kiesbye, bkiesbye@sussdorff-roy.com + @creation-date 2003-03-26 + @param prefix display users depending on this prefix + +} { + + {prefix "A"} + +} -properties { + +} + +set onliners [whos_online::user_ids] +set all_invisible [whos_online::all_invisible_user_ids] +if {[llength $all_invisible] == 0 } {lappend all_invisible 0} +set all_users [whos_online::all_user_ids] + +set context [list "Online users"] + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + +set any_is_online_p 0 + +multirow create prefix_links prefix +set prefix_list [list A B C D E F G H I J K L M N O P Q R S T U V W X Y Z All] +for {set j 0} { $j < [llength $prefix_list]} {incr j} { + multirow append prefix_links [lindex $prefix_list $j] +} + +multirow create other_status any_user_id any_screen_id first_names last_name service status create_jid chat + + +# query to get users within the OACS who are online in Jabber and who are not explicit friends + +if {![string equal $prefix "All"]} { + +db_foreach get_all_other_users_online "" { + set online_any($service) $status + multirow append other_status $any_user_id $screen_id $first_names $last_name $service $status [jb_create_jid $im_screen_name $service] [jb_best_chat $any_user_id] + set any_is_online_p 1 +} + +} else { + +db_foreach get_all_users_online "" { + set online_any($service) $status + multirow append other_status $any_user_id $screen_id $first_names $last_name $service $status [jb_create_jid $im_screen_name $service] [jb_best_chat $any_user_id] + set any_is_online_p 1 +} + +} Index: openacs-4/packages/jabber/www/del-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/del-user.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/del-user.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,4 @@ +set user_id [ad_conn user_id] +db_dml del "delete from jb_screens where user_id = :user_id" +db_dml del2 "delete from jb_user_jabber_information where user_id = :user_id" +ns_returnredirect index \ No newline at end of file Index: openacs-4/packages/jabber/www/display-name-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/display-name-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/display-name-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,12 @@ + + + + oracle8.1.6 + + + + select im_screen_name from jb_screens WHERE user_id = :user_id_friend and service = $trans_symbol + + + + Index: openacs-4/packages/jabber/www/display-name-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/display-name-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/display-name-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,14 @@ + + + + postgresql7.1 + + + + + select im_screen_name from jb_screens WHERE user_id = :user_id_friend and service = $trans_symbol + + + + + Index: openacs-4/packages/jabber/www/display-name.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/display-name.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/display-name.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,11 @@ + +Jabber + +

Display Screen Name

+ +

You and your friend are both online at @im_service@. +
Your friends Screen Name at @im_service@ is: @im_screen_name@ +
Add this Screen Name to your roster to Chat with him.

+

+ + Index: openacs-4/packages/jabber/www/display-name.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/display-name.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/display-name.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,29 @@ +ad_page_contract { + + display-name.tcl + @author Bjoern Kiesbye + @author Luis Mosteiro Fernandez + @param trans_symbol which im_service + @param user_id_friend which user + +} { + + trans_symbol:notnull + user_id_friend:notnull,integer + {return_url "index.tcl"} + +} -properties { + + im_service:onevalue + im_screen_name:onevalue + +} + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + +set im_service $trans_symbol + +db_0or1row get_screen "" + + Index: openacs-4/packages/jabber/www/edit-external-contact-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-external-contact-2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-external-contact-2-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,34 @@ + + + + oracle8.1.6 + + + + begin + jb_screen.delete(:old_screen_id); + end; + + + + + + + declare + id integer; + begin + id := jb_screen.new ( + user_id => :db_nulling, + im_screen_name => :new_screen, + service => :cur_service, + status => 'offline', + refcount => '1', + object_type => 'jb_screen', + creation_user => :user_id, + creation_ip => :peeraddr + ); + end; + + + + Index: openacs-4/packages/jabber/www/edit-external-contact-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-external-contact-2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-external-contact-2-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,23 @@ + + + + postgresql7.1 + + + + + + SELECT jb_screen__delete(:old_screen_id) + + + + + + + SELECT jb_screen__new (null , :db_nulling, :new_screen, + :cur_service, 'offline', '' , '' , '1', 'jb_screen', null , + :user_id, :peeraddr , null) + + + + Index: openacs-4/packages/jabber/www/edit-external-contact-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-external-contact-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-external-contact-2.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,155 @@ +ad_page_contract { + + updates the database + @author Luis Mosteiro Fernandez + @creation-date 2002-10-23 + @param screen_id who should be updated + @param first_names new value for first_names + @param last_name new value for last_name + @param im_screen_name new value for im_screen_name + +} { + friend_first_name + friend_last_name + friend_last_name_old + friend_first_name_old + im_screen_name:array + im_screen_name_old:array + services:array +} -properties { + +} + +set user_id [ad_conn user_id] +set peeraddr [ad_conn peeraddr] +set db_nulling [db_null] + +if {$friend_first_name != $friend_first_name_old} { + +db_dml update_first_name "UPDATE jb_friends SET friend_first_name = :friend_first_name + WHERE friend_first_name = :friend_first_name_old + AND friend_last_name = :friend_last_name_old + AND user_id = :user_id" + +set friend_first_name_old "$friend_first_name" + +} + + +if {$friend_last_name != $friend_last_name_old} { + +db_dml update_first_name "UPDATE jb_friends SET friend_last_name = :friend_last_name + WHERE friend_first_name = :friend_first_name_old + AND friend_last_name = :friend_last_name_old + AND user_id = :user_id" + +set friend_last_name_old "$friend_last_name" + + +} + + + + +for {set search [array startsearch services]} { [array anymore services $search]} {} { + + + set cur_service_1 [array nextelement services $search] + set cur_service $services($cur_service_1) +ns_log notice "cur_service = $cur_service , services(cur_service) = $services($cur_service_1)" + + set old_screen $im_screen_name_old($cur_service) + set new_screen $im_screen_name($cur_service) + + if {$new_screen != $old_screen} { + + if {$cur_service == "msn"} { + regsub -all "@" $old_screen "%" old_screen + regsub -all "@" $new_screen "%" new_screen + } + + if {$old_screen != "" } { + + #remove from friends list + + db_1row get_old_screen_id "SELECT (screen_id) as old_screen_id , refcount FROM jb_screens WHERE im_screen_name = :old_screen AND service = :cur_service" + + db_dml delete_from_friendslist "DELETE FROM jb_friends + WHERE friend_screen_id = :old_screen_id + AND user_id = :user_id" + + if {$refcount > 1} { + set refcount [expr $refcount - 1] + db_dml update_refcount "UPDATE jb_screens SET refcount = :refcount WHERE im_screen_name = :old_screen AND service = :cur_service" + } else { + + db_exec_plsql jb_screen_delete "" + + set success [jb_removetransportbuddy $old_screen [jb_get_transport_id_from_symbol $cur_service]] + + } + + } + + if { $new_screen != "" } { + # check if we alreddy have this screen in the jb_screens table + if { [ db_0or1row get_new_screen_id "SELECT (screen_id) as new_screen_id , (refcount) as new_refcount FROM jb_screens WHERE im_screen_name = :new_screen AND service = :cur_service"]} { + + + #we know this screen just update the friends table. + + db_dml insert_new_frind "INSERT INTO jb_friends (friend_first_name , friend_last_name , friend_screen_id , user_id) values (:friend_first_name_old , :friend_last_name_old , :new_screen_id , :user_id)" + + set new_refcount [expr $new_refcount +1] + + db_dml update_refcount_with_screen_id "UPDATE jb_screens SET refcount = :new_refcount WHERE screen_id = :new_screen_id" + + + } else { + + #we have a total new screen + + + #create a new jb_screen object for the new screen name + db_exec_plsql new_screen {} + + #now add the new screen to the jabber roster + set success [jb_addtransportbuddy $new_screen "online-trace" [jb_get_transport_id_from_symbol $cur_service]] + + + db_1row get_new_screen_id "SELECT (screen_id) as new_screen_id , (refcount) as new_refcount + FROM jb_screens + WHERE im_screen_name = :new_screen + AND service = :cur_service" + + db_dml insert_new_frind "INSERT INTO jb_friends (friend_first_name , friend_last_name , friend_screen_id , user_id) + VALUES (:friend_first_name_old , :friend_last_name_old , :new_screen_id , :user_id)" + + } + + + + } + + + + + + + + } + + + + + + + +} + + + + + + +ad_returnredirect "view-external-contacts" Index: openacs-4/packages/jabber/www/edit-external-contact-confirm.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-external-contact-confirm.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-external-contact-confirm.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,31 @@ + + + +Edit Contact Information +Confirm + +

Please confirm your changes

+ +
+

First Name : @friend_first_name@

+

Last Name : @friend_last_name@

+ + + + + + +

+@new_im_contacts.pretty_name@ : @new_im_contacts.im_screen_name@ +

+ + + + + + +
+ +
+ +Back to index page Index: openacs-4/packages/jabber/www/edit-external-contact-confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-external-contact-confirm.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-external-contact-confirm.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,47 @@ +ad_page_contract { + + edit external contact + @author Bjoern Kiesbye + @creation-date 2003-06-19 + @param friend Frist and Last name of the conntact that should be edited + +} { + + friend_first_name + friend_last_name + friend_last_name_old + friend_first_name_old + im_screen_name:array + im_screen_name_old:array + services:array + services_pretty:array + + + +} -properties { + + new_im_contacts + friend_first_name:onevalue + friend_last_name:onevalue + friend_last_name_old:onevalue + friend_first_name_old:onevalue +} + + + +multirow create new_im_contacts service pretty_name im_screen_name im_screen_name_old + + + +for {set search [array startsearch services]} { [array anymore services $search]} {} { + + + set cur_service_1 [array nextelement services $search] + set cur_service $services($cur_service_1) +ns_log notice "cur_service = $cur_service , services(cur_service) = $services($cur_service_1)" + + multirow append new_im_contacts $cur_service $services_pretty($cur_service) $im_screen_name($cur_service) $im_screen_name_old($cur_service) + +} + +ad_return_template \ No newline at end of file Index: openacs-4/packages/jabber/www/edit-external-contact.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-external-contact.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-external-contact.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,12 @@ + +Edit external contact information +Edit + +

Edit external contact information

+ + + +
+Back to view +Back to index page + Index: openacs-4/packages/jabber/www/edit-external-contact.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-external-contact.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-external-contact.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,98 @@ +ad_page_contract { + + edit external contact + @author Bjoern Kiesbye + @creation-date 2003-06-19 + @param friend Frist and Last name of the conntact that should be edited + +} { + + friend_first_name:notnull + friend_last_name:notnull + +} -properties { + + im_screen_name:onevalue + service:onevalue + friend_first_name:onevalue + friend_last_name:onevalue + +} + +set user_id [ad_conn user_id] +set services_list [list] + +db_foreach get_services "" { + + lappend services_list $service + set services($service) $pretty_name + set details_im_screen_name($service) "" +} + +db_foreach get_external_contacts_details "" { +ns_log notice "$service / $im_screen_name" + set details_im_screen_name($service) $im_screen_name +# lappend details_service $service + +} + + + + + + +template::form create edit-user -action edit-external-contact-confirm + +template::element create edit-user friend_first_name -datatype text -widget text -label "First Name:" -value $friend_first_name +template::element create edit-user friend_last_name -datatype text -widget text -label "Last Name:" -value $friend_last_name +template::element create edit-user friend_first_name_old -datatype text -widget hidden -value $friend_first_name +template::element create edit-user friend_last_name_old -datatype text -widget hidden -value $friend_last_name + + + +for {set i 0} { $i < [llength $services_list]} { incr i } { + + set err "" + + # catch { set test "$details_im_screen_name([lindex $services_list $i])" } err + # ns_log notice "err = $err" + if {$details_im_screen_name([lindex $services_list $i]) != ""} { + + set displayed_im_screen_name $details_im_screen_name([lindex $services_list $i]) + + if { [lindex $services_list $i] == "msn"} { + regsub -all "%" $displayed_im_screen_name "@" displayed_im_screen_name + + } + + template::element create edit-user im_screen_name.[lindex $services_list $i] -datatype text -widget text -label "$services([lindex $services_list $i]) Screen:" -value "$displayed_im_screen_name" + + + template::element create edit-user im_screen_name_old.[lindex $services_list $i] -datatype text -widget hidden -value "$displayed_im_screen_name" + + template::element create edit-user services.$i -datatype text -widget hidden -value "[lindex $services_list $i]" + + template::element create edit-user services_pretty.[lindex $services_list $i] -datatype text -widget hidden -value "$services([lindex $services_list $i])" + + } else { + + set displayed_im_screen_name $details_im_screen_name([lindex $services_list $i]) + template::element create edit-user im_screen_name.[lindex $services_list $i] -datatype text -widget text -label "$services([lindex $services_list $i]) Screen:" -value "$displayed_im_screen_name" + + + template::element create edit-user im_screen_name_old.[lindex $services_list $i] -datatype text -widget hidden -value "$displayed_im_screen_name" + + template::element create edit-user services.$i -datatype text -widget hidden -value "[lindex $services_list $i]" + + template::element create edit-user services_pretty.[lindex $services_list $i] -datatype text -widget hidden -value "$services([lindex $services_list $i])" + + + } +} + + + + + + +ad_return_template \ No newline at end of file Index: openacs-4/packages/jabber/www/edit-external-contact.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-external-contact.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-external-contact.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,23 @@ + + + + + + Select service , pretty_name from jb_services where active_check_p = 't' + + + + + + + Select jb_screens.im_screen_name , jb_screens.service , jb_screens.screen_id + from jb_screens , jb_friends + where jb_friends.friend_first_name = :friend_first_name + and jb_friends.friend_last_name = :friend_last_name + and jb_friends.friend_screen_id = jb_screens.screen_id + and jb_friends.user_id = :user_id + + + + + Index: openacs-4/packages/jabber/www/edit-user-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-user-2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-user-2-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,35 @@ + + + + oracle8.1.6 + + + + begin + jb_screen.delete(:old_screen_id); + end; + + + + + + + + declare + id integer; + begin + id := jb_screen.new ( + user_id => :user_id, + im_screen_name => :user_screen_name, + service => :service, + status => 'offline', + refcount => '1', + object_type => 'jb_screen', + creation_user => :user_id, + creation_ip => :peeraddr + ); + end; + + + + Index: openacs-4/packages/jabber/www/edit-user-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-user-2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-user-2-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,24 @@ + + + + postgresql7.1 + + + + + + SELECT jb_screen__delete(:old_screen_id) + + + + + + + + + SELECT jb_screen__new (null, :user_id, :user_screen_name, + :service, 'offline', '', '' , '1', 'jb_screen', null , :user_id, + :peeraddr , null) + + + Index: openacs-4/packages/jabber/www/edit-user-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-user-2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-user-2.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,6 @@ + + +Edit Contact Information + + + Index: openacs-4/packages/jabber/www/edit-user-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-user-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-user-2.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,167 @@ +ad_page_contract { + + updates existing user preferences + @author Luis Mosteiro Fernandez + @creation-date 2002-10-22 + @param screen_name array of new/old screen names + +} { + + screen_name:array + +} + + +set user_id [ad_conn user_id] +set db_nulling [db_null] +set peeraddr [ad_conn peeraddr] +ns_log debug "edit-user-2 1" + +db_foreach get_services "Select service from jb_services where active_check_p = 't'" { + set screen_id "-1" + set refcount "0" + set user_screen_name $screen_name($service) + if {$service == "msn"} { + regsub -all "@" $user_screen_name "%" user_screen_name + + } + + if {[empty_string_p $screen_name($service)]} { + ns_log debug "edit-user-2 2 $user_screen_name" + #the user did not enter a screen for this service, so just remove old stuff + if {[db_0or1row get_screen_id "SELECT screen_id , refcount , im_screen_name + FROM jb_screens + WHERE user_id = :user_id + AND service = :service"]} { + ns_log debug "edit-user-2 2.1" + + #we have a screen for this user_id and no new , so we have to 1. completly remove the screen from jb_screens if no one else + #is interestet in this screen refcount = 1 and remove it from the jabber roster. + #2. just delete the user_id from the screen_id + + set old_screen_name $im_screen_name + + if { $refcount == 1 } { + + set old_screen_id $screen_id + + db_exec_plsql jb_screen_delete { + begin + jb_screen.delete(:screen_id); + end; + } + + set old_screen_id "" + + # db_dml delete_screen "delete from jb_screens where user_id = :user_id and service = :service" + set success [jb_removetransportbuddy $old_screen_name [jb_get_transport_id_from_symbol $service]] + + + } else { + ns_log debug "edit-user-2 2.1.2" + + db_dml update_screen "UPDATE jb_screens SET user_id = :db_nulling WHERE user_id = :user_id AND service = :service" + } + + + } else { ns_log debug "edit-user-2 2.2" + # we have no screen in the db , and no new one , nothing to do. + } + } else { + ns_log debug "edit-user-2 3" + #we have a new screen , see if we have one in the jb_screens table + + if {[db_0or1row get_screen_id "select (screen_id) as old_screen_id , (im_screen_name) as old_screen_name , refcount from jb_screens where user_id = :user_id and service = :service"]} { + ns_log debug "edit-user-2 3.1" + #we have a screen in the db , see if it's a new one. + if { $old_screen_name != $user_screen_name } { + ns_log debug "edit-user-2 3.1.1" + #we have a new screen , see if we can just update the OLD table column + if { [db_0or1row check_new_screen_exists "SELECT (screen_id) as new_screen_id + FROM jb_screens + WHERE im_screen_name = :user_screen_name + AND service = :service"]} { + + ns_log debug "edit-user-2 3.1.1.1" + #ok we already have a new screen_id for this screen, so remove the user_id from the old screen_id and may drop the whole + #column , or just update the user_id , old column to null and the new one to :user_id + if { $refcount == 1 } { + ns_log debug "edit-user-2 3.1.1.1.1" + # no one is interested in the old screen so remove the whole column + # we have to do it with the delete function (ACSOBJECT) + # till then we just delete the user_id + + + db_exec_plsql jb_screen_delete "" + + + set success [jb_removetransportbuddy $old_screen_name [jb_get_transport_id_from_symbol $service]] + + } else { + ns_log debug "edit-user-2 3.1.1.1.2" + #just remove the user_id in the old column , and put it in the new column + db_dml remove_old_user_id "UPDATE jb_screens SET user_id = :db_nulling WHERE screen_id = :old_screen_id" + db_dml update_new_screens_column "UPDATE jb_screens SET user_id = :user_id WHERE screen_id = :new_screen_id" + + } + + } else { + ns_log debug "edit-user-2 3.1.1.2" + #the new screen doesen't exists jet create a new one and delete the user_id from the old + + if { $refcount == 1 } { +ns_log debug "edit-user-2 3.1.1.2.1" + # no one is interested in the old screen so remove the whole column + # we have to do it with the delete function (ACSOBJECT) + # till then we just delete the user_id + + + db_exec_plsql jb_screen_delete "" + + set success [jb_removetransportbuddy $old_screen_name [jb_get_transport_id_from_symbol $service]] + + } else { +ns_log debug "edit-user-2 3.1.1.2.2" + #just remove the user_id in the old column + db_dml remove_old_user_id "UPDATE jb_screens SET user_id = :db_nulling WHERE screen_id = :old_screen_id" + + } + + #create a new jb_screen object for the new screen name + db_exec_plsql new_screen {} + + #now add the new screen to the jabber roster + set success [jb_addtransportbuddy $user_screen_name "online-trace" [jb_get_transport_id_from_symbol $service]] + + } + + + } else { +ns_log debug "edit-user-2 3.1.2" + + #old and new screen name match so do nothing + } + } else { +ns_log debug "edit-user-2 3.2" + #we have no old_screen_id for this user_id , so check if we have to fully create a a new one, or just inserting the old user_id. + if { [db_0or1row check_new_screen_exists "SELECT (screen_id) as new_screen_id + FROM jb_screens + WHERE im_screen_name = :user_screen_name + AND service = :service"]} { + + + #just update the user_id column + db_dml insert_new_user_id "UPDATE jb_screens SET user_id = :user_id WHERE screen_id = :new_screen_id" + + + } else { + db_exec_plsql new_screen {} + + #now add the new screen to the jabber roster + set success [jb_addtransportbuddy $user_screen_name "online-trace" [jb_get_transport_id_from_symbol $service]] + } + } + } +} + +ad_returnredirect "index.tcl" Index: openacs-4/packages/jabber/www/edit-user-confirm.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-user-confirm.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-user-confirm.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,22 @@ + + + +Edit Contact Information + + +

Please confirm your changes

+ + + +

+@new_im_contacts.pretty_name@ : @new_im_contacts.im_screen_name@ +

+ + + +
+ +
+ +Back to index page + Index: openacs-4/packages/jabber/www/edit-user-confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-user-confirm.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-user-confirm.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,28 @@ +ad_page_contract { + + edit-user-confirm.tcl + @author: bkiesbye@sussdorff-roy.com , lmosteiro@sussdorff-roy.com + + } { + + service_pretty_name:array + service:array + screen_name:array + +} + + +multirow create new_im_contacts service pretty_name im_screen_name + + + +for {set search [array startsearch service]} { [array anymore service $search]} {} { + + + set cur_service [array nextelement service $search] + + + + multirow append new_im_contacts $service($cur_service) $service_pretty_name($cur_service) $screen_name($cur_service) + +} \ No newline at end of file Index: openacs-4/packages/jabber/www/edit-user.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-user.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-user.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,23 @@ + + + +Edit Contact Information +@context@ + +

Edit Your Contact Information

+ +

These are the IM-Contact information for @first_names@ +@last_name@. Please edit them, if necessary.

+ +

+ +

+ + +
+ +Back to index page + + + + Index: openacs-4/packages/jabber/www/edit-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-user.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-user.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,41 @@ +ad_page_contract { + + edit user IM-contact information + @author Luis Mosteiro Fernandez + @creation-date 2002-10-22 + +} -properties { + + first_names:onevalue + last_name:onevalue + get_existing_screen:multirow + context:onevalue + +} + +set context [list "Edit contact information"] + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + + +db_1row get_name "" + +template::form create edit-user -action edit-user-confirm + +db_foreach get_services {} { + set im_screen_name "" + db_0or1row get_screen_name {} + + if {$service == "msn"} { + regsub -all "%" $im_screen_name "@" im_screen_name + + } + + template::element create edit-user screen_name.$service -datatype text -widget text -label "$pretty_name screen name" -value $im_screen_name + template::element create edit-user service_pretty_name.$service -datatype text -widget hidden -value $pretty_name + template::element create edit-user service.$service -datatype text -widget hidden -value $service + +} + +ad_return_template Index: openacs-4/packages/jabber/www/edit-user.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/edit-user.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/edit-user.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,26 @@ + + + + + + select first_names , last_name from persons where person_id = :user_id + + + + + + + Select service , pretty_name from jb_services where active_check_p = 't' + + + + + + + + Select im_screen_name from jb_screens where service = :service and user_id = :user_id + + + + + Index: openacs-4/packages/jabber/www/enigma.jnlp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/enigma.jnlp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/enigma.jnlp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,30 @@ + + + + + + Enigma 3 + Die Horde + http://complat.sourceforge.net + Enigma 3 is a jabber client. + E3 is a java jabber client! + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/jabber/www/enter-xml.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/enter-xml.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/enter-xml.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,18 @@ + + + +Jabber-XML + + +

ENTER YOUR XML

+ +
+

+ +XML:
+
+

+

+ + + Index: openacs-4/packages/jabber/www/ext-cont =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/ext-cont,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/ext-cont 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,363 @@ +edit-external-contact.tcl0100777000076500007650000000727207674430441015157 0ustar bkiesbyewebad_page_contract { + + edit external contact + @author Bjoern Kiesbye + @creation-date 2003-06-19 + @param friend Frist and Last name of the conntact that should be edited + +} { + + friend_first_name:notnull + friend_last_name:notnull + +} -properties { + + im_screen_name:onevalue + service:onevalue + friend_first_name:onevalue + friend_last_name:onevalue + +} + +set user_id [ad_conn user_id] +set services_list [list] + +db_foreach get_services "Select service , pretty_name from jb_services where active_check_p = 't'" { + + lappend services_list $service + set services($service) $pretty_name + set details_im_screen_name($service) "" +} + +db_foreach get_external_contacts_details "Select jb_screens.im_screen_name , jb_screens.service , jb_screens.screen_id + from jb_screens , jb_friends + where jb_friends.friend_first_name = :friend_first_name + and jb_friends.friend_last_name = :friend_last_name + and jb_friends.friend_screen_id = jb_screens.screen_id + and jb_friends.user_id = :user_id" { +ns_log notice "$service / $im_screen_name" + set details_im_screen_name($service) $im_screen_name +# lappend details_service $service + +} + + + + + + +template::form create edit-user -action edit-external-contact-confirm + +template::element create edit-user friend_first_name -datatype text -widget text -label "First Name:" -value $friend_first_name +template::element create edit-user friend_last_name -datatype text -widget text -label "Last Name:" -value $friend_last_name +template::element create edit-user friend_first_name_old -datatype text -widget hidden -value $friend_first_name +template::element create edit-user friend_last_name_old -datatype text -widget hidden -value $friend_last_name + + + +for {set i 0} { $i < [llength $services_list]} { incr i } { + + set err "" + + # catch { set test "$details_im_screen_name([lindex $services_list $i])" } err + # ns_log notice "err = $err" + if {$details_im_screen_name([lindex $services_list $i]) != ""} { + + set displayed_im_screen_name $details_im_screen_name([lindex $services_list $i]) + + if { [lindex $services_list $i] == "msn"} { + regsub -all "%" $displayed_im_screen_name "@" displayed_im_screen_name + + } + + template::element create edit-user im_screen_name.[lindex $services_list $i] -datatype text -widget text -label "$services([lindex $services_list $i]) Screen:" -value "$displayed_im_screen_name" + + + template::element create edit-user im_screen_name_old.[lindex $services_list $i] -datatype text -widget hidden -value "$displayed_im_screen_name" + + template::element create edit-user services.$i -datatype text -widget hidden -value "[lindex $services_list $i]" + + template::element create edit-user services_pretty.[lindex $services_list $i] -datatype text -widget hidden -value "$services([lindex $services_list $i])" + + } else { + + set displayed_im_screen_name $details_im_screen_name([lindex $services_list $i]) + template::element create edit-user im_screen_name.[lindex $services_list $i] -datatype text -widget text -label "$services([lindex $services_list $i]) Screen:" -value "$displayed_im_screen_name" + + + template::element create edit-user im_screen_name_old.[lindex $services_list $i] -datatype text -widget hidden -value "$displayed_im_screen_name" + + template::element create edit-user services.$i -datatype text -widget hidden -value "[lindex $services_list $i]" + + template::element create edit-user services_pretty.[lindex $services_list $i] -datatype text -widget hidden -value "$services([lindex $services_list $i])" + + + } +} + + + + + + +ad_return_templateedit-external-contact.adp0100777000076500007650000000046607674430463015143 0ustar bkiesbyeweb +Edit external contact information +Edit + +

Edit external contact information

+ + + +
+Back to view +Back to index page + +edit-external-contact-confirm.tcl0100644000076500001440000000211507674430506017147 0ustar bkiesbyeusersad_page_contract { + + edit external contact + @author Bjoern Kiesbye + @creation-date 2003-06-19 + @param friend Frist and Last name of the conntact that should be edited + +} { + + friend_first_name + friend_last_name + friend_last_name_old + friend_first_name_old + im_screen_name:array + im_screen_name_old:array + services:array + services_pretty:array + + + +} -properties { + + new_im_contacts + friend_first_name:onevalue + friend_last_name:onevalue + friend_last_name_old:onevalue + friend_first_name_old:onevalue +} + + + +multirow create new_im_contacts service pretty_name im_screen_name im_screen_name_old + + + +for {set search [array startsearch services]} { [array anymore services $search]} {} { + + + set cur_service_1 [array nextelement services $search] + set cur_service $services($cur_service_1) +ns_log notice "cur_service = $cur_service , services(cur_service) = $services($cur_service_1)" + + multirow append new_im_contacts $cur_service $services_pretty($cur_service) $im_screen_name($cur_service) $im_screen_name_old($cur_service) + +} + +ad_return_templateedit-external-contact-confirm.adp0100644000076500001440000000231707674430526017137 0ustar bkiesbyeusers + + +Edit Contact Information +Confirm + +

Please confirm your changes

+ +
+

First Name : @friend_first_name@

+

Last Name : @friend_last_name@

+ + + + + + +

+@new_im_contacts.pretty_name@ : @new_im_contacts.im_screen_name@ +

+ + + + + + +
+ +
+ +Back to index page +edit-external-contact-2.tcl0100777000076500007650000001140507674430616015313 0ustar bkiesbyewebad_page_contract { + + updates the database + @author Luis Mosteiro Fernandez + @creation-date 2002-10-23 + @param screen_id who should be updated + @param first_names new value for first_names + @param last_name new value for last_name + @param im_screen_name new value for im_screen_name + +} { + friend_first_name + friend_last_name + friend_last_name_old + friend_first_name_old + im_screen_name:array + im_screen_name_old:array + services:array +} -properties { + +} + +set user_id [ad_conn user_id] +set peeraddr [ad_conn peeraddr] + +if {$friend_first_name != $friend_first_name_old} { + +db_dml update_first_name "UPDATE jb_friends SET friend_first_name = :friend_first_name + WHERE friend_first_name = :friend_first_name_old + AND friend_last_name = :friend_last_name_old + AND user_id = :user_id" + +set friend_first_name_old "$friend_first_name" + +} + + +if {$friend_last_name != $friend_last_name_old} { + +db_dml update_first_name "UPDATE jb_friends SET friend_last_name = :friend_last_name + WHERE friend_first_name = :friend_first_name_old + AND friend_last_name = :friend_last_name_old + AND user_id = :user_id" + +set friend_last_name_old "$friend_last_name" + +} + + + + +for {set search [array startsearch services]} { [array anymore services $search]} {} { + + + set cur_service_1 [array nextelement services $search] + set cur_service $services($cur_service_1) +ns_log notice "cur_service = $cur_service , services(cur_service) = $services($cur_service_1)" + + set old_screen $im_screen_name_old($cur_service) + set new_screen $im_screen_name($cur_service) + + if {$new_screen != $old_screen} { + + if {$cur_service == "msn"} { + regsub -all "@" $old_screen "%" old_screen + regsub -all "@" $new_screen "%" new_screen + } + + if {$old_screen != "" } { + + #remove from friends list + + db_1row get_old_screen_id "SELECT (screen_id) as old_screen_id , refcount FROM jb_screens WHERE im_screen_name = :old_screen AND service = :cur_service" + + db_dml delete_from_friendslist "DELETE FROM jb_friends + WHERE friend_screen_id = :old_screen_id + AND user_id = :user_id" + + if {$refcount > 1} { + set refcount [expr $refcount - 1] + db_dml update_refcount "UPDATE jb_screens SET refcount = :refcount WHERE im_screen_name = :old_screen AND service = :cur_service" + } else { + + db_exec_plsql jb_screen_delete " + begin + jb_screen.delete(:old_screen_id); + end; + " + + set success [jb_removetransportbuddy $old_screen [jb_get_transport_id_from_symbol $cur_service]] + + } + + } + + if { $new_screen != "" } { + # check if we alreddy have this screen in the jb_screens table + if { [ db_0or1row get_new_screen_id "SELECT (screen_id) as new_screen_id , (refcount) as new_refcount FROM jb_screens WHERE im_screen_name = :new_screen AND service = :cur_service"]} { + + + #we know this screen just update the friends table. + + db_dml insert_new_frind "INSERT INTO jb_friends (friend_first_name , friend_last_name , friend_screen_id , user_id) values (:friend_first_name_old , :friend_last_name_old , :new_screen_id , :user_id)" + + set new_refcount [expr $new_refcount +1] + + db_dml update_refcount_with_screen_id "UPDATE jb_screens SET refcount = :new_refcount WHERE screen_id = :new_screen_id" + + + } else { + + #we have a total new screen + + + #create a new jb_screen object for the new screen name + db_exec_plsql new_screen { + declare + id integer; + begin + id := jb_screen.new ( + user_id => :user_id, + im_screen_name => :new_screen, + service => :cur_service, + status => 'offline', + refcount => '1', + object_type => 'jb_screen', + creation_user => :user_id, + creation_ip => :peeraddr + ); + end; + } + + #now add the new screen to the jabber roster + set success [jb_addtransportbuddy $new_screen "online-trace" [jb_get_transport_id_from_symbol $cur_service]] + + + db_1row get_new_screen_id "SELECT (screen_id) as new_screen_id , (refcount) as new_refcount + FROM jb_screens + WHERE im_screen_name = :new_screen + AND service = :cur_service" + + db_dml insert_new_frind "INSERT INTO jb_friends (friend_first_name , friend_last_name , friend_screen_id , user_id) + VALUES (:friend_first_name_old , :friend_last_name_old , :new_screen_id , :user_id)" + + } + + + + } + + + + + + + + } + + + + + + + +} + + + + + + +ad_returnredirect "view-external-contacts" \ No newline at end of file Index: openacs-4/packages/jabber/www/go-to-jabber.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/go-to-jabber.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/go-to-jabber.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,25 @@ +ad_page_contract { + + @param user_id_friend + @param return_url +} { + + user_id_friend:notnull,integer + {return_url "index.tcl"} +} + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + +db_foreach get_screens {} { + + if {$cur == $user_id} { + set user_a $screen + } else { + set user_b $screen} +} + +set suc [jb_chat $user_a $user_b] + + +ns_returnredirect "jabber-login.tcl?return_url=$return_url" Index: openacs-4/packages/jabber/www/go-to-jabber.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/go-to-jabber.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/go-to-jabber.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + Select (sn.im_screen_name) as screen, (sn.user_id) as cur + from jb_screens sn + WHERE (sn.user_id = :user_id or sn.user_id = :user_id_friend) + AND sn.service = 'jabber' + + + + + Index: openacs-4/packages/jabber/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/index-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/index-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,96 @@ + + + + oracle8.1.6 + + + + + + + + + + select (user_id) as reg_check, (uc.jabber_regstate) as reg_stat + from jb_user_jabber_information uc where user_id = :user_id + + + + + + + Select service from jb_services where active_check_p = 't' + + + + + + select lower(sn.status) as status, + lower(sn.service) as service + FROM jb_screens sn , jb_services + WHERE sn.user_id = :user_id + AND sn.service = jb_services.service + AND jb_services.active_check_p = 't' + + + + + + + select service + from jb_services + where active_check_p = 't' + + + + + + select (persons.person_id) as friends_user_id , + persons.first_names as first_names, persons.last_name as last_name + from persons + where persons.person_id IN (Select jb_screens.user_id from jb_screens, jb_friends + where jb_friends.user_id = :user_id + and jb_screens.screen_id = jb_friends.friend_screen_id + and jb_screens.user_id IS NOT NULL) + AND persons.person_id NOT IN [template::util::tcl_to_sql_list $all_invisible] + + + + + + + + SELECT (sn.screen_id) as friend_screen_id, + (sn.status) as status , + sn.im_screen_name, + lower(sn.service) as service + FROM jb_screens sn + WHERE sn.user_id = :friends_user_id + AND ( ( lower(sn.status) != 'offline' ) or (sn.user_id IN [template::util::tcl_to_sql_list $onliners]) ) + + + + + + select (ef.friend_screen_id) as ef_id , + (ef.friend_first_name) as first_names , + (ef.friend_last_name) as last_name + FROM jb_friends ef + WHERE ef.user_id = :user_id + AND ef.friend_screen_id IN ( Select screen_id from jb_screens + where user_id is null ) + + + + + + + select (sn.status) as status , + (sn.service) as service, sn.im_screen_name + FROM jb_screens sn + WHERE sn.screen_id = :ef_id + AND sn.status != 'offline' + + + + Index: openacs-4/packages/jabber/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/index-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/index-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,96 @@ + + + + postgresql7.3 + + + + select (user_id) as reg_check, (uc.jabber_regstate) as reg_stat + from jb_user_jabber_information uc where user_id = :user_id + + + + + + + Select service from jb_services where active_check_p = 't' + + + + + + select lower(sn.status) as status, + lower(sn.service) as service + FROM jb_screens sn , jb_services + WHERE sn.user_id = :user_id + AND sn.service = jb_services.service + AND jb_services.active_check_p = 't' + + + + + + select service + from jb_services + where active_check_p = 't' + + + + + + + select (persons.person_id) as friends_user_id , + persons.first_names as first_names, persons.last_name as last_name + from persons + where persons.person_id IN (Select jb_screens.user_id from jb_screens, jb_friends + where jb_friends.user_id = :user_id + and jb_screens.screen_id = jb_friends.friend_screen_id + and jb_screens.user_id IS NOT NULL) + AND persons.person_id NOT IN ([template::util::tcl_to_sql_list $all_invisible]) + + + + + + + SELECT (sn.screen_id) as friend_screen_id, + (sn.status) as status , + sn.im_screen_name, + lower(sn.service) as service + FROM jb_screens sn + WHERE sn.user_id = :friends_user_id + AND ( ( lower(sn.status) != 'offline' ) or sn.user_id IN ([template::util::tcl_to_sql_list $onliners]) ) + + + + + + select (ef.friend_screen_id) as ef_id , + (ef.friend_first_name) as first_names , + (ef.friend_last_name) as last_name + FROM jb_friends ef + WHERE ef.user_id = :user_id + AND ef.friend_screen_id IN ( Select screen_id from jb_screens + where user_id is null ) + + + + + + select (sn.status) as status , + (sn.service) as service, sn.im_screen_name + FROM jb_screens sn + WHERE sn.screen_id = :ef_id + AND sn.status != 'offline' + + + + + + + + + + + + Index: openacs-4/packages/jabber/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/index.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,244 @@ + +Jabber +@context@ + + +

Who's online?

+ +

The IM System is not avaiable, please try it again later!

+
+Go to the Conference facility +

This page displays users, who are currently online. It differentiate between three user groups. Internal, registered Jabber users, who are on your buddy list including their +other Instant Messaging contacts. Then external friends, who are not registered in @system_name@, but you want to have on your buddy list. At last other internal, registered Jabber users, who are online. This provides you information, who is online, if you want to begin a chat. Furthermore you do not have to search internal users to add them to your buddy list, you have to click only on the link to add them to your friend list. +

+ + + + + +
+ + + + + + + + + + + +
Your Messenger Status
+
+
This icons display your online State.
Log in to the @system_name@ Jabber by clicking on the yellow Links below. + + + + + Jabber Applet Active + + + + + + + +
+
+ + + + + + + + + + + +
+ + The screen name you typed in is already in use! + + + Please fill in the form to register with Jabber! + +
+ +
+
+ + + + + + + + + +
+ Edit your contact information + + View your external contacts + + Add a new external contact + + Search for users +
+ + + + +
 
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
Class Members online
@member_status.first_names@ @member_status.last_name@Add Member to Friends list + +
+
+
+ + + + +
 
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Your Friends online
@friend_status.first_names@ @friend_status.last_name@Remove from list + +
+
+
+ + + + +
 
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
External Friends Online
@external_status.first_names@ @external_status.last_name@Contact from IM-Addressbook +
Click on Icon
+
+
+ + + + +
 
+

If you want to see all community users online, who are not on your buddy list, follow this link: Current Community users online

+


+ On a public Internet service, the number of casual surfers (unregistered) will + outnumber the registered users by at least 10 to 1. Thus there could be many + more people using this service than it would appear. +

+

+

+ + + + + + + + Index: openacs-4/packages/jabber/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/index.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,192 @@ +ad_page_contract { + + + @cvs-id index.tcl, + @creation-date 25/8/02 + @author bkiesbye@sussdorff-roy.com + @author lmosteiro@sussdorff-roy.com + @param reg_error checks, whether input was successful + +} { + + {reg_error "nothing"} + +} -properties { + + reg_error_code:onevalue + reg_error_name:onevalue + user_status:multirow + friend_status:multirow + external_status:multirow + other_status:multirow + context:onevalue + return_url:onevalue + friends_is_online_p:onevalue + external_is_online_p:onevalue + any_is_online_p:onevalue + +} + + + +#set url_to_conference_group [jb_start_conference_room_for_group_url 15331] + +#Check if we are inside a dotlrn Comunity +set community_id [dotlrn_community::get_community_id_from_url] + + +set system_name [ad_system_name] +set trans_symbol [list] +set return_url [ad_conn url] +set context "" +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration +set reg_need "0" + +set connstate [jb_getconnstate] + +set user_invisible [whos_online::check_invisible $user_id ] +set all_invisible [whos_online::all_invisible_user_ids] +if {[llength $all_invisible] == 0 } {lappend all_invisible 0} +set all_users [whos_online::all_user_ids] + +#----------------------------------------------------check, whether user is registered------------------------------------- + +if { ![db_0or1row is_user_reg_with_jabber {select (user_id) as reg_check, (uc.jabber_regstate) as reg_stat + from jb_user_jabber_information uc where user_id = :user_id} ]} { + set reg_need "1" +} + +ad_form -name user-register -action user-register -form { + {jscreen:text(text) {label "Jabber Screen:
"}} + {passwd:text(password) {label "Password:
"}} + {return_url:text(hidden) {value "index"}} +} + +#-----------------------------------------------------get avaiable services-------------------------------------------------- + +db_foreach get_services {} { + set user_states($service) "offline" + set online_state($service) "offline" + set online_state_name($service) $service + set online_ext($service) "offline" + set online_ext_name($service) $service + set online_any($service) "offline" + set online_any_name($service) $service + append trans_symbol " $service" +} + +#-------------------------------------get the different user states for the IM services----------------------------------------- + +multirow create user_status service status + +db_foreach get_users_state {} { + multirow append user_status $service $status + set user_states($service) $status +} if_no_rows { + + db_foreach get_services {} { + multirow append user_status $service "no" + set user_states($service) "offline" + } + +} + +set jabber_start "offline" + +for {set j 0} { $j < [llength $trans_symbol]} {incr j} { + if { [lindex $trans_symbol $j] == "jabber" } { + if { [set user_states([lindex $trans_symbol $j])] == "offline" } { + set jabber_start "offline" + } else { + set jabber_start "online" + } + } + if { [lindex $trans_symbol $j] == "aim" } { + if { [set user_states([lindex $trans_symbol $j])] != "offline" } { + set aim_on 1 + } else { + set aim_on 0 + } + } +} + + +set member_is_online_p 0 +set onliners [whos_online::user_ids] + + +#----------------------------------Comunity Members Online------------------------------------------ + +multirow create member_status first_names last_name member_user_id member_screen_id service status create_jid chat im_screen_name member_is_friend + +db_foreach get_members_state { select (persons.person_id) as friends_user_id , + persons.first_names as first_names, persons.last_name as last_name + from persons , group_distinct_member_map gdmm + where persons.person_id = gdmm.member_id + AND gdmm.group_id = :community_id + AND persons.person_id != :user_id +} { + + lappend members_online_list $friends_user_id + + if {[db_0or1row check_if_member_is_friend {select jf.friend_screen_id from jb_friends jf, jb_screens js where jf.user_id = :user_id and jf.friend_screen_id = js.screen_id and js.user_id = :friends_user_id and js.service = 'jabber'} ] } { + set member_is_friend 1 + } else { + set member_is_friend 0 + } + db_foreach get_his_online_states "" { + + set online_state($service) $status + + multirow append member_status $first_names $last_name $friends_user_id $friend_screen_id $service $status [jb_create_jid $im_screen_name $service] [jb_best_chat $friends_user_id] $im_screen_name $member_is_friend + set member_is_online_p 1 + } + + + + +} + +#-------------------------------internal friend online ------------------------------------------------------------------------------ + +set friend_is_online_p 0 +#set onliners [whos_online::user_ids] + +multirow create friend_status first_names last_name friend_user_id friend_screen_id service status create_jid chat im_screen_name + + +db_foreach get_a_friend "" { + + lappend friends_online_list $friends_user_id + + + db_foreach get_his_online_states "" { + set online_state($service) $status + multirow append friend_status $first_names $last_name $friends_user_id $friend_screen_id $service $status [jb_create_jid $im_screen_name $service] [jb_best_chat $friends_user_id] $im_screen_name + set friend_is_online_p 1 + } + +} + +#--------------------------External friends---------------------------------------------------------------------- + +set external_is_online_p 0 + +multirow create external_status friend_screen_id first_names last_name combi_name service status create_jid + + +db_foreach get_friends_users_online {} { + + db_foreach get_this_online_anys {} { + set online_ext($service) $status + multirow append external_status $ef_id $first_names $last_name "$first_names $last_name" $service $status [jb_create_jid $im_screen_name $service] + set external_is_online_p 1 + } + +} + + +ad_return_template + + Index: openacs-4/packages/jabber/www/invisible.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/invisible.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/invisible.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,27 @@ +ad_page_contract { + + + @cvs-id invisible.tcl, + @creation-date 18/3/03 + @author bkiesbye@sussdorff-roy.com + + +} { + + type:notnull + {return_url "[apm_package_url_from_key jabber]"} + +} + +set user_id [ad_conn user_id] + +if {$type == "set"} { + + whos_online::set_invisible $user_id + +} elseif { $type == "unset"} { + + whos_online::unset_invisible $user_id +} + +ns_returnredirect $return_url \ No newline at end of file Index: openacs-4/packages/jabber/www/jabber-auto-login-greenthumb-neu.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-auto-login-greenthumb-neu.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-auto-login-greenthumb-neu.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,64 @@ + +set HTML { + + + + } + + + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + + + +if {[db_0or1row name_pass ""]} { + + + + append HTML " + + + + + + + + + + + + + + + +If you see this text, the scrolls say your browser does not support java applets. + +" +} else { + append HTML "you are not registert!" +} + +append HTML "" +doc_return 200 text/html $HTML Index: openacs-4/packages/jabber/www/jabber-auto-login-greenthumb-neu.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-auto-login-greenthumb-neu.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-auto-login-greenthumb-neu.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + Select (jb_screens.im_screen_name) as jabber_screen , jb_user_jabber_information.jabber_passwd + from jb_user_jabber_information, jb_screens + where jb_user_jabber_information.user_id = :user_id + and jb_screens.user_id = :user_id and jb_screens.service = 'jabber' + + + + + Index: openacs-4/packages/jabber/www/jabber-auto-login-greenthumb.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-auto-login-greenthumb.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-auto-login-greenthumb.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,55 @@ + +set HTML { + + + + } + + + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + + + +if {[db_0or1row name_pass ""]} { + + append HTML " + + + + + + + + +If you see this text, the scrolls say your browser does not support java applets. + +" +} else { + append HTML "you are not registert!" +} + +append HTML "" +doc_return 200 text/html $HTML Index: openacs-4/packages/jabber/www/jabber-auto-login-greenthumb.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-auto-login-greenthumb.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-auto-login-greenthumb.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + Select (jb_screens.im_screen_name) as jabber_screen , jb_user_jabber_information.jabber_passwd + from jb_user_jabber_information, jb_screens + where jb_user_jabber_information.user_id = :user_id + and jb_screens.user_id = :user_id and jb_screens.service = 'jabber' + + + + + Index: openacs-4/packages/jabber/www/jabber-auto-login.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-auto-login.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-auto-login.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,65 @@ + +set HTML { + + + + } + + + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + + + +if {[db_0or1row name_pass ""]} { + +#ns_returnredirect "http://aiesec-dev.sussdorff-roy.com:8004/jabber-auto-login.tcl?j_screen=$jabber_screen&j_password=$jabber_passwd" + + + + append HTML " + + + + + + + + + + + + + + + " +#ad_script_abort +} else { + append HTML "you are not registert!" +} + +append HTML "" +doc_return 200 text/html $HTML Index: openacs-4/packages/jabber/www/jabber-auto-login.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-auto-login.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-auto-login.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + Select (jb_screens.im_screen_name) as jabber_screen , jb_user_jabber_information.jabber_passwd + from jb_user_jabber_information, jb_screens + where jb_user_jabber_information.user_id = :user_id + and jb_screens.user_id = :user_id and jb_screens.service = 'jabber' + + + + + Index: openacs-4/packages/jabber/www/jabber-auto-webstart-applet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-auto-webstart-applet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-auto-webstart-applet.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,54 @@ + +set HTML { + + + + + + Jabber Applet + SourceForge + http://jabberapplet.sourceforge.net + JabberApplet + JabberApplet is a lighweight jabber chat client! + + + + + + + +} + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + + + +if {[db_0or1row name_pass "Select (jb_screens.im_screen_name) as jabber_screen , jb_user_jabber_information.jabber_passwd + from jb_user_jabber_information, jb_screens + where jb_user_jabber_information.user_id = :user_id + and jb_screens.user_id = :user_id and jb_screens.service = 'jabber'"]} { + + append HTML " + + + + + + + + + + + + + " +} else { + append HTML "you are not registert!" +} + +append HTML "" +doc_return 200 application/x-java-jnlp-file $HTML Index: openacs-4/packages/jabber/www/jabber-login-greenthumb-neu.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-login-greenthumb-neu.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-login-greenthumb-neu.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,35 @@ +proc auto-login-1 { destination } { + + +set HTML { + + + + Jabber Client + + +} + +append HTML " + +

If no new small window has opened please click this Link to open a new window for the Jabber client, +resize it yourself and then click this Link to proceed. +

+

If you have your own Jabber Client, you can visit the Jabber preference page and disable the Jabber Applet.

+ +" + +doc_return 200 text/html $HTML +} + +set_the_usual_form_variables +auto-login-1 "$return_url" + Index: openacs-4/packages/jabber/www/jabber-login-greenthumb.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-login-greenthumb.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-login-greenthumb.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,35 @@ +proc auto-login-1 { destination } { + + +set HTML { + + + + Jabber Client + + +} + +append HTML " + +

If no new small window has opened please click this Link to open a new window for the Jabber client, +resize it yourself and then click this Link to proceed. +

+

If you have your own Jabber Client, you can visit the Jabber preference page and disable the Jabber Applet.

+ +" + +doc_return 200 text/html $HTML +} + +set_the_usual_form_variables +auto-login-1 "$return_url" + Index: openacs-4/packages/jabber/www/jabber-login.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-login.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-login.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,35 @@ +proc auto-login-1 { destination } { + + +set HTML { + + + + Jabber Client + + +} + +append HTML " + +

If no new small window has opened please click this Link to open a new window for the Jabber client, +resize it yourself and then click this Link to proceed. +

+

If you have your own Jabber Client, you can visit the Jabber preference page and disable the Jabber Applet.

+ +" + +doc_return 200 text/html $HTML +} + +set_the_usual_form_variables +auto-login-1 "$return_url" + Index: openacs-4/packages/jabber/www/jabber-webstart-auto-login.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-webstart-auto-login.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-webstart-auto-login.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,62 @@ + +set JNLP { + + + + + + Jabber Applet + SourceForge + http://jabberapplet.sourceforge.net + JabberApplet + JabberApplet is a lighweight jabber chat client! + + + + + + + + + + + +} + + + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + + + +if {[db_0or1row name_pass ""]} { + + append JNLP " + + + + + + + + + + + + +" + +doc_return 200 application/x-java-jnlp-file $JNLP + +} else { + + set HTML "

You are not registert!

" + doc_return 200 text/html $HTML + +} + + + Index: openacs-4/packages/jabber/www/jabber-webstart-auto-login.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-webstart-auto-login.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-webstart-auto-login.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + Select (jb_screens.im_screen_name) as jabber_screen , jb_user_jabber_information.jabber_passwd + from jb_user_jabber_information, jb_screens + where jb_user_jabber_information.user_id = :user_id + and jb_screens.user_id = :user_id and jb_screens.service = 'jabber' + + + + + Index: openacs-4/packages/jabber/www/jabber-webstart-login.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/jabber-webstart-login.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/jabber-webstart-login.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,35 @@ +proc auto-login-1 { destination } { + + +set HTML { + + + + Jabber Client + + +} + +append HTML " + +

If no new small window has opened please click this Link to open a new window for the Jabber client, +resize it yourself and then click this Link to proceed. +

+

If you have your own Jabber Client, you can visit the Jabber preference page and disable the Jabber Applet.

+ +" + +doc_return 200 text/html $HTML +} + +set_the_usual_form_variables +auto-login-1 "$return_url" + Index: openacs-4/packages/jabber/www/message-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/message-2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/message-2-oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,13 @@ + + + + oracle8.1.6 + + + + insert into jb_message_log ( message_id, user_id , message , send , conn_state, receive_jid) values ( jb_message_log_seq.nextval, :user_id , :message , sysdate , :success , :user_log ) + + + + + Index: openacs-4/packages/jabber/www/message-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/message-2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/message-2-postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,14 @@ + + + + postgresql7.1 + + + + insert into jb_message_log ( message_id, user_id , message , send , + conn_state, receive_jid) values ( nextval('jb_message_log_seq') , :user_id , :message , current_timestamp , :success , :user_log ) + + + + + Index: openacs-4/packages/jabber/www/message-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/message-2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/message-2.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,30 @@ + +Send Message + +
+

To: @screen@
+ Your message: @message@ +

+ + + +

The Instant Messaging System is not available.
+ The Message will be send as soon it becomes available!

+

+
+ +

Message has been sent and logged!

+
+
+ +

We had problems to find out who you are. All messages are logged.

+
+ + +
+
+
+

Back to Index page.

+ + + Index: openacs-4/packages/jabber/www/message-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/message-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/message-2.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,45 @@ + +ad_page_contract { + + send messages and insert into jb_message_log + @author Bjoern Kiesbye + @author Malte Fliedner + @author Luis Mosteiro Fernandez + @param screen_id + @param screen the jabber_id of the receiver + @param message + +} { + + screen_id:integer,optional + screen:notnull + message:trim + +} -properties { + + success:onevalue + user_check_p:onevalue + +} + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + + +if {[db_0or1row get_name "select first_names , last_name from persons where person_id =:user_id"]} { + + set user_check_p 1 + set name "([string range $first_names 0 0]. $last_name)\n" + append name $message + set message $name + append message "\n(You can't respond to this Message)" + set user_log $screen + set success [jb_message $screen $message] + db_dml insert_log "insert into jb_message_log ( message_id, user_id , message , send , conn_state, receive_jid) values ( jb_message_log_seq.nextval, :user_id , :message , sysdate , :success , :user_log )" + +} else { + set user_check_p 0 +} + + +ad_return_template Index: openacs-4/packages/jabber/www/message.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/message.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/message.adp 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,11 @@ + +Jabber message + +

Message for "@screen@"

+ + +

Please type your message !

+ + +
+Back to index page Index: openacs-4/packages/jabber/www/message.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/message.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/message.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,40 @@ + + +ad_page_contract { + + send message via index page + @author Luis Mosteiro Fernandez + @creation-date 2002-10-29 + @param screen_id + @param screen + +} { + + screen_id:integer + screen:notnull + +} -properties { + + screen_id:onevalue + screen:onevalue + +} + + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + +ad_form -name message -action message-2 -form { + {screen:text(hidden) {value $screen}} + {screen_id:text(hidden) {value $screen_id}} + {message:text(textarea) {html {cols 25}} {html {rows 5}} {label "Message:"}} +} + +ad_return_template + + + + + + + Index: openacs-4/packages/jabber/www/oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/Attic/oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/oracle.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,12 @@ + + + + oracle8.1.6 + + + + + + + + Index: openacs-4/packages/jabber/www/postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/Attic/postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/postgresql.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,18 @@ + + + + postgresql7.1 + + + + + + declare + id integer; + begin + id := acs_group.new(group_name => :group_name); + insert into jb_conference_groups (group_id) values (id); + end; + + + Index: openacs-4/packages/jabber/www/remove-external-contact.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/remove-external-contact.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/remove-external-contact.tcl 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,26 @@ +ad_page_contract { + + remove external contact from list + @author Luis Mosteiro Fernandez + @creation-date 2002-10-22 + @param screen_id who will be removed from jb_friends + +} { + + screen_id:integer + +} + + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + +db_dml remove_friend {} +db_dml decrease_reference {} + +#db_1row get_jabber_id {} +#db_1row get_friend_screen_name {} + +#[jb_removetransbuddy $im_screen_name $friend_screen_name] + +ad_returnredirect "view-external-contacts" Index: openacs-4/packages/jabber/www/remove-external-contact.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/remove-external-contact.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/remove-external-contact.xql 20 Oct 2004 19:36:49 -0000 1.1 @@ -0,0 +1,18 @@ + + + + + + delete from jb_friends where user_id = :user_id and friend_screen_id = :screen_id + + + + + + + update jb_screens set refcount = refcount - 1 where screen_id = :screen_id + + + + + Index: openacs-4/packages/jabber/www/skin.jar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/skin.jar,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/user-register-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/user-register-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/user-register-oracle.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,24 @@ + + + + oracle8.1.6 + + + + declare + id integer; + begin + id := jb_screen.new ( + user_id => :user_id, + im_screen_name => :jscreen, + service => 'jabber', + status => 'offline', + refcount => '1', + object_type => 'jb_screen' + ); + end; + + + + + Index: openacs-4/packages/jabber/www/user-register-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/user-register-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/user-register-postgresql.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,14 @@ + + + + postgresql7.1 + + + + + + SELECT jb_screen__new (null , :user_id, :jscreen, 'jabber', + 'offline', '' , '' , '1', 'jb_screen' , null , null , null , null ) + + + Index: openacs-4/packages/jabber/www/user-register.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/user-register.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/user-register.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,34 @@ + +Jabber-Register + +

Jabber Register:


+ + + +

Database Error Occured

+

Insert failed : @errormsg@

+
+ +

New JabberID created: @jscreen@\@jabber_server

+ + +

JabberID exists or user is already signed in for Jabber! Please choose another username or user_id!

+
+ + +

We had a problem processing your data! The Jabber Client could not register you!

+
+ +
+
+
+

Back to index.

+ + + + + + + + + Index: openacs-4/packages/jabber/www/user-register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/user-register.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/user-register.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,71 @@ +ad_page_contract { + + register user in jabber + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation_date 2002-10-17 + @param user_id + @param user which jabber screen name + @param pass password for login + +} { + + jscreen:notnull + passwd:notnull + +} -properties { + + user_id:onevalue + user:onevalue + errormsg:onevalue + insert_check_p:onevalue + passwd:onevalue + +} + +set user_id [ad_conn user_id] +set creation_user [ad_conn user_id] +ad_maybe_redirect_for_registration + +set peeraddr [ad_conn peeraddr] + + + + +set success [jb_register $jscreen $passwd] + +if {$success == "r" } { + + db_exec_plsql new_screen {} + + db_dml create_contact {insert into jb_user_jabber_information (user_id , jabber_regstate, jabber_passwd) values (:user_id , 'r', :passwd)} + ns_returnredirect "index?reg_error=success" + set insert_check_p 1 + +} elseif {$success == "e"} { + + ns_returnredirect "index?reg_error=exists" + + set insert_check_p 2 + +} else { + + ns_returnredirect "index?reg_error=offline" + set insert_check_p 3 + +} + + + + + + +ad_return_template + + + + + + + + + Index: openacs-4/packages/jabber/www/user-search.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/user-search.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/user-search.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,44 @@ + +Search users +@context@ + +

Search user

+ +

Please note that you can only search users, who are registered in our Jabber server!

+ + + +
+

Search for Users who's First or Last Name starts with:

+ +
+ + + + +

You can add these users to your buddy list

+ + + + + + + + + + + + + +
First NameLast NameAction
@partys.first_names@@partys.last_name@Add
+
+ +

Sorry, there are no Jabber users with this prefix, try again!

+
+ + + +
+
+
+

Back to admin-page

Index: openacs-4/packages/jabber/www/user-search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/user-search.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/user-search.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,61 @@ +ad_page_contract { + + user-register.tcl + Admin Page to register a user + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-03-05 + @param user_prefix search for user with this user_prefix, so admin can register them + +} { + + {user_prefix ""} + +} -properties { + + partys:multirow + row_check_p:onevalue + +} + +set row_check_p 0 +set context "Search" + + +ad_form -name search -action user-search\#result -form { + {user_prefix:text(text) {value $user_prefix} {label ""}} + {Search:text(submit) {value "Search"}} +} + + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + + +multirow create partys person_id first_names last_name + +if {$user_prefix != ""} { + + set friends_list [list $user_id] + + db_foreach get_friends "" { + lappend friends_list $user_id + } + + + db_foreach get_users_from_prefix "" { + + set row_check_p 1 + multirow append partys $person_id $first_names $last_name + + } if_no_rows { + + set row_check_p -1 + } + +} + +set return_url "user-search?user_prefix=$user_prefix" + +ad_return_template + + Index: openacs-4/packages/jabber/www/user-search.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/user-search.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/user-search.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,26 @@ + + + + + + + Select distinct user_id from jb_screens where screen_id in (Select friend_screen_id from jb_friends where user_id = :user_id) + and user_id is not null + + + + + + + + SELECT distinct p.person_id , p.first_names , p.last_name + FROM persons p + WHERE ( lower(p.last_name) like(lower('$user_prefix%')) OR lower(p.first_names) like(lower('$user_prefix%')) ) + and p.person_id NOT IN ([template::util::tcl_to_sql_list $friends_list]) + + + + + + + Index: openacs-4/packages/jabber/www/view-external-contacts.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/view-external-contacts.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/view-external-contacts.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,35 @@ + + +View Your External Contacts +@context@ + +

Your External Contacts

+ + + + + + + + + + + + + + + + + + + +
First NamesLast NameEdit Remove ?
@get_external_friends.friend_first_name@@get_external_friends.friend_last_name@EditRemove?
+ +
+ +

You don't have any external contacts!

+
+ +
+ +Back to index page Index: openacs-4/packages/jabber/www/view-external-contacts.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/view-external-contacts.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/view-external-contacts.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,26 @@ +ad_page_contract { + + view your external contacts + @author Luis Mosteiro Fernandez + @creation-date 2002-10-22 + +} -properties { + + get_external_friends:multirow + context:onevalue + row_check_p:onevalue + +} + +set context [list "Edit External Contact"] + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + +db_multirow get_external_friends get_external_friends {} { + set row_check_p 1 +} if_no_rows { + set row_check_p 0 +} + +ad_return_template Index: openacs-4/packages/jabber/www/view-external-contacts.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/view-external-contacts.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/view-external-contacts.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,20 @@ + + + + + + + Select distinct friend_first_name , friend_last_name , friend_screen_id + from jb_friends , jb_screens + where jb_screens.user_id is null + and jb_screens.screen_id = jb_friends.friend_screen_id + and jb_friends.user_id = :user_id + order by friend_last_name + + + + + + + + Index: openacs-4/packages/jabber/www/admin/add-community-members.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/add-community-members.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/add-community-members.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,38 @@ +ad_page_contract { + + add selected community members + @author Luis Mosteiro Fernandez + @creation-date 2002-12-04 + @param user_id to which user + @param community_members array of user_ids, which should be added + @param rows, we need this variable for our loop through the array + +} { + + user_id:integer + community_members:array + rows:integer + +} + +for {set i 1} { $i <= $rows} {incr i} { + + if {[info exists community_members($i)]} { + set add_user_id $community_members($i) + + #get screen_names + db_0or1row get_jabber_screen_name {} + db_0or1row get_jabber_screen_name_from_add_user {} + #insert into jb_friends and update jb_screens + if {![db_0or1row check_friend ""]} { + db_dml insert_into_jb_friends {} + } + db_dml update_reference_count {} + #add buddy to Jabber roster + set success [jb_addbuddy $user_screen $im_screen_name] + + } +} + + +ns_returnredirect "index" \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/add-community-members.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/add-community-members.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/add-community-members.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,39 @@ + + + + + + Select (im_screen_name) as user_screen from jb_screens where user_id = :user_id and service = 'jabber' + + + + + + + Select im_screen_name , screen_id from jb_screens where user_id = :add_user_id and service = 'jabber' + + + + + + + Select * from jb_friends where user_id = :user_id and friend_screen_id = :screen_id + + + + + + + insert into jb_friends (user_id , friend_screen_id) values (:user_id , :screen_id) + + + + + + + update jb_screens SET refcount = refcount + 1 where user_id = :add_user_id and service = 'jabber' + + + + + Index: openacs-4/packages/jabber/www/admin/add-group-members.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/add-group-members.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/add-group-members.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,38 @@ +ad_page_contract { + + add selected group members + @author Luis Mosteiro Fernandez + @creation-date 2002-12-04 + @param user_id to which user + @param group_members array of user_ids, which should be added + @param rows, we need this variable for our loop through the array + +} { + + user_id:integer + group_members:array + rows:integer + +} + +for {set i 1} { $i <= $rows} {incr i} { + + if {[info exists group_members($i)]} { + set add_user_id $group_members($i) + + #get screen_names + db_0or1row get_jabber_screen_name {} + db_0or1row get_jabber_screen_name_from_add_user {} + #insert into jb_friends and update jb_screens + if {![db_0or1row check_friend ""]} { + db_dml insert_into_jb_friends {} + } + db_dml update_reference_count {} + #add buddy to Jabber roster + set success [jb_addbuddy $user_screen $im_screen_name] + + } +} + + +ns_returnredirect "index" \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/add-group-members.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/add-group-members.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/add-group-members.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,39 @@ + + + + + + Select (im_screen_name) as user_screen from jb_screens where user_id = :user_id and service = 'jabber' + + + + + + + Select im_screen_name , screen_id from jb_screens where user_id = :add_user_id and service = 'jabber' + + + + + + + Select * from jb_friends where user_id = :user_id and friend_screen_id = :screen_id + + + + + + + insert into jb_friends (user_id , friend_screen_id) values (:user_id , :screen_id) + + + + + + + update jb_screens SET refcount = refcount + 1 where user_id = :add_user_id and service = 'jabber' + + + + + Index: openacs-4/packages/jabber/www/admin/add-group-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/add-group-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/add-group-oracle.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,16 @@ + + + + oracle8.1.6 + + + + declare + id integer; + begin + id := composition_rel.new(OBJECT_ID_ONE => :group_id , OBJECT_ID_TWO => :new_group_id ); + end; + + + + Index: openacs-4/packages/jabber/www/admin/add-group-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/add-group-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/add-group-postgresql.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,13 @@ + + + + postgresql7.1 + + + + + + SELECT composition_rel__new(:group_id , :new_group_id ) + + + Index: openacs-4/packages/jabber/www/admin/add-group.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/add-group.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/add-group.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,21 @@ +ad_page_contract { + + add-group.tcl + Admin Page for Conference Groups + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-12-20 +} { + group_id:notnull + group_name:notnull + list_members:notnull + new_group_id:notnull +} + + + + +db_exec_plsql new_conference_group {} + + + +ns_returnredirect "group-edit.tcl?group_name=$group_name&group_id=$group_id&list_members=$list_members" Index: openacs-4/packages/jabber/www/admin/add-user-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/add-user-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/add-user-oracle.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,16 @@ + + + + oracle8.1.6 + + + + declare + id integer; + begin + id := membership_rel.new(OBJECT_ID_ONE => :group_id , OBJECT_ID_TWO => :user_id ); + end; + + + + Index: openacs-4/packages/jabber/www/admin/add-user-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/add-user-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/add-user-postgresql.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,13 @@ + + + + postgresql7.1 + + + + + + SELECT membership_rel__new(:group_id , :user_id ) + + + Index: openacs-4/packages/jabber/www/admin/add-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/add-user.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/add-user.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,21 @@ +ad_page_contract { + + add-user.tcl + Admin Page for Conference Groups + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-12-20 +} { + group_id:notnull + group_name:notnull + list_members:notnull + user_id:notnull +} + + + + +db_exec_plsql new_conference_group {} + + + +ns_returnredirect "group-edit.tcl?group_name=$group_name&group_id=$group_id&list_members=$list_members" Index: openacs-4/packages/jabber/www/admin/addbuddy.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/addbuddy.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/addbuddy.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,39 @@ + +Add buddy to user's roster + +

Here you can add buddies to the user's roster

+ + + +

This is a list of jabber users, who are registered in our internal Jabber Server. You can add those to the user's specific roster only.

+ + + + + + + + + + + + + + + + +
First NamesLast NameScreen nameAction
@internal_users.first_names@@internal_users.last_name@@internal_users.im_screen_name@Add
+ + + +
+
+Add members of a community + +
+ +

There are no other users registert than the user you have chosen, so you cannot add anyone.

+
+ +
+

Back to admin-page

Index: openacs-4/packages/jabber/www/admin/addbuddy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/addbuddy.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/addbuddy.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,29 @@ +ad_page_contract { + + add buddy to user's roster + @author Luis Mosteiro Fernandez + @creation-date 2002-11-12 + @param user_id to whom's roster should the admin add buddies + +} { + + user_id:integer + +} -properties { + + user_id:onevalue + internal_users:multirow + row_check_p:onevalue + +} + + +db_multirow internal_users get_internal_users {} { + set row_check_p 1 +} if_no_rows { + set row_check_p 0 +} + + + +ad_return_template \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/addbuddy.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/addbuddy.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/addbuddy.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,19 @@ + + + + + + + Select persons.first_names, persons.last_name, persons.person_id , jb_screens.im_screen_name + from jb_screens, persons + where persons.person_id = jb_screens.user_id + and jb_screens.service = 'jabber' + and persons.person_id != :user_id + and jb_screens.screen_id not in (Select friend_screen_id from jb_friends where user_id = :user_id) + + + + + + + Index: openacs-4/packages/jabber/www/admin/addbuddy2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/addbuddy2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/addbuddy2.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,26 @@ +ad_page_contract { + + add buddy to user's roster + @author Luis Mosteiro Fernandez + @creation-date 2002-11-12 + @param username username of the buddy, which should be added + @param user_id + +} { + + user_id:integer + screen_name:notnull + +} + + +db_0or1row get_user_screen_name {} +db_0or1row get_screen_id {} + + +db_dml update_reference {} +db_dml insert_into_jb_friends {} + +set success [jb_addbuddy $im_screen_name $screen_name] + +ns_returnredirect "addbuddy?user_id=$user_id" \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/addbuddy2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/addbuddy2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/addbuddy2.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,32 @@ + + + + + + Select im_screen_name from jb_screens where user_id = :user_id and service = 'jabber' + + + + + + + Select screen_id from jb_screens where im_screen_name = :screen_name and service = 'jabber' + + + + + + + update jb_screens SET refcount = refcount + 1 where im_screen_name = :screen_name and service = 'jabber' + + + + + + + insert into jb_friends (user_id , friend_screen_id) values (:user_id , :screen_id) + + + + + Index: openacs-4/packages/jabber/www/admin/block-group-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/block-group-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/block-group-2.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,32 @@ +ad_page_contract { + + block-group-2.tcl + @author Bjoern Kiesbye + @email bkiesbye@sussdorff-roy.com + +} { + + group_id:integer,notnull + type:notnull + {showe_blocked "true"} +} + + +if { $type == "block" } { + + + catch { [db_dml remove_group_from_conferencing ""] + } errormsg + + catch { [db_dml block_group_for_conferencing ""] + } errormsg + + ns_returnredirect block-group.tcl?showe_blocked=$showe_blocked +} elseif { $type == "unblock"} { + + + catch { [db_dml unblock_group_for_conferencing ""] + } errormsg + + ns_returnredirect block-group.tcl?showe_blocked=$showe_blocked +} Index: openacs-4/packages/jabber/www/admin/block-group-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/block-group-2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/block-group-2.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,25 @@ + + + + + + DELETE FROM jb_conference_groups WHERE group_id = :group_id + + + + + + + INSERT INTO jb_groups_blocked_conference (group_id) values (:group_id) + + + + + + + DELETE FROM jb_groups_blocked_conference WHERE group_id = :group_id + + + + + Index: openacs-4/packages/jabber/www/admin/block-group.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/block-group.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/block-group.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,29 @@ + +Jabber Admin Conference Groups +Conference + + +
    + +
  • @blocked_groups.group_name@ Unblock
  • +
    +
+

Hide this List

+
+ +

Showe List of blocked Groups

+
+ +

Enter a search prefix to find the Group to Block.
+ (Blocking a Group will implicitly remove this Group from the Conference System,
this Group can't be added again as long as the Group is blocked)

+

+ + + + + + \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/block-group.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/block-group.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/block-group.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,48 @@ +ad_page_contract { + + block-group.tcl + @author Bjoern Kiesbye + @email bkiesbye@sussdorff-roy.com + +} { + + group_prefix:optional + {show_blocked "true"} +} + + +if {$show_blocked == "true"} { +multirow create blocked_groups group_name group_id + +db_foreach get_blocked_groups "" { + + + multirow append blocked_groups $group_name $group_id + + } +} + + +set searched_rows "false" + +if { [info exists group_prefix]} { + + set searched_rows "true" + + multirow create searched_groups group_name group_id + + db_foreach get_group_from_prefix "" { + + multirow append searched_groups $cur_group_name $cur_group_id + + } if_no_rows { + + set searched_rows "false" + } +} + +ad_form -name search -action block-group\#result -form { + {show_blocked:text(hidden) {value $show_blocked}} + {group_prefix:text(text) {label ""}} + {sub1:text(submit) {label "Search"}} +} \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/block-group.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/block-group.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/block-group.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,18 @@ + + + + + + SELECT (g.group_name) as group_name , (g.group_id) group_id FROM jb_groups_blocked_conference jgbc , groups g WHERE jgbc.group_id = g.group_id + + + + + + + SELECT (group_id) as cur_group_id , (group_name) as cur_group_name FROM groups g WHERE lower(g.group_name) like(lower('$group_prefix%')) + + + + + Index: openacs-4/packages/jabber/www/admin/chatstart.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/chatstart.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/chatstart.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,23 @@ + +Start Chat + + +

Start Chat:


+ + +

Jabber Client Offline!

+
+ +

Chat started between: @user1@ and @user2@!

+
+ +
+
+
+

Back to admin-page

+ + + + + + Index: openacs-4/packages/jabber/www/admin/chatstart.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/chatstart.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/chatstart.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,28 @@ +ad_page_contract { + + displays whether chat started or not + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @param user1 + @param user2 + +} { + + user1:notnull + user2:notnull + +} -properties { + + user1:onevalue + user2:onevalue + success:onevalue + +} + +set success [jb_chat $user1 $user2] + + +ad_return_template + + + + Index: openacs-4/packages/jabber/www/admin/client.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/client.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/client.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,26 @@ + +Login + +


Login:

+ + +

Jabber Client could not login! See Error Log for details!

+
+ +

Jabber Client logged in! + + Setting Presence failed! See Error Log for details!

+ + + Presence set to 'Online'! + +
+ +
+
+
+

Back to admin-page.

+ + + + Index: openacs-4/packages/jabber/www/admin/client.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/client.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/client.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,19 @@ +ad_page_contract { + + display whether client could login or not + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-10-16 + +} -properties { + + success:onevalue + success_presence:onevalue + +} + + +set success [jb_login] + +set success_presence [jb_setpresence] + +ad_return_template \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/conference.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/conference.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/conference.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,23 @@ + +JABBER CONFERENCE ADMIN + +
+
+ + + +
+Manage Blocking of Groups +
+Add or Remove Users or Groups to/from a Conference Group + +
    + +
  • @groups.group_name@
  • +
    +
      + + + +

      There are no Groups!! You have to create a Group before you can add Users to a Group

      +
      \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/conference.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/conference.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/conference.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,38 @@ +ad_page_contract { + + conference.tcl + Admin Page for Conference Groups + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-10-16 +} -properties { + + +} + +ad_form -name find -action new-group -form { + {group_name:text(text) {label "Find existing    
      group: "}} + {new_group:text(submit) {label "Find"}} +} + +ad_form -name create -action new-group -form { + {group_name:text(text) {label "Create group:"}} + {new_group:text(submit) {label "Create"}} +} + + +set groups_exist "true" + +multirow create groups group_name group_id + + +db_foreach get_conference_groups "" { + + multirow append groups $group_name $group_id + + + } if_no_rows { + + set groups_exist "false" + } + + Index: openacs-4/packages/jabber/www/admin/conference.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/conference.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/conference.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + SELECT (g.group_name) as group_name , (g.group_id) as group_id + FROM jb_conference_groups jcg, groups g + WHERE jcg.conference_only_p = 't' + AND g.group_id = jcg.group_id + + + + + Index: openacs-4/packages/jabber/www/admin/group-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/group-edit.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/group-edit.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,70 @@ + +JABBER CONFERENCE GROUP EDIT + + +
      +

      All members of this Group

      + + + + + + +
      NameStateAction
      @users_list.name@@users_list.member_state@delete
      +
      +
      +

      All Groups of this Conference Group

      + + + + + + + + + + +
      NameAction
      @groups_list.name@remove
      +
      +

      Don't show this list

      +
      + + +

      Show a list of all Members

      +
      + + +Here you can search for Users or Groups to add them to the Conference group @group_name@ ! + + + + + +
      +

      Search for Users who's Last Name starts with:

      +

      +
      +

      Search for Groups who's Name starts with

      +

      +
      + + + + +

      You can add this @multi@ to the Conference group @group_name@

      + +
      + + + +

      You can add this @multi@ to the Conference group @group_name@

      + +
      \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/group-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/group-edit.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/group-edit.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,96 @@ +ad_page_contract { + + group-edit.tcl + Admin Page for Conference Groups + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-10-16 +} { + {user_prefix ""} + {group_prefix ""} + group_id:notnull + group_name:notnull + {list_members "true"} +} -properties { + +} + +set multi "" + +multirow create partys party_id name + +if {$user_prefix != ""} { + + set multi users + + db_foreach get_users_from_prefix "" { + + + multirow append partys $person_id "$first_names $last_name" + } if_no_rows { + + set multi "" + } +} elseif { $group_prefix != ""} { + + set multi groups + + db_foreach get_groups_from_prefix "" { + + + multirow append partys $cur_group_id $cur_group_name + } if_no_rows { + + set multi "" + } + + +} + + + + + +if {$list_members == "true" } { +multirow create users_list name rel_id member_state + +db_foreach get_users_from_this_group "" { + + multirow append users_list "$first_names $last_name" $rel_id $member_state + + } if_no_rows { + + } + + + + +multirow create groups_list name rel_id + + + +db_foreach get_groups_from_this_group "" { + + multirow append groups_list $name $rel_id + + } if_no_rows { + + } + + +} + +ad_form -name user_search -action group-edit\#result -form { + {group_id:text(hidden) {value $group_id}} + {group_name:text(hidden) {value $group_name}} + {list_members:text(hidden) {value $list_members}} + {user_prefix:text(text) {label ""}} + {sub1:text(submit) {label "Search User"}} +} + +ad_form -name group_search -action group-edit\#result -form { + {group_id:text(hidden) {value $group_id}} + {group_name:text(hidden) {value $group_name}} + {list_members:text(hidden) {value $list_members}} + {group_prefix:text(text) {label ""}} + {sub2:text(submit) {label "Search Group"}} +} Index: openacs-4/packages/jabber/www/admin/group-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/group-edit.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/group-edit.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,42 @@ + + + + + + SELECT person_id , first_names , last_name FROM persons p WHERE lower(p.last_name) like(lower('$user_prefix%')) + + + + + + +SELECT (group_id) as cur_group_id , (group_name) as cur_group_name +FROM groups g WHERE lower(g.group_name) like(lower('$group_prefix%')) + + + + + + + SELECT (p.last_name) as last_name , (p.first_names) as first_names , (gmm.rel_id) as rel_id , (mr.member_state) as member_state + FROM persons p, group_member_map gmm, membership_rels mr + WHERE gmm.group_id = :group_id + AND gmm.group_id = gmm.container_id + AND gmm.member_id = p.person_id + AND mr.rel_id = gmm.rel_id + + + + + + + SELECT (g.group_name) as name, (gcm.rel_id) as rel_id + FROM groups g , group_component_map gcm + WHERE gcm.group_id = :group_id + AND gcm.component_id = g.group_id + + + + + + Index: openacs-4/packages/jabber/www/admin/group-state-change-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/group-state-change-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/group-state-change-oracle.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,14 @@ + + + + oracle8.1.6 + + + + begin + composition_rel.delete(:rel_id ); + end; + + + + Index: openacs-4/packages/jabber/www/admin/group-state-change-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/group-state-change-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/group-state-change-postgresql.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,13 @@ + + + + postgresql7.1 + + + + + + SELECT composition_rel__delete(:rel_id ) + + + Index: openacs-4/packages/jabber/www/admin/group-state-change.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/group-state-change.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/group-state-change.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,20 @@ +ad_page_contract { + + group-state-change.tcl + Admin Page for Conference Groups + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-10-16 +} { + group_id:notnull + group_name:notnull + list_members:notnull + rel_id:notnull + +} + + + +db_exec_plsql new_conference_group {} + + +ns_returnredirect "group-edit.tcl?group_name=$group_name&group_id=$group_id&list_members=$list_members" Index: openacs-4/packages/jabber/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/index.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,71 @@ + +JABBER ADMIN PAGE + + +

      JABBER ADMIN PAGE

      +
      + +

      Conference Groups Administration

      +

      Start the JabberApplet

      + + +
      + + + + + + +

      Client Control:

      + + + + + + + + + + + + + +
      Connection State: OFFLINE ONLINE
      + +
      +

      Add New IM-Service:

      + + +
      +

      Show online users

      +
      +

      Show registered users
      Search and register non registered users

      Services view/deactivate

      +
      +

      Add Buddy to User's roster

      +

      Remove Buddy from User's roster

      +
      + + + + + + +

      Send message:

      + + +
      +

      Start Chat:

      + + +
      +
      + + + + + + + + + + Index: openacs-4/packages/jabber/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/index.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,59 @@ +ad_page_contract { + + jabber-admin.tcl + Admin Page for Jabber server + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-10-16 + +} -properties { + + url:onevalue + state:onevalue + user_id:onevalue + +} + + + set url [ad_conn url] + set jconn [jb_getconnstate] + + if {$jconn == "-1"} { + set state 0 + } else { + set state 1 + } + + set user_id [ad_conn user_id] + ad_maybe_redirect_for_registration + +# define the different forms + +ad_form -name login -action client -form { + {Login:text(submit) {label "Log In"}} +} + +ad_form -name logout -action logout -form { + {Logout:text(submit) {label "Log Out"}} +} + +ad_form -name service-add -action service-add -form { + {service:text(text) {label "Service Name:
      (Database reference name)"}} + {pretty_name:text(text) {label "Pretty Name:"}} +} + +ad_form -name message -action message2 -form { + {receive_user:text(text) {label "Username:"}} + {message:text(textarea) {html {cols 25}} {html {rows 5}} {label "Message:"}} + {Send:text(submit)} +} + +ad_form -name chat -action chatstart -form { + {user1:text(text) {label "1.User:"}} + {user2:text(text) {label "2.User:"}} + {Chat:text(submit)} +} + +ad_return_template + + + Index: openacs-4/packages/jabber/www/admin/jabber-users.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/jabber-users.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/jabber-users.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,49 @@ + +Jabber - Jabber Users + + + +

      Jabber Users:


      [refresh] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      UserIDJabberIDPasswordStatusActionView user's roster
      @get_users.user_id@@get_users.screen_name@@get_users.pass@@get_users.regstate@RegisterApprove and RegisterRemove userView buddies
      +

      Jabber Users:


      +

      Actually there are no users registered!

      + +
      +[refresh] +
      +
      +
      +

      Back to admin-page.

      + Index: openacs-4/packages/jabber/www/admin/jabber-users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/jabber-users.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/jabber-users.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,29 @@ +ad_page_contract { + + display registered jabber users + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-10-17 + +} -properties { + + register:onevalue + get_users:multirow + row_check_p:onevalue + +} + + + + + +db_multirow get_users get_users {} { + + set regstate [string trimright $regstate] + set row_check_p 1 + +} if_no_rows { + + set row_check_p 0 +} + +ad_return_template Index: openacs-4/packages/jabber/www/admin/jabber-users.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/jabber-users.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/jabber-users.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,15 @@ + + + + + + + Select (un.user_id) as user_id , (sn.im_screen_name) as screen_name , + (un.jabber_passwd) as pass , (un.jabber_regstate) as regstate + from jb_screens sn , jb_user_jabber_information un + where un.user_id = sn.user_id and sn.service = 'jabber' + + + + + Index: openacs-4/packages/jabber/www/admin/logout.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/logout.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/logout.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,20 @@ + +Logout + + +

      Logout:


      + + +

      Jabber Client could not logout properly! No Connection found!

      +
      + +

      Jabber Client logged out!

      +
      + + +
      +
      +
      +

      Back to admin-page.

      + + Index: openacs-4/packages/jabber/www/admin/logout.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/logout.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/logout.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,16 @@ +ad_page_contract { + + logout page + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + +} -properties { + + success:onevalue + +} + +set success [jb_logout] + + + +ad_return_template Index: openacs-4/packages/jabber/www/admin/message2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/message2-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/message2-oracle.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,13 @@ + + + + oracle8.1.6 + + + + insert into jb_message_log ( message_id , user_id , message , send , conn_state , receive_jid) values ( jb_message_log_seq.nextval , '[ad_get_user_id]' , :message , sysdate , :success , :user_log ) + + + + + Index: openacs-4/packages/jabber/www/admin/message2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/message2-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/message2-postgresql.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,13 @@ + + + + postgresql7.1 + + + + insert into jb_message_log ( message_id , user_id , message , send , conn_state , receive_jid) values ( jb_message_log_seq.nextval , '[ad_get_user_id]' , :message , current_timestamp , :success , :user_log ) + + + + + Index: openacs-4/packages/jabber/www/admin/message2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/message2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/message2.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,24 @@ + +Send Message + +

      Send Message:

      +
      + + + +

      Jabber Client Offline!

      +
      + +

      Following message has been sent to '@receive_user@':

      +
      +

      '@message@'

      +
      +
      + +

      You are not registered

      +
      + +
      +
      +
      +

      Back to admin-page.

      Index: openacs-4/packages/jabber/www/admin/message2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/message2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/message2.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,41 @@ +ad_page_contract { + + inserts messages written on the admin-page into the database + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-10-18 + @param receive_user who shall receive the message + @param message message + +} { + + receive_user:notnull + message:optional + +} + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + +if {[db_0or1row get_name ""]} { + + set register_check_p 1 + set name "([string range $first_names 0 1]. $last_name)\n" + append name $message + set message $name + set user_log "$receive_user" + set success [jb_message $receive_user $message] + db_dml insert_log "" + + + + +} else { + + set register_check_p 0 + +} + + +ad_return_template + + Index: openacs-4/packages/jabber/www/admin/message2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/message2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/message2.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + select first_names , last_name from persons where person_id = :user_id + + + + + Index: openacs-4/packages/jabber/www/admin/new-group-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/new-group-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/new-group-2.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,20 @@ +ad_page_contract { + + new-groups-2.tcl + Admin Page for Conference Groups + @author Bjoern Kiesbye + @email bkiesbye@sussdorff-roy.com + @creation-date 2003-03-13 + +} { + + + group_id:notnull + +} + + +catch { [db_dml add_group_for_conferencing ""] + } errormsg + +ns_returnredirect conference.tcl Index: openacs-4/packages/jabber/www/admin/new-group-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/new-group-2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/new-group-2.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + INSERT INTO jb_conference_groups (group_id) values (:group_id) + + + + + Index: openacs-4/packages/jabber/www/admin/new-group-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/new-group-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/new-group-oracle.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,17 @@ + + + + oracle8.1.6 + + + + declare + id integer; + begin + id := acs_group.new(group_name => :group_name); + insert into jb_conference_groups (group_id) values (id); + end; + + + + Index: openacs-4/packages/jabber/www/admin/new-group-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/new-group-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/new-group-postgresql.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,13 @@ + + + + postgresql7.1 + + + + + + insert into jb_conference_groups (group_id) values (acs_group__new(:group_name)) + + + Index: openacs-4/packages/jabber/www/admin/new-group.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/new-group.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/new-group.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,18 @@ + +Jabber Admin Confernce Groups +1 +

      +This Groups are able to be used with the Conference System ( Blocked Groups will not show up. +If you want to add a previously blocked Group you have to unblock this Group first). +

      + +
        + +
      • @groups.group_name@ Add
      • +
        +
          + + + +

          No Group Name found that starts with "@group_name@" + \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/new-group.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/new-group.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/new-group.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,48 @@ +ad_page_contract { + + new-groups.tcl + Admin Page for Conference Groups + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-12-18 + +} { + + + group_name:notnull + new_group:notnull +} + +set searched_rows "false" + +if {$new_group == "Create"} { + + catch { + db_dml new_conference_group {} + } errormsg + + +ns_returnredirect conference.tcl +ad_script_abort + +} elseif {$new_group == "Find" } { + + set searched_rows true + + multirow create groups group_name group_id + + db_foreach get_group_from_prefix "SELECT (group_id) as cur_group_id , (group_name) as cur_group_name + FROM groups g + WHERE lower(g.group_name) like(lower('$group_name%')) + AND g.group_id NOT IN (SELECT group_id FROM jb_groups_blocked_conference)" { + + multirow append groups $cur_group_name $cur_group_id + + + } if_no_rows { + + set searched_rows "false" + + + } + +} Index: openacs-4/packages/jabber/www/admin/online-users.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/online-users.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/online-users.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,38 @@ + +Jabber - Online Users + + + +

          Online Users:


          [refresh] + + + + + + + + + + + + + + + + + + + + +

          Online Users:


          +
          JabberIDResourceStatusServiceStart a ChatAdd this user to my Roster
          @get_users.im_screen_name@@get_users.resource@@get_users.status@@get_users.service@@ltext@ @get_users.im_screen_name@add to my roster +
          +

          There are no users online!

          + +
          +[refresh] +
          +
          +
          +

          Back to admin-page.

          + Index: openacs-4/packages/jabber/www/admin/online-users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/online-users.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/online-users.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,55 @@ +ad_page_contract { + + display users who are online + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-10-17 + +} -properties { + + caller:onevalue + ltext:onevalue + get_users:multirow + online_check_p:onevalue + statecolour:onevalue + +} + + +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration + + + +if { [db_0or1row reg_request {}] } { + set caller $im_screen_name + set ltext "Start chat" +} else { + set caller "" + set ltext "You are not registered" +} + + +multirow create get_users screen_id status statecolour im_screen_name service resource +db_foreach get_users "select * from jb_screens where status != 'offline'" { + + set online_check_p 1 + + if { $status == "online" } { + set statecolour "green" + } elseif { $status == "away" } { + set statecolour "mediumslateblue" + } elseif { $status == "dnd" } { + set statecolour "navy" + } else { + set statecolour "black" + } + + multirow append get_users $screen_id $status $statecolour $im_screen_name $service $resourc +} if_no_rows { + + set online_check_p 0 + +} + + +ad_return_template \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/online-users.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/online-users.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/online-users.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,19 @@ + + + + + + select * from jb_screens where status != 'offline' + + + + + + +select im_screen_name from jb_screens where user_id= :user_id and service = 'jabber' + + + + + + Index: openacs-4/packages/jabber/www/admin/remove-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/remove-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/remove-oracle.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,17 @@ + + + + oracle8.1.6 + + + + + begin + jb_screen.delete(:user_screen_id); + end; + + + + + + Index: openacs-4/packages/jabber/www/admin/remove-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/remove-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/remove-postgresql.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,13 @@ + + + + postgresql7.1 + + + + Select jb_screen__delete(:user_screen_id); + + + + + Index: openacs-4/packages/jabber/www/admin/remove-user-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/remove-user-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/remove-user-oracle.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,17 @@ + + + + oracle8.1.6 + + + + + begin + membership_rel.delete(:rel_id ); + end; + + + + + + Index: openacs-4/packages/jabber/www/admin/remove-user-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/remove-user-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/remove-user-postgresql.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,13 @@ + + + + postgresql7.1 + + + + Select membership_rel__delete(:rel_id ) + + + + + Index: openacs-4/packages/jabber/www/admin/remove-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/remove-user.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/remove-user.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,20 @@ +ad_page_contract { + + group-edit.tcl + Admin Page for Conference Groups + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-10-16 +} { + group_id:notnull + group_name:notnull + list_members:notnull + rel_id:notnull +} -properties { + +} + + +db_exec_plsql new_conference_group {} + + +ns_returnredirect "group-edit.tcl?group_name=$group_name&group_id=$group_id&list_members=$list_members" \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/remove.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/remove.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/remove.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,17 @@ + +Remove registered user + + +

          Remove registered user

          + + +

          We had problems processing your data, we could not remove the user from the the Jabber server. Database transaction was aborted!

          +
          + + +

          DML statement failed!

          +
          + + +

          DML statement failed!

          +
          \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/remove.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/remove.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/remove.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,73 @@ +ad_page_contract { + + remove user from the jabber server + @author Luis Mosteiro Fernandez + @creation-date 2002-12-10 + @param user_id + @param user the Jabber screenname of the user + +} { + + user_id:integer + user:notnull + +} + +set user_screen_ids [list] +set delete_screens_check 1 +set delete_jabber_information_check 1 + +# remove user from the Jabber server +set success [jb_remove $user] + +# get all screen IDs from user to delete them with the jb_screens_delete func + + +if {$success == "1"} { + + db_foreach get_screen_ids {} { + + lappend user_screen_ids $screen_id + + } + + # delete rows from the database + + for { set i 0 } {$i <= [llenght $user_screen_ids] - 1} {incr i} { + + set user_screen_id [lindex $user_screen_ids $i] + + db_transaction { + + db_exec_plsql jb_screen_delete {} + } on_error { + set delete_screens_check 0 + } + + } + + db_transaction { + + db_dml delete_jabber_information {} + + } on_error { + + set delete_jabber_information_check 0 + + } + + if { $delete_screens_check == "1" && $delete_jabber_information == "1" } { + ns_returnredirect "jabber-users" + } else { + ad_return_template + } + + +} else { + + ad_return_template + +} + + + Index: openacs-4/packages/jabber/www/admin/remove.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/remove.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/remove.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,18 @@ + + + + + + Select screen_id from jb_screens where user_id = :user_id + + + + + + + delete from jb_user_jabber_information where user_id = :user_id + + + + + Index: openacs-4/packages/jabber/www/admin/removebuddy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/removebuddy.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/removebuddy.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,25 @@ +ad_page_contract { + + remove buddy from user's roster + @author Luis Mosteiro Fernandez + @creation-date 2002-11-13 + @param user_id which roster + @param screen_id who should be removed + +} { + + user_id:integer + screen_id:integer + +} + + +db_1row get_user_jid {} +db_1row get_friend_screen_name {} + +db_dml remove_from_jb_friends {} +db_dml decrease_reference {} + +set success [jb_removebuddy $im_screen_name $friend_screen_name] + +ns_returnredirect "view-users-roster?user_id=$user_id&action=remove" \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/removebuddy.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/removebuddy.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/removebuddy.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,32 @@ + + + + + + Select im_screen_name from jb_screens where user_id = :user_id and service = 'jabber' + + + + + + + Select (im_screen_name) as friend_screen_name from jb_screens where screen_id = :screen_id + + + + + + + delete from jb_friends where user_id = :user_id and friend_screen_id = :screen_id + + + + + + + update jb_screens SET refcount = refcount - 1 where screen_id = :screen_id + + + + + Index: openacs-4/packages/jabber/www/admin/service-activate.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/service-activate.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/service-activate.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,17 @@ +ad_page_contract { + + enable a IM-Service + @author Luis Mosteiro Fernandez + @creation-date 2002-11-6 + @param service which service should be activated + +} { + + service:notnull + +} + + +db_dml activate_service {} + +ns_returnredirect "service-view" \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/service-activate.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/service-activate.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/service-activate.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + update jb_services SET active_check_p = 't' where service = :service + + + + + Index: openacs-4/packages/jabber/www/admin/service-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/service-add.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/service-add.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,21 @@ + +Add New Service + + +

          Add New Service

          + + + +

          Insert was successfull, new service is now available!

          + +
          + + +

          Insert failed. Service exists already, maybe it is deactivated, please check following the link + on the admin page! +

          + +
          + +
          +

          Back to admin-page

          \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/service-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/service-add.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/service-add.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,37 @@ +ad_page_contract { + + add new service to jb_services + @author Luis Mosteiro Fernandez + @creation-date 2002-11-6 + @param service database name for the IM-service + @param pretty_name pretty_name for the service + +} { + + service:notnull + pretty_name:notnull + +} -properties { + + insert_check_p:onevalue + +} + + + + +#check, whether service is in the database or not + +if {![db_0or1row get_services {}]} { + + db_dml insert "" + + set insert_check_p 1 + +} else { + + set insert_check_p 0 + +} + +ad_return_template \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/service-add.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/service-add.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/service-add.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,18 @@ + + + + + + Select service , pretty_name from jb_services where service = :service + + + + + + + insert into jb_services (service , pretty_name , active_check_p ) values ( :service , :pretty_name , 't') + + + + + Index: openacs-4/packages/jabber/www/admin/service-deactivate.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/service-deactivate.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/service-deactivate.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,17 @@ +ad_page_contract { + + disable a IM-Service + @author Luis Mosteiro Fernandez + @creation-date 2002-11-6 + @param service which service should be deactivated + +} { + + service:notnull + +} + + +db_dml deactivate_service {} + +ns_returnredirect "service-view" \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/service-deactivate.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/service-deactivate.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/service-deactivate.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + update jb_services SET active_check_p = 'f' where service = :service + + + + + Index: openacs-4/packages/jabber/www/admin/service-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/service-view.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/service-view.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,39 @@ + +Available IM-Services + + +

          Available IM-Services and their activation status

          + + + + + + + + + + + + + + + + + + + + + + + + + + + +

          Sorry, there are no IM-services available! Please add one!

          + +
          +
          Pretty NameService Name (database name)StatusChange Status
          @get_services.pretty_name@@get_services.service@ENABLED        disableDISABLED        enable
          + +
          +

          Back to admin-page

          \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/service-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/service-view.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/service-view.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,25 @@ +ad_page_contract { + + page to display all IM-Services + @author Luis Mosteiro Fernandez + @creation-date 2002-11-6 + +} -properties { + + get_services:multirow + row_check_p:onevalue + +} + +db_multirow get_services get_service {} { + + set row_check_p 1 + +} if_no_rows { + + set row_check_p 0 + +} + +ad_return_template + Index: openacs-4/packages/jabber/www/admin/service-view.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/service-view.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/service-view.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + Select * from jb_services + + + + + Index: openacs-4/packages/jabber/www/admin/user-register-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/user-register-2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/user-register-2.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,35 @@ + +Register user + + +

          Sorry, the IM Service is not avaiable now, please try again later.

          +
          +
          +
          +

          Back to admin-page

          +
          + +

          Register user

          + + + + + + + +
          + + The screen name you typed in is already in use! + + + Please fill in the form to register user with Jabber! + +
          +
          +
          +
          +
          +

          Back to search list +
          +Back to admin-page

          +
          \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/user-register-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/user-register-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/user-register-2.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,34 @@ +ad_page_contract { + + register user through admin page, uses form like the form in the Jabber index page + @author Bjoern Kiesbye bkiesbye@sussdorff-roy.com + @author Luis Mosteiro Fernandez lmosteiro@sussdorff-roy.com + @creation-date 2003-03-06 + @param user_id which user should be registered + @param user_prefix + @param reg_error error code for failed registration + +} { + + user_id:integer,notnull + {user_prefix ""} + {reg_error "nothing"} + +} -properties { + + connstate:onevalue + user_id:onevalue + user_prefix:onevalue + +} + +set connstate [jb_getconnstate] + +ad_form -name user-register -action user-register-3 -form { + {jscreen:text(text) {label "Jabber screen:"}} + {passwd:text(password) {label "Password:"}} + {return_url:text(hidden) {value "index"}} + {user_id:integer(hidden) {value $user_id}} + {user_prefix:text(hidden) {value $user_prefix}} + {Register:text(submit) {value "Register"}} +} \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/user-register-3-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/user-register-3-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/user-register-3-oracle.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,26 @@ + + + + oracle8.1.6 + + + + + declare + id integer; + begin + id := jb_screen.new ( + user_id => :user_id, + im_screen_name => :jscreen, + service => 'jabber', + status => 'offline', + refcount => '1', + object_type => 'jb_screen' + ); + end; + + + + + + Index: openacs-4/packages/jabber/www/admin/user-register-3-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/user-register-3-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/user-register-3-postgresql.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,14 @@ + + + + postgresql7.1 + + + + SELECT jb_screen__new (null , :user_id, :jscreen, 'jabber', + 'offline', '' , '' , '1', 'jb_screen' , null , null , null , null ) + + + + + Index: openacs-4/packages/jabber/www/admin/user-register-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/user-register-3.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/user-register-3.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,51 @@ +ad_page_contract { + + final registration process, checks, whether registration was successful, throws exception and redirects to registration form + @author Bjoern Kiesbye bkiesbye@sussdorff-roy.com + @author Luis Mosteiro Fernandez lmosteiro@sussdorff-roy.com + @creation-date 2003-03-06 + @param user_id which user should be registered + @param jscreen which name should the user have + @param passwd which password will the user have + @param user_prefix + +} { + + user_id:integer,notnull + jscreen:notnull + passwd:notnull + {user_prefix ""} + +} -properties { + +} + + + +set success [jb_register $jscreen $passwd] + +if {$success == "r" } { + + db_exec_plsql new_screen {} + + db_dml create_contact {} + ns_returnredirect "user-register?user_prefix=$user_prefix" + set insert_check_p 1 + +} elseif {$success == "e"} { + + ns_returnredirect "user-register-2?reg_error=exists&user_id=$user_id" + + set insert_check_p 2 + +} else { + + ns_returnredirect "user-register-2?reg_error=offline&user_id=$user_id" + set insert_check_p 3 + +} + +ad_return_template + + + Index: openacs-4/packages/jabber/www/admin/user-register-3.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/user-register-3.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/user-register-3.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + insert into jb_user_jabber_information (user_id , jabber_regstate, jabber_passwd) values (:user_id , 'r', :passwd) + + + + + Index: openacs-4/packages/jabber/www/admin/user-register.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/user-register.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/user-register.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,30 @@ + +Register user to the Jabber Server + +

          Register user to the Jabber Server

          + +

          Here you can search for Users, who are not registered to the Jabber Server yet, so you can register them now!

          + + + +
          +

          Search for Users who's First or Last Name starts with:

          + +
          + + + + +

          You can add this @multi@ to the Jabber Server

          + +
          + + +
          +
          +
          +

          Back to admin-page

          Index: openacs-4/packages/jabber/www/admin/user-register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/user-register.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/user-register.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,53 @@ +ad_page_contract { + + user-register.tcl + Admin Page to register a user + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-03-05 + @param user_prefix search for user with this user_prefix, so admin can register them + +} { + + {user_prefix ""} + +} -properties { + + partys:multirow + multi:onevalue + +} + +set multi "" + + +ad_form -name search -action user-register\#result -form { + {user_prefix:text(text) {value $user_prefix} {label ""}} + {Search:text(submit) {value "Search"}} +} + + + +multirow create partys party_id name + +if {$user_prefix != ""} { + + + set multi users + + + + db_foreach get_users_from_prefix "" { + + multirow append partys $person_id "$first_names $last_name" + + } if_no_rows { + + set multi "" + } + +} + +ad_return_template + + +# \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/user-register.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/user-register.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/user-register.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + SELECT distinct person_id , first_names , last_name FROM persons p WHERE (lower(p.last_name) like(lower('$user_prefix%')) OR lower(p.first_names) like(lower('$user_prefix%'))) and p.person_id not in (Select distinct user_id from jb_screens where user_id is not null) + + + + + Index: openacs-4/packages/jabber/www/admin/user-state-change-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/user-state-change-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/user-state-change-oracle.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,28 @@ + + + + oracle8.1.6 + + + + + begin + membership_rel.delete(:rel_id ); + end; + + + + + + + + + begin + membership_rel.approve(:rel_id ); + end; + + + + + + Index: openacs-4/packages/jabber/www/admin/user-state-change-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/user-state-change-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/user-state-change-postgresql.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,25 @@ + + + + postgresql7.1 + + + + + + Select membership_rel__delete(:rel_id ) + + + + + + + + + Select membership_rel__approve(:rel_id ) + + + + + + Index: openacs-4/packages/jabber/www/admin/user-state-change.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/user-state-change.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/user-state-change.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,36 @@ +ad_page_contract { + + group-edit.tcl + Admin Page for Conference Groups + @author Bjoern Kiesbye, Luis Mosteiro Fernandez + @creation-date 2002-10-16 +} { + group_id:notnull + group_name:notnull + list_members:notnull + rel_id:notnull + new_state:notnull +} -properties { + +} + +if {$new_state == "deleted" } { + +db_exec_plsql new_conference_group_delete { + begin + membership_rel.delete(:rel_id ); + end; +} +} elseif {$new_state == "approved" } { + +db_exec_plsql new_conference_group_approve { + begin + membership_rel.approve(:rel_id ); + end; +} + + +} + + +ns_returnredirect "group-edit.tcl?group_name=$group_name&group_id=$group_id&list_members=$list_members" \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/view-communities-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-communities-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-communities-oracle.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,31 @@ + + + + oracle8.1.6 + + + + + select dotlrn_communities.community_id, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name, + dotlrn_communities.description, + dotlrn_communities.package_id, + dotlrn_community.url(dotlrn_communities.community_id) as url, + dotlrn_member_rels_approved.rel_type, + dotlrn_member_rels_approved.role, + '' as role_pretty_name, + decode(dotlrn_community_admin_p(dotlrn_communities.community_id, dotlrn_member_rels_approved.user_id),'f',0,1) as admin_p + from dotlrn_communities, + dotlrn_member_rels_approved + where dotlrn_member_rels_approved.user_id = :user_id + and dotlrn_communities.community_id = dotlrn_member_rels_approved.community_id + and dotlrn_communities.community_type != 'dotlrn_community' + order by dotlrn_communities.pretty_name + + + + + + + Index: openacs-4/packages/jabber/www/admin/view-communities-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-communities-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-communities-postgresql.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,32 @@ + + + + postgresql7.1 + + + + FIX ME DECODE + + select dotlrn_communities.community_id, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name, + dotlrn_communities.description, + dotlrn_communities.package_id, + dotlrn_community__url(dotlrn_communities.community_id) as url, + dotlrn_member_rels_approved.rel_type, + dotlrn_member_rels_approved.role, + '' as role_pretty_name, + decode(dotlrn_community_admin_p(dotlrn_communities.community_id, dotlrn_member_rels_approved.user_id),'f',0,1) as admin_p + from dotlrn_communities, + dotlrn_member_rels_approved + where dotlrn_member_rels_approved.user_id = :user_id + and dotlrn_communities.community_id = dotlrn_member_rels_approved.community_id + and dotlrn_communities.community_type != 'dotlrn_community' + order by dotlrn_communities.pretty_name + + + + + + + Index: openacs-4/packages/jabber/www/admin/view-communities.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-communities.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-communities.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,46 @@ + +View User's Communities + + +

          This are the groups and communities this user is member of

          + + + +

          Following is a list of groups:

          + + + +
          + +

          The user is not member of any group!

          +
          + +
          + + + +

          Following is a list of dotlrn communities:

          + + + + + + + + + + + + + + +
          Community TypeCommunity NameView members
          @get_dotlrn_communities.community_type@@get_dotlrn_communities.pretty_name@View
          + +
          + +

          The user is not member of a dotlrn community!

          +
          \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/view-communities.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-communities.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-communities.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,51 @@ +ad_page_contract { + + view the communities the user is member of + @author Luis Mosteiro Fernandez + @creation-date 2002-12-4 + @param user_id which user + +} { + + user_id:integer + +} -properties { + + dotlrn_row_check_p:onevalue + get_dotlrn_communities:multirow + groups_row_check_p:onevalue + get_groups:multirow + user_id:onevalue + +} + + +set dotlrn_row_check_p 0 + + +if {![db_0or1row check_dotlrn "select * from apm_packages where instance_name = 'dotlrn'"]} { + +db_multirow get_dotlrn_communities get_dotlrn_communities {} { + + set dotlrn_row_check_p 1 + +} if_no_rows { + + set dotlrn_row_check_p 0 + +} + +} + + +db_multirow get_groups get_groups {} { + + set groups_row_check_p 1 + +} if_no_rows { + + set groups_row_check_p 0 + +} + +ad_return_template \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/view-communities.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-communities.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-communities.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,28 @@ + + + + + + select * from apm_packages where instance_name = 'dotlrn' + + + + + + + + + select gr.group_name , gr.group_id + from groups gr, group_approved_member_map grm + where grm.member_id = :user_id + and gr.group_id = grm.group_id + and gr.group_id > 1 + and gr.group_name != 'Main Site Parties' + and gr.group_name != 'subsite Parties' + + + + + + + Index: openacs-4/packages/jabber/www/admin/view-community-members.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-community-members.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-community-members.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,21 @@ + +View Community Members + + +

          These are the members of the selected dotlrn community.

          +

          Please take under consideration that not all user's displayed are registered users in our Jabber server!

          + + +

          Select the user's you want to add.

          +

          + + + + @users.first_names@   @users.last_name@ (@users.role@)
          +
          +

          +

          + +

          + Index: openacs-4/packages/jabber/www/admin/view-community-members.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-community-members.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-community-members.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,26 @@ +ad_page_contract { + + view members of an dotlrn community + @author Luis Mosteiro Fernandez + @creation-date 2002-12-04 + @param community_id + +} { + + community_id:integer + user_id:integer + +} -properties { + + users:multirow + +} + +#Get members +set community_members [dotlrn_community::list_users $community_id] + +template::util::list_of_ns_sets_to_multirow \ + -rows $community_members \ + -var_name "users" + +ad_return_template \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/view-group-members.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-group-members.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-group-members.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,15 @@ + +View Group Members + + +

          These are the members of the selected group and registered users in our Jabber server without users, who are in your buddy list already!

          + + + +

          Please select the user's you want to add

          + + +
          + +

          You already have all users of these group on your buddy list!

          +
          \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/view-group-members.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-group-members.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-group-members.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,43 @@ +ad_page_contract { + + view members of a group + @author Luis Mosteiro Fernandez + @creation-date 2002-12-04 + @param group_id which group + @param user_id to which user + +} { + + group_id:integer + user_id:integer + +} -properties { + + get_group_members:multirow + member_row_check_p:onevalue + +} + +set row_count 0 + +ad_form -name group_members -action add-group-members -form { + {user_id:text(hidden) {value $user_id}} +} + +db_foreach get_group_members {} { + set options [list [list "" $person_id]] + incr row_count + template::element create group_members group_members.$row_count -datatype text -widget checkbox -label "$first_names $last_name" -options $options + set member_row_check_p 1 + +} if_no_rows { + set member_row_check_p 0 +} + +ad_form -extend -name group_members -form { + {rows:integer(hidden) {value $row_count}} +} + +ad_return_template + + \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/view-group-members.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-group-members.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-group-members.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,20 @@ + + + + + + + Select pe.person_id , pe.first_names , pe.last_name + from persons pe, group_approved_member_map grm , jb_screens js + where grm.group_id = :group_id + and pe.person_id = grm.member_id + and pe.person_id = js.user_id + and js.service = 'jabber' + and pe.person_id != :user_id + and js.screen_id not in (Select friend_screen_id from jb_friends where user_id = :user_id) + + + + + + Index: openacs-4/packages/jabber/www/admin/view-users-roster.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-users-roster.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-users-roster.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,66 @@ + +View user's roster or buddy list + + + + + +

          Internal buddies

          + + + + + + + + + + + + + + + + + +
          First NamesLast NameService
          @internal_buddies.first_names@@internal_buddies.last_name@@internal_buddies.service@Remove
          +
          + +

          Sorry, no internal buddies

          +
          + +

          External buddies

          + + + + + + + + + + + + + + + + + +
          First NamesLast NameService
          @external_buddies.friend_first_name@@external_buddies.friend_last_name@@external_buddies.service@Remove
          +
          + +

          Sorry, no external buddies

          +
          +
          + +

          This user has no buddies in his roster

          +
          + + +
          + Add buddies to this user +
          + +
          +

          Back to admin-page

          Index: openacs-4/packages/jabber/www/admin/view-users-roster.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-users-roster.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-users-roster.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,31 @@ +ad_page_contract { + + view user's roster or buddy list + @author Luis Mosteiro Fernandez + @creation-date 2002-11-12 + @param user_id who's roster do you want to see + @param action what do you want to do with user's roster + +} { + + user_id:integer + action:notnull + +} -properties { + + row_check_p:onevalue + action:onevalue + internal_buddies:multirow + external_buddies:multirow + +} + +set row_check_p 0 + +db_multirow internal_buddies get_internal {} { + set row_check_p [expr $row_check_p + 1] +} + +db_multirow external_buddies get_external {} { + set row_check_p [expr $row_check_p + 2] +} Index: openacs-4/packages/jabber/www/admin/view-users-roster.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-users-roster.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-users-roster.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,31 @@ + + + + + + + Select persons.first_names, persons.last_name, jb_screens.screen_id, jb_screens.service + from jb_screens, persons + where persons.person_id = jb_screens.user_id + and jb_screens.user_id is not null + and jb_screens.screen_id IN (Select friend_screen_id from jb_friends where user_id = :user_id) + + + + + + + + + Select jb_friends.friend_first_name, jb_friends.friend_last_name , jb_screens.screen_id , jb_screens.service + from jb_friends , jb_screens + where jb_friends.user_id = :user_id + and friend_first_name is not null + and friend_last_name is not null + and jb_friends.friend_screen_id = jb_screens.screen_id + + + + + + Index: openacs-4/packages/jabber/www/admin/view-users.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-users.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-users.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,28 @@ + +Select a user + + +

          Please select a user to @action@ buddies

          + + + + + + + + + + + + + + +
          First NameLast Name
          @get_users.first_names@@get_users.last_name@Select
          +
          + +

          Sorry, there are no jabber-users

          +
          + +
          + +

          Back to admin-page

          \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/view-users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-users.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-users.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,31 @@ +ad_page_contract { + + view of jabber users, so the admin can choose for which user he wants to add or remove buddies + @author Luis Mosteiro Fernandez + @creation-date 2002-11-12 + @param action , what does the admin want to do with user's roster, add or remove buddies + +} { + + action:notnull + +} -properties { + + row_check_p:onevalue + action:onevalue + get_users:multirow + +} + +db_multirow get_users get_users {} { + set row_check_p 1 + +} if_no_rows { + + set row_check_p 0 + +} + + + +ad_return_template \ No newline at end of file Index: openacs-4/packages/jabber/www/admin/view-users.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/admin/view-users.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/admin/view-users.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,16 @@ + + + + + + + Select persons.first_names, persons.last_name, persons.person_id + from jb_screens, persons + where persons.person_id = jb_screens.user_id + and jb_screens.service = 'jabber' + + + + + + Index: openacs-4/packages/jabber/www/conference/JabberApplet.jar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/JabberApplet.jar,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/conference/append-chat-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/append-chat-2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/append-chat-2.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,9 @@ + +Jabber +conference + +

          +The Topic '@topic@' , in Room '@room_name@' cant be appended.
          +Reason: The IM System is not available, or the Room is not spelled correctly. + +

          \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/append-chat-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/append-chat-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/append-chat-2.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,30 @@ +ad_page_contract { + append-chat.tcl + author: bkiesbye@sussdorff-roy.com + 26.2.2003 +} { + + room_name:notnull + thread_id:notnull + subject:notnull + {display_status "true"} + {party_id "0"} + {room_id "0"} + +} + + + +set ret [jb_append_subject $room_name $subject $subject $thread_id] +ns_log notice "thread_id in append_chat-2.tcl ghj $thread_id" + +if { $ret == "0"} { +ns_returnredirect recorded-chat.tcl?name=$room_name&thread_id=$thread_id&party_id=$party_id&subject=$subject&display_status=$display_status&room_id=$room_id + +ad_script_abort + +} else { + +ad_return_template + +} \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/append-chat.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/append-chat.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/append-chat.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,28 @@ + +Jabber +conference + +

          +The Room '@room_name@' is Active, at the moment the Topic '@current_subject@' is disscused.
          If you change the Topic, everything submitted to this Room will be appended to the discussion on Topic '@subject@'. +

          + +Room: @room_name@
          Current Topic: @current_subject@
          New Topic: @subject@
          + +

          + + + + + +
          Users in this Room
          @members.nick@
          +

          + +

          +Are you sure you want to +change the Topic to @subject@ ? +

          + +

          +or you rather +return , and don't change anything ? +

          \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/append-chat.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/append-chat.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/append-chat.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,58 @@ +ad_page_contract { + append-chat.tcl + author: bkiesbye@sussdorff-roy.com + 26.2.2003 +} { + + room_name:notnull + thread_id:notnull + subject:notnull + {display_status "true"} + {party_id "0"} + {room_id "0"} + +} + +set current_subject "Unknowen" + +set active_rooms "-1" + +set active_members [jb_activeroommembers $room_name] + +if {$active_members == -1} { +ns_returnredirect append-chat-2.tcl?room_name=$room_name&thread_id=$thread_id&party_id=$party_id&subject=$subject$display_status=display_status&room_id=$room_id +} else { + set active_rooms [jb_activeconferencerooms] + if {$active_rooms != -1} { + + set rooms_count [ns_set size $active_rooms] + + for {set i 0 } {$i < $rooms_count} {incr i} { + if { [ns_set key $active_rooms $i ] == $room_name } { + set current_subject "[ns_set value [ns_set value $active_rooms $i ] 1 ]" + + } + } + } + + + + + set member_count [ns_set size $active_members] + + multirow create members nick color + + if {$member_count != -1} { + + for {set j 0} {$j < $member_count } {incr j} { + + set cur_member [ns_set value $active_members $j] + multirow append members [ns_set value $cur_member 0] [jb_get_link_color_from_state [ns_set value $cur_member 2 ]] + + } + + } + + + +} \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/create-room.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/create-room.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/create-room.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,9 @@ + +Jabber +conference + + + +

          Before you can invite Users to a Room you may have to Restart it, or you may have to create a fully new one

          +

          + \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/create-room.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/create-room.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/create-room.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,41 @@ +ad_page_contract { + + create-room.tcl + +} { + + party_id:notnull + {create "false"} + {return_url "index"} + +} -properties { + + jid:onevalue + +} + +set jid "bjoern@jabber.org" + +set user_id [ad_conn user_id] + +if {[db_0or1row get_user_screen "" ]} { + + + set jid [jb_create_jid $im_screen_name jabber] + +} else { + + set jid "bjoern@jabber.org" + +} + +ad_form -name room_create -action room-create -form { + {party_id:text(hidden) {value $party_id}} + {create:text(hidden) {value $create}} + {roomname:text(text) {label "Please Enter the
          Name of the Room:
          "} {html {size 75}}} + {roomsubject:text(text) {label "Please Enter a short
          description of the Room:
          "} {html {size 75}} {value "Not specified"}} + {jid:text(text) {label "Your Jabber ID:"} {value $jid} {html {size 40}}} + {threadname:text(text) {label "New topics name:"} {value "Not specified"} {html {size 75}}} + {threadsubject:text(text) {label "New topics description:"} {value "Not specified"} {html {size 75}}} + {sub1:text(submit) {label "Create room"}} +} \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/create-room.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/create-room.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/create-room.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + Select im_screen_name FROM jb_screens WHERE user_id = :user_id AND service = 'jabber' + + + + + Index: openacs-4/packages/jabber/www/conference/help.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/help.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/help.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,62 @@ + +Jabber + + + +

          +-Rooms
          +Rooms describe a chat between 2 or more Persons everything you write to the +Room will be recorded (stored ) , so in case you want to lock up something +you have been discussing (Your Homework’s , or the Planing of a new +Business Project ) Yesterday , last week or may even a year ago , you can +go to the Group main Page ( Business ). and browse to the Room to read the +old discussion. +

          + + +

          +-Topics
          +Topics separate Rooms in logical blocks , so you can have a Room in your +Business Group for Daily_meetings, you can then separate this Room in Topics +like Monday-morning , Monday-midday , Tuesday-morning and so on. You can +never discuss two Topics in one Room at the same time. So in case you have +to split your Group on Tuesday-midday in to two parts, so part 1 can discuss +Project A and part 2 can discuss Project B you can start a new Room to discuss +Project B. The easiest way to start this kind of new Room is to go to the +index Page, you will find the actual discussion ‘Tuesday-midday’ +in the new Topics section . Click on the Read Link to display what you already +discussed on Tuesday-midday (i.e. that you have to split), click on one +of the first names to start a new Room , this Room will then be displayed +next to the Tuesday-midday Topic in the Rooms and Topic hierarchy. You can +go on to the invite Page to invite the rest of the Persons who should work +in Part 2 on Project B. +

          +

          + + +- Index Page
          + Here you find a list with all Groups you are a Member of, following this +Link will bring you to the Conference main Page of this Group. Below the +you find a list with all new topics , that have been discussed in the Groups +you are a Member of , since your Last visit. +

          +

          + +- main Page
          + On the Main Page of a Group you find all Rooms and Topics ordered in a hierarchy. +You can browse the topics and may create new Rooms and/or Topics that you +want to discuss . After you created a Room you can invite other Members of + this Group to join your new Room to discuss the new topic. +

          +

          +-recorded-chat Page
          +When you read a recorded Chat you will find that the first Names of the members +in every Row are Links. Clicking this Link will automatically create a new +Room, this Room will bee placed right next to the Topic from where you started +it , in the Room and Topics hierarchy on the main Page. You and the Person +who’s first name you clicked will automatically receive an invite to +the new Room. Thais is you should use this Link to discuss subtopics , +or in some cases further questions. The preferred way to discuss further +questions is to Enter or to Restart the Room in which the Topic has been +discussed (you can do this from the main Page). +

          \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/help.htm =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/help.htm,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/help.htm 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,53 @@ + +Jabber +@context@ + + + +-Rooms +Rooms describe a chat between 2 or more Persons everything you write to the +Room will be recorded (stored ) , so in case you want to lock up something +you have been discussing (Your Homework’s , or the Planing of a new +Business Project ) Yesterday , last week or may even a year ago , you can +go to the Group main Page ( Business ). and browse to the Room to read the +old discussion. + +-Topics +Topics separate Rooms in logical blocks , so you can have a Room in your +Business Group for Daily_meetings, you can then separate this Room in Topics +like Monday-morning , Monday-midday , Tuesday-morning and so on. You can +never discuss two Topics in one Room at the same time. So in case you have +to split your Group on Tuesday-midday in to two parts, so part 1 can discuss +Project A and part 2 can discuss Project B you can start a new Room to discuss +Project B. The easiest way to start this kind of new Room is to go to the +index Page, you will find the actual discussion ‘Tuesday-midday’ +in the new Topics section . Click on the Read Link to display what you already +discussed on Tuesday-midday (i.e. that you have to split), click on one +of the first names to start a new Room , this Room will then be displayed +next to the Tuesday-midday Topic in the Rooms and Topic hierarchy. You can +go on to the invite Page to invite the rest of the Persons who should work +in Part 2 on Project B. + + +- Index Page + Here you find a list with all Groups you are a Member of, following this +Link will bring you to the Conference main Page of this Group. Below the +you find a list with all new topics , that have been discussed in the Groups +you are a Member of , since your Last visit. + +- main Page + On the Main Page of a Group you find all Rooms and Topics ordered in a hierarchy. +You can browse the topics and may create new Rooms and/or Topics that you +want to discuss . After you created a Room you can invite other Members of + this Group to join your new Room to discuss the new topic. + +-recorded-chat Page +When you read a recorded Chat you will find that the first Names of the members +in every Row are Links. Clicking this Link will automatically create a new +Room, this Room will bee placed right next to the Topic from where you started +it , in the Room and Topics hierarchy on the main Page. You and the Person +who’s first name you clicked will automatically receive an invite to +the new Room. Thais is you should use this Link to discuss subtopics , +or in some cases further questions. The preferred way to discuss further +questions is to Enter or to Restart the Room in which the Topic has been +discussed (you can do this from the main Page). Index: openacs-4/packages/jabber/www/conference/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/index.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,32 @@ + +Jabber +Conference +

          Help

          +

          Visite Conferences of Group:

          + + + + +

          New Topics since your last Visit!

          +
            + + +
          1. @rooms_table.room_name@ + + Enter + + + Restart + + + @rooms_table.thread_table@
          2. +
            + + + + You don't have access to any rooms Yet + \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/index.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,113 @@ +ad_page_contract { + + + @cvs-id index.tcl, + @creation-date 04/12/02 + @author bkiesbye@sussdorff-roy.com + + +} -properties { + + + + room_table:multirow + context:onevalue + is_room_table:onevalue + time:onevalue + groups:multirow +} + +set time [ns_time] + +set active "false" + +set active_value "-1" + +set context "" + +set user_id [ad_conn user_id] + +set is_room_table "true" + +set thread_list "" + +set active_rooms [jb_activeconferencerooms] + +if {$active_rooms != -1} { + + set room_count [ns_set size $active_rooms] +} else { + + set room_count "-1" +} + + + + +if {[db_0or1row get_last_visit ""]} { + set last_visit_t $last_visit + } + + +multirow create groups group_name group_id + +db_foreach groups_of_this_user "" { + + multirow append groups $group_name $group_id +} + + +multirow create rooms_table room_name room_id active thread_table active_value party_id + + +db_foreach get_conference_group_rooms "" { + + + + if {$room_count != -1} { + + set active "false" + set active_value "-1" + + for {set i 0 } {$i < $room_count} {incr i} { + if { [ns_set key $active_rooms $i ] == $room_name } { + set active "true" + set active_value [jb_invite_user $room_name 2 index.tcl] + } + } + + } + + + + +set thread_list "
              " + +db_foreach get_new_conference_threads "" { + + + append thread_list "
            1. $subject $start_time View Log
            2. " + + + } if_no_rows { + + set thread_list "" + } + + + if { $thread_list != ""} { + append thread_list "
            " + + + + + multirow append rooms_table $room_name $room_id $active $thread_list $active_value $party_id + + set thread_list "" + } + + } if_no_rows { + + + set is_room_table "false" + } \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/index.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/index.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,48 @@ + + + + + + select last_visit FROM users WHERE user_id = :user_id + + + + + + + SELECT (gp.group_name) as group_name , (gp.group_id) as group_id + FROM group_distinct_member_map gdmm , groups gp , jb_conference_groups jcg + WHERE gdmm.member_id = :user_id + AND gdmm.group_id = jcg.group_id + AND gdmm.group_id = gp.group_id + + + + + + SELECT (jrpm.party_id) as party_id , (jrpm.room_id) as room_id , (jcr.name) as room_name + FROM + group_distinct_member_map gdmm , + jb_room_party_map jrpm , + jb_conference_rooms jcr , + jb_conference_groups jcg + WHERE gdmm.member_id = :user_id + AND gdmm.group_id = jcg.group_id + AND gdmm.group_id = jrpm.party_id + AND jcr.room_id = jrpm.room_id + ORDER BY gdmm.group_id + + + + + + + SELECT thread_id , subject , start_time + FROM jb_conference_room_threads + WHERE room_id = :room_id + AND start_time > to_date(:last_visit , 'YYYY-MM-DD') + + + + + Index: openacs-4/packages/jabber/www/conference/index2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/index2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/index2.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,26 @@ + +Jabber +@context@ +

            Bold entrys indicate Rooms, Rooms are indexed by Upper Letters . If there is some one in the Room you can enter the Room. +If there is no one in the Room you can Restart it

            +

            Plain Entrys are indexed by numbers, they describe topics that where discussed in the above Room , you can Read the discussions.
            Every Topic may have one ore more Room Entrys diplayed just beneath them , those Rooms where created to to discuss a sub Topic of the above displayed major Topic

            + +
              + + +
            1. @rooms_table.room_name@ + + Enter + + + Restart + + + @rooms_table.thread_table@

            2. + +
              +
            +
            + + You don't have access to any rooms Yet + \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/index2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/index2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/index2.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,107 @@ +ad_page_contract { + + + @cvs-id index.tcl, + @creation-date 04/12/02 + @author bkiesbye@sussdorff-roy.com + + +} { + + last_visit:optional + +} -properties { + + + + room_table:multirow + context:onevalue + is_room_table:onevalue + time:onevalue +} + +set time [ns_time] + + +set context "" + +set user_id [ad_conn user_id] + +set is_room_table "true" + + +set active_rooms [jb_activeconferencerooms] + +if {$active_rooms != -1} { + + set room_count [ns_set size $active_rooms] +} else { + + set room_count "-1" +} + + +if {![info exists last_visit]} { + +if {[db_0or1row get_last_visit ""]} { + set last_visit_t $last_visit + } +} elseif {$last_visit == -1} { + +if {[db_0or1row get_last_visit_2 ""]} { + set last_visit_t $last_visit + } + + +} + + +multirow create rooms_table room_name room_id active thread_table active_value party_id + + +db_foreach get_conference_group_rooms "" { + + + + if {$room_count != -1} { + + set active "false" + set active_value "-1" + + for {set i 0 } {$i < $room_count} {incr i} { + if { [ns_set key $active_rooms $i ] == $room_name } { + set active "true" + set active_value [jb_invite_user $room_name 1 index.tcl] + } + } + + } + + + + + +set thread_table "
              " + db_foreach get_new_conference_threads "" { + + append thread_table "
            1. $subject $start_time Read [jb_get_room_thread_tree $thread_id $party_id $active_rooms $last_visit]
            2. " + + } if_no_rows { + append thread_table "
            3. Nothing new
            4. " + + + } + + +append thread_table "
            " + + multirow append rooms_table $room_name $room_id $active $thread_table $active_value $party_id + + + + + } if_no_rows { + + + set is_room_table "false" + } \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/index2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/index2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/index2.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,40 @@ + + + + + + select last_visit FROM users WHERE user_id = :user_id + + + + + + +select (last_visit - 1000) as last_visit FROM users WHERE user_id = :user_id + + + + + + + SELECT (jrpm.party_id) as party_id , (jrpm.room_id) as room_id , (jcr.name) room_name + FROM group_distinct_member_map gdmm , jb_room_party_map jrpm , jb_conference_rooms jcr + WHERE gdmm.member_id = :user_id + AND gdmm.group_id = jrpm.party_id + AND jcr.room_id = jrpm.room_id + ORDER BY jcr.name + + + + + + + SELECT thread_id , subject , start_time + FROM jb_conference_room_threads + WHERE room_id = :room_id + + + + + + Index: openacs-4/packages/jabber/www/conference/invit-group.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/invit-group.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/invit-group.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,100 @@ +ad_page_contract { + + + @cvs-id invite-group.tcl, + @creation-date 04/12/02 + @author bkiesbye@sussdorff-roy.com + + +} { + group_id:integer,notnull + + +} -properties { + + + + users_table:multirow + context:onevalue + is_users_table:onevalue + +} + +set is_rooms_table "true" + +set active_rooms [jb_activeconferencerooms] + +if {$active_rooms != -1} { + + set room_count [ns_set size $active_rooms] +} else { + + set room_count "-1" +} + +multirow create active_rooms_table name + +multirow create closed_rooms_table name + + +db_foreach get_rooms_from_group "SELECT (jcr.name) as room_name + FROM jb_room_party_map jrpm , jb_conference_rooms jcr + WHERE jrpm.party_id = :group_id + AND jcr.room_id = jrpm.room_id + AND lower(jcr.type) != 'child' + ORDER BY jcr.name" { + + + if {$room_count != -1} { + + multirow append closed_rooms_table $room_name + for {set i 0 } {$i < $room_count} {incr i} { + if { [ns_set key $active_rooms $i ] == $room_name } { + + multirow append active_rooms_table $room_name + + } else { + + multirow append closed_rooms_table $room_name + + } + } + + } + + + + multirow append closed_rooms_table $room_name + } if_no_rows { + + set is_rooms_table "false" +} + + + + + +multirow create users_table first_name last_name screen status + +db_foreach get_users_from_group "SELECT (pe.first_names) as first_name , (pe.last_name) as last_name , (js.im_screen_name) as screen , (js.status) as status + FROM group_distinct_member_map gdmm , jb_screens js, persons pe + WHERE gdmm.member_id = js.user_id + AND gdmm.member_id = pe.person_id + AND js.service = 'jabber' + AND gdmm.group_id = :group_id + ORDER BY last_name" { + + + +#AND js.status = 'offline' + + +append screen "@" +append screen [jb_get_transport_url_from_id [jb_get_transport_id_from_symbol jabber ]] + + +multirow append users_table $first_name $last_name $screen [jb_get_link_color_from_state $status] + + +} + Index: openacs-4/packages/jabber/www/conference/invite-group-1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/invite-group-1.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/invite-group-1.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,16 @@ + +Jabber +@context@ + + +

            Inviting Users to a Conference:

            + + +

            Here you can select the users you want to Invite to the Conference Room,
            + @room_name@
            + you can select more than one user, but you have to select at least one user +

            + + + +
            \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/invite-group-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/invite-group-1.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/invite-group-1.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,44 @@ +ad_page_contract { + + @email bkiesbye@sussdorff-roy.com +} { + room_name:notnull + group_id:notnull,integer +} + +template::form create invite -action invite-group-2 + +set context 0 +set user_checkbox_options [list] + + +multirow create users_table first_name last_name screen status + + + +db_foreach get_users_from_group "" { + + + +append screen "@" +append screen [jb_get_transport_url_from_id [jb_get_transport_id_from_symbol jabber ]] + + +set user_checkbox_options [concat [list [list "$first_name $last_name" $screen]] $user_checkbox_options] +multirow append users_table $first_name $last_name $screen [jb_get_link_color_from_state $status] + + +} if_no_rows { + + + set is_users_table "false" +} + +# form template invite + +template::element create invite jids -datatype text -widget checkbox -label "Select users" -options $user_checkbox_options -optional +template::element create invite room_subject -datatype text -widget text -label "The topic you want to discuss:" -optional +template::element create invite msg -datatype text -widget textarea -label "A short message to
            the user you want to invite:" -optional +template::element create invite room_name -datatype text -widget hidden -label -value $room_name +template::element create invite sub-invite -datatype text -widget submit -label "Invite" + Index: openacs-4/packages/jabber/www/conference/invite-group-1.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/invite-group-1.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/invite-group-1.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,18 @@ + + + + + + SELECT (pe.first_names) as first_name , (pe.last_name) as last_name , (js.im_screen_name) as screen , (js.status) as status + FROM group_distinct_member_map gdmm , jb_screens js, persons pe + WHERE gdmm.member_id = js.user_id + AND gdmm.member_id = pe.person_id + AND js.service = 'jabber' + AND js.status != 'offline' + AND gdmm.group_id = :group_id + ORDER BY last_name + + + + + Index: openacs-4/packages/jabber/www/conference/invite-group-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/invite-group-2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/invite-group-2.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,29 @@ +ad_page_contract { + + conf-room-create.tcl + +} { + + room_name:notnull + {room_subject "Not specified"} + {msg "Not specified"} + jids:notnull,multiple + + {return_url "index.tcl"} + {version "1"} +} + +set length [llength $jids] + + +for {set i 0} {$i < $length} {incr i} { + + set suc [jb_invite [lindex $jids $i] $room_name $room_subject $msg $version ] + + ns_log Notice "hello" + +} + + + +ns_returnredirect $return_url Index: openacs-4/packages/jabber/www/conference/invite-group.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/invite-group.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/invite-group.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,20 @@ + +Jabber +@context@ + + +

            Inviting Users to a Conference:

            + + +

            Please select first a conference room to which you want to invite users. +

            + + + + +
            +
            + + +

            Before you can invite Users to a Room you may have to Restart it, or you may have to create a fully new one

            + Index: openacs-4/packages/jabber/www/conference/invite-group.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/invite-group.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/invite-group.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,121 @@ +ad_page_contract { + + + @cvs-id invite-group.tcl, + @creation-date 04/12/02 + @author bkiesbye@sussdorff-roy.com + + +} { + group_id:integer,notnull + {return_url "index.tcl"} + +} -properties { + + + + active_rooms_table:multirow + closed_rooms_table:multirow + users_table:multirow + context:onevalue + is_users_table:onevalue + +} + +set is_rooms_table "true" + +set context "" + +set active_rooms [jb_activeconferencerooms] + +set user_id [ad_conn user_id] + +if {[db_0or1row get_user_screen "" ]} { + + set jid [jb_create_jid $im_screen_name jabber] +} + +if {$active_rooms != -1} { + + set room_count [ns_set size $active_rooms] +} else { + + set room_count "-1" +} + +template::form create invite -action invite-group-1 +template::form create create -action room-create + +set user_checkbox_options [list] +set active_select_options [list] +set closed_select_options [list] + +multirow create active_rooms_table name + +multirow create closed_rooms_table name + + +db_foreach get_rooms_from_group "" { + + + if {$room_count != -1} { + + set active_r false + + for {set i 0 } {$i < $room_count} {incr i} { + if { [ns_set key $active_rooms $i ] == $room_name } { + + set active_select_options [concat [list [list $room_name $room_name]] $active_select_options] + multirow append active_rooms_table $room_name + set active_r true + } + } + + + if { $active_r == "true"} { + + set active_r false + + } else { + + set closed_select_options [concat [list [list $room_name $room_name]] $closed_select_options] + multirow append closed_rooms_table $room_name + + + } + + + + } else { + + set closed_select_options [concat [list [list $room_name $room_name]] $closed_select_options] + + multirow append closed_rooms_table $room_name + + } + + + + + } if_no_rows { + + set is_rooms_table "false" +} + + + + + + +# form template invite + +template::element create invite room_name -datatype text -widget select -label "Select room" -options $active_select_options +template::element create invite sub-invite -datatype text -widget submit -label "Invite" +template::element create invite group_id -datatype text -widget hidden -value $group_id +# form template create +template::element create create roomname -datatype text -widget select -label "Select room" -options $closed_select_options +template::element create create roomsubject -datatype text -widget hidden -value "restart" +template::element create create jid -datatype text -widget hidden -value $jid +template::element create create threadname -datatype text -widget text -label "New topics name:" +template::element create create threadsubject -datatype text -widget text -label "New topics subject:" +template::element create create sub-restart -datatype text -widget submit -label "Restart" Index: openacs-4/packages/jabber/www/conference/invite-group.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/invite-group.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/invite-group.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,22 @@ + + + + + + Select im_screen_name FROM jb_screens WHERE user_id = :user_id AND service = 'jabber' + + + + + + + SELECT (jcr.name) as room_name + FROM jb_room_party_map jrpm , jb_conference_rooms jcr + WHERE jrpm.party_id = :group_id + AND jcr.room_id = jrpm.room_id + ORDER BY jcr.name + + + + + Index: openacs-4/packages/jabber/www/conference/invite.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/invite.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/invite.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,34 @@ +ad_page_contract { + + conf-room-create.tcl + +} { + + room_name:notnull + room_subject:notnull + msg:notnull + jid:notnull + second_jid:optional + second_user_id:optional + {return_url "index.tcl"} + {version "1"} +} + + + +# we send both version of invites to asure all clients recive the invite +# This causesconflicts inside the conference module + +set suc [jb_invite $jid $room_name $room_subject $msg $version ] +#set suc [jb_invite $jid $room_name $room_subject $msg 2 ] +if {[info exists second_jid]} { + +set suc [jb_invite $second_jid $room_name $room_subject $msg $version ] +#set suc [jb_invite $second_jid $room_name $room_subject $msg 2 ] + +} +#set suc [jb_activeconferencerooms] +#set suc [jb_invite] + + +ns_returnredirect $return_url Index: openacs-4/packages/jabber/www/conference/main.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/main.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/main.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,31 @@ + +Jabber +Rooms +

            Bold entrys indicate Rooms, Rooms are indexed by Upper Letters . If there is some one in the Room you can enter the Room. +If there is no one in the Room you can Restart it

            +

            Plain Entrys are indexed by numbers, they describe topics that where discussed in the above Room , you can Read the discussions.
            Every Topic may have one ore more Room Entrys diplayed just beneath them , those Rooms where created to to discuss a sub Topic of the above displayed major Topic

            +

            Create a new top level Room

            +

            Invite other Users to a Room

            + +
              + + + +
            1. @rooms_table.room_name@ + + Enter + + + Restart + + + <%set cur_thread_table "[lindex [lindex $rooms_table_list $adp_count] 13]" +ns_log notice "cur_thread_table = $cur_thread_table , list = [lindex [lindex $rooms_table_list $adp_count] 13]" +%> <%=$cur_thread_table%>

            2. + <% incr adp_count%> +
              +
            +
            + + You don't have access to any rooms Yet + Index: openacs-4/packages/jabber/www/conference/main.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/main.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/main.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,117 @@ +ad_page_contract { + + + @cvs-id index.tcl, + @creation-date 04/12/02 + @author bkiesbye@sussdorff-roy.com + + +} { + group_id:integer,notnull + last_visit:optional + +} -properties { + + + + room_table:multirow + context:onevalue + is_room_table:onevalue + time:onevalue +} + +set time [ns_time] + +set adp_count 0 +set context "" + +set package_installed_p [apm_package_installed_p jabber] +#set package_url [apm_package_url_from_key jabber] + +set user_id [ad_conn user_id] + +set is_room_table "true" + +set active_value "-1" +set active "false" + +set active_rooms [jb_activeconferencerooms] + +if {$active_rooms != -1} { + + set room_count [ns_set size $active_rooms] +} else { + + set room_count "-1" +} + + +if {![info exists last_visit]} { + + if {[db_0or1row get_last_visit ""]} { + set last_visit_t $last_visit + } +} elseif {$last_visit == -1} { + + if {[db_0or1row get_last_visit_2 ""]} { + set last_visit_t $last_visit + } +} + + +multirow create rooms_table room_name room_id active thread_table active_value party_id + + +db_foreach get_conference_group_rooms "" { + + + set active "false" + if {$room_count != -1} { + + set active "false" + set active_value "-1" + + for {set i 0 } {$i < $room_count} {incr i} { + if { [ns_set key $active_rooms $i ] == $room_name } { + set active "true" + set active_value [jb_invite_user $room_name 1 index.tcl] + } + } + + + } + + + + + +set thread_table "
              " + db_foreach get_new_conference_threads "" { +set sub_table "" +set sub_table "[jb_get_room_thread_tree $thread_id $party_id $active_rooms $last_visit 0]" + + append thread_table "
            1. $subject $start_time View Log $sub_table
            2. " + +if {![empty_string_p $sub_table]} { + append thread_table "
            " +} + #set active "main jb_get_room_thread_tree" + } if_no_rows { + append thread_table "
          3. Nothing new
          4. " + + + } + + +append thread_table "
          " + + multirow append rooms_table "$room_name" $room_id $active "$thread_table" $active_value $party_id + +set rooms_table_list [template::util::multirow_to_list rooms_table] + + + } if_no_rows { + + + set is_room_table "false" + } \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/main.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/main.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/main.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,47 @@ + + + + + + select last_visit FROM users WHERE user_id = :user_id + + + + + + + select last_visit FROM users WHERE user_id = :user_id + + + + + + + SELECT (jrpm.party_id) as party_id , (jrpm.room_id) as room_id , (jcr.name) as room_name + FROM jb_room_party_map jrpm , jb_conference_rooms jcr + WHERE jrpm.party_id = :group_id + AND jcr.room_id = jrpm.room_id + AND lower(jcr.type) != 'child' + ORDER BY jcr.name + + + + + + + SELECT thread_id , subject , start_time + FROM jb_conference_room_threads + WHERE room_id = :room_id + + + + + + + +select (last_visit - 1000) as last_visit FROM users WHERE user_id = :user_id + + + + + Index: openacs-4/packages/jabber/www/conference/make-group-conference-group.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/make-group-conference-group.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/make-group-conference-group.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,8 @@ + +Jabber Conference +1 + + +

          The Group @group-name@ is not allowed for Conferencing.

          +
          +@errormsg@ \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/make-group-conference-group.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/make-group-conference-group.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/make-group-conference-group.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,98 @@ +ad_page_contract { + + make-group-conference-group.tcl + @author Bjoern Kiesbye + @email bkiesbye@sussdorff-roy.com + + } { + + + group_id:integer,notnull + type:notnull + {return_url "jabber"} + {errormsg ""} +} +set user_id [ad_conn user_id] +set group_name "Unknown" + +# First check if our system is online +if {[jb_getconnstate ] == -1 } { + + ns_returnredirect $return_url +} + +# test if this group is already a conference group , if its blocked or if it doesn't meet our constrains, + +if { $group_id > 10 } { + + if { ![db_0or1row check_if_group_is_blocked ""]} { + if {![db_0or1row check_group_for_existence_at_conference ""]} { + + + # this group_id is not a conference group yet ,and it's not blocked so make it one. + + db_dml enabling_group_for_conferencing "" + + + } + + + + + + # At least now it's a group_id free for conferencing , redirect him to the groups main page / or just Start the Default Room. + + if {$type == "start_room"} { + + # Check if the user is registerd with jabber, and if get his/her screen and online status + if {[db_0or1row get_jabber_user_screen ""]} { + set jid "$im_screen_name@[jb_get_transport_url_from_id [jb_get_transport_id_from_symbol "jabber"]]" + } else { + + # the user is not registerd just redirect him to the jabber/index.tcl + + ns_returnredirect "jabber/index" + ad_script_abort + } + + # We got jid and online status, now try to get the default room + + set room_name [jb_get_default_room_for_group $group_id] + + if {$room_name == "-1"} { + # we could not get a default room name + set errormsg "We had problems to figure out your default Room , please contact your admin" + ad_return_template + ad_script_abort + } + + + # now we have a room just try to start it + set suc [jb_createconferenceroom $room_name [ad_conn user_id] "First Start" $jid "Automatic Started Room ,this room: $room_name will be the Groups default name"] + + # now invite him any way + + set suc [jb_invite $jid $room_name "Groups discussion room" "You send this invite throug your web server" 1] + + # now return or let him login + if {$status == "offline"} { + + #ns_returnredirect "../jabber-login.tcl?return_url=$return_url" + ns_returnredirect main.tcl?group_id=$group_id + ad_script_abort + } else { + #ns_returnredirect $return_url + ns_returnredirect main.tcl?group_id=$group_id + ad_script_abort + } + + } else { + ns_returnredirect main.tcl?group_id=$group_id + + ad_script_abort + + + + } + } +} \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/make-group-conference-group.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/make-group-conference-group.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/make-group-conference-group.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,48 @@ + + + + + + SELECT (jgbc.group_id) as test_group_id FROM jb_groups_blocked_conference jgbc WHERE group_id =:group_id + + + + + + + SELECT group_id FROM jb_conference_groups WHERE group_id = :group_id + + + + + + + INSERT INTO jb_conference_groups (group_id , conference_only_p ) values (:group_id , 'f') + + + + + + + SELECT im_screen_name , status FROM jb_screens WHERE user_id = :user_id AND service = 'jabber' + + + + + +DECLARE + v_room_id integer; + begin + SELECT room_id INTO v_room_id + FROM jb_conference_rooms + WHERE lower(name) = lower(:room_name); + + UPDATE jb_conference_groups + SET default_room_id = v_room_id + WHERE group_id = :group_id; + END; + + + + + Index: openacs-4/packages/jabber/www/conference/recorded-chat.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/recorded-chat.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/recorded-chat.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,38 @@ + +Jabber + + + + + + +

          Recorded Chat from
          Room: @name@
          Subject: @subject@


          +

          Pic up Topic
          (Here you can restart the discussion on this Topic. All new submissions will be appended to the end of this document. )

          + + + + +
          +Here you can create a new Room to discuss a sub Topic of the current Topic. The new Room will be displayed next to the current Topic. +

          + + + + + + + + + + + + + + + +
          NickMessageDate
          +<%set dummy [lindex [lindex $msg_list $msg_list_count] 3] + incr msg_list_count +%><%=$dummy%>@msg.nick@@msg.text@@msg.date@
          Index: openacs-4/packages/jabber/www/conference/recorded-chat.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/recorded-chat.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/recorded-chat.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,127 @@ +ad_page_contract { + recordings + +} { + room_id:integer,notnull + thread_id:notnull + party_id:notnull + {name:optional "Unknowen"} + {subject:optional "Unknowen"} + {display_status "true"} +} -properties { + + name:onevalue + subject:onevalue + msg:multirow + nothing:onevalue + nothing_message:onevalue + thread_id:onevalue + return_url:onevalue + time:onevalue + user_jid:onevalue + party_id:onevalue + new_name:onevalue + +} + +set link "false" +set user_id [ad_conn user_id] +set user_id_cur "NULL" +set first_names "Unknown" +set last_name "Unknown" +set email "Unknowen" +set nothing false +set nothing_message "" +set status "offline" +set return_url [ad_conn url] +set time [ns_fmttime [ns_time] "%D %T"] +set ad_url [ad_url] + +regsub -all ":" $time "-" time +regsub -all "/" $time "_" time +regsub -all " " $time "at" time +regsub -all "(0-9)(0-9)_(0-9)(0-9)_(0-9)(0-9)at(0-9)(0-9)-(0-9)(0-9)-(0-9)(0-9)" $name $time new_name + +regsub -all {[0-9][0-9]_[0-9][0-9]_[0-9][0-9]at[0-9][0-9]-[0-9][0-9]-[0-9][0-9]} $name $time new_name + +if {$name == $new_name} { + + set new_name $time + append new_name $name +} + +append return_url "?thread_id=$thread_id&room_id=$room_id" + +multirow create msg nick text date link link_url + +if {[db_0or1row get_user_jid "" ]} { +set user_jid $im_screen_name +append user_jid "@" +append user_jid [jb_get_transport_url_from_id [jb_get_transport_id_from_symbol jabber ]] + +} else { + + set user_jid false +} + +if { $thread_id == "full" } { + +set sql "Select (user_id) as user_id_cur , jid , message , to_date(stored , 'HH:MM:SS') as stored from jb_conference_protocols where room_id=:room_id order by stored" + +} else { + + +set sql "Select (user_id) as user_id_cur , jabber_id , message , stored + FROM jb_conference_protocols + WHERE room_id= :room_id + AND thread_id= :thread_id + order by stored" + + + + + +} + +db_foreach messages_from_room_and_thread $sql { + + regsub -all {(@).*} $jabber_id "" nick + + if {$user_id_cur != "NULL" } { + + + set link "true" + set link_url [acs_community_member_link -user_id $user_id_cur -label "$nick"] + + } + + multirow append msg nick $message $stored $link $link_url + + + +set user_id_cur "NULL" +set nick "Unknown" + +} if_no_rows { + set nothing true + set nothing_message "Sorry but we din't find any discussion from Room: $name and Thread: $subject" + +} + +if {$nothing != "true"} { +set msg_list [template::util::multirow_to_list msg] +set msg_list_count 0 +} + +ad_form -name room_create -action room-create -form { + {jid:text(hidden) {value $user_jid}} + {party_id:text(hidden) {value $party_id}} + {thread_id:text(hidden) {value $thread_id}} + {return_url:text(hidden) {value "invite-group?group_id=$party_id"}} + {type:text(hidden) {value "insert"}} + {roomname:text(text) {label "New room name:"}} + {roomsubject:text(text) {label "New room description:"} {value "Not specified"}} + {threadname:text(text) {label "New topic:"}} + {threadsubject:text(text) {label "New topic description:"} {value "Not specified"}} + {sub1:text(submit) {label "Create"}} +} Index: openacs-4/packages/jabber/www/conference/recorded-chat.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/recorded-chat.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/recorded-chat.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + + SELECT im_screen_name FROM jb_screens WHERE user_id = :user_id AND service = 'jabber' + + + + + Index: openacs-4/packages/jabber/www/conference/room-create.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/room-create.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/room-create.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,7 @@ + +Jabber Conference Error + + +

          Sorry an Error happend!! :

          +

          @errormsg@

          +

          Please backup your Browser and correcht your entrys!

          \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/room-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/room-create.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/room-create.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,171 @@ +ad_page_contract { + + room-create.tcl + +} { + + roomname:notnull + roomsubject:notnull + threadname:notnull + threadsubject:notnull + jid:optional + jid_to:optional + thread_id:optional,integer + room_id:optional + party_id:optional,notnull + type:optional + {return_url "index.tcl"} + {create "false"} + {restart "false"} +} -properties { + + error:onevalue + +} +set pos 0 + +set errormsg "Position: " + +set allow_creation false + +set user_id [ad_conn user_id] + +set roomname [string trim $roomname] +set roomname [string tolower $roomname] +set err "" +set suc "" +if {[regexp {([ ]+)|(!+)|(/+)|([-]+)|([:]+)|(;+)|("+)|('+)|([*]+)|(%+)|(&+)|([$]+)|(�+)} $roomname match ]} { + +set pos 1 + set errormsg "Room: $roomname cant' be created.
          + Because you used the charackter : \"$match\" , in your RoomName.
          + Do not use iligal caracters like ! , + , / , : , ; , \$ , \' , \" , % , & or spaces in your RoomName.
          + Use the carackters a to z, numbers 0 to 9 and the singnes \"-\" and \"_\" only." + + set allow_creation false + +} else { +set pos 1.1 +set allow_creation true +} + + +if {![info exists jid]} { +set jid "www.sussdorff-roy.com" +} + + + + +# This code is used when some one starts a room (a discussion from an existing thread), we have to map the old thread to the new Room + + +if { [info exists thread_id] && [info exists type] && $type == "insert" && $allow_creation == "true" } { + + if { [db_0or1row get_room_id ""] } { + + catch {[ set suc [jb_createconferenceroom $roomname $user_id $threadname $jid $roomsubject ] ]} err + + set error_txt "The Room: $roomname is all ready in use" + + set suc "-10" + + } else { + + catch {[ set suc [jb_createconferenceroom $roomname $user_id $threadname $jid $roomsubject ] ]} err + } + + if {$suc == -10 } { + + set errormsg "Room creation unsuccessful. $error_txt" +} else { + + if { [db_0or1row get_room_id ""] } { + + catch {[db_dml map_new_room_to_old_thread ""]} errormsg + catch {[db_dml map_new_room_to_group ""]} errormsg +} + + +# the room is created now invite the persons + + ns_returnredirect invite-group-1.tcl?group_id=$party_id&room_name=$roomname + + #ns_returnredirect invite.tcl?room_name=$roomname&room_subject=$roomsubject&msg=Question_about:_$roomname&version=1&jid=$jid&second_jid=$jid_to&thread_id=$thread_id&room_id=$room_id + + + } + + +} + + + + + + +#This happens at a normal room creation + +if { $create == "true" && $allow_creation == "true"} { + + + set pos 3 + + ns_log notice "form room creation $roomname $user_id $threadname $jid $roomsubject" + + catch { + [set suc [jb_createconferenceroom $roomname $user_id $threadname $jid $roomsubject ]] + } err + +ns_log notice "nach dem room creation" + if {$suc != 0} { + set pos 3.1 + set errormsg "Room creation unsuccessful. error $suc. Jabber Server not available." + } else { + set pos 3.2 + set im "keine ahnung" + if { $create == "true" } { + + if {[db_0or1row get_room_id ""]} { + set pos 3.3 + db_dml map_new_room_to_group "" + db_dml update_room_type "" + + set im ja + } else { + set pos 3.4 + set im nein + } + + } + + + #ns_return 200 text/html "room: $roomname create: $create im if? $im " + ns_returnredirect [jb_invite_user $roomname 1 $return_url] + set pos 3.5 + } + +} + +append errormsg " $allow_creation, $restart nnnn" + +if { $allow_creation == "true" && $restart == "true" } { + + catch { + [set suc [jb_createconferenceroom $roomname $user_id $threadname $jid $roomsubject ]] + } err + +ns_log notice "after createroom suc = $suc" + if {$suc == -10 } { + + set errormsg "Room creation unsuccessful. error $suc" + } else { + ns_log notice "return_url = $return_url" + set check_url [jb_invite_user $roomname 2 $return_url] + ns_log notice "check_url = $check_url" + ns_returnredirect $check_url + + } +} + +set pos "ende" \ No newline at end of file Index: openacs-4/packages/jabber/www/conference/room-create.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/conference/room-create.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/conference/room-create.xql 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,35 @@ + + + + + + SELECT (room_id) as new_room_id FROM jb_conference_rooms WHERE name = :roomname + + + + + + + + INSERT INTO jb_room_start_from_thread (room_id , thread_id) VALUES (:new_room_id , :thread_id) + + + + + + + INSERT INTO jb_room_party_map (room_id , party_id) VALUES (:new_room_id , :party_id) + + + + + + + + + UPDATE jb_conference_rooms SET type = 'master' WHERE room_id = :new_room_id + + + + + Index: openacs-4/packages/jabber/www/doc/admin.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/admin.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/admin.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,21 @@ + +Conferencing for Admins + +
          +Back: Conferencing user help (advanced) +Next: Requirements +
          + + +

          Conferencing for Admins:

          + + +

          On the www/jabber/admin/conference.adp page you are able to define Group�s , this Groups will be able to use the Conferencing facility of the Jabber module. You can define a new Group by entering a name in the Group Name Field and pressing the create Button. Once a Group is created it will show up in the list of existing Conference Group�s below. The Group names link you to a page where you can add and remove Users or whole Groups to the one you have just created. At the bottom of the page you can search the System for Users or Groups , the search results will be displayed below your search entry . Clicking on one of the search results will add this User/Group to your Conference Group. At the top of the Page two lists are displayed the first shows all Users (their names) of the Conference Group , the second shows all Groups of your Conference Group (their names). Behind every Name you have a Link to remove this User/Group from your Conference Group.

          +

          You are able to add a hole Group A to your Group Conf , all users who are members of Group A will then be members of Group Conf , even if members from Group A wont show up in the Users List of Group Conf.

          + + +
          +Back: Conferencing user help (advanced) +Next: Requirements +
          + Index: openacs-4/packages/jabber/www/doc/conference-v2-final..htm =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/conference-v2-final..htm,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/conference-v2-final..htm 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,105 @@ + + + + + + + +

          Before you start:

          +
          +

          If you want to use the Conferencing facility you should have a Jabber account already and you should be online with the Enigma Jabber Client (or any other Jabber Client that supports Conferencing, the Jabber Applet doesn�t support Conferencing ).

          + +

           

          +

          How to get to the Conference facility :

          +
          +

          In your (dotLRN) Classes workspace you will find a Link that:

          +

          1. Brings you to the Conferencing main page of this Class

          +

          2. Let you directly enter this Classes default Conference Room (this facility is not implemented yet).

          +

          +

          The global main Page (Pic. 1) for conferencing is usually the LINK (if you don�t find it there email your System administrator).

          + +

          At the global main Page you will see a list displaying all the Conference Groups you are a member of, below you will see a List displaying all new Topics that have been discussed since you last visited this System. Clicking on one of the �View Log� links behind a new topic brings you directly to the page that shows the whole discussion on this Topic. If you follow one of the Group Name Links ,at the top, you get to the main Page of this Group.

          + +

          Pic. 1

          + +

          +
          +

          On the Groups main Page (Pic. 2) you find two Links one to Create a new Top level Room , a second to Invite other Users to a Conference Room.

          +

          Below them you find a structure displaying all Rooms of this Group with all Topics that have been discussed.

          +

          Behind every room you find a Link ,in case other users are currently in this Room , saying Enter. If you are online with Enigma you enter this Room when you Click on the Enter Link. If no one is currently in this Room the Link will be named Restart, clicking this link will restart the Room and you will enter it, again.

          + +

          Pic. 2

          +

          +
          +

          1. Invite other users.

          +

          2. Create a new Top level Room.

          +

          3.View a Log.

          +

          4. Create a new Sublevel Room.

          +

          5. Structure your Rooms and Topics (Example).

          +
          + +

          1. Invite other Users:

          + +

          Go to the Invite Page (Pic.2 ) (just follow the Link �Invite other Users to a Room� at the top of the page Pic. 2), here you find a List off all users which are currently online and in the same group you are in. . Select the once you want to invite , below you find a Selection Box with all active Rooms including the one you want to Invite your friends to , select it.

          +

          Note: You are able to select only those Rooms which are currently open (Re/Started).

          + +

          In the two Text Fields below enter some words that let the Users you are going to Invite know why you are inviting them and what you want to discuss.

          +

          Now you can press the �Invite� button, every User you selected above will be asked to come to the Room you selected.

          +

          At the bottom of the Page you find an extra Section from where you can restart Rooms as well, in case the Room you want to invite users to hasn�t been opened/restarted yet.

          + +

          Pic. 3

          +

          + +
          +

          2.Create a new Top level Room:

          + +

          To Create a new Top Level Room just click the link on the Groups main Page saying �Create new Top level Room �. A page will be displayed asking you to enter a new Room Name a description of this Room, as well as the name of the initial Topic and its description. Pressing the create Button will create and start a new Room which will be identified by the Room Name you have entered before.

          +

          Back at the Groups main Page you find a Link saying �Create new' Top Level Room at the top of the Page, this Link will bring you to a page where you can create an new Room. This way to create a Room is a special one, it will be displayed at the very left of the Room and Topic hierarchy (as you can see it on Pic. 4.1+4.3), you should only use it when there are no Rooms in this Group yet , or if you want to start a completely different Topic to what is usually discussed in this Group

          + +

          Pic.4

          + +

          +
          +

          3. View Log

          + +

          You can view a Log from a previously recorded chat by clicking on the �View Log/Read� Link behind a Topic name (Pic. 4). On this Page the discussion in Room (RoomName) about the Topic (TopicName) will be displayed Line by Line (Pic. 5.3). Every Line starts with the nickname of the User who submitted the Text displayed in this Line. If this nickname belongs to a local User you can view it�s user information (including online and contact information) by clicking on his/her nickname. At the end of every Line the time , when the Text where submitted to the Room , is displayed.

          +

          At the Top of every Log Page you have two options, the first is to pick up the Topic (Pic. 5.1). Be carefull using the Pickup option, there can be only one Topic at the time, discussed in one Room. Picking up a Topic means that everything submitted to the Room (RoomName) will be appended to this Log Page , until someone changes the Topic again. The system will warn you, in case someone discusses a different Topic in this Room at the moment, before it picks up a Topic.

          + +

           

          +

          The second option is to create a sublevel Room (SubRoomName), a sublevel Room has all the features of a top level Room (RoomName) has, the difference is where it is going to be displayed on the Groups main Page. If you create a sublevel Room (SubRoomName ) from a Topic�s Log Page, the new Room name will be displayed next to this Topic�s name, just below and a little bit to the left (Pic. 4.4).

          +

          +

          Pic. 5

          +

          +
          +

           

          +
          +

          4. Create a sublevel Room

          +
          +

          On the View Log Page you find a Form at the top of the page (Pic. 5.2), asking you for the new Rooms name ,this Rooms description , the name of the initial Topic and a description for this topic. When you press the 'Create' button at the bottom of the Form , the new Room (SubRoomName) will be created and you�ll be brought??? to the Invite Page to let you invite other users to the new Room.

          +

          If you create a sublevel Room (SubRoomName ) from a Topic�s Log Page, the new Room name will be displayed next to this Topic�s name, just below and a little bit to the left (Pic. 4.4).

          + +

           

          +
          +

          5. Structure your Rooms and Topics (Example)

          + +

          There are two types of Rooms (top and sub level) both have the same features, their types differentiate them to let them be created/displayed in a structured way . This makes it easier for you and others, to navigate through and find the information, they are interested in.

          + +

          Overview:

          +
          +
          • Every Room can have more than one Topic , but only one Topic can be discussed in one Room at the time.

          • + +

            - Sometimes one Room is just not enough for A. All Users B. All Topics

            +

                   Case A.: Create a new Top level Room 2 and split the users in room Room 1 into two groups

            + +

                  Case B.: Create a new Top level Room 2 if you have to discuss
            +         a absolute different Topic to what Topics you discuss in Room 1.
            +         Or Create a new sub level Room 2 in case you want to discuss a Topic
            +         that somehow belongs to an existing Topic, but is fare to complex to discuss everything under the existing Topics name

            + +

             

            +

            Example:

            + +

            Back at the Groups main Page you find a Link saying �Create new Top Level Room� at the top of the Page, this Link will bring you to a page where you can create a new Room. This way to create a Room is a special one, it will be displayed at the very left of the Room hierarchy, you should only use it when there are no Rooms in this Group yet , or if you want to start a completely different Topic to what is usually discussed in this Group. Lets say you work for a small company and you are a member of the Group �Computer Staff� , right now all you have to do is to administrate the existing Computer Network , you will need a Room (named �Administration�) where the members of the Computer Staff can meet to discuss there daily work. This should be a top level Room. Every morning the �Administration� Room is restarted , and every thing about new User accounts, Software updates etc. will be discussed in that Room. May be there are some sub level Rooms created for some bigger Software updates, that need to be discussed in an extra Room but still belong to the major Topic �Administration�.

            +

            The company grows and decides to hire Software Developers to standardize the Software company uses with scripts, to serve the needs that grow with the Company. These Software Developers will belong to the Group �Computer Staff� as well, but you can�t let them discuss their Topics in the same Room the Administrators use. And logically the Development Topics don�t fit in a sub level Room , of the top level Room �Administrators�, even if only Developers use this Room it will be hard to find this discussions on development when they are placed somewhere in between administration Topics.

            +

            This is the time to create a new top level Room named �Software_Development�, this Room can then be used by the Developers to discuss their Topics, and in case the Developers need information from the System Administrators (or vice versa) (the current version of the standard Software, for example) they can enter the �Administration� Room and ask their Questions, or browse older discussions of the �Administration� Room to find the information they need.

            + Index: openacs-4/packages/jabber/www/doc/design.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/design.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/design.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,221 @@ + +Jabber Design + + +
            + +
            +Back: Requirements +
            + +

            Jabber Design

            + + +

            This document explains brief the design of the Jabber Module, its +existing table and what's the purpose of each table. Furthermore you get an view over the defined procedures. +
            +You have to know that not only the tcl-files define transactions to the database, but also +the C-modules. This non convenient procedure is due to velocity advantages, which are provided +by an direct access to the database by the C-modules.

            + +

            Please read the introduction page first, so you can get an general overview: +
            Introduction +
            +
            +

            + +1. Overview +
            +2. Tables +
            +3. API - Procedures + + +

            1. Overview

            +

            The Jabber module for OpenACS can track any entity presence state (i.e. online or offline) from most of the Big Instant Messaging Systems (AIM , MSN , Yahoo , ICQ and Jabber). It is able to interact with your local Jabber Server and it can record Chat’s hosted by the Conference Component of your local Jabber Server.

            + + + +

            The tracking of presence :

            +

            The Aolserver log’s into your precreated account at your local Jabber Server , it acts like a usual Jabber Client so it can connect it self to any IM System your Jabber Server is able to connect to. When a user enters a name from an entity from any supported IM System (say name: ‘Fred123’ IM System: ‘AIM’ ), this information is inserted into the table jb_screens (Oacs) and into the account information (in jabber terms ‘roster’) (the account the Aolserver uses ) at your local Jabber Server.

            +

            Once this information is in the Aolserver’s accounts roster , the Jabber Server will push any presence state changes ,from this entity , to the Aolserver. Who then writes the new state into the state column of the jb_screens table where the screen column has the value ‘Fred123’ and the service column has the value ‘AIM’. The table jb_screens holds all information about a entity , the screen(name) the service the screen belongs to , the current online state (and possibly a away message and a resource). If any application has an interest in the online state of any entity (like the IM Addressbook) this application has to reefer to the jb_screens table .In the www/image subdirectory their are several icons for displaying different online states and IM Systems . In the jabber-procs.tcl library file their are some functions that return a colour for a passed in online state (it would be help full for users if the different states are display system wide in the same colour ).

            +

            As well you are able to send IM Messages to any entity of any IM System your Jabber Server supports, but you can’t receive any Messages. For end users it can be used like a SMS web interfaces , the OpenACS could use it in it’s alert system. You find all pages related to the tracking of presence in the www/jabber directory.

            + +

            The recording of Chat’s:

            +

            The Aolserver can enter any Conference Room from the Conference Module of your local Jabber Server, so it is able to receive any Messages send to a Conference Room once it is asked to record this Conference Room. The Conferences are stored in three tables jb_conference_protocols , this table holds any Message from any Conference Room , in addition to the Message text any line reefers to the table jb_conference_rooms ,via the room_id (which holds the room name the description of what discussions this room is for etc. ), the table jb_conference_thraeds ,via the thread_id (which holds the name of the currently discussed topic), and the users table via the user_id (the user_id is figured out with the help of the jid, the possibility to query the conference module for the real jid’s of conference members isn’t a standard so make sure you use the version that comes with the package). You find all tcl/adp pages used for conferencing in the www/jabber/conferencing subdirectory. Later access is done by relations , the jb_conferens_room is defined as an Object (acs 4.x) so a room can (has to) be related to a Group (Groups for conferencing can be created and administrated in the admin section of the jabber module www/jabber/admin/conferencing). On the Conference index page a list of all Groups the user is a member of are displayed, which link them to an overview of all Room’ including all Topics that belong to this Group which themselves link the user to read a Topic enter an currently active Room or to Restart an inactive Room. On the index page their is an overview with all new Topics (since last visit) displayed.

            + + + + +

            2. Tables

            + +jb_services + +

            Due to the fact that not all IM-services are avaiable for Jabber and that +new services could come in the future, this table stores those IM-services, +which are avaiable and enabled. In the future the admin can deactivate a certain +IM-service or add new ones. +

            + +jb_screens + +

            This table stores all relevant information of every contact or +buddy, whether they are members in the OACS and registered users of +the Jabber server or they are non members of the OACS and are external +contacts. To offer the possibility of permissioning for each user +jb_screens is implemented as an object inheriting the features of an +object. A unique screen_id referencing an object_id is used as index +for this table. Furthermore for users within the OACS the user_id is +stored, so it is possible to find out whether this buddy is an +internal or external buddy. Moreover the Screen Name +(im_screen_name), the service (aim, icq, msn, yahoo, jabber or irc) +and the actual online status is stored. The im_screen_name in +combination with the service have to be unique due to the fact that +the Im-Services do not allow identical Screen names.

            + +jb_conference_rooms + +

            This table stores all relevant information of every existing +conference room. It is aswell implemented as object, so +the permissioning system and the auditing attributes of an object +can be inherited. A room_id referencing an object_id is used as index, +furthermore a name and description for each room has to be stored. +Due to the fact that only registered users of the Jabber server can +create a conference room the creator_jabber_id is archived, so the +creator is not only referenced by his user_id (inherited +attribute).

            + +jb_conference_room_threads + +

            Each conreference_room can have different threads with different +topics, so this table stores information for every thread, archiving +the room_id, so you can reference every thread with his +conference_room. A thread_id is used as index of this table. The +threads are not implemented as object, because there is no need to +inherit the features of an object like the permissioning system. This +is accomplished by the permissioning of the conference room. As +consequence this table has to store auditing information for +itself. Furthermore a name and brief description of this thread is +stored aswell.

            + +jb_conference_room_protocols + +

            This table stores the transcripts for each room and thread, so +later users can take a look on the transcripts. The permissioning +system of the conference_room is used to allow the view on the +protocols.

            + +jb_message_log + +

            This table stores every message written and send through the +jabber-server. Moerover auditing information is archived to +relationate a message with a screen_id.

            + +jb_friends + +

            This table stores the buddy list for each user within the OACS and +Jabber server. The screen_id, first_names and last_name of the contact +ist stored. Through the information in jb_screens it can be figured +out qhether the contact is member of the OACS or not (user_id not null +in jb_screens). If the friend is user of the OACS, the first and last +names are taken out from persons, if not, the user is given a GUI to +write the first and last names.

            + +jb_user_jabber_information + +

            For registered users of the OACS this table stores login +information like password, registry status and a boolean +auto-login. There are several different registry status, "r" stands +for registered, "a" for approved.

            + +jb_subscription_request + +

            This table stores a jabber_id (includes information over which IM-service +is used), which need approval by the user you want to add to your buddy list, +for example in icq with authorize. The Jabber server checks whether an +approval arrives and then this screen is added to jb_screens.

            + +jb_xml_to_send + +

            This table stores every xml-send-information, which could not been send +because of problems with the Jabber server, for example when the Jabber server +is down. On every restart of the Jabber server the server checks this table and +send the archived messages to its destination.

            + + +jb_room_start_from_thread + +
            +create  table jb_room_start_from_thread (
            +        thread_id     not null references jb_conference_room_threads(thread_id),
            +        room_id       not null references jb_conference_rooms(room_id),
            +        primary key(thread_id , room_id)
            +                                          );
            +
            + +

            Maps Rooms to the threads where the dicussion started, for storing the structure of a discussion on an major topic.The structure is manly used for later displaye. The time stamp orders the Rooms in x-direction, this table orders the Rooms in y-direction +

            + + + +jb_room_party_map +
            +create table jb_room_party_map (
            +                                party_id      not null references parties(party_id),
            +                                room_id       not null references  jb_conference_rooms(room_id),
            +                                primary key (party_id , room_id) 
            +	                       );
            +
            +

            +This Table Maps a Room to a Party ( user/group),it difines who has access to a Room. Yet there are no permisions (other then access/noaccess a group maps to a Room or not ) definde for the objects acs_party and jb_conference_room. When relations for this objects are intrduced, this table becomes an index for fast access, that is kept up to date via trigers (like it's done for the the acs_groups system) +

            + + +jb_conference_groups +
            +create table jb_conference_groups (
            +                                  group_id primary key references groups(group_id)
            +                                  );  
            +
            +

            +This Table Stores the group_id's ,of the groups, which have access to the conference system. +

            + + + +

            3. API - Procedures

            + +Up + +

            Some procedures are defined in the tcl-library file named jabber-procs. You can find +this file in the /tcl directory of your jabber-server package. The C-modules define procedure +aswell, which are not only used within the C-modules, but also in the tcl-files. To see the documentation +for several procedures defined in th nsjabber-module follow this link: ns-jabber procedure +documentation

            + +

            The nsjabber-module accesses the database, but due to the fact that the c-modules should not be used in connection with +a certain datamodel, we define PL/SQL procedures and functions, which will be called by the c-modules. So we can debug and administer +the c-modules independently from the datamodel. If changes occur in the datamodel we only have to change the PL/SQL procedures and +functions. This implementation symplifies the maintenance of the system. To see the documentation for the PL/SQL procedures +and functions follow this link: PL/SQL procedure documentation

            + + +
            +Back: Requirements +
            + +
            +
            +

            Author: +Luis Mosteiro Fernandez +

            +
            +

            +Modified +Bjoern Kiesbye
            Added the Overview , and new Table descriptions. +

            +

            Last modified: January 10 2003

            + + +

            Copyright Sussdorff & Roy 2001

            + Index: openacs-4/packages/jabber/www/doc/doc-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/doc-master.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/doc-master.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,9 @@ + +@context@ + + + + + +
            +

            Back to documentation index site

            \ No newline at end of file Index: openacs-4/packages/jabber/www/doc/doc-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/doc-master.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/doc-master.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,5 @@ +# to build the proper context bar + + +set context [list] +append context "Documentation" \ No newline at end of file Index: openacs-4/packages/jabber/www/doc/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/index.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,29 @@ + +@context@ +

            These pages are optimized to be displayed by Internet Explorer and Netscape. +There are some display problems with mozilla and konqueror, specially the +installation page is not displayed perfectly, sorry, I'll try to fix that. +

            + Index: openacs-4/packages/jabber/www/doc/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/index.tcl 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,13 @@ +ad_page_contract { + + a bit of a test + +} -properties { + + context:onevalue + +} + +set context [list "Documentation"] + +ad_return_template \ No newline at end of file Index: openacs-4/packages/jabber/www/doc/installation.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/installation.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/installation.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,515 @@ + + +Installation Guide + +
            +Back: Jabber Server Installation +Next: General user documentation +
            + +

            Installation Guide for Jabber module for OACS

            + + +

            To install the jabber package for OACS adequately you have to +follow these installation instructions. You have to know that the jabber package +is separated in three different installations, which are the C-module for AOLserver, +C-module for Jabber server and the Jabber APM. +
            +I you want to go directly to a certain installation guide click on the links:

            +AOLServer Installation Guide +  +

            +Jabber Client Installation Guide + +

            + +

            +All C-Sources you will need to download. +

            +

            +

            To install the APM follow the installation instructions for all APMs described +in the documentation for the package manager.

            + +

            1. Installation Requirements for the C-modules

            + +

            The C-modules have certain requirements to work correctly. First of all you need an +AOLserver installation with the entire source code (no rpm installation!) and of course +an Jabber server installation with enteire source code.

            + +

            Installation instructions for these applications can be found at these urls: +
            AOLserver installation: http://www.aolserver.com +
            Jabber server installation: http://www.jabber.org +

            + +

            2. Installation Guide for AOLserver C-module (Jabber-Client)

            +Up + +

            You must have a valid Jabber-ID, so please start a public Jabber Client and register +as a normal Jabber user. This Jabber user is necessary as a parameter for the AOLserver.

            + +

            Following instructions should be made as "nsadmin", so type in a bash shell: +
            ?- su -nsadmin (RET) +
            ?- password: ******* (RET) +
            +
            +
            Copy the tar file to "/your/path/to/aolserver/" and untar the file there. +
            Now you should have a new directory named nsjabber. Next go to "/your/path/to/aolserver/nsjabber/bin" +and type "make". To see whether everything went right you should find a new file named ns_jabber.so.

            + +

            You may now type "make install" to install the Jabber_Client in the +directory "/usr/local/aolserver/bin", this is the default installation +directory for AOLServer.
            +Now you have to configure the client and add following lines to your +aolserver-config.tcl. +
            +

            + +
              +
            • ns_section ns/server/${server}/module/nsjabber
            • +
            • ns_param jid aiesec@intranet.sussdorff-roy.com/DEV
            • +
            • ns_param pw secret
            • +
            • ns_param jabber_server intranet.sussdorff-roy.com
            • +
            • ns_param aim_transport aim.intranet.sussdorff-roy.com
            • +
            • ns_param conference_service conference.intranet.sussdorff-roy.com
            • +
            • ns_param msn_transport msn.intranet.sussdorff-roy.com
            • +
            • ns_param yahoo_transport yahoo.intranet.sussdorff-roy.com
            • +
            • ns_param icq_transport icq.intranet.sussdorff-roy.com
            • +
            • ns_param yahoo_transport yahoo.intranet.sussdorff-roy.com
            • +
            + +

            The "jid" parameter is the jabber id you created already (as described +above). It has to be exactly (case sensetive) the same you +specified (or you will specify) in the jabber.xml config file of your +Jabber Server. +
            +The "pw" parameter is the password for the above specified jid to +login the Jabber Server. +
            +The "jabber_server" parameter is the URL of your Jabber Server, the +same that you specified in your jabber.xml config file in the + section. +
            +
            +The folowing param's are the FQN of your transports (aim. icq , etc.). +
            +The next section has to be below the above one in your config.tcl. +The section probably already exists in your config and you will only +have to add one parameter. +
            +

            + +
              +
            • ns_section ns/server/${server}/modules
            • +
            • ns_param nsperm nsperm.so
            • +
            • ns_param nssock nssock.so
            • +
            • ns_param nslog nslog.so
            • +
            • ns_param nssha1 nssha1.so
            • +
            • ns_param nscache nscache.so
            • +
            • +
            • #-------The parameter to add------
            • +
            • ns_param nsjabber ns_jabber.so
            • +
            • #---------------------------------
            • +
            +
            +This parameter tells the AOLServer to load the Jabber Client module +into the core AOLServer. + +

            The jabber client needs a own Databasehandle pool with 2 handles. +To create the Pool add the following Lines to the existing sections ... +(NOTE: The configuration of the Database may vary, +depending on what driver you are using) +

            + +
              +
            • ns_section "ns/servers"
            • +
            • #-------The parameter to add------
            • +
            • set jabberpoolconn(yourserver) 2
            • +
            • #--------------------------------
            • +
            • +
            • ns_section "ns/db/pools"
            • +
            • #-------The parameter to add------------
            • +
            • ns_param jabber "Jabber Pool"
            • +
            • #---------------------------------------
            • +
            + +
            ... and then add this section to your ini.tcl +
            +
              +
            • ns_section "ns/db/pool/jabber"
            • +
            • ns_param Driver ora8
            • +
            • ns_param Connections $jabberpoolconn(${server})
            • +
            • ns_param DataSource ""
            • +
            • ns_param User $dbuser(${server})
            • +
            • ns_param Password $dbpw(${server})
            • +
            • ns_param Verbose on
            • +
            • ns_param LogSQLErrors On
            • +
            • ns_param ExtendedTableInfo On
            • +
            • ns_param MaxOpen 1000000000
            • +
            • ns_param MaxIdle 1000000000
            • +
            +
            +

            Finaly add this line to the mime type section.It is needed to let the Aolserver work together with Java WebStart.

            + + + + + + + + +
            ns_section ns/mimetypes +
            ns_param Default text/plain
            ns_param NoExtension text/plain
            ns_param .pcd image/x-photo-cd
            ns_param .prc application/x-pilot
            ns_param .xls application/vnd.ms-excel
            the line to add \/
            ns_param .jnlp application/x-java-jnlp-file
            + +

            Now you may restart your AOLserver to load the nsjabber.so module and +test it. Make sure you have installed the the mod_acs in your Jabber +Server otherwise you won't be able to use the admin functionality. +But if you like you can let aolserver send Messages to any valid jid, +
            +use the folowing tcl commands: +
            +set conn_state [jb_login] #conn_state will be 0 on succsess -1 on error +
            +set succsess [jb_message "user@server" "The Message string"] +#will be 0 on succsess -1 when the client isn't logged in +
            +set conn_state [jb_logout] +

            + + +

            3. Installation Guide for Jabber Client C-module

            +Up + + +

            Now follow some installion tasks for the Jabber Client +These tasks have to be accomplished as the user how is in charge for the Jabber Server !

            +C-module. These C-module enables a jabber admin mod.

            +

            Copy the mod_acs.tar file to the head Source directory of your Jabber Server (like /your/path/to/jabber-1.4.x),
            + Now type
            +?- tar -xvf mod_acs.tar to utar the file. +
            +The extracted files should be copyed to the directorys where they belong atomaticly. +

            + + + +

            Change to the modules directory type: + +
            ?- cd jsm/modules +
            open the file 'Makefile' with your prefered editor, +(type: emacs Makefile ) +and put a entry saying 'mod_acs.o' at the end of the 'jsm_modules_OBJECTS' +section and save it.It should look like this when you are finished : +

            + + + + + + + + + + + + + + + + + + + + + + + + +
            jsm_modules_OBJECTS=\
               mod_admin.o \
               mod_agents.o \
               mod_browse.o \
               mod_announce.o \
               mod_auth_plain.o \
               mod_auth_digest.o \
               mod_auth_0k.o \
               mod_echo.o \
               mod_filter.o \
               mod_groups.o \
               mod_presence.o \
               mod_xml.o \
               mod_roster.o \
               mod_time.o \
               mod_vcard.o \
               mod_version.o \
               mod_register.o \
               mod_log.o \
               mod_last.o \
               mod_offline.o\ <----------------------------------!
              mod_acs.o <---- Your edit. Don't forget to put a ' \ ' at the end
                                         + of the above line!!!
            + +

            Don't forget to save your edits. +
            +Now close your editor , and go back one directory (type: cd .. ), +you are now in the '/your/path/to/jabber-1.4.x/jsm' directory. +Open the file 'Makefile' with your prefered editor +(this is the second and last Makefile you have to edit), +(type: emacs Makefile ) +and put a entry saying 'mod_acs.o' at the end of the 'jsm_EXOBJECTS' +section and save it.It should look like this when your finished : +

            + + +jsm_EXOBJECTS = \ + + + + + + + + + + + + + + + + + + + + + +
               modules/mod_admin.o \
               modules/mod_agents.o \
               modules/mod_browse.o \
               modules/mod_announce.o \
               modules/mod_auth_plain.o \
               modules/mod_auth_digest.o \
               modules/mod_auth_0k.o \
               modules/mod_echo.o \
               modules/mod_filter.o \
               modules/mod_groups.o \
               modules/mod_presence.o \
               modules/mod_xml.o \
               modules/mod_roster.o \
               modules/mod_time.o \
               modules/mod_vcard.o \
               modules/mod_version.o \
               modules/mod_register.o \
               modules/mod_log.o \
               modules/mod_last.o \
               modules/mod_offline.o\ <----------------------------------!
               modules/mod_acs.o <------ Your edit. Don't forget to put a ' \ ' +
                                                           + at the end of the above line!!!
            + +

            Don't forget to save your edits. +
            +Close your editor aigan and and move up a nother directory, +do this by typing: +
            cd .. in your shell. Now you schould be in the '/your/path/to/jabber-1.4.x' +directory now type: +
            +make +
            +and may (to install the new binarys) +
            +make install +
            +
            +in your shell.You will see a debug report if no errors ocure you are done. +If an error ocures (somthing like: `can't find mod_acs.o'), +check if you have done everything right in the above sections, +
            +
            +But if everything went right, its now time to configure your Jabber Server +to work with the module. +
            +In the same dir the '/your/path/to/jabber-1.4.x' open the jabber.xml file +with your prefered editor, type: +
            +emacs jabber.xml +
            +you have probably done this before, now go to the '<service>' section and in +ther to the '<load>' section +insert a line saying : +

            + +

            "<mod_acs>./jsm/jsm.so</mod_acs>" + +

            + +

            +at the seconed row of the '<load>' section.Make sure you placed your edits in +the first row after the '<jsm>' row , other wise the module wont work. +Save your edits , it should look like this: +

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            <service>
            ...
            <several services>
            ....
             <load main="jsm">
                <jsm>./jsm/jsm.so</jsm>
                <mod_acs>./jsm/jsm.so</mod_acs> <-----enter your row here.
                <mod_echo>./jsm/jsm.so</mod_echo>
                <mod_roster>./jsm/jsm.so</mod_roster>
                <mod_time>./jsm/jsm.so</mod_time>
                <mod_vcard>./jsm/jsm.so</mod_vcard>
                <mod_last>./jsm/jsm.so</mod_last>
                <mod_version>./jsm/jsm.so</mod_version>
                <mod_announce>./jsm/jsm.so</mod_announce>
                <mod_agents>./jsm/jsm.so</mod_agents>
                <mod_browse>./jsm/jsm.so</mod_browse>
                <mod_admin>./jsm/jsm.so</mod_admin>
                <mod_filter>./jsm/jsm.so</mod_filter>
                <mod_offline>./jsm/jsm.so</mod_offline>
                <mod_presence>./jsm/jsm.so</mod_presence>
                <mod_auth_plain>./jsm/jsm.so</mod_auth_plain>
                <mod_auth_digest>./jsm/jsm.so</mod_auth_digest>
                <mod_auth_0k>./jsm/jsm.so</mod_auth_0k>
                <mod_log>./jsm/jsm.so</mod_log>
                <mod_register>./jsm/jsm.so</mod_register>
                <mod_xml>./jsm/jsm.so</mod_xml>
             </load>
            </service>
            + +
            +

            +Defining a jadmin section in the jabber-configfile (jabber.xml). +The </jadmin> tag has to be a direct subtag of the <jsm> section of your config file. +

            + + + <jsm xmlns="jabber:config:jsm"> + . + . + +<jadmin host="localhost" community_client="xxx@localhost/resource" standard_buddy="buddy_name" standard_group="buddy_group" ></jadmin> + + . + . + . + </jsm> +
            + +

            <!-- the "host" attribute has to be of the same value,that you defined in the <host> section above.
            + the "community_client" needs the same value you defined in the configfile of your web server.
            + admin functions will only register to the session of your web server client
            + when the jid you login with, exactily matches this string
            + (user , server and recource)
            +
            + the "standard_buddy" is the user part of the jid you defined in the "community_client" attribute.
            + the "standard_group" is the name of the default group you wish to add buddys to.
            +

            + + +
            +

            +Don't forget to save your edits.(In emacs you do this by typing: C-x C-s) +
            + +
            +
            +Now go to the spool directory of your jabber server, +
            +
            +?- cd spool +
            +
            +there you find towe files plain.xml.1 and plain.xml.2 , the number at the end stands for the server you are using i.e. jabber-1.4.1/1.4.2. If you have not installed the jabber server with make install , all you need to do is to move the file in the server directoy, type : +
            +
            +?- mv plain.xml.x yourserver.com/plain.xml +
            +
            +if you have installed the binarys in another directory you have to move the file into the server directory of your installation path.You have to type somthing like this: +
            +
            +?- mv plain.xml.x /your/jabber-instalation/spool/yourserver.com/plain.xml +
            +
            +default path is +
            +
            +?- mv plain.xml.x /usr/locale/jabber/spool/yourserver.com/plain.xml +
            +
            +The mod will work without this file , but you will not be able to register users via the admin client. +
            +
            +
            +

            Now you should install the Conference Module for the Jabber Server. + If you have already installed the commen Conference Module you schould change to our one, + it is usaly named like the oficial releas with an '+' at the end, + it offers additional features witch make it more usefull for OpenACS. + The extra features are:
            + Limit the creation of Rooms with a specific prefix (like 'offical_xyz') to Admins
            + Get the Remote (real) JID's of the Members in a Room. This way we know to wich OpenACS User belongs a Message.
            +
            + The nsjabber module for Aolserver will work with the normal Conference Module, + but it's recomended to use the '+' version. +

            + +

            Download the conference-0.4.1+.tar to your server copy it to your Jabber Server directory and untar it. +
            ?- tar -xvf conference-0.4.1+.tar +
            know change to the confererence directory and build the binarys. Type: +
            ?- cd conference-0.4.1+ +
            ?- make +
            +
            if the build was successfull you can now configure the Conference Module. + + +

            + Conference can be configured as a public or private chatroom server, users from other Jabber Servers will only + be able to access your Conference Server if the URL it uses is fully qualified : +

            + +

            + Open the jabber.xml configuration file again with your prefered Editor and enter the following section to the <service> section; +

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            <service id='conference.localhost'>
                 <load><conference>/your/path/to/conference/conference.so</conference></load>
              <conference xmlns="jabber:config:conference">
                <public/>
            The below admins section defines admins that are allowed to create Rooms with a specific prefix!
            One of the admins schould be the jid your Aolserver uses, together with the prefix(s) you want to limit to your Comunity
               <admins>
                   <admin jid="admin@sussdorff-roy.com">
                    <room>room_name</room>
                    <room>room_prefix</room>
                   </admin>
                </admins>
                <vCard>
                  <FN>Public Chatrooms</FN>
                  <DESC>This service is for public chatrooms.</DESC>
                  <URL>http://foo.bar/</URL>
                </vCard>
                <history>20</history>
                <notice>
                  <join> has become available</join>
                  <leave> has left</leave>
                  <rename> is now known as </rename>
                </notice>
                <room jid="help@conference.localhost">
                  <name>Assistance Zone</name>
                  <privacy/>
                </room>
                <room jid="admin@conference.localhost">
                  <name>Adminz only</name>
                  <secret>con0r</secret>
                  <notice>
                    <join> just rocks!</join>
                     <leave> gets lost</leave>
                    <rename> feels it is more important to be known as </rename>
                  </notice>
                </room>
              </conference>
            </service>
            + +

            +Add this section to the <browse> area to advertise it to your users: + +

            <conference type="public" jid="conference.localhost" name="Public Chatrooms"/> + +

            +
            +
            +

            +If you have done this, and no error ocured you are throug with the +instalation.Check if you have doene everything right by restarting your +server.Type : +

            + + +?- cd ../jabberd +
            +?- jabberd -D +
            +
            +Debugg output will showe errors if any occured. +

            +Up + +
            +Back: Jabber Server Installation +Next: General user documentation +
            + +
            + \ No newline at end of file Index: openacs-4/packages/jabber/www/doc/introduction.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/introduction.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/introduction.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,118 @@ + +Jabber Introduction + + +
            +Next: Installation Guide +
            + +

            Introduction

            + + +

            This document explains the Jabber Server, which functionality and characteristics +it has, so everyone can get a better overview.

            + +Jabber is an XML-based system for the near-real-time exchange of messages and +presence.(A strong foundation in XML, which makes structured, intelligent +messaging possible not only between human users but also between software +applications.) Jabber uses a client-server architecture, not a client-to-client +architecture. All Jabber messages and data from one client to another must go +through the server. Any client is free to negotiate a direct connection to +another client, but those connections are for application-specific usage only. +There are even specific instances where this is encouraged, such as file +transfers, but those instances are negotiated first within the context of a +client-server framework. Jabber uses a distributed Network, its architecture is +modeled after that of the e-mail system. Each user has their local server which +receives information for them, and the servers transfer messages and presence +information among themselves. There can exist any number of Jabber servers which +accept connections from clients as well as communicate to other Jabber servers. +Each server functions independently of the others, and maintains its own user +list. Any Jabber server can talk to any other Jabber server that is accessable +via the Internet. A particular user is associated with a specific server by a +unique identefier (jid) that is like an emailadress. +

            +Jabber ID (jid) +

            Jabber IDs are used both externally and internally to express ownership or +routing information. A Jabber ID is made up of a domain, node, and resource in +the following format: user@host/resource or [node@]domain[/resource]. It is +designed as a URI (Uniform Resource Identifier), a URI is a character string +used to identify a resource (such as a file, in this case a session of a Jabber +Server entity) from anywhere on the Internet by type and location. The term +�URL� (Uniform Resource Locator) is a specific type of URI. For more +information, visit http://www.w3.org/Addressing/.

            +The three main branches of the Jabber communication. +

            -Info/Query:      In the Jabber protocol, Info/Query is a data structure used to +obtain information about a Jabber Entity or to set information for an entity. +
            +-Presence:         Presence indicates whether a Jabber Entity is available for +communication. It includes basic Availability (i.e., online vs. offline), as +well as status indicators that capture various Availability Types.
            +-Message:         A Message is used to transport information (a message) between two or more entitys +of a Jabber Server.

            +Jabber Server +

            The Jabber Server is the software that connects and communicates with other +Jabber clients and servers. All communications for a client are directed to the +server and then passed to the client. All client preferences and data are stored +on the server. The Jabber server plays two primary roles: 1. Listening for +client connections and communicating directly with client applications. 2. +Communicating with other Jabber servers. The Jabber Server is designed to be +modular, it can be extended by modules (JSM) that implement speciale purposes, +or comunicat with other deamons that register them selfs at the Jabber core +Server (not like then the modules, they are not a part of it) , and translate +the Jabber native protocol to a protocol of any other IM Service. This protocol +translation deamons are called Transports, the comunication between a Transport +and the core Server is based on Networkprotokols such as TCP/IP and can be +hosted on diferent Servers.The Jabber core Server can be configured in one +config file that is loaded into the Jabber core Server, it determines what +modules of the JSM and what Transports should be loaded (on start up) along with +detailed configuration information for each.

            +Transport +

            A component of the Jabber server that provides a bridge over the Internet or +a network, between the Jabber Server and any non-Jabber system or network. How +is it doing that: -Protocol A protocol is a formalized set of instructions that +developers follow when creating applications, including Jabber applications. +-Native Protocol A native protocol is the format in which communications occur +within a particular service. For example, the AIM Transport communicates with +AIM by translating Jabber�s native XML protocol into AIM�s native protocol +and vice-versa. +

            Client +

            -Resource:      The resource of a Jabber ID can provide additional information +about how a user is accessing a Jabber server. A Resource can be the location +from which a user is connecting (e.g., home or work), the type of device a user +is connecting with (e.g., notebook or handheld), or the user�s specific Jabber +Client (e.g., JIM or WinJab).
            +-Priority:         Priority is a user-defined setting that +determines the importance of each Resource a Jabber user is using to access the +Jabber server. The server will send messages and presence information to the +highest-priority resource, which is known as the Primary Resource. This enables +a user to connect to the server from multiple locations or devices, but only +receive messages at a single device or location. 
            +-Roster:          A list of Jabber Users or other Jabber Entities to whom a +Jabber User is subscribed. A user�s roster is often the combination of a +user�s Personal Groups and Shared Groups. -Subscription: A subscription is a +request to receive presence updates from a Jabber User or other Jabber Entity. +The receiving entity may refuse a subscription, preventing the requesting party +from seeing presence updates. If the receiving entity approves the subscription, +the requesting party will see presence updates.

            + +

            Important:
            +
            + The OACS Jabber server acts as one buddy, so if you send a message the receiver +of the message will think that the user "OACS" send him this message. Of course we want the receiver +to know who send him the message, so we append on every message your name at the beginning. Furthermore +the receiver cannot send you messages back if you send him the message via Webpages, because this way you would +be the OACS-user and not you!Therefore it is impossible for the Jabber server to track the messages and find +the original sender. So if you want to be recognized perfectly by the receiver and be able to receive messages aswell, +you have to send your messages through the Jabber Applet, because this Jabber Applet acts like a normal Jabber Client +and you would not send your messages via the Jabber server as general OACS-user, but as Jabber user with his own JabberID. +

            + +
            +Next: Installation Guide +
            + +
            +

            Author: + Bjoern Kiesbye +

            + Index: openacs-4/packages/jabber/www/doc/jabber-developer.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/jabber-developer.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/jabber-developer.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,33 @@ + +Overview + + +

            Overview

            +

            The Jabber module for OpenACS can track any entity presence state (i.e. online or offline) from most of the Big Instant Messaging Systems (AIM , MSN , Yahoo , ICQ and Jabber). It is able to interact with your local Jabber Server and it can record Chat�s hosted by the Conference Component of your local Jabber Server.

            + +

             

            +

             

            +

            The tracking of presence :

            +

            The Aolserver log�s into your precreated account at your local Jabber Server , it acts like a usual Jabber Client so it can connect it self to any IM System your Jabber Server is able to connect to. When a user enters a name from an entity from any supported IM System (say name: �Fred123� IM System: �AIM� ), this information is inserted into the table jb_screens (Oacs) and into the account information (in jabber terms �roster�) (the account the Aolserver uses ) at your local Jabber Server.

            +

            Once this information is in the Aolserver�s accounts roster , the Jabber Server will push any presence state changes ,from this entity , to the Aolserver. Who then writes the new state into the state column of the jb_screens table where the screen column has the value �Fred123� and the service column has the value �AIM�. The table jb_screens holds all information about a entity , the screen(name) the service the screen belongs to , the current online state (and possibly a away message and a resource). If any application has an interest in the online state of any entity (like the IM Addressbook) this application has to reefer to the jb_screens table .In the www/image subdirectory their are several icons for displaying different online states and IM Systems . In the jabber-procs.tcl library file their are some functions that return a colour for a passed in online state (it would be help full for users if the different states are display system wide in the same colour ).

            +

            As well you are able to send IM Messages to any entity of any IM System your Jabber Server supports, but you can�t receive any Messages. For end users it can be used like a SMS web interfaces , the OpenACS could use it in it�s alert system. You find all pages related to the tracking of presence in the www/jabber directory.

            + +

            The recording of Chat�s:

            +

            The Aolserver can enter any Conference Room from the Conference Module of your local Jabber Server, so it is able to receive any Messages send to a Conference Room once it is asked to record this Conference Room. The Conferences are stored in three tables jb_conference_protocols , this table holds any Message from any Conference Room , in addition to the Message text any line reefers to the table jb_conference_rooms ,via the room_id (which holds the room name the description of what discussions this room is for etc. ), the table jb_conference_thraeds ,via the thread_id (which holds the name of the currently discussed topic), and the users table via the user_id (the user_id is figured out with the help of the jid, the possibility to query the conference module for the real jid�s of conference members isn�t a standard so make sure you use the version that comes with the package). You find all tcl/adp pages used for conferencing in the www/jabber/conferencing subdirectory. Later access is done by relations , the jb_conferens_room is defined as an Object (acs 4.x) so a room can (has to) be related to a Group (Groups for conferencing can be created and administrated in the admin section of the jabber module www/jabber/admin/conferencing). On the Conference index page a list of all Groups the user is a member of are displayed, which link them to an overview of all Room� including all Topics that belong to this Group which themselves link the user to read a Topic enter an currently active Room or to Restart an inactive Room. On the index page their is an overview with all new Topics (since last visit) displayed.

            + +

             

            +

             

            +

             

            +

             

            +

            Conferencing for Admins:

            +

            On the www/jabber/admin/conference.adp page you are able to define Group�s , this will Groups be able to use the Conferencing facility of the Jabber module. You can define a new Group by entering a name in the Group Name Field a pressing the create Button. Once a Group is created it will show up in the list of existing Conference Group�s below. The Group names link you to a page where you can add and remove Users or whole Groups to the one you have just created. At the bottom of the page you can search the System for Users or Groups , the search results will be displayed below your search entry . Clicking on one of the search results will add this User/Group to your Conference Group. At the top of the Page two lists are displayed the first shows all Users (their names) of the Conference Group , the second shows all Groups of your Conference Group (their names). Behind every Name you have a Link to remove this User/Group from your Conference Group.

            +

            You are able to add a hole Group A to your Group Conf , all users who are members of Group A will then be members of Group Conf , even if members from Group A wont show up in the Users List of Group Conf.

            + +

             

            +

             

            +

            Conferencing for Users:

            +

            If you want to use the Conferencing facility you should have a Jabber account already and you should (but you don�t have to ) be online with the Enigma Jabber Client (or any other Jabber Client that supports Conferencing , the Jabber Applet doesn�t support Conferencing ). Go to the page /jabber/conferencing you will see a list displaying all Conference Groups you are a member of, below you will see a List displaying all new Topics that have been discussed since you last visited this System. Clicking on one of the read links behind a new topic will bring you directly to the page that show�s the whole discussion on this Topic. If you follow one of the Group Name Links ,at the top, you get to the main Page of this Group. On the Groups main Page You find two Links one to Create a new Top level Room , a second to Invite other Users to a Conference Room, below you find a structure displaying all Rooms of this Group with all Topics that have been discussed. Behind every room you find a Link ,in case other users are currently in this Room , saying Enter. If you are online with Enigma you enter this Room when you Click on the Enter Link. If no one is currently in this Room the Link will be named Restart, clicking this link will restart the Room and you will enter it. In case you restarted a Room you can now go to the Invite page (just follow the Link �Invite other Users to a Room� at the top of the page ), here you find a Selection Box with other Users (only those who are currently online will be displayed) . Select the once you want to invite (in case you want to invite more then User , hold the �Ctrl� or �Strg� � Key down while making your selections with the Mouse ) , below you find a Selection Box with all active Rooms including the one you have just restated , select it. In the two Text Fields below enter some words that let the Users your going to Invite know why your inviting them and what you want to discuss. Now you can press the �Invite� Button ,every User o you selected above will be asked to come to the Room you selected.

            + +

             

            +

            That means after you have entered contact information into the IM Addressbook (like Firstname: �Fred� Name: �Example� AIM screen: �Fred123� ) the Jabber module tracks the presence of the AIM entity �Fred123� . From now on ,when ever you call one of the Jabber Pages , the online state of your contact is displayed to you.

            + \ No newline at end of file Index: openacs-4/packages/jabber/www/doc/jabber-instalation.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/jabber-instalation.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/jabber-instalation.adp 20 Oct 2004 19:36:50 -0000 1.1 @@ -0,0 +1,283 @@ + + +Installation Guide + + +

            +Download the jabber-1.4.2 server to your tmp directory. +and do the same with mod_acs-0.0.8.x.tar.gz +

            +

            +Now unzip and untar the archive. +

            +
              +
            • >gzip -d jabber-1.4.2.tar.gz
            • +
            • >tar -xvf jabber-1.4.2.tar
            • +
            +

            +now copy the mod_acs-0.0.8.x.tar.gz into the jabber-1.4.2 dir. +

            +

            +>mv mod_acs-0.0.8.x.tar.gz jabber-1.4.2 +

            +

            +Now configure and make the binaries. +

            + +
              +
            • >cd jabber-1.4.2
            • +
            • >gzip -d mod_acs-0.0.8.x.tar.gz
            • +
            • >tar -xvf mod_acs-0.0.8.x.tar
            • +
            • >./configure
            • +
            +edit the make files. + +

            +>make +

            +

            +If no errors occured you can now configure your jabber server. +

            +

            +>emacs jabber.xml +

            +

            +now replace the all "localhost" appearences with "your.domain.name" +

            + +

            +(In emacs the easiest way in emacs todo this is: + M-x replace-string (hit enter) + localhost (enter) + your.domain.com (enter) +
            + emacs will tell you how many times it replaces "localhost" with "your.domain.name" + ) +

            + +

            +Quit emacs C-x C-c, and start the server vor the first time. + +

            +>jabberd/jabberd -D +

            +

            +Now try to connect to your Jabber Server with your Jabber Client , and register a account, if it worecked +, register an acount for your aolserver. +

            +

            +Now install the jabberd server to /usr/local/jabber +

            +
              +
            • >su root
            • +
            • >cd /usr/local
            • +
            • >mkdir jabber
            • +
            • >chown nsadmin jabber
            • +
            • >chown web jabber
            • +
            • >exit
            • +
            +

            +As nsadmin go back to the /tmp/jabber-1.4.2/ dir. and copy the following files. +

            +
              +
            • >cd /tmp/jabber-1.4.2
            • +
            • >mkdir /usr/local/jabber/jabberd
            • +
            • >cp jabberd/jabberd /usr/local/jabber/jabberd
            • +
            • >mkdir /usr/local/jabber/
            • +
            • >cp jsm/*.so /usr/local/jabber/jsm
            • +
            • >cp pthsock/*.so /usr/local/jabber/
            • +
            • >cp dnsrv/*.so /usr/local/jabber/
            • +
            • >cp xdb_file/*.so /usr/local/jabber/
            • +
            • >cp -r spool /usr/local/jabber/
            • +
            • >cp dialback/*.so /usr/local/jabber
            • +
            • >rm -r cygin
            • +
            + + +

            +Now download the transports (aim , yahoo , etc.) and install them. +

            +

            +Download the aim-transport-0.x.x.tar.gz to the folder /tmp/jabber-1.4.1 +

            +
              +
            • >gzip -d aim-transport-0.x.x.tar.gz
            • +
            • >tar -xvf aim-transport-0.x.x.tar
            • +
            • >cd aim-transport-0.x.x
            • +
            • >emacs README
            • +
            + +

            +In the README file you find everything you have to know to compile an configure the transport, +compilation an configuration can vary from transport to transport, this is what it mostly locks like. +

            + +
              +
            • >cd aim-transport-0.x.x
            • +
            • > ./configure
            • +
            • >make
            • +
            • >mkdir /usr/local/jabber/aim
            • +
            • >cp src/*.so /usr/local/jabber/aim
            • +
            • >emacs /usr/local/jabber/jabber.xml
            • +
            + +

            +Inserting a <browes> and a <service> section, into the jabber.xml file. +

            + + + + + + + + + + + + + + + + + + + + + + + + +
            <jabber>
            ...
            >jsm>
            ...
            <browes>
            <!-- The Browes section is only important if you want to let users use + your transporst, this is no technical configuration of the Server or + it's Transports, it's just to information Jabber Client Aplication's + what Transports are available. + --> +
            <service type="aim" jid="aim.intranet.sussdorff-roy.com" name="AIM Transport">
            <ns>jabber:iq:gateway</ns>
            <ns>jabber:iq:register</ns>
            </service>
            .....
            </browes>
            </jsm>
            + + <!-- The Service section is very important, it tells jabberd wich Transports (lib's) to use, + their two ways to use a Transport 1. load/run it in the main jabberd proccess. + 2. load/run a Transport in a own jabberd proccess, and let the main jabberd proccess + connect to it via the network (prefered way ) + + As well the service Section configures the Transports (wich url they use etc.) --> + +
            + <!-- 1. To load/run a Transport in the main jabberd proccess, put a <service>-xml (like the example A.) + into the jabber.xml file to let the main jabberd proccess load/configure/run the Transport. + After you entered this Section you can restart your server with: +
            + >jabberd/jabberd -c /usr/local/jabber/jabber.xml +
            + and the Transport will be available to your users. + --> +
            + + Example A. : + + + + + + + + + + + + + + + + + + +
            <service id='aim.intranet.sussdorff-roy.com'>
            <aimtrans xmlns='jabber:config:aimtrans'>
            <aimbinarydir</home/bkiesbye/jabber/jabber-1.4.1/aim-transport-0.9.23/aim3.5.1670>/aimbinarydir<
            <vCard>
            <FN>AIM Transport</FN>
            <DESC>An AIM Transport!</DESC>
            <URL>http://aim.intranet.sussdorff-roy.com/</URL>
            </vCard>
            </aimtrans>
            <load>
            <aim_transport>./aim-transport-0.9.24c/src/aimtrans.so</aim_transport>
            </load>
            <t/service>
            + + <!-- 2. To let the main jabberd proccess connect to a Transport that runs in a seperate proccess. + you need a different styled sektion in your jabber.xml file (Example B) to let the main jabberd + know how to connect to a Transport that runs in a seperate proccess (may even on a seperate server) + , and a seperate Transport-jabber.xml (Example C.) file, to let the seperate jabberd proccess + load/configure/run The transport. +--> +
            + + Example B.: + + + + + + + + + + + + + + + +
            <service id="yahoo-linker">
            <host>yahoo.intranet.sussdorff-roy.com</host>
            <accept>
            <ip>127.0.0.1</ip> <!-- Server IP the Transport runs on >
            <port>5237</port> <!-- the port to connect to (same as in Example C.) >
            <secret>passwd</secret>
            </accept>
            </service>
            </jabber>
            + +

            + The conntent of the extra file should look like this (yahoo-jabber.xml) +

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            <!-- Example yahoo-jabber.xml configuration file -->
            <jabber>
            <!-- This section is to let this proccess know how to connect to the main jabberd proccess -->
            <service id="yahoo-linker">
            <connect>
            <ip>127.0.0.1</ip>
            <port>5237</port>
            <secret>passwd</secret>
            </connect>
            <uplink/>
            </service>
            <pidfile>./yahoo-jabber.pid</pidfile>
            <!-- This section is to load/configure the Transport it self. -->
            <service id="yahoo.intranet.sussdorff-roy.com">
            <load><yahoo_transport>./yahoo-transport.so</yahoo_transport></load>
            <config xmlns="jabber:config:yahoo">
            <vCard>
            <NAME>Yahoo Transport</NAME>
            </vCard>
            <server>scs.yahoo.com</server>
            <port>5050</port>
            <charmap>CP1252</charmap>
            </config>
            </service>
            </jabber>
            + +

            +You can now start your main jabberd proccess with: +

            +

            +>jabberd/jabberd -c /usr/local/jabber/jabber.xml +

            +

            +and to start the Transport in it's own proccess type: +

            +

            +>jabberd/jabberd -c /usr/local/jabber/yahoo-jabber.xml +

            +

            +It will atomaticly try to connect to the main jabberd proccess via the network, +you can start/stop/crash the seperate Transport proccess without harming the main jabberd proccess. +In case you run your Transport on a seperate Server you need a Jabber instalation on this Server as well. +

            + + + + \ No newline at end of file Index: openacs-4/packages/jabber/www/doc/jabber-installation.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/jabber-installation.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/jabber-installation.adp 20 Oct 2004 19:36:51 -0000 1.1 @@ -0,0 +1,292 @@ + + +Installation Guide +
            +Back: Introduction +Next: Jabber Client Installation +
            + +

            +Download the jabber-1.4.2 server to your tmp directory. +and do the same with mod_acs-0.0.8.x.tar.gz +

            +

            +Now unzip and untar the archive. +

            +
              +
            • >gzip -d jabber-1.4.2.tar.gz
            • +
            • >tar -xvf jabber-1.4.2.tar
            • +
            +

            +now copy the mod_acs-0.0.8.x.tar.gz into the jabber-1.4.2 dir. +

            +

            +>mv mod_acs-0.0.8.x.tar.gz jabber-1.4.2 +

            +

            +Now configure and make the binaries. +

            + +
              +
            • >cd jabber-1.4.2
            • +
            • >gzip -d mod_acs-0.0.8.x.tar.gz
            • +
            • >tar -xvf mod_acs-0.0.8.x.tar
            • +
            • >./configure
            • +
            +edit the make files. + +

            +>make +

            +

            +If no errors occured you can now configure your jabber server. +

            +

            +>emacs jabber.xml +

            +

            +now replace the all "localhost" appearences with "your.domain.name" +

            + +

            +(In emacs the easiest way in emacs todo this is: + M-x replace-string (hit enter) + localhost (enter) + your.domain.com (enter) +
            + emacs will tell you how many times it replaces "localhost" with "your.domain.name" + ) +

            + +

            +Quit emacs C-x C-c, and start the server vor the first time. + +

            +>jabberd/jabberd -D +

            +

            +Now try to connect to your Jabber Server with your Jabber Client , and register a account, if it worecked +, register an acount for your aolserver. +

            +

            +Now install the jabberd server to /usr/local/jabber +

            +
              +
            • >su root
            • +
            • >cd /usr/local
            • +
            • >mkdir jabber
            • +
            • >chown nsadmin jabber
            • +
            • >chown web jabber
            • +
            • >exit
            • +
            +

            +As nsadmin go back to the /tmp/jabber-1.4.2/ dir. and copy the following files. +

            +
              +
            • >cd /tmp/jabber-1.4.2
            • +
            • >mkdir /usr/local/jabber/jabberd
            • +
            • >cp jabberd/jabberd /usr/local/jabber/jabberd
            • +
            • >mkdir /usr/local/jabber/
            • +
            • >cp jsm/*.so /usr/local/jabber/jsm
            • +
            • >cp pthsock/*.so /usr/local/jabber/
            • +
            • >cp dnsrv/*.so /usr/local/jabber/
            • +
            • >cp xdb_file/*.so /usr/local/jabber/
            • +
            • >cp -r spool /usr/local/jabber/
            • +
            • >cp dialback/*.so /usr/local/jabber
            • +
            • >rm -r cygin
            • +
            + + +

            +Now download the transports (aim , yahoo , etc.) and install them. +

            +

            +Download the aim-transport-0.x.x.tar.gz to the folder /tmp/jabber-1.4.1 +

            +
              +
            • >gzip -d aim-transport-0.x.x.tar.gz
            • +
            • >tar -xvf aim-transport-0.x.x.tar
            • +
            • >cd aim-transport-0.x.x
            • +
            • >emacs README
            • +
            + +

            +In the README file you find everything you have to know to compile an configure the transport, +compilation an configuration can vary from transport to transport, this is what it mostly locks like. +

            + +
              +
            • >cd aim-transport-0.x.x
            • +
            • > ./configure
            • +
            • >make
            • +
            • >mkdir /usr/local/jabber/aim
            • +
            • >cp src/*.so /usr/local/jabber/aim
            • +
            • >emacs /usr/local/jabber/jabber.xml
            • +
            + +

            +Inserting a <browes> and a <service> section, into the jabber.xml file. +

            + + + + + + + + + + + + + + + + + + + + + + + + +
            <jabber>
            ...
            >jsm>
            ...
            <browes>
            <!-- The Browes section is only important if you want to let users use + your transporst, this is no technical configuration of the Server or + it's Transports, it's just to information Jabber Client Aplication's + what Transports are available. + --> +
            <service type="aim" jid="aim.intranet.sussdorff-roy.com" name="AIM Transport">
            <ns>jabber:iq:gateway</ns>
            <ns>jabber:iq:register</ns>
            </service>
            .....
            </browes>
            </jsm>
            + + <!-- The Service section is very important, it tells jabberd wich Transports (lib's) to use, + their two ways to use a Transport 1. load/run it in the main jabberd proccess. + 2. load/run a Transport in a own jabberd proccess, and let the main jabberd proccess + connect to it via the network (prefered way ) + + As well the service Section configures the Transports (wich url they use etc.) --> + +
            + <!-- 1. To load/run a Transport in the main jabberd proccess, put a <service>-xml (like the example A.) + into the jabber.xml file to let the main jabberd proccess load/configure/run the Transport. + After you entered this Section you can restart your server with: +
            + >jabberd/jabberd -c /usr/local/jabber/jabber.xml +
            + and the Transport will be available to your users. + --> +
            + + Example A. : + + + + + + + + + + + + + + + + + + +
            <service id='aim.intranet.sussdorff-roy.com'>
            <aimtrans xmlns='jabber:config:aimtrans'>
            <aimbinarydir</home/bkiesbye/jabber/jabber-1.4.1/aim-transport-0.9.23/aim3.5.1670>/aimbinarydir<
            <vCard>
            <FN>AIM Transport</FN>
            <DESC>An AIM Transport!</DESC>
            <URL>http://aim.intranet.sussdorff-roy.com/</URL>
            </vCard>
            </aimtrans>
            <load>
            <aim_transport>./aim-transport-0.9.24c/src/aimtrans.so</aim_transport>
            </load>
            <t/service>
            + + <!-- 2. To let the main jabberd proccess connect to a Transport that runs in a seperate proccess. + you need a different styled sektion in your jabber.xml file (Example B) to let the main jabberd + know how to connect to a Transport that runs in a seperate proccess (may even on a seperate server) + , and a seperate Transport-jabber.xml (Example C.) file, to let the seperate jabberd proccess + load/configure/run The transport. +--> +
            + + Example B.: + + + + + + + + + + + + + + + +
            <service id="yahoo-linker">
            <host>yahoo.intranet.sussdorff-roy.com</host>
            <accept>
            <ip>127.0.0.1</ip> <!-- Server IP the Transport runs on >
            <port>5237</port> <!-- the port to connect to (same as in Example C.) >
            <secret>passwd</secret>
            </accept>
            </service>
            </jabber>
            + +

            + The conntent of the extra file should look like this (yahoo-jabber.xml) +

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            <!-- Example yahoo-jabber.xml configuration file -->
            <jabber>
            <!-- This section is to let this proccess know how to connect to the main jabberd proccess -->
            <service id="yahoo-linker">
            <connect>
            <ip>127.0.0.1</ip>
            <port>5237</port>
            <secret>passwd</secret>
            </connect>
            <uplink/>
            </service>
            <pidfile>./yahoo-jabber.pid</pidfile>
            <!-- This section is to load/configure the Transport it self. -->
            <service id="yahoo.intranet.sussdorff-roy.com">
            <load><yahoo_transport>./yahoo-transport.so</yahoo_transport></load>
            <config xmlns="jabber:config:yahoo">
            <vCard>
            <NAME>Yahoo Transport</NAME>
            </vCard>
            <server>scs.yahoo.com</server>
            <port>5050</port>
            <charmap>CP1252</charmap>
            </config>
            </service>
            </jabber>
            + +

            +You can now start your main jabberd proccess with: +

            +

            +>jabberd/jabberd -c /usr/local/jabber/jabber.xml +

            +

            +and to start the Transport in it's own proccess type: +

            +

            +>jabberd/jabberd -c /usr/local/jabber/yahoo-jabber.xml +

            +

            +It will atomaticly try to connect to the main jabberd proccess via the network, +you can start/stop/crash the seperate Transport proccess without harming the main jabberd proccess. +In case you run your Transport on a seperate Server you need a Jabber instalation on this Server as well. +

            + + +
            +Back: Introduction +Next: Jabber Client Installation +
            + + + + \ No newline at end of file Index: openacs-4/packages/jabber/www/doc/ns-jabber-documentation.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/ns-jabber-documentation.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/ns-jabber-documentation.adp 20 Oct 2004 19:36:51 -0000 1.1 @@ -0,0 +1,526 @@ + +nsjabber procedure documentation + + + + +

            Index of all the tcl functions related to the Jabber Client for the AOLServer

            +All functions return 0 if the client is connected to the Jabber server,
            + and -1 if the client is not connected to the Jabber Server. +
            In the second case no action at all takes places.
            +

            Index

            +

            jb_getconnstate

            +

            jb_addbuddy

            +

            jb_addtransbuddy

            +

            jb_chat

            +

            jb_message

            +

            jb_login

            +

            jb_logout

            +

            jb_remove

            +

            jb_removebuddy

            +

            jb_removetransbuddy

            +

            jb_sendxml

            +

            jb_invite

            +

            jb_activeroommembers

            +

            jb_activeconferencerooms

            +

            jb_delconferenceroom

            +

            jb_createconferenceroom

            +

            jb_new_subject

            +

            jb_append_subject

            +

            jb_spellcheck

            +

            jb_get_transport_url_from_id

            + + + + + +
            +
            +
            + + + +

            jb_getconnstate

            +

            Overview

            +

            Check if the Aolserver is online at the Jabber Server

            +

            Syntax

            +

            jb_addbuddy

            +

            Description

            +

            jb_getconnstate Takes no parameters, returns 0 if the Aolserver is online or -1 if not.

            + + + + +
            +
            +
            + +
            + +

            jb_addbuddy

            +

            Overview

            +

            Adding buddy('s) to a user roster.

            +

            Syntax

            +

            [1] jb_addbuddy screenname screenname ...

            +

            Description

            +

            [1]jb_addbuddy This function is not limited to the amount of parameters,each parameter must be a valid + sreenname (a screenname is a jid with out the Server portion). + The first parameter has to be the screenname of the user who wants to add someones jid to his roster (e.g. the one who is triggering this function), all other parameters are the screennames to be added to the firsts roster. + If a screenname contains invalid charakters this function returns an error, if a screenname is spelled corectly but is not valid the function will not return an error and no action to this specific screenname takes place, but it will still apear in all valid screennames rosters.

            + +

            Syntax

            +

            [2]jb_addbuddy list1 list2 .... listn

            +

            Description

            +

            [2]jb_addbuddy works like [1]jb_addbuddy except that it gets past lists instaed of +simple variables. A list consists of :

            +

            +

            + + + + +
            IndexValueDescription
            1screenThe screenname of a user
            2groupThe (roster)group the jid should be added to.Defaults to "acs"
            3nameThe name to be displayed in the roster/chat.Defaults to screen.Requiers a group specified in index 2.
            +

            + + +
            +
            +
            +
            + +
            +

            jb_addtransbuddy

            +

            Overview

            +

            Adding buddy from other IM Systems to the Roster of the Web Server Client to track their presence.

            +

            Syntax

            +

            [1] jb_addtransbuddy screenname group Transport id

            +

            Description

            +

            [1]jb_addtransbuddy This function takes three parameters the first is a Screenname from any IM System that is available, the second is the ID of the IM System (transport) to wich the screenname belongs.You can find out wich ID a transport uses by calling the function jb_get_transport_id_from_symbol $symbol, where symbol is used in the db to identify a service (or transport in jabber terms) (aim ,msn , jabber , etc.)). +

            + + +
            +
            +
            +
            + +
            + +

            jb_chat

            +

            Overview

            +

            Start a chat between two users.

            +

            Syntax

            +

            jb_chat screenname screenname

            +

            Description

            +

            jb_chat +This function takes two parameters, both are screennames (a screenname is a jid with out the Server portion) , it will start a chat between the specified + users. Even if both are offline they recive at least a "Hello" and all masseges send, when they go online the next time.If a screenname contains invalid charakters this function returns an error.

            +

            NOTE

            +

            Nothing

            + +
            +
            +
            +
            + +
            +

            jb_login

            +

            Overview

            +

            Log the AOLServer Client into the Jabber IM Server

            +

            Syntax

            +

            success jb_login void

            +

            Description

            +

            jb_loginThis function takes no parameters, it logs the community client into the Jabber Server. A call to this function should be done on AOLServer startup, or after a restart of the Jabber Server. It returns (success) 0 on a successfull login and -1 otherwise.

            +

            NOTE

            +

            A automatic login on AOLServer startup is in work but not implemented yet

            + +
            +
            +
            +
            + +
            +

            jb_logout

            +

            Overview

            +

            Log the AOLServer Client out of the Jabber IM Server

            +

            Syntax

            +

            jb_logout void

            +

            Description

            +

            jb_logout This function takes no parameters, it logs the community client out of the Jabber Server.

            +

            NOTE

            +

            This function is not password protected any tcl programmer can call it.

            + +
            +
            +
            +
            + + +
            +

            jb_message

            +

            Overview

            +

            Sending a message.

            +

            Syntax

            +

            jb_message jid message

            +

            Description

            +

            jb_message +This funktion takes two parameters, the first is a full jid (of any valid Jabber Server including its transports) , the second is the message String. +This function dosen't return any errors yet.

            + +
            +
            +
            +
            + + +
            + +

            jb_remove

            +

            Overview

            +

            Unregistering a user at the Jabber Server.

            +

            Syntax

            +

            jb_remove screenname

            +

            Description

            +

            jb_remove +This function takes one parameter, the srcreenname of the user to be unregistered.If a screenname contains invalid charakters this function returns an error. +The screenname and all information related to it, will be removed from the community db backend , as well as the Jabber acount relaeted to the screenname. +The user will be imidiatly disconected from the Jabber server. +

            NOTE

            +

            We work on a version of this function that returns a un-/successfull unregistration +information.

            + +
            +
            +
            +
            + + + +

            jb_removebuddy

            +

            Overview

            +

            Removing buddy('s) from a user roster.

            +

            Syntax

            +

            [1] jb_removebuddy screenname screenname ...

            +

            Description

            +

            [1] jb_removebudy This function is not limited to the amount of parameters,each parameter must be a valid + sreenname (a screenname is a jid with out the Server portion). + The first parameter has to be the screenname of the user who wants to remove someones jid from his roster (e.g. the one who is triggering this function), all other parameters are the screennames to be removed from the firsts roster. + If a screenname contains invalid charakters this function returns an error, if a screenname is spelled corectly but is not valid the function will not return an error and no action to this specific screenname takes place. The roster held in the users prefered Jabber Client (if the user is online) will not change till the user does a relogin.

            + +

            Syntax

            +

            [2] jb_removebuddy list1 list2 .... listn

            +

            Description

            +

            [2]jb_removebuddy works like [1]jb_removebuddy exept that it gets past lists instaed of +simple variables. A list consists of :

            +

            + + + + +
            IndexValueDescription
            1screenThe screenname of a user
            2groupThe (roster)group the jid should be removed from .Defaults to "acs"
            +

            + +
            +
            +
            +
            + +
            +

            jb_removetransbuddy

            +

            Overview

            +

            Removing a buddy from other IM Systems, from the Roster of the Web Server Client to stop tracking their presence.

            +

            Syntax

            +

            jb_removetransbuddy screenname Transport_ID

            +

            Description

            +

            jb_removetransbuddy This function takes two parameters the first is a Screenname from any IM System that is available, the second is the Transport ID of the IM System (transport) to wich the screenname belongs. +

            + +
            +
            +
            +
            + +
            +

            jb_sendxml

            +

            Overview

            +

            Sending raw XML.For developers to test new XML.

            +

            Syntax

            +

            jb_sendxml XML

            +

            Description

            +

            jb_sendxml This function takes one parameter that consists of serialised XML (Serialised XML is a string of XML - Tag's). + It is used by developers only to test new XML , the XML will be directly send to the Jabber server without any tests. + If the Jabber server does not accept the XML as valid Jabber XML it will disconect the client. +

            +

            NOTE

            +

            This function is not password protected any tcl programmer can call it. + It is also possible that the Jabber server disconnects the client, if bad XML is passed.

            + +
            +
            +
            +
            + +
            +

            jb_get_transport_url_from_id

            +

            Overview

            +

            Retrieving the URL of a transport from the local Jabber Server +

            +

            Syntax

            +

            URL jb_get_transport_url_from_id ID

            +

            Description

            +

            jb_get_transport_url_from_id This function takes one parameter, the ID of a transport. It returns the URL this Transport uses.It is manly used to form JID's . +Example:
            +

            + db_select get_jabber_information "SELECT screen , service FROM jb_screens WHERE user_id = :user_id"
            +

            +

            +set users_jid "$screen@[jb_get_transport_url_from_id [jb_get_transport_id_from_symbol $service]]" +

            +

            +jb_message $users_jid "This is your jid $users_jid" +

            +

            +This view lines of code retrieve the abstract stored user information from the db. The screen name from one IM System and a Identifier for the service the screen name belongs to. The ns_jabber module stores all URL's +of the local Jabber Server in an array (not tcl array) , it needs a correct id to identify the correct transport. The function jb_get_transport_id_from_symbol is written in tcl , it converts the symbol (easy to read) used to identify a service (transport in jabber terms) in your System into the correct transport id. +

            +

            + + +
            +
            +
            +
            + + +
            +

            jb_spellcheck

            +

            Overview

            +

            Tests if a screen name is spelled corectly +

            +

            Syntax

            +

            int jb_spellcheck screen

            +

            Description

            +

            jb_spellcheck This function takes one parameter, a screen that should be checked for illigal Charackters. It returns 0 if no illigal charackters are used, and -1 if the screen contains illigal charackters. +

            + + +
            +
            +
            +
            + + +
            +

            jb_createconferenceroom

            +

            Overview

            +

            Start recording a chat from the local Jabber Server Conference service. +

            +

            Syntax

            +

            int jb_createconferenceroom RoomName user_id Threadname creator_jid short description

            +

            Description

            +

            jb_createconferenceroom +This function takes a RoomName the user_id of the creator , a topic name Threadname (which will only be used in case it is the first time this room is recorded), the creator_jid and a short description as parameters. This function will start to record the chat in the conference Room RoomName , if this Room hasn't been opened when it is called , it opens up this Room at the local Jabber Conference Service.
            +If it is the first time a Chat in this Room is Recorded , it will also create a new entry in the table jb_conference_rooms (or an abstraction) and a new entry in the table jb_conference_room_threads +(or an abstraction) . In case a Chat from this Room has been recorded before , it will create a new entry in the table jb_conference_room_threads (or an abstraction) only. In case of an error it returns -1 and 0 otherwise. + +

            + + +
            +
            +
            +
            + + +
            +

            jb_delconferenceroom

            +

            Overview

            +

            Stop recording a chat from the local Jabber Server Conference service. +

            +

            Syntax

            +

            int jb_delconferenceroom RoomName

            +

            Description

            +

            jb_delconferenceroom +This function takes a RoomName as parameter, a call to this function will stop the recording of the Chat in the Room RoomName. The recording of this Room can be restarted by a call to jb_createconferenceroom. +This function returns -1 on an error and 0 otherwise. +

            + + +
            +
            +
            +
            + +
            +

            jb_new_subject

            +

            Overview

            +

            Sending a new subject (Topic) to a Room at the Jabber Server Conference service. +

            +

            Syntax

            +

            int jb_new_subject RoomName New_Thread_name explaination_of_Thread_Name [optional existing thread_id]

            +

            Description

            +

            jb_new_subject +This function takes a RoomName New_Thread_name explaination_of_Thread_Name and optional an existing thread_idas parameter, a call to this function will stop the recording of the current subject in the Room RoomName. The recording of this Room will go on, but every thing will eather be stored with the passed in thread_id (to append the discussion of an old subject) in this case New_Thread_name and explaination_of_Thread_Name will NOT overwrite the old values, or with a internaly new created thread_id if none is passed in. In the second case New_Thread_name and explaination_of_Thread_Name will be written into the db. (See SQL doc,check table jb_conference_room_threads for details). +This function returns -1 on an error and 0 otherwise. +

            + + +
            +
            +
            +
            + +
            +

            jb_new_subject

            +

            Overview

            +

            Sending a old subject (Topic) to a Room at the Jabber Server Conference service to append the recordings of this subject, incase the Room is not active it will be restarted automaticly. +

            +

            Syntax

            +

            int jb_new_subject RoomName New_Thread_name explaination_of_Thread_Name existing_thread_id

            +

            Description

            +

            jb_new_subject +This function takes a RoomName New_Thread_name explaination_of_Thread_Name and an existing thread_id as parameter, a call to this function will stop the recording of the current subject in the Room RoomName. The recording of this Room will go on, but every thing will eather be stored with the passed in thread_id (to append the discussion of an old subject) in this case New_Thread_name and explaination_of_Thread_Name will NOT overwrite the old values, in case the Room is not active at the moment it will be restated. +This function returns -1 on an error and 0 otherwise. +

            + + +
            +
            +
            +
            + + +
            +

            jb_activeconferencerooms

            +

            Overview

            +

            Returns a ns_set with all Conference Rooms that get recorded at the moment. +

            +

            Syntax

            +

            ns_set id jb_delconferenceroom

            +

            Description

            +

            jb_activeconferencerooms +This function is called with no parameters , it returns a ns_set . This ns_set has the names of the active Rooms as its keys , and ns_set's as values. The ns_set's store more detailed information about the room .
            Example: +

            + set active_rooms [jb_activeconferencerooms] +

            +

            +if {$active_rooms != -1} { + + set room_count [ns_set size $active_rooms] } +

            +

            set html "<TABLE> <tr> <th> Room Name </th> <th> Current Topic </th></tr>"

            +

            +for {set i 0} {i < $row_count} {incr i}{ +

            +

            + append html "<tr><td>[ns_set key $active_rooms $i] </td><td>[ns_set value [ns_set value $active_rooms $i ] 1]</td></tr>" +

            +} + +

            append html "</table>"

            + +

            +This example calls jb_activeconferencerooms and stores the ns_set ID in the variable active_rooms, it checks if the function hasent returned -1 (no error). Then it reads the size of the ns_set into the variable row_count . Then in a for loop , it loops through the returned ns_set putting it's keys in the first column of the table , and in the second column it first reads the ns_set ID from the keys (roomNames) value pair , and then from this ns_set it reads the value from position 1 (wich holds the topic of this room). +

            +

            +Structur of the ns_set returned by jb_activeconferencerooms +
            KeyValue
            Room Ans_set_id A
            Room Bns_set_id B
            + +

            +

            +Structure of the ns_set from a value of a returned ns_set: + + + + + +
            Key Value Position
            name Room Name0
            subject Current Topic 1
            roomid Room Id which identifies the Room in the db. 2
            threadid Thread Id which identifies the current Topic in the db 3
            + +

            + +

            +
            +
            +
            +
            + + +
            +

            jb_activeroommembers

            +

            Overview

            +

            Returns a ns_set with all Members from a Conference Room that gets recorded at the moment. +

            +

            Syntax

            +

            ns_set id jb_activeroommembers RoomName

            +

            Description

            +

            jb_activroommembers +This function is called with a RoomName as parameter, it returns a ns_set . This ns_set has the current nicks (nick inside a Room) of the Members who are inside this Room as its keys , and ns_set's as values. The ns_set's store more detailed information about the Member .
            +

            +Structur of the ns_set returned by jb_activeroommembers: +
            KeyValue
            NickName1 ns_set_id 1
            NickName2ns_set_id 2
            + +

            +

            +Structure of the ns_set from a value of a returned ns_set: + + + + + +
            Key Value Position
            nick AnyNickName0
            jidThe jid of this Member 1
            statusThe status of this Member (online,away,etc.)2
            user_idThe acs user_id. (if available)3
            + +

            + +

            +
            +
            +
            +
            + +
            +

            jb_invite

            +

            Overview

            +

            Sends a Invite to a Conference Room , to a user. +

            +

            Syntax

            +

            int jb_invite Jid RoomName Topic A_short_message Type +

            +

            Description

            +

            jb_invite +This function is called with +a Jid to send the invite to, the RoomName to which the recipient should be invited to, the Topic that will be discused in the room, a A short message that lets the recipient know why he got invited , and the Type of the invite. The type can be 1 or 2 , standing for the versions v.1 and v.2. Right know v.1 is the prefered way to invite some one to a Conference Room, most Jabber Clients support this version , the Room RoomName doesn't needs to be recorded to send an invite to this Room. While v.2 is more power full but not all Jabber Clients support this version jet, the Room RoomName has to be recorded to send an invite to this Room. + +

            +
            +
            +
            +
            + +
            +

            jb_new_subject

            +

            Overview

            +

            Sends a new subject (Topic) to a Conference Room . +

            +

            Syntax

            +

            int jb_new_subject RoomName TopicName Description_of_the_new_Topic +

            +

            Description

            +

            jb_new_subject +This function is called with +a RoomName to send the subject change to, the TopicName to change to and a Discription of the new topic. This function worcks only on Rooms that get recorded at the moment. +

            +
            +
            +
            + + + +

            Back to design page

            +
            +Author: +Bjoern Kiesbye +

            +

            Last modified: January 10 2003

            + + +

            Copyright Sussdorff & Roy 2001

            Index: openacs-4/packages/jabber/www/doc/nsjabber.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/nsjabber.png,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/doc/pl-sql-documentation.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/pl-sql-documentation.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/pl-sql-documentation.adp 20 Oct 2004 19:36:51 -0000 1.1 @@ -0,0 +1,782 @@ + +PL/SQL procedure documentation + +

            PL/SQL procedure documentation

            + + +

            Following PL/SQL procedures and functions are invoked by the nsjabber-module. Please mind that some procedures are not useful for +the datamodel of the OACS, specially those dealing with a conference room ID, because the conference room is implemented as an object so +we cannot query the room ID, but this procedures have to be defined, because the nsjabber-module uses those procedures to be for +general use.

            + +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Procedure jb_reg_validation

            +
            +

            Overview

            +
            +

               Validates whether user is in the database. If the user is in the database his regstate is changed.

            +
            +

            Syntax

            +
            +

               jb_reg_validation  screen_in  regstate

            +
            +

            Return

            +
            +

               No return

            +
            +

            Description

            +
            +

               Screen_in is the Jabber screen name of the user, who should be validated, and regstate is the new regstate for this user.

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Procedure jb_update_status

            +
            +

            Overview

            +
            +

               Update user's online status.

            +
            +

            Syntax

            +
            +

               jb_update_status  status_in   resourc_in   screen_in   service_in

            +
            +

            Return

            +
            +

               No return

            +
            +

            Description

            +
            +

               Status_in is the new online status
            +    resourc_in is the resource of the user (whether he is at home or...)
            +    screen_in is the screen name of the user
            +    service_in is the IM service of the user

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Procedure jb_clear_status

            +
            +

            Overview

            +
            +

               Puts every status and resource on offline when the Jabber server logs in or out.

            +
            +

            Syntax

            +
            +

               jb_clear_status

            +
            +

            Return

            +
            +

               No return

            +
            +

            Description

            +
            +

               When the Jabber server logs in or out every status and resource is put on offline.

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Function jb_subscription_check

            +
            +

            Overview

            +
            +

               Checks whether a certain Jabber ID is in our subscription table, which stores Jabber IDs, which need approval by the user.

            +
            +

            Syntax

            +
            +

               jb_subscription_check  jid_in

            +
            +

            Return

            +
            +

               Returns 0 if Jabber ID is not in jb_subscription_request, otherwise returns number n of subscription requests for this Jabber ID.

            +
            +

            Description

            +
            +

               jid_in is the requested Jabber ID.

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Procedure jb_subscription_insert

            +
            +

            Overview

            +
            +

               Inserts a new subscription request into the database.

            +
            +

            Syntax

            +
            +

               jb_subscription_insert  jid_in

            +
            +

            Return

            +
            +

               No return

            +
            +

            Description

            +
            +

               jid_in is the Jabber ID, which should be inserted.

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Procedure jb_subscription_del

            +
            +

            Overview

            +
            +

               Removes a subscription from the database.

            +
            +

            Syntax

            +
            +

               jb_subscription_del  jid_in

            +
            +

            Return

            +
            +

               No return

            +
            +

            Description

            +
            +

               jid_in is the Jabber ID, which should be removed from the database.

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Function jb_get_user_id

            +
            +

            Overview

            +
            +

               Gets the user_id for a given Jabber screen name.

            +
            +

            Syntax

            +
            +

               jb_get_user_id  screen_in

            +
            +

            Return

            +
            +

               Returns the user_id

            +
            +

            Description

            +
            +

               screen_in is the Jabber screen name for which you want to get the user ID.

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Function jb_get_jid

            +
            +

            Overview

            +
            +

               Gets the Jabber ID for a given user ID.

            +
            +

            Syntax

            +
            +

               jb_get_jid  user_id_in

            +
            +

            Return

            +
            +

               Returns the Jabber ID

            +
            +

            Description

            +
            +

               user_id_in is the User ID for which you want to get the Jabber ID.

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Procedure jb_conference_thread_finish

            +
            +

            Overview

            +
            +

               Finishes a conference room thread.

            +
            +

            Syntax

            +
            +

               jb_conference_thread_finish  thread_id_in

            +
            +

            Return

            +
            +

               No return

            +
            +

            Description

            +
            +

               thread_id_in is the Conference Room Thread ID for the thread, which should be finished.

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Procedure jb_conference_thread_new

            +
            +

            Overview

            +
            +

               Creates a new thread for a certain Conference Room.

            +
            +

            Syntax

            +
            +

               jb_conference_thread_new  thread_id_in   room_id_in   subject_in   creator_jid   creator_user_id

            +
            +

            Return

            +
            +

               No return

            +
            +

            Description

            +
            +

               thread_id_in is the new Thread ID
            +    room_id_in is the Room ID for which a new thread is created
            +    subject_in is the subject for this thread
            +    creator_jid is the Jabber ID of the creator of this thread
            +    creator_user_id is the User ID of the creator of this thread

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Procedure jb_conference_message

            +
            +

            Overview

            +
            +

               Inserts a message in the database (jb_conference_protocols).

            +
            +

            Syntax

            +
            +

               jb_conference_message  jid_in   message_in   room_id_in   thread_id_in   user_id_in

            +
            +

            Return

            +
            +

               No return

            +
            +

            Description

            +
            +

               jid_in is the Jabber ID of the user who has written the message
            +    message_in is the message
            +    room_id_in is the Conference Room in which this message was written
            +    thread_id_in is the Conference Room Thread in which this message was written
            +    user_id_in is the User ID of the user who has written the message

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Function jb_conference_room_check

            +
            +

            Overview

            +
            +

               Checks whether a Conference Room exists for a given room name.

            +
            +

            Syntax

            +
            +

               jb_conference_room_check  room_name_in

            +
            +

            Return

            +
            +

               Returns a room ID on success, otherwise -1 is returned

            +
            +

            Description

            +
            +

               room_name_in is the room name, which should be checked.

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Procedure jb_conference_rooms_new

            +
            +

            Overview

            +
            +

               Creates a new Conference Room.

            +
            +

            Syntax

            +
            +

               jb_conference_rooms_new  room_id_in   user_id_in   creator_jid_in   name_in   description_in

            +
            +

            Return

            +
            +

               No return

            +
            +

            Description

            +
            +

               room_id_in is irrelevant for OACS datamodel, because we get the ID from acs_objects, but we have to give the procedure + a room ID to not generate an error
            +    user_id_in is the user ID of the creator
            +    creator_jid_in is the Jabber ID of the creator
            +    name_in is the name of the new Conference Room
            +    description_in is the description of the new Conference Room
            +   
            +    This procedure invokes the jb_conference_room.new procedure to create a new conference room

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Function jb_conference_next_room_id

            +
            +

            Overview

            +
            +

               Gets a room ID (irrelevant for OACS datamodel. Function returns an integer value so the nsjabber module doesn't + generates an error.

            +
            +

            Syntax

            +
            +

               jb_conference_next_room_id

            +
            +

            Return

            +
            +

               Returns an integer value

            +
            +

            Description

            +
            +

               This procedure doesn't get a room ID, it only returns an integer value. This ID is used to create a new Conference Room,
            +    but as seen in the procedure jb_conference_rooms_new we don't use the room_id.

            +
            +
            +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            +

            Function jb_conference_next_thread_id

            +
            +

            Overview

            +
            +

               Gets a new Conference Room Thread ID.

            +
            +

            Syntax

            +
            +

               jb_conference_next_thread_id

            +
            +

            Return

            +
            +

               Returns a thread ID

            +
            +

            Description

            +
            +

               Gets a new thread ID from the corresponding sequence.

            +
            +
            \ No newline at end of file Index: openacs-4/packages/jabber/www/doc/requirements.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/requirements.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/requirements.adp 20 Oct 2004 19:36:51 -0000 1.1 @@ -0,0 +1,70 @@ + + +Jabber Requirements + + + +
            +
            +Back: Conferencing admin help +Next: Design +
            + +

            1.Introduction

            + +

            This document explains brief what the Jabber Module does and what the +requirements for the Jabber module are.

            + +

            2. What is Jabber and what features should the Jabber Module offer

            + +

            A Jabber server permits users to communicate between users even +when they are in different Instant Messaging Services, so the Jabber +server offers a common platform. Jabber server can support the most +frequently used Im-Services like AIM, ICQ, MSN and Yahoo Messaging. +You can have personal chats with users of these IM services, if you register yourself +in one of these IM services. To chat with users not using Jabber you need the Enigma client. The +conference rooms should offer the same features as the existing chat module. +If you want more detailed information please refer to our introduction page: +Introduction

            + +
              +
            • General: +
            • Creation of new buddys and possibility to add buddys
            • +
            • Possibility of saving buddy or +contact lists for every user where the im-screen-name, service name +and actual status of the contact is stored.
            • +
            • The Jabber Module has to know whether the buddy is member of the +OACS or not.
            • +
            • Set a permission whether a user can be added to our buddy list or +not.
            • +
            • Messages should be logged with auditing information.
            • +
            • Messages should be stored if the jabber server cannot send the message due to internal +problems.
            • +
            • Creation of conference rooms and threads for each room with +permissioning system for each room.
            • +
            • Conference Rooms and Threads have unique display names and a description.
            • +
            • Creator of the room and creation date should be stored.
            • +
            • Protocols for every room and thread should be stored.
            • +
            • Permissioning system to allow to view the protocols.
            • +
            • Two ways to send messages, via webpages or via Jabber Applet.
            • +
            • Admin: +
            • Set permissioning for buddys and for conference rooms.
            • +
            • Add and delete buddys.
            • +
            • Add and deactivate IM-services.
            • +
            • Send messages.
            • +
            • View over registered users, online users and those, who want to be registered.
            • +
            • Create conference rooms or delete them.
            • +
            + + +
            +Back: Conferencing admin help +Next: Design +
            +
            +
            +

            Author: +Luis Mosteiro Fernandez +

            +

            Last modified: October 18 2002 + Index: openacs-4/packages/jabber/www/doc/user-conference.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/user-conference.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/user-conference.adp 20 Oct 2004 19:36:51 -0000 1.1 @@ -0,0 +1,114 @@ + + +User Conference Guide +@context@ + +

            +Back: Conferencing +Next: Conferencing admin help +
            + + +

            Before you start:

            +
            +

            If you want to use the Conferencing facility you should have a Jabber account already and you should be online with the Enigma Jabber Client (or any other Jabber Client that supports Conferencing, the Jabber Applet doesn�t support Conferencing ).

            + +

             

            +

            How to get to the Conference facility :

            +
            +

            In your (dotLRN) Classes workspace you will find a Link that:

            +

            1. Brings you to the Conferencing main page of this Class

            +

            2. Let you directly enter this Classes default Conference Room (this facility is not implemented yet).

            +

            +

            The global main Page (Pic. 1) for conferencing is usually ClassHome/jabber/conference (if you don�t find it there email your System administrator).

            + +

            At the global main Page you will see a list displaying all the Conference Groups you are a member of, below you will see a List displaying all new Topics that have been discussed since you last visited this System. Clicking on one of the �View Log� links behind a new topic brings you directly to the page that shows the whole discussion on this Topic. If you follow one of the Group Name Links ,at the top, you get to the main Page of this Group.

            + +

            Pic. 1

            + +

            +
            +

            On the Groups main Page (Pic. 2) you find two Links one to Create a new Top level Room , a second to Invite other Users to a Conference Room.

            +

            Below them you find a structure displaying all Rooms of this Group with all Topics that have been discussed.

            +

            Behind every room you find a Link ,in case other users are currently in this Room , saying Enter. If you are online with Enigma you enter this Room when you Click on the Enter Link. If no one is currently in this Room the Link will be named Restart, clicking this link will restart the Room and you will enter it, again.

            + +

            Pic. 2

            +

            +
            +

            1. Invite other users.

            +

            2. Create a new Top level Room.

            +

            3.View a Log.

            +

            4. Create a new Sublevel Room.

            +

            5. Structure your Rooms and Topics (Example).

            +
            + +

            1. Invite other Users:

            + +

            Go to the Invite Page (Pic.2 ) (just follow the Link �Invite other Users to a Room� at the top of the page Pic. 2), here you find a List off all users which are currently online and in the same group you are in. . Select the once you want to invite , below you find a Selection Box with all active Rooms including the one you want to Invite your friends to , select it.

            +

            Note: You are able to select only those Rooms which are currently open (Re/Started).

            + +

            In the two Text Fields below enter some words that let the Users you are going to Invite know why you are inviting them and what you want to discuss.

            +

            Now you can press the �Invite� button, every User you selected above will be asked to come to the Room you selected.

            +

            At the bottom of the Page you find an extra Section from where you can restart Rooms as well, in case the Room you want to invite users to hasn�t been opened/restarted yet.

            + +

            Pic. 3

            +

            + +
            +

            2.Create a new Top level Room:

            + +

            To Create a new Top Level Room just click the link on the Groups main Page saying �Create new Top level Room �. A page will be displayed asking you to enter a new Room Name a description of this Room, as well as the name of the initial Topic and its description. Pressing the create Button will create and start a new Room which will be identified by the Room Name you have entered before.

            +

            Back at the Groups main Page you find a Link saying �Create new' Top Level Room at the top of the Page, this Link will bring you to a page where you can create an new Room. This way to create a Room is a special one, it will be displayed at the very left of the Room and Topic hierarchy (as you can see it on Pic. 4.1+4.3), you should only use it when there are no Rooms in this Group yet , or if you want to start a completely different Topic to what is usually discussed in this Group

            + +

            Pic.4

            + +

            +
            +

            3. View Log

            + +

            You can view a Log from a previously recorded chat by clicking on the �View Log/Read� Link behind a Topic name (Pic. 4). On this Page the discussion in Room (RoomName) about the Topic (TopicName) will be displayed Line by Line (Pic. 5.3). Every Line starts with the nickname of the User who submitted the Text displayed in this Line. If this nickname belongs to a local User you can view it�s user information (including online and contact information) by clicking on his/her nickname. At the end of every Line the time , when the Text where submitted to the Room , is displayed.

            +

            At the Top of every Log Page you have two options, the first is to pick up the Topic (Pic. 5.1). Be carefull using the Pickup option, there can be only one Topic at the time, discussed in one Room. Picking up a Topic means that everything submitted to the Room (RoomName) will be appended to this Log Page , until someone changes the Topic again. The system will warn you, in case someone discusses a different Topic in this Room at the moment, before it picks up a Topic.

            + +

             

            +

            The second option is to create a sublevel Room (SubRoomName), a sublevel Room has all the features of a top level Room (RoomName) has, the difference is where it is going to be displayed on the Groups main Page. If you create a sublevel Room (SubRoomName ) from a Topic�s Log Page, the new Room name will be displayed next to this Topic�s name, just below and a little bit to the left (Pic. 4.4).

            +

            +

            Pic. 5

            +

            +
            +

             

            +
            +

            4. Create a sublevel Room

            +
            +

            On the View Log Page you find a Form at the top of the page (Pic. 5.2), asking you for the new Rooms name ,this Rooms description , the name of the initial Topic and a description for this topic. When you press the 'Create' button at the bottom of the Form , the new Room (SubRoomName) will be created and you�ll be brought??? to the Invite Page to let you invite other users to the new Room.

            +

            If you create a sublevel Room (SubRoomName ) from a Topic�s Log Page, the new Room name will be displayed next to this Topic�s name, just below and a little bit to the left (Pic. 4.4).

            + +

             

            +
            +

            5. Structure your Rooms and Topics (Example)

            + +

            There are two types of Rooms (top and sub level) both have the same features, their types differentiate them to let them be created/displayed in a structured way . This makes it easier for you and others, to navigate through and find the information, they are interested in.

            + +

            Overview:

            +
            +
            • Every Room can have more than one Topic , but only one Topic can be discussed in one Room at the time.

            + +

            - Sometimes one Room is just not enough for A. All Users B. All Topics

            +

                   Case A.: Create a new Top level Room 2 and split the users in room Room 1 into two groups

            + +

                  Case B.: Create a new Top level Room 2 if you have to discuss
            +         a absolute different Topic to what Topics you discuss in Room 1.
            +         Or Create a new sub level Room 2 in case you want to discuss a Topic
            +         that somehow belongs to an existing Topic, but is fare to complex to discuss everything under the existing Topics name

            + +

             

            +

            Example:

            +

            Back at the Groups main Page you find a Link saying �Create new Top Level Room� at the top of the Page, this Link will bring you to a page where you can create a new Room. This way to create a Room is a special one, it will be displayed at the very left of the Room hierarchy, you should only use it when there are no Rooms in this Group yet , or if you want to start a completely different Topic to what is usually discussed in this Group. Lets say you work for a small company and you are a member of the Group �Computer Staff� , right now all you have to do is to administrate the existing Computer Network , you will need a Room (named �Administration�) where the members of the Computer Staff can meet to discuss there daily work. This should be a top level Room. Every morning the �Administration� Room is restarted , and every thing about new User accounts, Software updates etc. will be discussed in that Room. May be there are some sub level Rooms created for some bigger Software updates, that need to be discussed in an extra Room but still belong to the major Topic �Administration�.

            + +

            The company grows and decides to hire Software Developers to standardize the Software company uses with scripts, to serve the needs that grow with the Company. These Software Developers will belong to the Group �Computer Staff� as well, but you can�t let them discuss their Topics in the same Room the Administrators use. And logically the Development Topics don�t fit in a sub level Room , of the top level Room �Administrators�, even if only Developers use this Room it will be hard to find this discussions on development when they are placed somewhere in between administration Topics.

            + +

            This is the time to create a new top level Room named �Software_Development�, this Room can then be used by the Developers to discuss their Topics, and in case the Developers need information from the System Administrators (or vice versa) (the current version of the standard Software, for example) they can enter the �Administration� Room and ask their Questions, or browse older discussions of the �Administration� Room to find the information they need.

            + +
            +Back: Conferencing +Next: Conferencing admin help +
            Index: openacs-4/packages/jabber/www/doc/user-conference.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/user-conference.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/user-conference.tcl 20 Oct 2004 19:36:51 -0000 1.1 @@ -0,0 +1,13 @@ +ad_page_contract { + + @email bkiesbye@sussdorff-roy.com + + +} -properties { + + conference_url:onevalue + +} + +set context "Conferencing" +set conference_url "../conference" \ No newline at end of file Index: openacs-4/packages/jabber/www/doc/user-documentation-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/user-documentation-2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/user-documentation-2.adp 20 Oct 2004 19:36:51 -0000 1.1 @@ -0,0 +1,56 @@ + +Index Site Structure + +
            +Back: First Steps +Next: Two different buddy lists +
            + +

            General user documentation

            + +

            We will proceed now with the documentation of the index page structure

            + +

            After registering with our Jabber Server, you will see that the registration form disappeared and three links +under the main grey frame appeared:

            +
              +
            • Edit your contact information
            • +
            • View your external contacts
            • +
            • Add external contact
            • +
            • Search users
            • +
            + + +

            Edit your contact information

            + +

            You will be directed to a page where you can write your different screens in other Instant Messaging services. +This allows the server to track down your online states in these IM services, so other users can see, whether +you are online via other IM services, if they added you to their buddy list. Being aware of your other online +states make it possible to send you messages to this other IM services via the web frontend. This means that even if +you are offline with Jabber, users will see your other online states on the web page and be able to send you a message +or invite you to an one-to-one chat.

            + +

            View your external contacts

            + +

            This page displays all your external contacts ordered by there last name. The external contacts will be +displayed by first name, last name, Instant messaging service and Instant messaging screen name. Via this page +you can edit the external contact or remove it from your external contact list clicking on the links on the right. +

            + +

            Add external contact

            + +

            This page offers you the possibility to add an external contact filling the form displayed on the page. You have +to fill at least the first names, last name and one of the textfield corresponding to one of the Instant messaging +services.

            + +

            Search users

            + +

            Following these link you will be directed to a page, where you can search users, who are registered users of the +community and registered users of our Jabber server and not in your friends buddy list yet. The users will be +displayed by there first and last name. You can then easily add the users clicking on the link "Add".

            + +



            + +
            +Back:First Steps +Next:Two different buddy lists +
            \ No newline at end of file Index: openacs-4/packages/jabber/www/doc/user-documentation-3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/user-documentation-3.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/user-documentation-3.adp 20 Oct 2004 19:36:51 -0000 1.1 @@ -0,0 +1,63 @@ + +Two different buddy lists + +
            +Back:index page structure +Next: Conferencing +
            + +

            General user documentation

            + +

            This page explains the two different buddy lists displayed on the index page. Furthermore it assets the +different actions you can carry out with your buddy list via the web frontend. We want to remind you that changes +in your buddy list accomplished via the web frontend will not effect the buddy lists in your clients unless it is +about adding/removing Jabber users registered in our local Jabber server.

            + + +

            The system differentiates between two buddy lists:

            + +
              +
            • Your friends online
            • +
            • External friends online
            • +
            + +

            Your friends online

            + +

            These are your buddies, who are registered users both in the Community system and our Jabber server. +The status of the user for each IM system is displayed assumed the user has written his contact information under +"Edit your contact information" (previous page). You can remove the user clicking on the link "remove from list". +

            +Please note that the user will be displayed as online although he might not be online with Jabber, he just needs +to be online in one of the other IM systems. Another possibility to be displayed is to move around the community +pages. Our server tracks down registered users. You will see them as online users, but you will not be able to +send them a message.

            +By clicking on one of the icons, you will be redirected to a page, where you can write the +user a message. Please note that the user will not have the chance to answer your message because you send the +message via the web frontend. If you want to chat with the user, click on the chatlink or use your clients like the +applet or Enigma.To send the user a message via the web frotnend allows you to send the user a message without +being online yourself!

            + +

            External friends online

            + +

            This category displays the online users you explicitly added to your external contact list. You can send them +a message clicking on the icon. To remove the user from the list, you have to follow the link "View your external +contacts" (previous page).

            + + +

            If you want to see other community users, who are online and not on your buddy list, you can follow the link +at the bottom of the page. You will get to a page, where all other users are displayed depending on their last +name prefix. You can add these users easily to your buddy list clicking on the link "Add to friends". Furthermore +you can send the user a message. Users, who are just surfing through the page will also be displayed.
            Please +note that this page displays community users or system users!

            + + +
            +
            +
            +

            Remember: If you remove a user from "Your friends online" or add a user from "Other Community users online" it will effect +the buddy lists of your clients!

            + +
            +Back:index page structure +Next: Conferencing +
            \ No newline at end of file Index: openacs-4/packages/jabber/www/doc/user-documentation.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/user-documentation.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/user-documentation.adp 20 Oct 2004 19:36:51 -0000 1.1 @@ -0,0 +1,75 @@ + +First Steps + +
            +Back: Jabber Client Installation +Next: Index pagee structure +
            + +

            General User documentation

            + +

            These page gives a user a general view over the Jabber Instant Messging System. It will explain, +which different clients are at your disposal, which are the features of each client and the structure +of the index site. Moreover you will learn how to edit your Instant Messaging information, how to +add external contacts, edit and delete them.

            + +

            First Steps

            +

            Now we will explain the first steps to be taken to register in our system.

            + + +

            On your first visit to the index page of the Jabber system you will see a grey frame displaying +your current messenger status. Due to the fact that at your first visit you are not already a registered +user, you will see the avaiable Instant messenger platforms crossed and on the right you will see a form +with which you will be able to register. Although you might have a Jabber ID already, we have to register a +new Jabber Id for you on our Jabber server, so we can track your presence and distinguish you as an internal +and not external user.

            +Index site, when user not registered + +

            Getting online: Which client shall I use?

            + +

            You have three ways to get online via three different clients. The links to the +different clients are displayed in the grey frame with your messenger status:

            + +
              +
            • Start Jabber Applet
            • +
            • Webstart Jabber Applet
            • +
            • Webstart Enigma 3 (advanced)
            • +
            + +

            Before explaining the functionality of the clients, an important notice: +The clients work independently from our database! As a consequence, users you add via the Webfrontend will not be +displayed on your client and vice versa. Only Jabber users of our local Jabber server can be displayed on the client when +being added/removed through the webfrontend.
            To display both users on the client and on the webfrontend you +need to add them in both. The webfrontend adds functionality like sending messages without being online +yourself or see people online without being online yourself!

            + +

            Start Jabber Applet

            + +

            This client offers a rudimentary Java Applet to start the Instant Messaging system. Please note that +because of the limited functionality of a Java Applet you will not be able to use all the features of the system. +You will be able to add Jabber buddies to your buddy list, categorising them in groups, sending them messages and of +course see there online status.
            You will not be able to add buddies of other Instant messaging services neither +register yourself in other Instant messaging services or participate in Jabber conference rooms.
            The Jabber Applet +can be used from all over the world, you only need a Java enabled web browser and you do not need to download +a huge program. So this client is especially useful for travellers and users, who want to get online fast without +having to download a client.

            + +

            Webstart Jabber Applet

            + +

            This is the same Applet is mentioned above. Webstart downloads the Jabber Applet and archives it on the local +hard disk, so the user do not has to download the Applet all the time. There is no difference in functionality.

            + +

            Webstart Enigma 3 (advanced)

            + +

            The Enigma client is equiped with all the functionality of other clients like Trillian. Plus the functionality +offered by the Jabber Applet you can register in other Instant Messaging services via this client, add buddies to +that Instant Messaging services and participate on Jabber conferences (group chats). But this client is not as +small as the normal Jabber Applet, it is 3.5 mb huge, so you have to download it. The combination of Enigma with +Webstart makes an explicit installation of the client Enigma unnecessary. Webstart downloads the client to your +local hard disk and when you click on the link, Webstart starts the client without having installed it. This client +should be the first choice of use because of the range of functionality, which is offered by the client.

            + +
            +Back: Jabber Client Installation +Next: Index page structure +
            Index: openacs-4/packages/jabber/www/doc/user.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/user.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber/www/doc/user.adp 20 Oct 2004 19:36:51 -0000 1.1 @@ -0,0 +1,27 @@ + +Users Documentation + +
            +Back: Two different buddy lists +Next: Conferencing (advanced) +
            + +

            Conferencing for Users:

            +

            If you want to use the Conferencing facility you should have a Jabber account already and you should (but you don’t have to ) be online with the Enigma Jabber Client (or any other Jabber Client that supports Conferencing , the Jabber Applet doesn’t support Conferencing ).

            +

            Go to the page /jabber/conferencing you will see a list displaying all Conference Groups you are a member of, below you will see a List displaying all new Topics that have been discussed since you last visited this System. Clicking on one of the read links behind a new topic will bring you directly to the page that show’s the whole discussion on this Topic.

            +

            If you follow one of the Group Name Links ,at the top, you get to the main Page of this Group. On the Groups main Page You find two Links one to Create a new Top level Room , a second to Invite other Users to a Conference Room. Below them you find a structure displaying all Rooms of this Group with all Topics that have been discussed. Behind every room you find a Link ,in case other users are currently in this Room , saying Enter. If you are online with Enigma you enter this Room when you Click on the Enter Link. If no one is currently in this Room the Link will be named Restart, clicking this link will restart the Room and you will enter it.

            +

            In case you restarted a Room you can now go to the Invite page (just follow the Link ‘Invite other Users to a Room’ at the top of the page ), here you find a Selection Box with other Users (only those who are currently online will be displayed) . Select the once you want to invite (in case you want to invite more then one User , hold the ‘Ctrl’ or ‘Strg’ – Key down while making your selections with the Mouse ) , below you find a Selection Box with all active Rooms including the one you have just restated , select it. In the two Text Fields below enter some words that let the Users your going to Invite know why your inviting them and what you want to discuss. Now you can press the ‘Invite’ Button ,every User you selected above will be asked to come to the Room you selected. At the bottom of the Page you find an extra Section from where you can restart Room’s as well, in case the Room you want to invite users to hasn’t been restarted yet.

            +

            Back at the Groups main Page you find a Link saying ‘Create new Top Level Room’ at the top of the Page, this Link will bring you to a page where you can create an new Room. This way to create a Room is a little special, it will be displayed at the very left of the Room hierarchy, you should only use it when there are no Rooms in this Group yet , or if you want to start a completely different Topic to what is usually discussed in this Group. Lets say you work for a little company and you are a member of the Group ‘Computer Staff’ , right now all you have to do is to administrate the existing Computer Network , you will need a Room (named ‘Administration’) where the members of the Computer Staff can meet to discuss there daily work this should bee a top level Room. Every morning the ‘Administration’ Room is restarted , and every thing about new User accounts, Software updates etc. will be discussed in that Room. May be there are some sub level Rooms created for some bigger Software updates , that need to bee discussed in an extra Room but still belong to the major Topic ‘Administration’ .The company grows and decides to hire Software Developers that specialise the standard Software the company uses with scripts , to serve the needs that grow with the Company. Thais Software Developers will belong to the Group ‘Computer Staff’ as well, but you can’t let them discuss the Developers their Topics in the same Room the Administrators use. And logically the Development Topics don’t fit in a sub level Room , of the top level Room ‘Administrators’ , even if only Developers use this Room it will be hard to find this discussions on development when there placed some where in between administration Topics. This is the time to create a new top level Room named ‘Software_Development’, this Room can than be used by the Developers to discuss their Topics , and in case the Developers need information from the System Administrators (or vice versa) (the current version of the standard Software for example) they can enter the ‘Administration’ Room and ask their Questions , or brows older discussions of the ‘Administration’ Room to find the information they need.

            +

            Creation of sublevel Rooms is only able from the ‘Recorded Chat’ Page. Behind every Topic on the Group Main Page, you find a Link saying ‘Read’, following this Link will bring you to the Recorded Chat Page. At the top of the Page the Room name and the discussed Topic is displayed, beneath you find a List displaying the Chat Line by Line. At the beginning of each Line the first and the last name of the Person who wrote that Line is displayed. If you read something you are interested in, but you have further questions to one of the Persons who wrote it, you can click on the Persons first name you want to contact. This will create a new sublevel Room , and you and the Person you want to contact, will automatically receive an Invite (only when you are online ) to this new Room. This new sublevel Room will later be displayed, in the Room Topic Hierarchy, next (left below) to the Topic you are just reading.

            + +
            +Back: Two different buddy lists +Next: Conferencing (advanced) +
            + + +
            +

            Author: +Bjoern Kiesbye + +

            Last modified: Janury 10 2003

            Index: openacs-4/packages/jabber/www/doc/images/current.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/images/current.jpg,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/doc/images/display-conference.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/images/display-conference.jpg,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/doc/images/global-conference.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/images/global-conference.jpg,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/doc/images/global-confernce.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/images/global-confernce.jpg,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/doc/images/global-confernece.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/images/global-confernece.jpg,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/doc/images/index-site.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/images/index-site.jpg,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/doc/images/index-unregistered.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/images/index-unregistered.jpg,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/doc/images/invite-conference.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/images/invite-conference.jpg,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/doc/images/log-conference-1.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/images/log-conference-1.jpg,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/doc/images/log-conference.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/images/log-conference.jpg,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/doc/images/main-conference.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/images/main-conference.jpg,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/doc/images/search.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/doc/images/search.jpg,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/aim.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/aim.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/aim_away.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/aim_away.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/aim_no.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/aim_no.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/aim_off.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/aim_off.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/aim_offline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/aim_offline.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/aim_on.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/aim_on.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/aim_online.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/aim_online.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/icq_away.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/icq_away.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/icq_dnd.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/icq_dnd.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/icq_no.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/icq_no.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/icq_off.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/icq_off.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/icq_offline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/icq_offline.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/icq_on.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/icq_on.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/icq_online.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/icq_online.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/icq_xa.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/icq_xa.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/irc_away.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/irc_away.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/irc_dnd.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/irc_dnd.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/irc_offline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/irc_offline.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/irc_online.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/irc_online.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/irc_xa.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/irc_xa.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/jabber_away.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/jabber_away.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/jabber_dnd.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/jabber_dnd.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/jabber_off.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/jabber_off.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/jabber_offline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/jabber_offline.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/jabber_on.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/jabber_on.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/jabber_online.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/jabber_online.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/jabber_xa.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/jabber_xa.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/msn_away.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/msn_away.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/msn_dnd.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/msn_dnd.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/msn_no.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/msn_no.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/msn_off.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/msn_off.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/msn_offline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/msn_offline.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/msn_on.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/msn_on.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/msn_online.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/msn_online.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/msn_xa.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/msn_xa.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/yahoo_away.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/yahoo_away.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/yahoo_dnd.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/yahoo_dnd.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/yahoo_no.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/yahoo_no.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/yahoo_off.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/yahoo_off.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/yahoo_offline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/yahoo_offline.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/yahoo_on.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/yahoo_on.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/yahoo_online.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/yahoo_online.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/image/yahoo_xa.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/image/yahoo_xa.gif,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/resources/E4-neu.jar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/resources/E4-neu.jar,v diff -u Binary files differ Index: openacs-4/packages/jabber/www/resources/skin.jar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber/www/resources/skin.jar,v diff -u Binary files differ Index: openacs-4/packages/jabber-portlet/jabber-portlet.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber-portlet/jabber-portlet.info,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber-portlet/jabber-portlet.info 20 Oct 2004 19:43:20 -0000 1.1 @@ -0,0 +1,28 @@ + + + + + Jabber Portlet + Jabber Portlets + f + f + + + + Bjoern Kiesbye + Malte Sussdorff + Portlet for the Jabber Package. + Sussdorff & Roy GbR + Portlet for the Jabber Package. + 2 + + + + + + + + + + + Index: openacs-4/packages/jabber-portlet/sql/oracle/jabber-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber-portlet/sql/oracle/jabber-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber-portlet/sql/oracle/jabber-portlet-create.sql 20 Oct 2004 19:43:21 -0000 1.1 @@ -0,0 +1,159 @@ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html + + + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource.new( + name => 'jabber_portlet', + description => 'Displays the jabber' + ); + + -- 4 defaults procs + + -- shadeable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shadeable_p', + value => 't' +); + + -- shaded_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shaded_p', + value => 'f' +); + + -- hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'hideable_p', + value => 't' +); + + -- user_editable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'user_editable_p', + value => 'f' +); + + -- link_hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'link_hideable_p', + value => 't' +); + + +end; +/ +show errors + + +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl.new ( + 'portal_datasource', + 'jabber_portlet', + 'jabber_portlet' + ); + +end; +/ +show errors + +declare + foo integer; +begin + + -- add all the hooks + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'jabber_portlet', + 'GetMyName', + 'jabber_portlet::get_my_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'jabber_portlet', + 'GetPrettyName', + 'jabber_portlet::get_pretty_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'jabber_portlet', + 'Link', + 'jabber_portlet::link', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'jabber_portlet', + 'AddSelfToPage', + 'jabber_portlet::add_self_to_page', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'jabber_portlet', + 'Show', + 'jabber_portlet::show', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'jabber_portlet', + 'Edit', + 'jabber_portlet::edit', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'jabber_portlet', + 'RemoveSelfFromPage', + 'jabber_portlet::remove_self_from_page', + 'TCL' + ); + +end; +/ +show errors + +declare + foo integer; +begin + + -- Add the binding + acs_sc_binding.new ( + contract_name => 'portal_datasource', + impl_name => 'jabber_portlet' + ); +end; +/ +show errors Index: openacs-4/packages/jabber-portlet/sql/postgresql/jabber-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber-portlet/sql/postgresql/jabber-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber-portlet/sql/postgresql/jabber-portlet-create.sql 20 Oct 2004 19:43:21 -0000 1.1 @@ -0,0 +1,212 @@ +-- Copyrigth Bjoern Kiesbye +-- Author Bjoern Kiesbye +-- email: Kiesbye@theservice.de Bjoern_kiesbye@web.de +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html + +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- /jabber-portlet/sql/postgresql/calendar-full-portlet-create.sql +-- + +-- Creates Jabber portlet + +-- Copyright (C) 2004 Bjoern Kiesbye +-- @author Bjoern Kiesbye (kiesbye@theservice.de bjoern_kiesbye@web.de) +-- @creation-date 2004-07-18 +-- ported to postres 2004-07-18 + + +create function jabber_inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource__new( + ''jabber_portlet'', + ''Displays the jabber'' + ); + + + -- the standard 4 params + + -- shadeable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shadeable_p'', + ''t'' +); + + + + -- shaded_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' +); + + -- hideable_p + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' + ); + + + + -- user_editable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' +); + + + -- link_hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + + + + return 0; + +end;' language 'plpgsql'; +select jabber_inline_0(); +drop function jabber_inline_0(); + +------------------------------------------------------------------------------- + + +create function jabber_inline_0() +returns integer as ' +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl__new ( + ''portal_datasource'', + ''jabber_portlet'', + ''jabber_portlet'' + ); + + return 0; + +end;' language 'plpgsql'; +select jabber_inline_0(); +drop function jabber_inline_0(); + + +------------------------------------------------------------------------------ + +create function jabber_inline_0() +returns integer as ' +declare + foo integer; +begin + + -- add all the hooks + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''jabber_portlet'', + ''GetMyName'', + ''jabber_portlet::get_my_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''jabber_portlet'', + ''GetPrettyName'', + ''jabber_portlet::get_pretty_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''jabber_portlet'', + ''Link'', + ''jabber_portlet::link'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''jabber_portlet'', + ''AddSelfToPage'', + ''jabber_portlet::add_self_to_page'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''jabber_portlet'', + ''Show'', + ''jabber_portlet::show'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''jabber_portlet'', + ''Edit'', + ''jabber_portlet::edit'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''jabber_portlet'', + ''RemoveSelfFromPage'', + ''jabber_portlet::remove_self_from_page'', + ''TCL'' + ); + + return 0; + +end;' language 'plpgsql'; +select jabber_inline_0(); +drop function jabber_inline_0(); + + +------------------------------------------------------------------------------- + + +create function jabber_inline_0() +returns integer as ' +declare + foo integer; +begin + + -- Add the binding + perform acs_sc_binding__new ( + ''portal_datasource'', + ''jabber_portlet'' + ); + + return 0; + +end;' language 'plpgsql'; +select jabber_inline_0(); +drop function jabber_inline_0(); + + Index: openacs-4/packages/jabber-portlet/tcl/jabber-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber-portlet/tcl/jabber-portlet-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber-portlet/tcl/jabber-portlet-procs.tcl 20 Oct 2004 19:43:21 -0000 1.1 @@ -0,0 +1,109 @@ + +ad_library { + + Jabber Portal Library + + @author Bjoern Kiesbye + @email bkiesbye@sussdorff-roy.com + + +} + + + namespace eval jabber_portlet { + + + + ad_proc -private get_my_name { + } { + return "jabber_portlet" + } + + ad_proc -public get_pretty_name { + } { + return "Jabber" + } + + ad_proc -private my_package_key { + } { + return "jabber-portlet" + } + + ad_proc -public link { + } { + return "jabber" + } + + ad_proc -public add_self_to_page { + {-portal_id:required} + {-package_id:required} + } { + Adds a Jabber PE to the given portal + ( We don't need to append we have only one package_id at all )or appends the given Jabber package_id + to the forums PE that already on the portal + } { + return [portal::add_element_parameters \ + -portal_id $portal_id \ + -portlet_name [get_my_name] \ + -pretty_name [get_pretty_name] \ + -value $package_id \ + ] + } + + ad_proc -public show { + cf + } { + } { + portal::show_proc_helper \ + -package_key [my_package_key] \ + -config_list $cf \ + -template_src "jabber-portlet" + + } + + + ad_proc -public edit { + } { + } { + + #nothing + return + } + + + ad_proc -public remove_self_from_page { + {portal_id:required} + {package_id:required} + } { + Removes a Jabber PE from the given page or just the given jabber's package_id + } { + portal::remove_element_parameters \ + -portal_id $portal_id \ + -portlet_name [get_my_name] \ + -value $package_id + } + + + ad_proc -public new { + + Create a new Jabber instance for dotlrn , just return the single instace package_id. + } { + {-forum_id ""} + {-name:required} + {-charter ""} + {-presentation_type flat} + {-posting_policy open} + {-package_id:required} + } { + + + return [apm_package_id_from_key jabber] + } + + + + +} + + + Index: openacs-4/packages/jabber-portlet/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber-portlet/www/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber-portlet/www/index.tcl 20 Oct 2004 19:43:21 -0000 1.1 @@ -0,0 +1,191 @@ +

            Who's online?

            + +

            The IM System is not avaiable, please try it again later!

            +
            +Go to the Conference facility +

            This page displays users, who are currently online. It differentiate between three user groups. Internal, registered Jabber users, who are on your buddy list including their +other Instant Messaging contacts. Then external friends, who are not registered in @system_name@, but you want to have on your buddy list. At last other internal, registered Jabber users, who are online. This provides you information, who is online, if you want to begin a chat. Furthermore you do not have to search internal users to add them to your buddy list, you have to click only on the link to add them to your friend list. +

            + + + + + +
            + + + + + + + + + + + +
            Your Messenger Status
            +
            +
            Log in to and out off the @system_name@ Jabber by clicking on the icon +

            Note: The moment you log into the @system_name@ Jabber, you will automatically + be logged into other services that you have authorised the Jabber + to connect with. At this point, the Jabber be your default messenger + for all services. Other instant messaging clients on your desktop + will not work when you are logged in through the Jabber. +

            + + + + + Jabber Applet Active + + + + + + + +
            +
            + + + + + + + + + + + +
            + + The screen name you typed in is already in use! + + + Please fill in the form to register with Jabber! + +
            + +
            +
            + + + + + + + + + +
            + Edit your contact information + + View your external contacts + + Add a new external contact + + Search for users +
            + + + + +
             
            + + + + + +
            + + + + + + + + + + + + + + + + + +
            Your Friends online
            @friend_status.first_names@ @friend_status.last_name@Remove from list +
            Chat +
            +
            +
            +
            + + + + +
             
            + + + + + +
            + + + + + + + + + + + + + + + + + + +
            External Friends Online
            @external_status.first_names@ @external_status.last_name@Contact from IM-Addressbook +
            Click on Icon
            +
            +
            + + + + +
             
            +

            If you want to see all community users online, who are not on your buddy list, follow this link: Current Community users online

            +


            + On a public Internet service, the number of casual surfers (unregistered) will + outnumber the registered users by at least 10 to 1. Thus there could be many + more people using this service than it would appear. +

            +

            +

            Index: openacs-4/packages/jabber-portlet/www/jabber-portal.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber-portlet/www/jabber-portal.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber-portlet/www/jabber-portal.tcl 20 Oct 2004 19:43:21 -0000 1.1 @@ -0,0 +1,166 @@ + + +#reading the information from dotlrn +array set config $cf + +set shaded_p $config(shaded_p) +set list_of_package_ids $config(package_id) +#set one_instance_p [ad_decode [llength $list_of_package_ids] 1 1 0] +#set can_read_private_data_p [acs_privacy::user_can_read_private_data_p -object_id [ad_conn package_id]] + + +set reg_error "nothing" +set url_to_conference_group [jb_start_conference_room_for_group_url 15331] +set system_name [ad_system_name] +set trans_symbol [list] +set return_url [ad_conn url] +set context "" +set user_id [ad_conn user_id] +ad_maybe_redirect_for_registration +set reg_need "0" +set connstate [jb_getconnstate] +set user_invisible [util::whos_online::check_invisible $user_id ] +set all_invisible [util::whos_online::all_invisible_user_ids] +if {[llength $all_invisible] == 0 } {lappend all_invisible 0} +set all_users [util::whos_online::all_user_ids] + +#----------------------------------------------------check, whether user is registered------------------------------------- + +if { ![db_0or1row is_user_reg_with_jabber { select (user_id) as reg_check, (uc.jabber_regstate) as reg_stat + from jb_user_jabber_information uc where user_id = :user_id }]} { + set reg_need "1" +} + +ad_form -name user-register -action user-register -form { + {jscreen:text(text) {label "Jabber Screen:
            "}} + {passwd:text(password) {label "Password:
            "}} + {return_url:text(hidden) {value "index"}} +} + +#-----------------------------------------------------get avaiable services-------------------------------------------------- + +db_foreach get_services { Select service from jb_services where active_check_p = 't'} { + set user_states($service) "offline" + set online_state($service) "offline" + set online_state_name($service) $service + set online_ext($service) "offline" + set online_ext_name($service) $service + set online_any($service) "offline" + set online_any_name($service) $service + append trans_symbol " $service" +} + +#-------------------------------------get the different user states for the IM services----------------------------------------- + +multirow create user_status service status + +db_foreach get_users_state { + select lower(sn.status) as status, + lower(sn.service) as service + FROM jb_screens sn , jb_services + WHERE sn.user_id = :user_id + AND sn.service = jb_services.service + AND jb_services.active_check_p = 't' +} { + multirow append user_status $service $status + set user_states($service) $status +} if_no_rows { + + db_foreach get_services { + select service + from jb_services + where active_check_p = 't' + } { + multirow append user_status $service "no" + set user_states($service) "offline" + } + +} + +set jabber_start "offline" + +for {set j 0} { $j < [llength $trans_symbol]} {incr j} { + if { [lindex $trans_symbol $j] == "jabber" } { + if { [set user_states([lindex $trans_symbol $j])] == "offline" } { + set jabber_start "offline" + } else { + set jabber_start "online" + } + } + if { [lindex $trans_symbol $j] == "aim" } { + if { [set user_states([lindex $trans_symbol $j])] != "offline" } { + set aim_on 1 + } else { + set aim_on 0 + } + } +} + +#-------------------------------internal friend online ------------------------------------------------------------------------------ + +set friend_is_online_p 0 +set onliners [util::whos_online::user_ids] + +multirow create friend_status first_names last_name friend_user_id friend_screen_id service status create_jid chat + + +db_foreach get_a_friend " + select (persons.person_id) as friends_user_id , + persons.first_names as first_names, persons.last_name as last_name + from persons + where persons.person_id IN (Select jb_screens.user_id from jb_screens, jb_friends + where jb_friends.user_id = :user_id + and jb_screens.screen_id = jb_friends.friend_screen_id + and jb_screens.user_id IS NOT NULL) + AND persons.person_id NOT IN [tcl_to_oracle_list $all_invisible] " { + + lappend friends_online_list $friends_user_id + + + db_foreach get_his_online_states " + SELECT (sn.screen_id) as friend_screen_id, + (sn.status) as status , + sn.im_screen_name, + lower(sn.service) as service + FROM jb_screens sn + WHERE sn.user_id = :friends_user_id + AND ( ( lower(sn.status) != 'offline' ) or (sn.user_id IN [tcl_to_oracle_list $onliners]) ) + + " { + set online_state($service) $status + multirow append friend_status $first_names $last_name $friends_user_id $friend_screen_id $service $status [jb_create_jid $im_screen_name $service] [jb_best_chat $friends_user_id] + set friend_is_online_p 1 + } + +} + +#--------------------------External friends---------------------------------------------------------------------- + +set external_is_online_p 0 + +multirow create external_status friend_screen_id first_names last_name combi_name service status create_jid + + +db_foreach get_friends_users_online { + select (ef.friend_screen_id) as ef_id , + (ef.friend_first_name) as first_names , + (ef.friend_last_name) as last_name + FROM jb_friends ef + WHERE ef.user_id = :user_id + AND ef.friend_screen_id IN ( Select screen_id from jb_screens + where user_id is null ) +} { + + db_foreach get_this_online_anys { select (sn.status) as status , + (sn.service) as service, sn.im_screen_name + FROM jb_screens sn + WHERE sn.screen_id = :ef_id + AND sn.status != 'offline' + } { + set online_ext($service) $status + multirow append external_status $ef_id $first_names $last_name "$first_names $last_name" $service $status [jb_create_jid $im_screen_name $service] + set external_is_online_p 1 + } + +} + Index: openacs-4/packages/jabber-portlet/www/jabber-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber-portlet/www/jabber-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber-portlet/www/jabber-portlet.adp 20 Oct 2004 19:43:21 -0000 1.1 @@ -0,0 +1,64 @@ + + + +

            The IM System is not avaiable, please try it again later!

            +
            + + + + + + + + + + + + +
            +
            +
            + + +
            + Please fill in the form to register with Jabber!
            You can change the system created Screen to what ever Screen you prefer, using the Carackters A to z , 0 to 9 or the "." (dot)
            +
            + +
            + + + + + +
            +
            +
            +
            + +
            +
            Community members online at:
            + + + + + + + +
            JabberMsnIcqAimYahoo
            @jabber_number@@msn_number@@icq_number@@aim_number@@yahoo_number@List Members
            +
            + + + + + + +
            +Enter Class Chat +Documentation +View Logs +
            +
            + + + +
            Index: openacs-4/packages/jabber-portlet/www/jabber-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/jabber-portlet/www/jabber-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/jabber-portlet/www/jabber-portlet.tcl 20 Oct 2004 19:43:21 -0000 1.1 @@ -0,0 +1,207 @@ + +##cluster## +if {[ad_canonical_server_p] != 1 } { + set canonical_p 0 + set canonical_address "http://[ad_parameter -package_id [ad_acs_kernel_id] CanonicalServer server-cluster]" +} else { + set canonical_p 1 +} +##cluster## + + +#reading the information from dotlrn +array set config $cf + +set shaded_p $config(shaded_p) +#set list_of_package_ids $config(package_id) +#set one_instance_p [ad_decode [llength $list_of_package_ids] 1 1 0] +#set can_read_private_data_p [acs_privacy::user_can_read_private_data_p -object_id [ad_conn package_id]] +#set comm_id $config(community_id) +set community_id [dotlrn_community::get_community_id_from_url] + +set reg_error "nothing" +#set url_to_conference_group [jb_start_conference_room_for_group_url 15331] +set system_name [ad_system_name] +set trans_symbol [list] +set return_url [ad_conn url] +set context "" +set user_id [ad_conn user_id] +set reg_need "0" +set not_registred false + +ad_maybe_redirect_for_registration + +if {$canonical_p == 1} { + set connstate [jb_getconnstate] +} else { + set canonical_url "$canonical_address" + append canonical_url "/SYSTEM/jb-getconnstate.tcl" + set connstate [ns_httpget $canonical_url] +} + +set user_invisible [whos_online::check_invisible $user_id ] +set all_invisible [whos_online::all_invisible_user_ids] +if {[llength $all_invisible] == 0 } {lappend all_invisible 0} +set all_users [whos_online::all_user_ids] + +#----------------------------------------------------check, whether user is registered------------------------------------- + +if { ![db_0or1row is_user_reg_with_jabber { select (user_id) as reg_check, (uc.jabber_regstate) as reg_stat + from jb_user_jabber_information uc where user_id = :user_id }]} { + set reg_need "1" + + + set not_registred true + + ad_form -name user-register -action jabber/user-register -form { + {jscreen:text(text) {label "Jabber Screen:
            "} {value "[jb_get_leagel_screen $user_id]"}} + {passwd:text(password) {label "Password:
            "}} + {return_url:text(hidden) {value "index"}} +} + + +} + +#-----------------------------------------------------get avaiable services-------------------------------------------------- + +db_foreach get_services { Select service from jb_services where active_check_p = 't'} { + set user_states($service) "offline" + set online_state($service) "offline" + set online_state_name($service) $service + set online_ext($service) "offline" + set online_ext_name($service) $service + set online_any($service) "offline" + set online_any_name($service) $service + append trans_symbol " $service" +} + +#-------------------------------------get the different user states for the IM services---------------------------------------- + + + + +multirow create user_status service status + +db_foreach get_users_state { + select lower(sn.status) as status, + lower(sn.service) as service + FROM jb_screens sn , jb_services + WHERE sn.user_id = :user_id + AND sn.service = jb_services.service + AND jb_services.active_check_p = 't' +} { + multirow append user_status $service $status + set user_states($service) $status +} if_no_rows { + + db_foreach get_services { + select service + from jb_services + where active_check_p = 't' + } { + multirow append user_status $service "no" + set user_states($service) "offline" + } + +} + + +set jabber_start "offline" + +for {set j 0} { $j < [llength $trans_symbol]} {incr j} { + if { [lindex $trans_symbol $j] == "jabber" } { + if { [set user_states([lindex $trans_symbol $j])] == "offline" } { + set jabber_start "offline" + set user_is_online false + set after_login_url [ad_conn url] + + + template::form::create user-login -action "/jabber/jabber-login" + template::element::create user-login return_url -widget hidden -value "[ad_conn url]" + template::element::create user-login Login -widget submit -lable Login -value reg + + + } else { + set jabber_start "online" + set user_is_online true + } + } + if { [lindex $trans_symbol $j] == "aim" } { + if { [set user_states([lindex $trans_symbol $j])] != "offline" } { + set aim_on 1 + } else { + set aim_on 0 + } + } +} + + +set jabber_number 0 +if { [db_0or1row number_of_onliners_jabber {SELECT count (js.status) as jabber_number + FROM group_distinct_member_map gdmm , jb_screens js, persons pe + WHERE gdmm.member_id = js.user_id + AND gdmm.member_id = pe.person_id + AND js.service = 'jabber' + AND js.status != 'offline' + AND gdmm.group_id = :community_id } ] } { + + + +} + +set icq_number 0 +if { [db_0or1row number_of_onliners_icq {SELECT count (js.status) as icq_number + FROM group_distinct_member_map gdmm , jb_screens js, persons pe + WHERE gdmm.member_id = js.user_id + AND gdmm.member_id = pe.person_id + AND js.service = 'icq' + AND js.status != 'offline' + AND gdmm.group_id = :community_id } ] } { + + + +} + + +set msn_number 0 +if { [db_0or1row number_of_onliners_msn {SELECT count (js.status) as msn_number + FROM group_distinct_member_map gdmm , jb_screens js, persons pe + WHERE gdmm.member_id = js.user_id + AND gdmm.member_id = pe.person_id + AND js.service = 'msn' + AND js.status != 'offline' + AND gdmm.group_id = :community_id } ] } { + + + +} + + +set yahoo_number 0 +if { [db_0or1row number_of_onliners_yahoo {SELECT count (js.status) as yahoo_number + FROM group_distinct_member_map gdmm , jb_screens js, persons pe + WHERE gdmm.member_id = js.user_id + AND gdmm.member_id = pe.person_id + AND js.service = 'yahoo' + AND js.status != 'offline' + AND gdmm.group_id = :community_id } ] } { + + + +} + + + +set aim_number 0 +if { [db_0or1row number_of_onliners_aim {SELECT count (js.status) as aim_number + FROM group_distinct_member_map gdmm , jb_screens js, persons pe + WHERE gdmm.member_id = js.user_id + AND gdmm.member_id = pe.person_id + AND js.service = 'aim' + AND js.status != 'offline' + AND gdmm.group_id = :community_id } ] } { + + + +} +