Changeset 10174
- Timestamp:
- 07/07/08 18:55:10 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfCombineFilterPlugin/branches/kraven/config/app.yml
r10169 r10174 1 1 all: # these are the defaults, you should override them in your application/config/app.yml file 2 2 sf_combine_filter_plugin: 3 css_filtered_paths: [ sfConfig::get('sf_root_dir'), plugins/, web/] # you probably want to end your paths (comma seperated) with a /3 css_filtered_paths: [%SF_ROOT_DIR%, plugins/, web/] # you probably want to end your paths (comma seperated) with a / 4 4 js_exclude_files: [tiny_mce] # you probably want E.G. tiny_mce in here, so I did this for you ;-) 5 javascripts: true 6 stylesheets: true 7 compress_js: true 8 compress_css: true 9 root_js_only: false 10 root_css_only: false 5 6 #defaults 7 #javascripts: true 8 #stylesheets: true 9 #compress_js: false 10 #compress_css: true 11 #root_js_only: false 12 #root_css_only: false plugins/sfCombineFilterPlugin/branches/kraven/lib/sfCombineFilter.class.php
r10169 r10174 30 30 $this->sf_relative_url_root = $this->getContext()->getRequest()->getRelativeUrlRoot(). $this->getContext()->getRequest()->getScriptName(); 31 31 32 if (sfConfig::get('app_sf_combine_filter_plugin_javascripts', true))32 if (sfConfig::get('app_sf_combine_filter_plugin_javascripts',true)) 33 33 { 34 34 $this->type = 'javascript'; … … 38 38 } 39 39 40 if (sfConfig::get('app_sf_combine_filter_plugin_stylesheets', true))40 if (sfConfig::get('app_sf_combine_filter_plugin_stylesheets',true)) 41 41 { 42 42 $this->type = 'css'; … … 49 49 protected function getCombinedJavascripts() 50 50 { 51 $root_js_only = sfConfig::get('app_sf_combine_filter_plugin_root_js_only', true);51 $root_js_only = sfConfig::get('app_sf_combine_filter_plugin_root_js_only', false); 52 52 53 53 $already_seen = array(); … … 130 130 if($this->type=='css') 131 131 { 132 //TODO: may need more replacements in the path but this covers everything I've come across so far133 //$filtered_paths = array(sfConfig::get('sf_root_dir'), 'plugins/', 'web/');134 //$filtered_paths = array_merge($filtered_paths, sfConfig::get('app_sf_combine_filter_plugin_css_filtered_paths', array()));135 132 $cssPath = str_replace(sfConfig::get('app_sf_combine_filter_plugin_css_filtered_paths', array()),'',$path); 136 133 $con = $this->fixCssPaths(file_get_contents($path),$cssPath); … … 145 142 } 146 143 147 if ($this->type=='javascript'&& sfConfig::get('app_sf_combine_filter_plugin_compress_js' ))144 if ($this->type=='javascript'&& sfConfig::get('app_sf_combine_filter_plugin_compress_js', false)) 148 145 { 149 146 $contents = JSMin::minify($contents); 150 147 } 151 elseif($this->type=='css'&& sfConfig::get('app_sf_combine_filter_plugin_compress_css' ))148 elseif($this->type=='css'&& sfConfig::get('app_sf_combine_filter_plugin_compress_css', true)) 152 149 { 153 150 $contents = $this->compressCss($contents); … … 244 241 protected function getCombinedStylesheets() 245 242 { 246 $root_css_only = sfConfig::get('app_sf_combine_filter_plugin_root_css_only', true);243 $root_css_only = sfConfig::get('app_sf_combine_filter_plugin_root_css_only', false); 247 244 $already_seen = array(); 248 245 $combined_sources = array();