Index: openacs-4/packages/xowf/tcl/xowf-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/xowf-callback-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowf/tcl/xowf-callback-procs.tcl 31 Jan 2018 14:03:45 -0000 1.1 @@ -0,0 +1,59 @@ +::xo::library doc { + XoWiki - Callback procs + + @creation-date 2006-08-08 + @author Gustaf Neumann + @cvs-id $Id: xowf-callback-procs.tcl,v 1.1 2018/01/31 14:03:45 gustafn Exp $ +} + +namespace eval ::xowf { + + ad_proc -private after-instantiate {-package_id:required } { + Callback when this an xowf instance is created + } { + ns_log notice "++++ BEGIN ::xowf::after-instantiate -package_id $package_id" + # General setup + ::xo::Package initialize -package_id $package_id + set folder_id [::$package_id folder_id] + + # + # Create a parameter page for convenience + # + set pform_id [::xowiki::Weblog instantiate_forms -forms en:Parameter.form \ + -package_id $package_id] + + ::xo::db::sql::content_item set_live_revision \ + -revision_id [$pform_id revision_id] \ + -publish_status production + + set ia { + MenuBar t top_includelet none production_mode t with_user_tracking t with_general_comments f + with_digg f with_tags f + ExtraMenuEntries {{entry -name New.Extra.Workflow -label "#xowf.menu-New-Extra-Workflow#" -form /en:Workflow.form}} + with_delicious f with_notifications f security_policy ::xowiki::policy1 + } + + set parameter_page_name en:xowf-default-parameter + set p [$pform_id create_form_page_instance \ + -name $parameter_page_name \ + -nls_language en_US \ + -default_variables [list title "XoWf Default Parameter" parent_id $folder_id \ + package_id $package_id instance_attributes $ia]] + $p save_new + + # + # Make the parameter page the default + # + parameter::set_value -package_id $package_id -parameter parameter_page -value $parameter_page_name + callback subsite::parameter_changed -package_id $package_id -parameter parameter_page -value $parameter_page_name + + ns_log notice "++++ END ::xowf::after-instantiate -package_id $package_id" + } +} + +# +# Local variables: +# mode: tcl +# tcl-indent-level: 2 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/xowf/tcl/xowf-calllback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/Attic/xowf-calllback-procs.tcl,v diff -u -N --- openacs-4/packages/xowf/tcl/xowf-calllback-procs.tcl 22 Dec 2017 13:52:06 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,59 +0,0 @@ -::xo::library doc { - XoWiki - Callback procs - - @creation-date 2006-08-08 - @author Gustaf Neumann - @cvs-id $Id: xowf-calllback-procs.tcl,v 1.5 2017/12/22 13:52:06 gustafn Exp $ -} - -namespace eval ::xowf { - - ad_proc -private after-instantiate {-package_id:required } { - Callback when this an xowf instance is created - } { - ns_log notice "++++ BEGIN ::xowf::after-instantiate -package_id $package_id" - # General setup - ::xo::Package initialize -package_id $package_id - set folder_id [::$package_id folder_id] - - # - # Create a parameter page for convenience - # - set pform_id [::xowiki::Weblog instantiate_forms -forms en:Parameter.form \ - -package_id $package_id] - - ::xo::db::sql::content_item set_live_revision \ - -revision_id [$pform_id revision_id] \ - -publish_status production - - set ia { - MenuBar t top_includelet none production_mode t with_user_tracking t with_general_comments f - with_digg f with_tags f - ExtraMenuEntries {{entry -name New.Extra.Workflow -label "#xowf.menu-New-Extra-Workflow#" -form /en:Workflow.form}} - with_delicious f with_notifications f security_policy ::xowiki::policy1 - } - - set parameter_page_name en:xowf-default-parameter - set p [$pform_id create_form_page_instance \ - -name $parameter_page_name \ - -nls_language en_US \ - -default_variables [list title "XoWf Default Parameter" parent_id $folder_id \ - package_id $package_id instance_attributes $ia]] - $p save_new - - # - # Make the parameter page the default - # - parameter::set_value -package_id $package_id -parameter parameter_page -value $parameter_page_name - callback subsite::parameter_changed -package_id $package_id -parameter parameter_page -value $parameter_page_name - - ns_log notice "++++ END ::xowf::after-instantiate -package_id $package_id" - } -} - -# -# Local variables: -# mode: tcl -# tcl-indent-level: 2 -# indent-tabs-mode: nil -# End: