Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -r1.189 -r1.190 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 20 Jul 2013 19:15:43 -0000 1.189 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 29 Jul 2013 08:58:11 -0000 1.190 @@ -4472,7 +4472,6 @@ } } - namespace eval ::xowiki::includelet { ############################################################################# # @@ -4489,6 +4488,7 @@ }} } + # the two method "href" and "page_number" are copied from "toc" html-file instproc href {book_mode name} { my instvar package_id __including_page @@ -4525,6 +4525,34 @@ } +namespace eval ::xowiki::includelet { + ############################################################################# + # + # Define chat as an includelet + # + ::xowiki::IncludeletClass create chat \ + -superclass ::xowiki::Includelet \ + -parameter { + {parameter_declaration { + {-title ""} + {-chat_id ""} + {-mode ""} + {-path ""} + }} + } + chat instproc render {} { + my get_parameters + ns_log notice chat_id=$chat_id + if {$chat_id eq ""} { + # make the chat just for including page + set char_id [[my set __including_page] item_id] + } + set r [::xowiki::Chat login -chat_id $chat_id -mode $mode -path $path] + #ns_log notice chat=>$r + return $r + } +} + ::xo::library source_dependent