From 8412968cead2b820484e8366bc54451cfada4dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Nu=CC=88bel?= Date: Fri, 19 Feb 2021 16:45:35 +0100 Subject: [PATCH 1/3] revert tools --- .../views/sportsmanager/view_tools.php | 110 ++++++------------ 1 file changed, 33 insertions(+), 77 deletions(-) diff --git a/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php b/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php index f582203..81c2765 100644 --- a/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php +++ b/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php @@ -17,22 +17,22 @@ function htmlentities_noquotes_utf8($s) { function addOnLoad($function) { ?> 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 ''; -} - -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] : ""; @@ -525,22 +481,22 @@ function lightBoxHeader($lightbox_class = "lightbox") { Date: Fri, 19 Feb 2021 16:48:50 +0100 Subject: [PATCH 2/3] yoothemeBild --- .../views/sportsmanager/view_tools.php | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php b/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php index 81c2765..6be5825 100644 --- a/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php +++ b/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php @@ -337,6 +337,53 @@ function bildURL($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0, return $sportsmanager_joomla_url . 'images/sportsmanager/' . $typ . '/' . basename($pfad_angepasst); } +/* + * #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 ''; +} function bildHTML($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0, $max_height = 0, $zusatz = "", $alternativ = "") { global $sportsmanager_joomla_path; From 4b15aa67eeec9e48c169da7c2910e9df4203682a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Nu=CC=88bel?= Date: Fri, 19 Feb 2021 16:54:05 +0100 Subject: [PATCH 3/3] fix yootheme images --- .../com_sportsmanager/views/sportsmanager/view.html.php | 2 +- .../com_sportsmanager/views/sportsmanager/view_tools.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structure/components/com_sportsmanager/views/sportsmanager/view.html.php b/src/structure/components/com_sportsmanager/views/sportsmanager/view.html.php index 4a1da67..ebb1a0a 100644 --- a/src/structure/components/com_sportsmanager/views/sportsmanager/view.html.php +++ b/src/structure/components/com_sportsmanager/views/sportsmanager/view.html.php @@ -6980,7 +6980,7 @@ global $params; bild_ausblenden ? '' : $row->spieler_id, 'crop=50,50', 'border="1" align="left" hspace="8" vspace="2"', $row->geschlecht == 'M' ? 'm' : 'w')) != null) + if (($bild = yoothemeBild("spieler", !$details_anzeigen && $row->bild_ausblenden ? '' : $row->spieler_id, '#resize=75', 'border="1" align="left" hspace="8" vspace="2"', $row->geschlecht == 'M' ? 'm' : 'w')) != null) echo $bild; ?> aktueller_verein_id == null) diff --git a/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php b/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php index 6be5825..1442897 100644 --- a/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php +++ b/src/structure/components/com_sportsmanager/views/sportsmanager/view_tools.php @@ -350,7 +350,7 @@ function bildURL($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0, #crop=250,250,left #crop=250,250,right */ -function yoothemeBild($typ, $id, $crop = 'resize=250', $zusatz = "", $alternativ) +function yoothemeBild($typ, $id, $resize = '', $zusatz = "", $alternativ) { global $sportsmanager_joomla_path; global $sportsmanager_joomla_url; @@ -382,7 +382,7 @@ function yoothemeBild($typ, $id, $crop = 'resize=250', $zusatz = "", $alternativ $bildpfad = "images/sportsmanager/" . $typ . "/" . $typ_prefix . $id . "." . $ext; - return ''; + return ''; } function bildHTML($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0, $max_height = 0, $zusatz = "", $alternativ = "") {