1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-27 08:14:46 +02:00

Rework of the thumbnail routine for more consistent behavior. {SITELOGO} rendering improved. (requires testing on older themes)

This commit is contained in:
Cameron
2016-04-13 14:30:42 -07:00
parent 75d94755d4
commit ac7c95d7f8
3 changed files with 99 additions and 96 deletions

View File

@@ -159,7 +159,7 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
if(empty($parm['noresize']) && !empty($logopref)) // resize by default - avoiding large files.
{
$logo = $tp->thumbUrl($logopref,$parm);
$logo = $logopref;
}
}
elseif(!deftrue('BOOTSTRAP'))
@@ -167,11 +167,25 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
$dimensions = getimagesize($path);
}
$imageStyle = (empty($dimensions)) ? '' : " style='width: ".$dimensions[0]."px; height: ".$dimensions[1]."px' ";
$opts = array('alt'=>SITENAME, 'class'=>'logo img-responsive');
$image = "<img class='logo img-responsive' src='".$logo."' ".$imageStyle." alt='".SITENAME."' />\n";
if(!empty($dimensions[0]))
{
$opts['w'] = $dimensions[0];
}
if(!empty($dimensions[1]))
{
$opts['h'] = $dimensions[1];
}
// $imageStyle = (empty($dimensions)) ? '' : " style='width: ".$dimensions[0]."px; height: ".$dimensions[1]."px' ";
// $image = "<img class='logo img-responsive' src='".$logo."' ".$imageStyle." alt='".SITENAME."' />\n";
$image = $tp->toImage($logo,$opts);
if (isset($link) && $link)