diff --git a/e107.htaccess b/e107.htaccess index 56611dc95..01603bd34 100644 --- a/e107.htaccess +++ b/e107.htaccess @@ -63,6 +63,7 @@ ReWriteRule ^media\/img\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ thumb.php?src=e_MEDIA_IMAGE/$5&$1w=$2&$3h=$4 [NC,L] ReWriteRule ^media\/avatar\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ thumb.php?src=e_AVATAR/$5&$1w=$2&$3h=$4 [NC,L] RewriteRule ^media\/img\/([-A-Za-z0-9+/]*={0,3})\.(jpg|gif|png)?$ thumb.php?id=$1 [NC,L] + ReWriteRule ^theme\/img\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ thumb.php?src=e_THEME/$5&$1w=$2&$3h=$4 [NC,L] ### send 404 on missing files in these folders RewriteCond %{REQUEST_URI} !^/(e107_images|e107_files)/ diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 2fbf4f4b9..a22f827b6 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -2314,6 +2314,11 @@ class e_parse extends e_parser $sefPath = 'media/avatar/'; $clean = array('{e_AVATAR}','e_AVATAR/'); } + elseif(strstr($url, 'e_THEME')) // theme folder images. + { + $sefPath = 'theme/img/'; + $clean = array('{e_THEME}','e_THEME/'); + } else { return false; diff --git a/e107_plugins/siteinfo/e_shortcode.php b/e107_plugins/siteinfo/e_shortcode.php index b01941f4c..13d34e8fa 100644 --- a/e107_plugins/siteinfo/e_shortcode.php +++ b/e107_plugins/siteinfo/e_shortcode.php @@ -153,9 +153,14 @@ class siteinfo_shortcodes // must match the folder name of the plugin. if((isset($parm['w']) || isset($parm['h']))) { - // $logo = $tp->thumbUrl($logopref,"w=".$parm['h']); + // $dimensions[0] = $parm['w']; - $dimensions[1] = $parm['h']; + $dimensions[1] = $parm['h']; + + if(empty($parm['noresize']) && !empty($logopref)) // resize by default - avoiding large files. + { + $logo = $tp->thumbUrl($logopref,$parm); + } } elseif(!deftrue('BOOTSTRAP')) {