DTFL changed logo size to 50x50

This commit is contained in:
Daniel Goerlich
2021-06-09 22:44:40 +02:00
parent c19e6d1f3d
commit 47ff29584e
2 changed files with 41 additions and 2 deletions
@@ -2242,12 +2242,12 @@ global $params;
?>
<td width="32" height="32" align="right">
<?php
$bild = yoothemeBild("mannschaften", $team->team_id, 28, 28, 0, 0, 'border="0"');
$bild = bildHTML("mannschaften", $team->team_id, 50, 50, 0, 0, 'border="0"');
if ($bild != null) {
echo $bild;
}
else if ($team->verein_id != null) {
$bild = yoothemeBild("vereine", $team->verein_id, 28, 28, 0, 0, 'border="0"');
$bild = bildHTML("vereine", $team->verein_id, 50, 28, 0, 0, 'border="0"');
if ($bild != null)
echo $bild;
}
@@ -385,6 +385,45 @@ function yoothemeBild($typ, $id, $resize = '', $zusatz = "", $alternativ)
return '<img class="el-image" data-src="' . $bildpfad . $resize . '" ' . $zusatz . ' uk-img />';
}
/*
Quick and dirty DTFL Logo Bilder
*/
function logoBilder($typ, $id, $resize = '', $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 . $resize . '" ' . $zusatz . ' uk-img />';
}
function bildHTML($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0, $max_height = 0, $zusatz = "", $alternativ = "") {
global $sportsmanager_joomla_path;
global $sportsmanager_joomla_url;