mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 07:06:30 +02:00
Added compression to generated PNG thumbnails. Additional module configurations added to e107.htaccess
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
|
||||
<IfModule mod_env.c>
|
||||
SetEnv HTTP_MOD_REWRITE On
|
||||
SetEnv HTTP_MOD_REWRITE_MEDIA Off
|
||||
SetEnv HTTP_MOD_REWRITE_MEDIA On
|
||||
</IfModule>
|
||||
|
||||
### enable rewrites
|
||||
@@ -78,5 +78,27 @@
|
||||
|
||||
</IfModule>
|
||||
|
||||
### Mod_Expires Settings (when available)
|
||||
### May be modified if required
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
ExpiresDefault "access plus 2 hours"
|
||||
ExpiresByType image/x-icon "access plus 1 year”
|
||||
ExpiresByType image/gif "access plus 1 week"
|
||||
ExpiresByType image/png "access plus 1 week"
|
||||
ExpiresByType image/jpg "access plus 1 week"
|
||||
ExpiresByType image/jpeg "access plus 1 week"
|
||||
ExpiresByType text/css "access plus 1 month"
|
||||
ExpiresByType application/javascript "access plus 1 month"
|
||||
ExpiresByType text/javascript "access plus 1 month"
|
||||
ExpiresByType text/x-javascript "access plus 1 month"
|
||||
</IfModule>
|
||||
|
||||
### Gzip Compression Module
|
||||
<ifmodule mod_deflate.c>
|
||||
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/xml text/xml application/rss+xml
|
||||
</ifmodule>
|
||||
|
||||
|
||||
### Enable when developing locally.
|
||||
### SetEnv E_DEV true
|
||||
|
@@ -1354,7 +1354,7 @@ class e_jsmanager
|
||||
return false;
|
||||
}
|
||||
|
||||
if(e_REQUEST_HTTP == e_ADMIN_ABS."menus.php") // disabled in menu-manager.
|
||||
if(e_REQUEST_HTTP == e_ADMIN_ABS."menus.php") // disabled in menu-manager.
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -986,7 +986,7 @@ class GdThumb extends ThumbBase
|
||||
{
|
||||
header('Content-type: image/png');
|
||||
}
|
||||
imagepng($this->oldImage);
|
||||
imagepng($this->oldImage, null, 9); // modified by e107
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1073,7 +1073,7 @@ class GdThumb extends ThumbBase
|
||||
imagejpeg($this->oldImage, $fileName, $this->options['jpegQuality']);
|
||||
break;
|
||||
case 'PNG':
|
||||
imagepng($this->oldImage, $fileName);
|
||||
imagepng($this->oldImage, $fileName, 9); // modified by e107
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user