Index: openacs-4/contrib/packages/portal/tcl/portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/tcl/portal-procs.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/contrib/packages/portal/tcl/portal-procs.tcl 13 Mar 2004 00:40:26 -0000 1.18 +++ openacs-4/contrib/packages/portal/tcl/portal-procs.tcl 14 Mar 2004 01:16:32 -0000 1.19 @@ -27,14 +27,6 @@ namespace eval portal { - # work around for template::util::url_to_file - ad_proc -private www_path {} { - returns the path of the www dir of the portal package. we need this for - stupid template tricks. - } { - return "/packages/portal/www" - } - ad_proc -public mount_point {} { caches the mount point } { @@ -55,6 +47,7 @@ {-page_list {{{Page 1} 2_column}}} {-owner_privileges {read write admin}} {-initialize_elements:boolean} + {-theme_name ""} } { Create a new portal for the passed in owner_id. create pages passed in the page_list. @@ -70,20 +63,27 @@ would make sense to only grant read to the party directly. @initialize_elements_p If true and template_id is set, initialize elements after copying. + @theme_name The theme to assign to this portal (defaults to the package's + default_theme_name) } { if { [string equal $context_id ""] } { set context_id [ad_conn package_id] } + if { [string equal $theme_name ""] } { + set theme_name [parameter::get -parameter default_theme_name] + } + db_transaction { set var_list [subst { {name $name} {template_id $template_id} {context_id $context_id} {owner_id $owner_id} + {theme_id [portal::theme::get_id -name $theme_name]} {package_id [ad_conn package_id]}}] set portal_id [package_instantiate_object -var_list $var_list portal] @@ -269,7 +269,7 @@ # get the portal and layout db_1row portal_select {} -column_array portal set page_id $portal(page_id) - set portal(page_src) "[www_path]/render-styles/${render_style}/render-page" + set portal(page_src) "/packages/portal/lib/render-styles/${render_style}/render-page" return [array get portal] } @@ -693,11 +693,11 @@ # create the master template - portal::new -owner_id 0 -owner_privileges {} + portal::new -name "Shared Portal" -owner_id 0 -owner_privileges {} # create the admin template - portal::new -owner_id [ad_conn package_id] -owner_privileges {} + portal::new -name "Administration" -owner_id [ad_conn package_id] -owner_privileges {} } }