From bba4301bfa45869fd861095e480a1e05f6460007 Mon Sep 17 00:00:00 2001 From: "green-ponies (jgen)" Date: Thu, 6 Oct 2011 15:23:49 -0400 Subject: [PATCH] Disabled option for Minifying CSS and JavaScript. (not currently supported) --- core/page.class.php | 5 ++++- ext/setup/main.php | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/core/page.class.php b/core/page.class.php index dde20a97..b2a8d662 100644 --- a/core/page.class.php +++ b/core/page.class.php @@ -263,7 +263,8 @@ class Page { * PLEASE: Ensure that you test your site out throughly after enabling this module! * Either that, or don't use this module unless you are sure of what it is doing. * - * TODO: For performance reasons: Before performing the regex's, compute the md5 of the CSS & JS files and store somewhere to check later. + * TODO: Add support for minify-ing CSS and Javascript files. (similar to Minify. See: http://code.google.com/p/minify/ or https://github.com/mrclay/minify) + * TODO: For performance reasons: Before performing the regex's, compute the md5 of the CSS & JS files and store somewhere to check later. * * @return * This function returns FALSE if it failed to cache the files, @@ -325,6 +326,7 @@ class Page { // Minify the CSS if enabled. if ($config->get_bool("autocache_min_css")){ // not supported yet. + // TODO: add support for Minifying CSS files. } // compute the MD5 sum of the concatenated CSS files @@ -375,6 +377,7 @@ class Page { // Minify the JS if enabled. if ($config->get_bool("autocache_min_js")){ // not supported yet. + // TODO: add support for Minifying CSS files. } // compute the MD5 sum of the concatenated JavaScript files diff --git a/ext/setup/main.php b/ext/setup/main.php index adf4bb64..8b1f0eba 100644 --- a/ext/setup/main.php +++ b/ext/setup/main.php @@ -287,11 +287,27 @@ class Setup extends SimpleExtension { $sb->add_text_option("api_recaptcha_pubkey", "
Public key: "); $event->panel->add_block($sb); + + // Options for Automatic Caching & Minifying + $minifyscript = ""; + $sb = new SetupBlock("Automatic Caching of CSS & JS"); $sb->add_text_option("autocache_location", "Location: "); $sb->add_label("
This location needs to be writeable by the webserver."); $sb->add_bool_option("autocache_css", "
Automatic caching of CSS: "); $sb->add_bool_option("autocache_js", "
Automatic caching of JS: "); + $sb->add_label("Minifying currently not supported.$minifyscript"); $sb->add_bool_option("autocache_min_css", "
Minimize CSS files: "); $sb->add_bool_option("autocache_min_js", "
Minimize JS files: "); $event->panel->add_block($sb);