Index: openacs-4/packages/acs-bootstrap-installer/installer/www/blank-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/installer/www/blank-master.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-bootstrap-installer/installer/www/blank-master.tcl 3 Nov 2018 19:47:34 -0000 1.10 +++ openacs-4/packages/acs-bootstrap-installer/installer/www/blank-master.tcl 3 Sep 2024 15:37:30 -0000 1.11 @@ -6,7 +6,7 @@ You should NEVER need to modify this file. Most of the time your pages or master templates should not directly set this - file in their tag. They should instead use site-master with + file in their <master> tag. They should instead use site-master with provides a set of standard OpenACS content. Only pages which need to return raw HTML should use this template directly. @@ -26,7 +26,7 @@ ad_conn -set language Must be used to override the document language if necessary. - To add a CSS or JavaScript files to the section of the document you can + To add a CSS or JavaScript files to the <head> section of the document you can call the corresponding template::head::add_* functions within your page. @see template::head::add_css @@ -40,7 +40,7 @@ @see template::head::add_link @see template::head::add_script - JavaScript event handlers, such as onload, an be added to the tag by + JavaScript event handlers, such as onload, can be added to the tag by calling template::add_body_handler within your page. @see template::add_body_handler @@ -62,7 +62,7 @@ } if {![info exists doc(type)]} { - set doc(type) {} + set doc(type) {} } # @@ -87,7 +87,7 @@ # e.g. the blank master is installed before the subsite definitions # for the page_plugin callback. Templates are required to be very # robust. -if {[info commands ::callback::subsite::page_plugin::*] ne ""} { +if {[llength [info commands ::callback::subsite::page_plugin::*]]} { callback subsite::page_plugin } @@ -195,7 +195,7 @@ -content "text/html; charset=$doc(charset)" \ -http_equiv "content-type" # -# The following meta tags are unknown for HTML5, therefore discouraged +# The following meta tags are unknown for HTML5, therefore, discouraged # # template::head::add_meta \ # -content "text/css" \ @@ -204,16 +204,23 @@ # -content "text/javascript" \ # -http_equiv "Content-Script-Type" - -# Determine if we should be displaying the translation UI # -if {[lang::util::translator_mode_p]} { +# Determine if we should be displaying the translation UI. +# +# We just do this when the developer support is active, but this does +# not have to be this way. By showing the translator mode only for ds, +# we save for large sites a large number of client properties to be +# set via "lang::util::translator_mode_p" and +# "ad_get_client_property". +# +set ds_active [expr {[namespace which ::ds_show_p] ne {} && [::ds_show_p]}] +if {$ds_active && [lang::util::translator_mode_p]} { template::add_footer -src "/packages/acs-lang/lib/messages-to-translate" } # Determine if developer support is installed and enabled # -if {[llength [info commands ::ds_show_p]] == 1 && [ds_show_p]} { +if {$ds_active} { template::head::add_css \ -href "/resources/acs-developer-support/acs-developer-support.css" \ -media "all" @@ -271,7 +278,7 @@ # blocked out. # if {[parameter::get -parameter CSPEnabledP -package_id [ad_acs_kernel_id] -default 0] - && [info commands ::security::csp::render] ne "" + && [namespace which ::security::csp::render] ne "" } { set csp [::security::csp::render] if {$csp ne ""} {