mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 14:37:52 +00:00
add yoothemeBild
This commit is contained in:
@@ -337,11 +337,55 @@ function bildURL($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0,
|
||||
return $sportsmanager_joomla_url . 'images/sportsmanager/' . $typ . '/' . basename($pfad_angepasst);
|
||||
}
|
||||
|
||||
|
||||
function bildHTML($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0, $max_height = 0, $zusatz = "", $alternativ = "") {
|
||||
/*
|
||||
* #resize=250
|
||||
#resize=250,250,blue
|
||||
#resize=250,250,blue
|
||||
#resize=250,250&sizes=60%,80%,200%
|
||||
#resize=250,250,cover&sizes=60%,80%,200%
|
||||
#resize=250,250,fill&sizes=60%,80%,200%
|
||||
#crop=250,250,center,top
|
||||
#crop=250,250
|
||||
#crop=250,250,center,bottom
|
||||
#crop=250,250,left
|
||||
#crop=250,250,right
|
||||
*/
|
||||
function yoothemeBild($typ, $id, $crop = 'resize=250', $zusatz = "", $alternativ)
|
||||
{
|
||||
global $sportsmanager_joomla_path;
|
||||
global $sportsmanager_joomla_url;
|
||||
|
||||
$typ_exploded = explode("/", $typ);
|
||||
$typ = $typ_exploded[0];
|
||||
$typ_prefix = count($typ_exploded) > 1 ? $typ_exploded[1] : "";
|
||||
$pfad = $sportsmanager_joomla_path . "/images/sportsmanager/" . $typ . "/" . $typ_prefix . $id . ".";
|
||||
|
||||
if (is_file($pfad . "png"))
|
||||
$ext = "png";
|
||||
else if (is_file($pfad . "jpg"))
|
||||
$ext = "jpg";
|
||||
else if (!empty($alternativ)) {
|
||||
$id = $alternativ;
|
||||
$pfad = $sportsmanager_joomla_path . "/images/sportsmanager/" . $typ . "/" . $typ_prefix . $id . ".";
|
||||
if (is_file($pfad . "png"))
|
||||
$ext = "png";
|
||||
else if (is_file($pfad . "jpg"))
|
||||
$ext = "jpg";
|
||||
else
|
||||
return null;
|
||||
}
|
||||
else
|
||||
return null;
|
||||
|
||||
$time = filemtime($pfad . $ext);
|
||||
|
||||
$bildpfad = "images/sportsmanager/" . $typ . "/" . $typ_prefix . $id . "." . $ext;
|
||||
|
||||
|
||||
return '<img class="el-image" data-src="' . $bildpfad . '#' . $crop . '" ' . $zusatz . ' uk-img />';
|
||||
}
|
||||
|
||||
function bildHTML($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0, $max_height = 0, $zusatz = "", $alternativ = "") {
|
||||
$typ_exploded = explode("/", $typ);
|
||||
$typ = $typ_exploded[0];
|
||||
$typ_prefix = count($typ_exploded) > 1 ? $typ_exploded[1] : "";
|
||||
@@ -387,20 +431,7 @@ function bildHTML($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* #resize=250
|
||||
#resize=250,250,blue
|
||||
#resize=250,250,blue
|
||||
#resize=250,250&sizes=60%,80%,200%
|
||||
#resize=250,250,cover&sizes=60%,80%,200%
|
||||
#resize=250,250,fill&sizes=60%,80%,200%
|
||||
#crop=250,250,center,top
|
||||
#crop=250,250
|
||||
#crop=250,250,center,bottom
|
||||
#crop=250,250,left
|
||||
#crop=250,250,right
|
||||
*/
|
||||
return '<img class="el-image" data-src="images/sportsmanager/' . $typ . '/' . basename($pfad_angepasst) . '#crop=150,150,center,top" uk-img/>';
|
||||
return '<img src="' . $sportsmanager_joomla_url . 'images/sportsmanager/' . $typ . '/' . basename($pfad_angepasst) . '" width="' . $width . '" height="' . $height . '" ' . $zusatz . ' />';
|
||||
}
|
||||
|
||||
$new_width = $width;
|
||||
|
||||
Reference in New Issue
Block a user