mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Improved resizing options for {SITELOGO}
This commit is contained in:
@@ -46,6 +46,11 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
|
||||
return SITETAG;
|
||||
}
|
||||
|
||||
function sc_sitelogo($parm='')
|
||||
{
|
||||
return $this->sc_logo($parm);
|
||||
}
|
||||
|
||||
function sc_logo($parm = '')
|
||||
{
|
||||
parse_str(vartrue($parm)); // Optional {LOGO=file=file_name} or {LOGO=link=url} or {LOGO=file=file_name&link=url}
|
||||
@@ -102,9 +107,21 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
|
||||
|
||||
//TODO Parm for resizing the logo image with thumb.php
|
||||
|
||||
if((isset($parm['w']) || isset($parm['h'])))
|
||||
{
|
||||
// $logo = $tp->thumbUrl($logopref,"w=".$parm['h']);
|
||||
$dimensions[0] = $parm['w'];
|
||||
$dimensions[1] = $parm['h'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$dimensions = getimagesize($path);
|
||||
}
|
||||
|
||||
$image = "<img class='logo img-responsive' src='".$logo."' style='width: ".$dimensions[0]."px; height: ".$dimensions[1]."px' alt='".SITENAME."' />\n";
|
||||
|
||||
|
||||
|
||||
$image = "<img class='logo' src='".$logo."' style='width: ".$dimensions[0]."px; height: ".$dimensions[1]."px' alt='".SITENAME."' />\n";
|
||||
|
||||
if (isset($link) && $link)
|
||||
{
|
||||
|
Reference in New Issue
Block a user