[pLog-svn] r5775 - in plog/branches/lifetype-1.2: class/template install locale/admin templates/admin
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Aug 2 16:37:37 EDT 2007
Author: oscar
Date: 2007-08-02 16:37:37 -0400 (Thu, 02 Aug 2007)
New Revision: 5775
Modified:
plog/branches/lifetype-1.2/class/template/template.class.php
plog/branches/lifetype-1.2/install/defaultconfig.properties.php
plog/branches/lifetype-1.2/locale/admin/locale_ca_ES.php
plog/branches/lifetype-1.2/locale/admin/locale_de_DE.php
plog/branches/lifetype-1.2/locale/admin/locale_en_UK.php
plog/branches/lifetype-1.2/locale/admin/locale_es_ES.php
plog/branches/lifetype-1.2/locale/admin/locale_fr_FR.php
plog/branches/lifetype-1.2/locale/admin/locale_gl_ES.php
plog/branches/lifetype-1.2/locale/admin/locale_it_IT.php
plog/branches/lifetype-1.2/locale/admin/locale_nl_NL.php
plog/branches/lifetype-1.2/locale/admin/locale_ru_RU.php
plog/branches/lifetype-1.2/locale/admin/locale_tt_RU.php
plog/branches/lifetype-1.2/locale/admin/locale_zh_CN.php
plog/branches/lifetype-1.2/locale/admin/locale_zh_TW.php
plog/branches/lifetype-1.2/templates/admin/globalsettings_templates.template
Log:
Added a configuration option to enable/disable the 'trim whitespace' filter available in smarty. This has a positive impact on page sizes (specially in the admin interface) so I think it will help sites save some bandwidth.
Backported from trunk, btw.
Modified: plog/branches/lifetype-1.2/class/template/template.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/template/template.class.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/class/template/template.class.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -93,6 +93,9 @@
// register dynamic block for every template instance
$this->register_block('dynamic', 'smarty_block_dynamic', false);
+
+ if( $config->getValue( 'trim_whitespace_output' ))
+ $this->load_filter( 'output', 'trimwhitespace' );
}
/**
Modified: plog/branches/lifetype-1.2/install/defaultconfig.properties.php
===================================================================
--- plog/branches/lifetype-1.2/install/defaultconfig.properties.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/install/defaultconfig.properties.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -128,4 +128,5 @@
$Inserts['template_load_order'] = "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES ('template_load_order','2', 1);";
$Inserts['summary_service_name'] = "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES ('summary_service_name','Your Service Name', 3);";
$Inserts['allow_javascript_blocks_in_posts'] = "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES ('allow_javascript_blocks_in_posts','0', 1);";
+$Inserts['trim_whitespace_output'] = "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES ('trim_whitespace_output','1', 1);";
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/locale/admin/locale_ca_ES.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_ca_ES.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/locale/admin/locale_ca_ES.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -1212,4 +1212,5 @@
/// new strings for LT 1.2.5 ///
$messages['bookmark_this_filter'] = 'Bookmark this filter';
+$messages['help_trim_whitespace_output'] = 'Removes all unnecessary blank spaces from rendered templates, which can make pages up to 40% smaller. It is adivsable to keep this enabled, unless you are concerned with performance [ Default = Yes ]';
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/locale/admin/locale_de_DE.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_de_DE.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/locale/admin/locale_de_DE.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -1196,4 +1196,5 @@
/// new strings for LT 1.2.5 ///
$messages['bookmark_this_filter'] = 'Bookmark this filter';
+$messages['help_trim_whitespace_output'] = 'Removes all unnecessary blank spaces from rendered templates, which can make pages up to 40% smaller. It is adivsable to keep this enabled, unless you are concerned with performance [ Default = Yes ]';
?>
Modified: plog/branches/lifetype-1.2/locale/admin/locale_en_UK.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_en_UK.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/locale/admin/locale_en_UK.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -1191,4 +1191,5 @@
/// new strings for LT 1.2.5 ///
$messages['bookmark_this_filter'] = 'Bookmark this filter';
+$messages['help_trim_whitespace_output'] = 'Removes all unnecessary blank spaces from rendered templates, which can make pages up to 40% smaller. It is adivsable to keep this enabled, unless you are concerned with performance [ Default = Yes ]';
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/locale/admin/locale_es_ES.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_es_ES.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/locale/admin/locale_es_ES.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -1203,4 +1203,5 @@
/// new strings for LT 1.2.5 ///
$messages['bookmark_this_filter'] = 'Bookmark this filter';
+$messages['help_trim_whitespace_output'] = 'Removes all unnecessary blank spaces from rendered templates, which can make pages up to 40% smaller. It is adivsable to keep this enabled, unless you are concerned with performance [ Default = Yes ]';
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/locale/admin/locale_fr_FR.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_fr_FR.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/locale/admin/locale_fr_FR.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -995,4 +995,5 @@
/// new strings for LT 1.2.5 ///
$messages['bookmark_this_filter'] = 'Bookmark this filter';
+$messages['help_trim_whitespace_output'] = 'Removes all unnecessary blank spaces from rendered templates, which can make pages up to 40% smaller. It is adivsable to keep this enabled, unless you are concerned with performance [ Default = Yes ]';
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/locale/admin/locale_gl_ES.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_gl_ES.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/locale/admin/locale_gl_ES.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -1212,4 +1212,5 @@
/// new strings for LT 1.2.5 ///
$messages['bookmark_this_filter'] = 'Bookmark this filter';
+$messages['help_trim_whitespace_output'] = 'Removes all unnecessary blank spaces from rendered templates, which can make pages up to 40% smaller. It is adivsable to keep this enabled, unless you are concerned with performance [ Default = Yes ]';
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/locale/admin/locale_it_IT.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_it_IT.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/locale/admin/locale_it_IT.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -1190,4 +1190,5 @@
/// new strings for LT 1.2.5 ///
$messages['bookmark_this_filter'] = 'Bookmark this filter';
+$messages['help_trim_whitespace_output'] = 'Removes all unnecessary blank spaces from rendered templates, which can make pages up to 40% smaller. It is adivsable to keep this enabled, unless you are concerned with performance [ Default = Yes ]';
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/locale/admin/locale_nl_NL.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_nl_NL.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/locale/admin/locale_nl_NL.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -1269,4 +1269,5 @@
/// new strings for LT 1.2.5 ///
$messages['bookmark_this_filter'] = 'Bookmark this filter';
+$messages['help_trim_whitespace_output'] = 'Removes all unnecessary blank spaces from rendered templates, which can make pages up to 40% smaller. It is adivsable to keep this enabled, unless you are concerned with performance [ Default = Yes ]';
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/locale/admin/locale_ru_RU.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_ru_RU.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/locale/admin/locale_ru_RU.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -1177,4 +1177,5 @@
/// new strings for LT 1.2.5 ///
$messages['bookmark_this_filter'] = 'Bookmark this filter';
+$messages['help_trim_whitespace_output'] = 'Removes all unnecessary blank spaces from rendered templates, which can make pages up to 40% smaller. It is adivsable to keep this enabled, unless you are concerned with performance [ Default = Yes ]';
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/locale/admin/locale_tt_RU.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_tt_RU.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/locale/admin/locale_tt_RU.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -1179,4 +1179,5 @@
/// new strings for LT 1.2.5 ///
$messages['bookmark_this_filter'] = 'Bookmark this filter';
+$messages['help_trim_whitespace_output'] = 'Removes all unnecessary blank spaces from rendered templates, which can make pages up to 40% smaller. It is adivsable to keep this enabled, unless you are concerned with performance [ Default = Yes ]';
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/locale/admin/locale_zh_CN.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_zh_CN.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/locale/admin/locale_zh_CN.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -1191,4 +1191,5 @@
/// new strings for LT 1.2.5 ///
$messages['bookmark_this_filter'] = 'Bookmark this filter';
+$messages['help_trim_whitespace_output'] = 'Removes all unnecessary blank spaces from rendered templates, which can make pages up to 40% smaller. It is adivsable to keep this enabled, unless you are concerned with performance [ Default = Yes ]';
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/locale/admin/locale_zh_TW.php
===================================================================
--- plog/branches/lifetype-1.2/locale/admin/locale_zh_TW.php 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/locale/admin/locale_zh_TW.php 2007-08-02 20:37:37 UTC (rev 5775)
@@ -1191,4 +1191,5 @@
/// new strings for LT 1.2.5 ///
$messages['bookmark_this_filter'] = 'Bookmark this filter';
+$messages['help_trim_whitespace_output'] = 'Removes all unnecessary blank spaces from rendered templates, which can make pages up to 40% smaller. It is adivsable to keep this enabled, unless you are concerned with performance [ Default = Yes ]';
?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/templates/admin/globalsettings_templates.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/globalsettings_templates.template 2007-08-02 20:27:48 UTC (rev 5774)
+++ plog/branches/lifetype-1.2/templates/admin/globalsettings_templates.template 2007-08-02 20:37:37 UTC (rev 5775)
@@ -77,4 +77,11 @@
<option value="2" {if $template_load_order == 2} selected="selected" {/if} />{$locale->tr("template_load_order_default_first")}</option>
</select>
</div>
+ <!-- trim_whitespace_output -->
+ <div class="field">
+ <label for="config[trim_whitespace_output]">trim_whitespace_output</label>
+ <div class="formHelp">{$locale->tr("help_trim_whitespace_output")}</div>
+ <input class="radio" type="radio" id="config[trim_whitespace_output]" name="config[trim_whitespace_output]" value="1" {if $trim_whitespace_output == 1 } checked="checked" {/if} />{$locale->tr("yes")}
+ <input class="radio" type="radio" id="config[trim_whitespace_output]" name="config[trim_whitespace_output]" value="0" {if $trim_whitespace_output == 0 } checked="checked" {/if} />{$locale->tr("no")}
+ </div>
</div>
More information about the pLog-svn
mailing list