🌍
English
dev:changes_in_2.6 [2014/01/15 16:14] mistic100 [CSS & JS as Smarty templates] |
dev:changes_in_2.6 [2014/03/16 08:07] (current) plg is_adviser() removed |
||
---|---|---|---|
Line 282: | Line 282: | ||
=== Limitation === | === Limitation === | ||
- | The CSS and JS template files are only parsed when the file combiner needs to regenerate the combined files. This means you can use real dynamic values in those files.\\ | + | The CSS and JS template files are only parsed when the file combiner needs to regenerate the combined files. This means you can not use real dynamic values in those files.\\ |
- | This feature must only be used for CSS and JS files depending on a configuration param, chaging very rarely. | + | This feature must only be used for CSS and JS files depending on a configuration param, chaging very rarely.\\ |
When the said configuration changes you must notify the template engine. There are two ways to do that: | When the said configuration changes you must notify the template engine. There are two ways to do that: | ||
* clear all combined files by calling | * clear all combined files by calling | ||
<code>FileCombiner::clear_combined_files();</code> | <code>FileCombiner::clear_combined_files();</code> | ||
- | * use the //version// parameter of **combine_css** and //combine_script//. For example, EasyCaptcha plugin saves the timestamp of last change in his configuration and uses it as CSS version. | + | * use the //version// parameter of **combine_css** and **combine_script**. For example, EasyCaptcha plugin saves the timestamp of last change in his configuration and uses it as CSS version. |
<code>{combine_css id='mystyle' path='path/to/dynamic.css' template=true version=$lastmod}</code> | <code>{combine_css id='mystyle' path='path/to/dynamic.css' template=true version=$lastmod}</code> | ||
===== query2array ===== | ===== query2array ===== | ||
Line 326: | Line 325: | ||
</code> | </code> | ||
+ | ===== is_adviser() removed ===== | ||
+ | |||
+ | Function is_adviser() has been deprecated for several releases. Now it has been removed. If you keep it your code, Piwigo will crash. |