contributions/jcssmanager/start.inc.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Config Options for JCSSManager 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup JCSSManager 00007 */ 00008 class ConfigJCSSManager { 00009 const CSS_DIR = 'JCSS_CSS_DIR'; 00010 const JS_DIR = 'JCSS_JS_DIR'; 00011 00012 /** 00013 * CSS Compression method. Only 'yui' and 'csstidy' are supported 00014 */ 00015 const CSS_COMPRESSOR = 'JCSS_CSS_COMPRESSOR'; 00016 /** 00017 * Javascript Compression method. Possible values are 'yui' or 'closure' 00018 */ 00019 const JS_COMPRESSOR = 'JCSS_JS_COMPRESSOR'; 00020 00021 /** 00022 * Set to FALSE to disable usage compressed scripts 00023 */ 00024 const USE_COMPRESSED = 'JCSS_USE_COMPRESSED'; 00025 /** 00026 * Set to FALSE to disable gzipping compressed files 00027 */ 00028 const ALSO_GZIP = 'JCSS_ALSO_GZIP'; 00029 } 00030 00031 00032 Config::set_value_from_constant(ConfigJCSSManager::CSS_DIR, 'APP_JCSS_CSS_DIR', 'css/'); 00033 Config::set_value_from_constant(ConfigJCSSManager::JS_DIR, 'APP_JCSS_JS_DIR', 'js/'); 00034 00035 Config::set_value_from_constant(ConfigJCSSManager::CSS_COMPRESSOR, 'APP_JCSS_CSS_COMPRESSOR', 'yui'); 00036 Config::set_value_from_constant(ConfigJCSSManager::JS_COMPRESSOR, 'APP_JCSS_JS_COMPRESSOR', 'yui'); 00037 00038 Config::set_feature_from_constant(ConfigJCSSManager::USE_COMPRESSED, 'APP_JCSS_USE_COMPRESSED', !APP_TESTMODE); 00039 Config::set_feature_from_constant(ConfigJCSSManager::ALSO_GZIP, 'APP_JCSS_ALSO_GZIP', true); 00040 00041 /** 00042 * @defgroup JCSSManager 00043 * 00044 * JCSSManager combines and compresses both Javascript and CSS files, reducing both the number of requests and 00045 * the amount of data transfered by your webserver. 00046 * 00047 * JCSSManager currently supports: 00048 * 00049 * @li YUI Compressor 2.4.2 (http://developer.yahoo.com/yui/compressor/) for both CSS and Javascript. Unfortunately, the current release 2.4.6 does not 00050 * work well with YAML CSS framework, so 2.4.2 is kept. YUI is default. 00051 * @li Closure Compiler 20100330 (http://code.google.com/closure/compiler/) for JavaScript only. Closure Compression Level is 00052 * SIMPLE_OPTIMIZATIONS 00053 * @li CSS Tiry 1.3 (http://csstidy.sourceforge.net/index.php) for CSS compression. Compression level is default + removing last ";" 00054 * 00055 * @attention JCSSManager need Java to be installed on your system to run both YUI Compressoor or Closure Compiler! 00056 * 00057 * @section Usage Usage 00058 * 00059 * 00060 */