Changeset 10169
- Timestamp:
- 07/07/08 17:33:14 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfCombineFilterPlugin/branches/kraven/config/app.yml
r10113 r10169 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: [ ]# you probably want to end your paths (comma seperated) with a /3 css_filtered_paths: [sfConfig::get('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 plugins/sfCombineFilterPlugin/branches/kraven/lib/sfCombineFilter.class.php
r10113 r10169 30 30 $this->sf_relative_url_root = $this->getContext()->getRequest()->getRelativeUrlRoot(). $this->getContext()->getRequest()->getScriptName(); 31 31 32 if ( $this->getParameter('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 ( $this->getParameter('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 = $this->getParameter('root_js_only', true);51 $root_js_only = sfConfig::get('app_sf_combine_filter_plugin_root_js_only', true); 52 52 53 53 $already_seen = array(); … … 131 131 { 132 132 //TODO: may need more replacements in the path but this covers everything I've come across so far 133 $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 $cssPath = str_replace( $filtered_paths,'',$path);133 //$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 $cssPath = str_replace(sfConfig::get('app_sf_combine_filter_plugin_css_filtered_paths', array()),'',$path); 136 136 $con = $this->fixCssPaths(file_get_contents($path),$cssPath); 137 137 } … … 145 145 } 146 146 147 if ($this->type=='javascript'&& $this->getParameter('compress_js'))147 if ($this->type=='javascript'&& sfConfig::get('app_sf_combine_filter_plugin_compress_js')) 148 148 { 149 149 $contents = JSMin::minify($contents); 150 150 } 151 elseif($this->type=='css'&& $this->getParameter('compress_css'))151 elseif($this->type=='css'&& sfConfig::get('app_sf_combine_filter_plugin_compress_css')) 152 152 { 153 153 $contents = $this->compressCss($contents); … … 244 244 protected function getCombinedStylesheets() 245 245 { 246 $root_css_only = $this->getParameter('root_css_only', true);246 $root_css_only = sfConfig::get('app_sf_combine_filter_plugin_root_css_only', true); 247 247 $already_seen = array(); 248 248 $combined_sources = array();