Version Notes
+ Versioning of merged CSS and JS files
* Improved generation of merged files url
Download this release
Release Info
Developer | Apptrian |
Extension | Apptrian_Minify_HTML_CSS_JS |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.2.0
- app/code/community/Apptrian/Minify/Block/About.php +1 -1
- app/code/community/Apptrian/Minify/Block/Info.php +10 -7
- app/code/community/Apptrian/Minify/Block/Page/Html/Head.php +33 -28
- app/code/community/Apptrian/Minify/Model/Config/Version.php +46 -0
- app/code/community/Apptrian/Minify/etc/config.xml +3 -1
- app/code/community/Apptrian/Minify/etc/system.xml +30 -2
- app/locale/en_US/Apptrian_Minify.csv +7 -0
- package.xml +7 -6
app/code/community/Apptrian/Minify/Block/About.php
CHANGED
@@ -25,7 +25,7 @@ class Apptrian_Minify_Block_About
|
|
25 |
<div style="background:url('$logopath') no-repeat scroll 15px 15px #e7efef; border:1px solid #ccc; min-height:100px; margin:5px 0; padding:15px 15px 15px 140px;">
|
26 |
<p>
|
27 |
<strong>Apptrian Minify HTML CSS JS Extension v$version</strong><br />
|
28 |
-
Minify HTML CSS JS including inline CSS/JS and speed up
|
29 |
</p>
|
30 |
<p>
|
31 |
Website: <a href="http://www.apptrian.com" target="_blank">www.apptrian.com</a><br />
|
25 |
<div style="background:url('$logopath') no-repeat scroll 15px 15px #e7efef; border:1px solid #ccc; min-height:100px; margin:5px 0; padding:15px 15px 15px 140px;">
|
26 |
<p>
|
27 |
<strong>Apptrian Minify HTML CSS JS Extension v$version</strong><br />
|
28 |
+
Minify HTML CSS JS including inline CSS/JS and speed up your site. Works with default Magento CSS/JS merger.
|
29 |
</p>
|
30 |
<p>
|
31 |
Website: <a href="http://www.apptrian.com" target="_blank">www.apptrian.com</a><br />
|
app/code/community/Apptrian/Minify/Block/Info.php
CHANGED
@@ -39,25 +39,28 @@ class Apptrian_Minify_Block_Info
|
|
39 |
</div>
|
40 |
<div>
|
41 |
<p><strong>Products and services you might be interested in:</strong></p>
|
42 |
-
<a href="http://www.apptrian.com/products-and-services/magento/
|
|
|
|
|
|
|
43 |
<img src="http://www.apptrian.com/media/apptrian-promotional/minify-html-css-js-for-magento.jpg" alt="Minify HTML CSS JS for Magento" style="border:1px solid #ccc;" />
|
44 |
</a>
|
45 |
-
<a href="http://www.apptrian.com/products-and-services/magento/professional-magento-installation" target="_blank" style="margin
|
46 |
<img src="http://www.apptrian.com/media/apptrian-promotional/professional-magento-installation.jpg" alt="Professional Magento Installation" style="border:1px solid #ccc;" />
|
47 |
</a>
|
48 |
-
<a href="http://www.apptrian.com/products-and-services/magento/quick-search-for-magento" target="_blank" style="margin
|
49 |
<img src="http://www.apptrian.com/media/apptrian-promotional/quick-search-for-magento.jpg" alt="Quick Search for Magento" style="border:1px solid #ccc;" />
|
50 |
</a>
|
51 |
-
<a href="http://www.apptrian.com/products-and-services/magento/responsive-product-slider-for-magento" target="_blank" style="margin
|
52 |
<img src="http://www.apptrian.com/media/apptrian-promotional/responsive-product-slider-for-magento.jpg" alt="Responsive Product Slider for Magento" style="border:1px solid #ccc;" />
|
53 |
</a>
|
54 |
-
<a href="http://www.apptrian.com/products-and-services/magento/schema-org-microdata-for-magento" target="_blank" style="margin
|
55 |
<img src="http://www.apptrian.com/media/apptrian-promotional/schema-org-microdata-for-magento.jpg" alt="Schema.org Microdata for Magento" style="border:1px solid #ccc;" />
|
56 |
</a>
|
57 |
-
<a href="http://www.apptrian.com/products-and-services/magento/social-integrator-for-magento" target="_blank" style="margin
|
58 |
<img src="http://www.apptrian.com/media/apptrian-promotional/social-integrator-for-magento.jpg" alt="Social Integrator" style="border:1px solid #ccc;" />
|
59 |
</a>
|
60 |
-
<a href="http://www.apptrian.com/products-and-services/magento/subcategories-grid-list-for-magento" target="_blank" style="margin
|
61 |
<img src="http://www.apptrian.com/media/apptrian-promotional/subcategories-grid-list-for-magento.jpg" alt="Subcategories Grid/List" style="border:1px solid #ccc;" />
|
62 |
</a>
|
63 |
</div>
|
39 |
</div>
|
40 |
<div>
|
41 |
<p><strong>Products and services you might be interested in:</strong></p>
|
42 |
+
<a href="http://www.apptrian.com/products-and-services/magento/image-optimizer-for-magento" target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
|
43 |
+
<img src="http://www.apptrian.com/media/apptrian-promotional/image-optimizer-for-magento.jpg" alt="Image Optimizer for Magento" style="border:1px solid #ccc;" />
|
44 |
+
</a>
|
45 |
+
<a href="http://www.apptrian.com/products-and-services/magento/minify-html-css-js-for-magento" target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
|
46 |
<img src="http://www.apptrian.com/media/apptrian-promotional/minify-html-css-js-for-magento.jpg" alt="Minify HTML CSS JS for Magento" style="border:1px solid #ccc;" />
|
47 |
</a>
|
48 |
+
<a href="http://www.apptrian.com/products-and-services/magento/professional-magento-installation" target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
|
49 |
<img src="http://www.apptrian.com/media/apptrian-promotional/professional-magento-installation.jpg" alt="Professional Magento Installation" style="border:1px solid #ccc;" />
|
50 |
</a>
|
51 |
+
<a href="http://www.apptrian.com/products-and-services/magento/quick-search-for-magento" target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
|
52 |
<img src="http://www.apptrian.com/media/apptrian-promotional/quick-search-for-magento.jpg" alt="Quick Search for Magento" style="border:1px solid #ccc;" />
|
53 |
</a>
|
54 |
+
<a href="http://www.apptrian.com/products-and-services/magento/responsive-product-slider-for-magento" target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
|
55 |
<img src="http://www.apptrian.com/media/apptrian-promotional/responsive-product-slider-for-magento.jpg" alt="Responsive Product Slider for Magento" style="border:1px solid #ccc;" />
|
56 |
</a>
|
57 |
+
<a href="http://www.apptrian.com/products-and-services/magento/schema-org-microdata-for-magento" target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
|
58 |
<img src="http://www.apptrian.com/media/apptrian-promotional/schema-org-microdata-for-magento.jpg" alt="Schema.org Microdata for Magento" style="border:1px solid #ccc;" />
|
59 |
</a>
|
60 |
+
<a href="http://www.apptrian.com/products-and-services/magento/social-integrator-for-magento" target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
|
61 |
<img src="http://www.apptrian.com/media/apptrian-promotional/social-integrator-for-magento.jpg" alt="Social Integrator" style="border:1px solid #ccc;" />
|
62 |
</a>
|
63 |
+
<a href="http://www.apptrian.com/products-and-services/magento/subcategories-grid-list-for-magento" target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
|
64 |
<img src="http://www.apptrian.com/media/apptrian-promotional/subcategories-grid-list-for-magento.jpg" alt="Subcategories Grid/List" style="border:1px solid #ccc;" />
|
65 |
</a>
|
66 |
</div>
|
app/code/community/Apptrian/Minify/Block/Page/Html/Head.php
CHANGED
@@ -55,8 +55,8 @@ class Apptrian_Minify_Block_Page_Html_Head extends Mage_Page_Block_Html_Head
|
|
55 |
$params = $params ? ' ' . $params : '';
|
56 |
if ($mergedUrl) {
|
57 |
|
58 |
-
$minifiedFileUrl = $this->minifyCssJs($format, $mergedUrl
|
59 |
-
|
60 |
$html .= sprintf($format, $minifiedFileUrl, $params);
|
61 |
|
62 |
} else {
|
@@ -74,25 +74,24 @@ class Apptrian_Minify_Block_Page_Html_Head extends Mage_Page_Block_Html_Head
|
|
74 |
*
|
75 |
* @param string $format
|
76 |
* @param string $mergedUrl
|
77 |
-
* @param string $params
|
78 |
* @return string
|
79 |
*/
|
80 |
-
public function minifyCssJs($format, $mergedUrl
|
81 |
{
|
82 |
-
|
83 |
-
$
|
84 |
-
|
85 |
-
|
86 |
-
|
|
|
87 |
$relativeUrlPathArray = explode('/', $relativeUrl);
|
|
|
88 |
$relativePath = implode(DS, $relativeUrlPathArray);
|
89 |
-
|
90 |
$originalFile = array_pop($relativeUrlPathArray);
|
91 |
-
|
92 |
-
$
|
93 |
-
|
94 |
-
$originalFileRealPath = $baseDir . $relativePath;
|
95 |
-
|
96 |
// CSS
|
97 |
if (strpos($format, '<link') === 0) {
|
98 |
|
@@ -101,8 +100,8 @@ class Apptrian_Minify_Block_Page_Html_Head extends Mage_Page_Block_Html_Head
|
|
101 |
}
|
102 |
|
103 |
$minifiedFilename = $this->getMinifiedFilename($originalFile, 'css');
|
104 |
-
$minifiedFileRealPath = $this->getMinifiedFileRealPath($
|
105 |
-
$minifiedFileUrl = $this->getMinifiedFileUrl($
|
106 |
|
107 |
if (!file_exists($minifiedFileRealPath)) {
|
108 |
|
@@ -126,8 +125,8 @@ class Apptrian_Minify_Block_Page_Html_Head extends Mage_Page_Block_Html_Head
|
|
126 |
}
|
127 |
|
128 |
$minifiedFilename = $this->getMinifiedFilename($originalFile, 'js');
|
129 |
-
$minifiedFileRealPath = $this->getMinifiedFileRealPath($
|
130 |
-
$minifiedFileUrl = $this->getMinifiedFileUrl($
|
131 |
|
132 |
if (!file_exists($minifiedFileRealPath)) {
|
133 |
|
@@ -142,9 +141,9 @@ class Apptrian_Minify_Block_Page_Html_Head extends Mage_Page_Block_Html_Head
|
|
142 |
}
|
143 |
|
144 |
}
|
145 |
-
|
146 |
return $minifiedFileUrl;
|
147 |
-
|
148 |
}
|
149 |
|
150 |
/**
|
@@ -157,37 +156,43 @@ class Apptrian_Minify_Block_Page_Html_Head extends Mage_Page_Block_Html_Head
|
|
157 |
*/
|
158 |
public function getMinifiedFilename($file, $type)
|
159 |
{
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
}
|
162 |
|
163 |
/**
|
164 |
* Returns real path of minified file.
|
165 |
* (Custom method not from original block.)
|
166 |
*
|
167 |
-
* @param string $
|
168 |
* @param string $minifiedFilename
|
169 |
* @param array $relativeUrlPathArray
|
170 |
* @return string
|
171 |
*/
|
172 |
-
public function getMinifiedFileRealPath($
|
173 |
{
|
174 |
$relativePath = implode(DS, $relativeUrlPathArray);
|
175 |
-
return $
|
176 |
}
|
177 |
|
178 |
/**
|
179 |
* Returns url of minified file.
|
180 |
* (Custom method not from original block.)
|
181 |
*
|
182 |
-
* @param string $
|
183 |
* @param string $minifiedFilename
|
184 |
* @param array $relativeUrlPathArray
|
185 |
* @return string
|
186 |
*/
|
187 |
-
public function getMinifiedFileUrl($
|
188 |
{
|
189 |
$relativeUrl = implode('/', $relativeUrlPathArray);
|
190 |
-
return $
|
191 |
}
|
192 |
|
193 |
}
|
55 |
$params = $params ? ' ' . $params : '';
|
56 |
if ($mergedUrl) {
|
57 |
|
58 |
+
$minifiedFileUrl = $this->minifyCssJs($format, $mergedUrl);
|
59 |
+
|
60 |
$html .= sprintf($format, $minifiedFileUrl, $params);
|
61 |
|
62 |
} else {
|
74 |
*
|
75 |
* @param string $format
|
76 |
* @param string $mergedUrl
|
|
|
77 |
* @return string
|
78 |
*/
|
79 |
+
public function minifyCssJs($format, $mergedUrl)
|
80 |
{
|
81 |
+
|
82 |
+
$baseDirMedia = Mage::getBaseDir('media');
|
83 |
+
$baseUrlMedia = Mage::getBaseUrl('media');
|
84 |
+
|
85 |
+
$relativeUrl = str_replace($baseUrlMedia, '', $mergedUrl);
|
86 |
+
|
87 |
$relativeUrlPathArray = explode('/', $relativeUrl);
|
88 |
+
|
89 |
$relativePath = implode(DS, $relativeUrlPathArray);
|
90 |
+
|
91 |
$originalFile = array_pop($relativeUrlPathArray);
|
92 |
+
|
93 |
+
$originalFileRealPath = $baseDirMedia . DS . $relativePath;
|
94 |
+
|
|
|
|
|
95 |
// CSS
|
96 |
if (strpos($format, '<link') === 0) {
|
97 |
|
100 |
}
|
101 |
|
102 |
$minifiedFilename = $this->getMinifiedFilename($originalFile, 'css');
|
103 |
+
$minifiedFileRealPath = $this->getMinifiedFileRealPath($baseDirMedia, $minifiedFilename, $relativeUrlPathArray);
|
104 |
+
$minifiedFileUrl = $this->getMinifiedFileUrl($baseUrlMedia, $minifiedFilename, $relativeUrlPathArray);
|
105 |
|
106 |
if (!file_exists($minifiedFileRealPath)) {
|
107 |
|
125 |
}
|
126 |
|
127 |
$minifiedFilename = $this->getMinifiedFilename($originalFile, 'js');
|
128 |
+
$minifiedFileRealPath = $this->getMinifiedFileRealPath($baseDirMedia, $minifiedFilename, $relativeUrlPathArray);
|
129 |
+
$minifiedFileUrl = $this->getMinifiedFileUrl($baseUrlMedia, $minifiedFilename, $relativeUrlPathArray);
|
130 |
|
131 |
if (!file_exists($minifiedFileRealPath)) {
|
132 |
|
141 |
}
|
142 |
|
143 |
}
|
144 |
+
|
145 |
return $minifiedFileUrl;
|
146 |
+
|
147 |
}
|
148 |
|
149 |
/**
|
156 |
*/
|
157 |
public function getMinifiedFilename($file, $type)
|
158 |
{
|
159 |
+
if ($type == 'css') {
|
160 |
+
$v = Mage::getStoreConfig('apptrian_minify/general/css_version');
|
161 |
+
} else {
|
162 |
+
$v = Mage::getStoreConfig('apptrian_minify/general/js_version');
|
163 |
+
}
|
164 |
+
|
165 |
+
return hash('md5', $file . $v) . '.' . $type;
|
166 |
}
|
167 |
|
168 |
/**
|
169 |
* Returns real path of minified file.
|
170 |
* (Custom method not from original block.)
|
171 |
*
|
172 |
+
* @param string $baseDirMedia
|
173 |
* @param string $minifiedFilename
|
174 |
* @param array $relativeUrlPathArray
|
175 |
* @return string
|
176 |
*/
|
177 |
+
public function getMinifiedFileRealPath($baseDirMedia, $minifiedFilename, $relativeUrlPathArray)
|
178 |
{
|
179 |
$relativePath = implode(DS, $relativeUrlPathArray);
|
180 |
+
return $baseDirMedia . DS . $relativePath . DS . $minifiedFilename;
|
181 |
}
|
182 |
|
183 |
/**
|
184 |
* Returns url of minified file.
|
185 |
* (Custom method not from original block.)
|
186 |
*
|
187 |
+
* @param string $baseUrlMedia
|
188 |
* @param string $minifiedFilename
|
189 |
* @param array $relativeUrlPathArray
|
190 |
* @return string
|
191 |
*/
|
192 |
+
public function getMinifiedFileUrl($baseUrlMedia, $minifiedFilename, $relativeUrlPathArray)
|
193 |
{
|
194 |
$relativeUrl = implode('/', $relativeUrlPathArray);
|
195 |
+
return $baseUrlMedia . $relativeUrl . '/' . $minifiedFilename;
|
196 |
}
|
197 |
|
198 |
}
|
app/code/community/Apptrian/Minify/Model/Config/Version.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @category Apptrian
|
4 |
+
* @package Apptrian_Minify
|
5 |
+
* @author Apptrian
|
6 |
+
* @copyright Copyright (c) 2015 Apptrian (http://www.apptrian.com)
|
7 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
8 |
+
*/
|
9 |
+
class Apptrian_Minify_Model_Config_Version extends Mage_Core_Model_Config_Data
|
10 |
+
{
|
11 |
+
|
12 |
+
public function _beforeSave()
|
13 |
+
{
|
14 |
+
|
15 |
+
$result = $this->validate();
|
16 |
+
|
17 |
+
if ($result !== true) {
|
18 |
+
|
19 |
+
Mage::throwException(implode("\n", $result));
|
20 |
+
|
21 |
+
}
|
22 |
+
|
23 |
+
return parent::_beforeSave();
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
public function validate()
|
28 |
+
{
|
29 |
+
|
30 |
+
$errors = array();
|
31 |
+
$helper = Mage::helper('apptrian_minify');
|
32 |
+
$value = $this->getValue();
|
33 |
+
|
34 |
+
if (!Zend_Validate::is($value, 'Regex', array('pattern' => '/^[\p{L}\p{N}_,;:!&#\+\*\$\?\|\'\.\-\ \/]*$/iu'))) {
|
35 |
+
$errors[] = $helper->__('One or more of Version fields are invalid.');
|
36 |
+
}
|
37 |
+
|
38 |
+
if (empty($errors)) {
|
39 |
+
return true;
|
40 |
+
}
|
41 |
+
|
42 |
+
return $errors;
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
}
|
app/code/community/Apptrian/Minify/etc/config.xml
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
<config>
|
12 |
<modules>
|
13 |
<Apptrian_Minify>
|
14 |
-
<version>1.
|
15 |
</Apptrian_Minify>
|
16 |
</modules>
|
17 |
<global>
|
@@ -53,7 +53,9 @@
|
|
53 |
<max_minification>0</max_minification>
|
54 |
<compatibility>0</compatibility>
|
55 |
<minify_css>0</minify_css>
|
|
|
56 |
<minify_js>0</minify_js>
|
|
|
57 |
</general>
|
58 |
</apptrian_minify>
|
59 |
</default>
|
11 |
<config>
|
12 |
<modules>
|
13 |
<Apptrian_Minify>
|
14 |
+
<version>1.2.0</version>
|
15 |
</Apptrian_Minify>
|
16 |
</modules>
|
17 |
<global>
|
53 |
<max_minification>0</max_minification>
|
54 |
<compatibility>0</compatibility>
|
55 |
<minify_css>0</minify_css>
|
56 |
+
<css_version></css_version>
|
57 |
<minify_js>0</minify_js>
|
58 |
+
<js_version></js_version>
|
59 |
</general>
|
60 |
</apptrian_minify>
|
61 |
</default>
|
app/code/community/Apptrian/Minify/etc/system.xml
CHANGED
@@ -131,10 +131,24 @@
|
|
131 |
<show_in_store>1</show_in_store>
|
132 |
<comment><![CDATA[Enables or disables CSS minification.<br />WARNING! Before you enable this option you must have valid CSS code on all of the pages on your site. In order for minification to work you must enable Admin>System>Configuration>Developer>CSS Settings>Merge CSS Files.]]></comment>
|
133 |
</minify_css>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
<heading_js translate="label">
|
135 |
<label>JS Settings</label>
|
136 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
137 |
-
<sort_order>
|
138 |
<show_in_default>1</show_in_default>
|
139 |
<show_in_website>1</show_in_website>
|
140 |
<show_in_store>1</show_in_store>
|
@@ -143,12 +157,26 @@
|
|
143 |
<label>Minify JavaScript</label>
|
144 |
<frontend_type>select</frontend_type>
|
145 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
146 |
-
<sort_order>
|
147 |
<show_in_default>1</show_in_default>
|
148 |
<show_in_website>1</show_in_website>
|
149 |
<show_in_store>1</show_in_store>
|
150 |
<comment><![CDATA[Enables or disables JavaScript minification.<br />WARNING! Before you enable this option you must have valid JS code on all of the pages on your site. In order for minification to work you must enable Admin>System>Configuration>Developer>JavaScript Settings>Merge JavaScript Files.]]></comment>
|
151 |
</minify_js>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
</fields>
|
153 |
</general>
|
154 |
</groups>
|
131 |
<show_in_store>1</show_in_store>
|
132 |
<comment><![CDATA[Enables or disables CSS minification.<br />WARNING! Before you enable this option you must have valid CSS code on all of the pages on your site. In order for minification to work you must enable Admin>System>Configuration>Developer>CSS Settings>Merge CSS Files.]]></comment>
|
133 |
</minify_css>
|
134 |
+
<css_version translate="label comment tooltip">
|
135 |
+
<label>Merged CSS Version</label>
|
136 |
+
<frontend_type>text</frontend_type>
|
137 |
+
<backend_model>apptrian_minify/config_version</backend_model>
|
138 |
+
<sort_order>7</sort_order>
|
139 |
+
<show_in_default>1</show_in_default>
|
140 |
+
<show_in_website>1</show_in_website>
|
141 |
+
<show_in_store>1</show_in_store>
|
142 |
+
<comment>Merged .css file version.</comment>
|
143 |
+
<tooltip><![CDATA[If you are using <strong>browser caching</strong> then you can use "versioning" technique to force browsers to load new version of merged .css file. This "version" can be any string you want and it will not be visible. It is used for generating new hashed name of .css file. The best practice is to use numbers and then increment on every new "version".]]></tooltip>
|
144 |
+
<depends>
|
145 |
+
<minify_css>1</minify_css>
|
146 |
+
</depends>
|
147 |
+
</css_version>
|
148 |
<heading_js translate="label">
|
149 |
<label>JS Settings</label>
|
150 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
151 |
+
<sort_order>8</sort_order>
|
152 |
<show_in_default>1</show_in_default>
|
153 |
<show_in_website>1</show_in_website>
|
154 |
<show_in_store>1</show_in_store>
|
157 |
<label>Minify JavaScript</label>
|
158 |
<frontend_type>select</frontend_type>
|
159 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
160 |
+
<sort_order>9</sort_order>
|
161 |
<show_in_default>1</show_in_default>
|
162 |
<show_in_website>1</show_in_website>
|
163 |
<show_in_store>1</show_in_store>
|
164 |
<comment><![CDATA[Enables or disables JavaScript minification.<br />WARNING! Before you enable this option you must have valid JS code on all of the pages on your site. In order for minification to work you must enable Admin>System>Configuration>Developer>JavaScript Settings>Merge JavaScript Files.]]></comment>
|
165 |
</minify_js>
|
166 |
+
<js_version translate="label comment tooltip">
|
167 |
+
<label>Merged JavaScript Version</label>
|
168 |
+
<frontend_type>text</frontend_type>
|
169 |
+
<backend_model>apptrian_minify/config_version</backend_model>
|
170 |
+
<sort_order>10</sort_order>
|
171 |
+
<show_in_default>1</show_in_default>
|
172 |
+
<show_in_website>1</show_in_website>
|
173 |
+
<show_in_store>1</show_in_store>
|
174 |
+
<comment>Merged .js file version.</comment>
|
175 |
+
<tooltip><![CDATA[If you are using <strong>browser caching</strong> then you can use "versioning" technique to force browsers to load new version of merged .js file. This "version" can be any string you want and it will not be visible. It is used for generating new hashed name of .js file. The best practice is to use numbers and then increment on every new "version".]]></tooltip>
|
176 |
+
<depends>
|
177 |
+
<minify_js>1</minify_js>
|
178 |
+
</depends>
|
179 |
+
</js_version>
|
180 |
</fields>
|
181 |
</general>
|
182 |
</groups>
|
app/locale/en_US/Apptrian_Minify.csv
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
"Info","Info"
|
2 |
"Minify HTML CSS JS","Minify HTML CSS JS"
|
3 |
"Apptrian Extensions","Apptrian Extensions"
|
@@ -14,6 +15,12 @@
|
|
14 |
"CSS Settings","CSS Settings"
|
15 |
"Minify CSS","Minify CSS"
|
16 |
"Enables or disables CSS minification.<br />WARNING! Before you enable this option you must have valid CSS code on all of the pages on your site. In order for minification to work you must enable Admin>System>Configuration>Developer>CSS Settings>Merge CSS Files.","Enables or disables CSS minification.<br />WARNING! Before you enable this option you must have valid CSS code on all of the pages on your site. In order for minification to work you must enable Admin>System>Configuration>Developer>CSS Settings>Merge CSS Files."
|
|
|
|
|
|
|
17 |
"JS Settings","JS Settings"
|
18 |
"Minify JavaScript","Minify JavaScript"
|
19 |
"Enables or disables JavaScript minification.<br />WARNING! Before you enable this option you must have valid JS code on all of the pages on your site. In order for minification to work you must enable Admin>System>Configuration>Developer>JavaScript Settings>Merge JavaScript Files.","Enables or disables JavaScript minification.<br />WARNING! Before you enable this option you must have valid JS code on all of the pages on your site. In order for minification to work you must enable Admin>System>Configuration>Developer>JavaScript Settings>Merge JavaScript Files."
|
|
|
|
|
|
1 |
+
"One or more of Version fields are invalid.","One or more of Version fields are invalid."
|
2 |
"Info","Info"
|
3 |
"Minify HTML CSS JS","Minify HTML CSS JS"
|
4 |
"Apptrian Extensions","Apptrian Extensions"
|
15 |
"CSS Settings","CSS Settings"
|
16 |
"Minify CSS","Minify CSS"
|
17 |
"Enables or disables CSS minification.<br />WARNING! Before you enable this option you must have valid CSS code on all of the pages on your site. In order for minification to work you must enable Admin>System>Configuration>Developer>CSS Settings>Merge CSS Files.","Enables or disables CSS minification.<br />WARNING! Before you enable this option you must have valid CSS code on all of the pages on your site. In order for minification to work you must enable Admin>System>Configuration>Developer>CSS Settings>Merge CSS Files."
|
18 |
+
"Merged CSS Version","Merged CSS Version"
|
19 |
+
"Merged .css file version.","Merged .css file version."
|
20 |
+
"If you are using <strong>browser caching</strong> then you can use ""versioning"" technique to force browsers to load new version of merged .css file. This ""version"" can be any string you want and it will not be visible. It is used for generating new hashed name of .css file. The best practice is to use numbers and then increment on every new ""version"".","If you are using <strong>browser caching</strong> then you can use ""versioning"" technique to force browsers to load new version of merged .css file. This ""version"" can be any string you want and it will not be visible. It is used for generating new hashed name of .css file. The best practice is to use numbers and then increment on every new ""version""."
|
21 |
"JS Settings","JS Settings"
|
22 |
"Minify JavaScript","Minify JavaScript"
|
23 |
"Enables or disables JavaScript minification.<br />WARNING! Before you enable this option you must have valid JS code on all of the pages on your site. In order for minification to work you must enable Admin>System>Configuration>Developer>JavaScript Settings>Merge JavaScript Files.","Enables or disables JavaScript minification.<br />WARNING! Before you enable this option you must have valid JS code on all of the pages on your site. In order for minification to work you must enable Admin>System>Configuration>Developer>JavaScript Settings>Merge JavaScript Files."
|
24 |
+
"Merged JavaScript Version","Merged JavaScript Version"
|
25 |
+
"Merged .js file version.","Merged .js file version."
|
26 |
+
"If you are using <strong>browser caching</strong> then you can use ""versioning"" technique to force browsers to load new version of merged .js file. This ""version"" can be any string you want and it will not be visible. It is used for generating new hashed name of .js file. The best practice is to use numbers and then increment on every new ""version"".","If you are using <strong>browser caching</strong> then you can use ""versioning"" technique to force browsers to load new version of merged .js file. This ""version"" can be any string you want and it will not be visible. It is used for generating new hashed name of .js file. The best practice is to use numbers and then increment on every new ""version""."
|
package.xml
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Apptrian_Minify_HTML_CSS_JS</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>Minify HTML CSS JS including inline CSS/JS and speed up
|
10 |
<description>Apptrian Minify HTML CSS JS is a very small and efficient extension. It will minify HTML including inline CSS and JS code. Minification of CSS and JS files is compatible with default Magento CSS and JS file merger. There are no complex setups nor query strings on minified CSS and JS files. Extension is very easy to install and use. Compatible with FPC and Varnish cache extensions.</description>
|
11 |
-
<notes>+
|
|
|
12 |
<authors><author><name>Apptrian</name><user>apptrian</user><email>apptrian@yahoo.com</email></author></authors>
|
13 |
-
<date>2015-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Apptrian"><dir name="Minify"><dir name="Block"><file name="About.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Apptrian_Minify_HTML_CSS_JS</name>
|
4 |
+
<version>1.2.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Minify HTML CSS JS including inline CSS/JS and speed up your site. Works with default Magento CSS/JS merger.</summary>
|
10 |
<description>Apptrian Minify HTML CSS JS is a very small and efficient extension. It will minify HTML including inline CSS and JS code. Minification of CSS and JS files is compatible with default Magento CSS and JS file merger. There are no complex setups nor query strings on minified CSS and JS files. Extension is very easy to install and use. Compatible with FPC and Varnish cache extensions.</description>
|
11 |
+
<notes>+ Versioning of merged CSS and JS files
|
12 |
+
* Improved generation of merged files url</notes>
|
13 |
<authors><author><name>Apptrian</name><user>apptrian</user><email>apptrian@yahoo.com</email></author></authors>
|
14 |
+
<date>2015-05-17</date>
|
15 |
+
<time>16:27:29</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="Apptrian"><dir name="Minify"><dir name="Block"><file name="About.php" hash="55714f78c451f529f64261efc28ba407"/><file name="Info.php" hash="d967c088301c8e90ada86e8fd8d009bd"/><dir name="Page"><dir name="Html"><file name="Head.php" hash="204827136e6a140524dcd211c8d30ecf"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="de569d80426c7fd01326fa2ba0409c35"/></dir><dir name="Model"><dir name="Config"><file name="Version.php" hash="6d2d900d99752bcbc6be3b8f2a70df44"/></dir><file name="Cron.php" hash="deb94ca0e0d4fc84e7f3b8ec93270e1e"/><file name="Observer.php" hash="628e9692083bebf250b19348d7a2c1d8"/></dir><dir name="etc"><file name="config.xml" hash="59708fa76111c6026bcc2ceae351aa8a"/><file name="system.xml" hash="37e857f3f437ea2e68089b9ac6b59a5d"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Apptrian_Minify.xml" hash="93ef03671067cf44a0b02f0100c8d2d0"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Apptrian_Minify.csv" hash="1e2631d6b496b0568f1465313d336ef3"/></dir></target><target name="magelib"><dir name="HTTP"><file name="ConditionalGet.php" hash="84d5f4e0b97e37228310a31a4bdc1240"/><file name="Encoder.php" hash="d697f04651d6363d1dd5dd8c2ce94cbd"/></dir><dir name="Minify"><file name="Build.php" hash="99800ab664e1fb0ff46a7133ab13bb1b"/><dir name="CSS"><file name="Compressor.php" hash="6f1d5d8c3f7ac47cabaca9d6ee923206"/><file name="UriRewriter.php" hash="d6c800c1b9b0603c3386f84074bc41a0"/></dir><file name="CSS.php" hash="c585f82e0a6f8af12da2d3337aa7e901"/><file name="CSSmin.php" hash="7e0549e63f49b99aac0f6688bfcf99ef"/><dir name="Cache"><file name="APC.php" hash="f83c096f1ea3eb712bf020371b7d3755"/><file name="File.php" hash="5550b7ad5d3cc20710a0835fdf20e3ec"/><file name="Memcache.php" hash="a572e300270f5cdb535de67eb1d9ce3b"/><file name="WinCache.php" hash="037003b972c8f648880b43b2c912afb7"/><file name="XCache.php" hash="a3239040e672955a8a520eef6e251d68"/><file name="ZendPlatform.php" hash="a20755bc554cfef6733ac64574c4f90e"/></dir><file name="ClosureCompiler.php" hash="0d04a74dae339bd8d2d0465503590819"/><file name="CommentPreserver.php" hash="f9fbae74aea3125d25f375942846d9c0"/><dir name="Controller"><file name="Base.php" hash="756cd27141da15f6bc0a9d34960e0338"/><file name="Files.php" hash="a0bc419aa48d256e19a64596dee53991"/><file name="Groups.php" hash="bf35ccd3d384c40033b978a402eaf917"/><file name="MinApp.php" hash="0910bc4af5280098b8411a8a23aa3e91"/><file name="Page.php" hash="c54a4b19474f9d0e9beb8ccb4e3678b3"/><file name="Version1.php" hash="0e4bce53a0b66c79aa6d15e52cf8ec50"/></dir><file name="DebugDetector.php" hash="d1bee7f6ab4dcf7be5d36dbcd1b81354"/><dir name="HTML"><file name="Helper.php" hash="af89e2e30f70dd935dd86d31649159e6"/></dir><file name="HTML.php" hash="d48eabaae177099a264b5a97379b0abf"/><file name="HTMLComp.php" hash="a2929a26f75e6877fd5f58e6fdc5f2d0"/><file name="HTMLMax.php" hash="63b191db9ce4b878809c33e5cc74323e"/><file name="HTMLMaxComp.php" hash="c6c76d9106d38c3a3fcd7c4ae4ff571a"/><file name="ImportProcessor.php" hash="075c561afa4825021fa44c3cac68ab94"/><dir name="JS"><file name="ClosureCompiler.php" hash="0d6d0017c3b9decdf0e1f647c0b53f17"/></dir><file name="Lines.php" hash="526499d43d682432dac9483da4509179"/><file name="Loader.php" hash="5e84b0e739587d8df742f47953f135d5"/><file name="Logger.php" hash="ee493543ebb47aa06f976f23a0f3d86a"/><file name="Packer.php" hash="e91f63a82c4fbd660c2341163e87dd4b"/><file name="Source.php" hash="f7055f963f00e5ae9f5b0005d5e4a5ec"/><dir name="YUI"><file name="CssCompressor.java" hash="cb15a586f2dcc4fead535bc982e3f91e"/><file name="CssCompressor.php" hash="12d5b4e38488c68bc84cc0efba6eb338"/></dir><file name="YUICompressor.php" hash="3ada081677d0cf118bba1f4b533b97cf"/></dir><dir name="."><file name="CSSmin.php" hash="b88ddd36d0ff681aa8a221467c0c71c1"/><file name="DooDigestAuth.php" hash="9d66abc8cfa37b5f593fc09c734f0269"/><file name="FirePHP.php" hash="f619b5a77fee4b21e4397e98d858fbf4"/><file name="JavaScriptPacker.php" hash="84900da372a375d3b2f117c5abe740a9"/><file name="JSMin.php" hash="63ada69cc753fe4136c67e1d3daabca3"/><file name="JSMinPlus.php" hash="13d47b54dd73ef825e5d86e6cc633e32"/><file name="Minify.php" hash="df50518e69c132b1354eb8ba73a8ed7c"/></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|