Änderungen zu issue #149 (Resize in yoothemeBild)

This commit is contained in:
Jürgen Meyer
2025-08-19 10:07:12 +02:00
parent 7a59020e64
commit 825a072ace
2 changed files with 11 additions and 8 deletions
@@ -356,7 +356,7 @@ function bildURL($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0,
#crop=250,250,left #crop=250,250,left
#crop=250,250,right #crop=250,250,right
*/ */
function yoothemeBild($typ, $id, $alternativ, $resize = '', $zusatz = ""): ?string function yoothemeBild($typ, $id, $alternativ, $zusatz = ""): ?string
{ {
$typ_exploded = explode("/", $typ); $typ_exploded = explode("/", $typ);
$typ = $typ_exploded[0]; $typ = $typ_exploded[0];
@@ -382,7 +382,7 @@ function yoothemeBild($typ, $id, $alternativ, $resize = '', $zusatz = ""): ?stri
$bildpfad = SPORTSMANAGER_JOOMLA_URL . "images/sportsmanager/" . $typ . "/" . $typ_prefix . $id . "." . $ext; $bildpfad = SPORTSMANAGER_JOOMLA_URL . "images/sportsmanager/" . $typ . "/" . $typ_prefix . $id . "." . $ext;
return '<img class="el-image" data-src="' . $bildpfad . $resize . '" ' . $zusatz . ' uk-img />'; return '<img class="el-image" data-src="' . $bildpfad . '" ' . $zusatz . ' uk-img />';
} }
function bildHTML($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0, $max_height = 0, $zusatz = "", $alternativ = ""): ?string function bildHTML($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0, $max_height = 0, $zusatz = "", $alternativ = ""): ?string
@@ -6671,6 +6671,9 @@ static function tabelleAnzeigen($veranstaltung, $modus, $teams, $spieltag, $spie
static function rangliste($rangliste, $rangliste_punkte, $allein_angezeigt, $details_anzeigen): void static function rangliste($rangliste, $rangliste_punkte, $allein_angezeigt, $details_anzeigen): void
{ {
?>
<style>td{padding: 3px;}</style>
<?php
global $params; global $params;
if ($allein_angezeigt) { if ($allein_angezeigt) {
?> ?>
@@ -6749,15 +6752,15 @@ static function tabelleAnzeigen($veranstaltung, $modus, $teams, $spieltag, $spie
?> ?>
<!-- Tabelle Rangliste --> <!-- Tabelle Rangliste -->
<div class="uk-overflow-auto"> <div class="uk-overflow-auto">
<table style='width: 100%; padding:1px 1px 1px 1px; border-collapse: collapse;' <table style='width: 100%; border-collapse: collapse;'
class="uk-table-divider uk-table-hover uk-table-middle rangliste-width contentpaneopen<?php echo $params->get('pageclass_sfx'); ?>"> class="uk-table-divider uk-table-hover uk-table-middle rangliste-width contentpaneopen<?php echo $params->get('pageclass_sfx'); ?>">
<tr class="sectiontableheader<?php echo $params->get('pageclass_sfx'); ?>"> <tr class="sectiontableheader<?php echo $params->get('pageclass_sfx'); ?>">
<th><strong><?php echo Text::_('COM_SPORTSMANAGER_RANK'); ?></strong></th> <th><strong><?php echo Text::_('COM_SPORTSMANAGER_RANK'); ?></strong></th>
<th></th> <th></th>
<th style="text-align: left"> <th style="text-align: left;">
<strong><?php echo Text::_('COM_SPORTSMANAGER_PLAYER'); ?></strong> <strong><?php echo Text::_('COM_SPORTSMANAGER_PLAYER'); ?></strong>
</th> </th>
<th style="text-align: center"><strong><?php echo Text::_('COM_SPORTSMANAGER_POINTS'); ?></strong></th> <th style="text-align: center; width 70px;"><strong><?php echo Text::_('COM_SPORTSMANAGER_POINTS'); ?></strong></th>
</tr> </tr>
<?php <?php
@@ -6774,10 +6777,10 @@ static function tabelleAnzeigen($veranstaltung, $modus, $teams, $spieltag, $spie
?> ?>
</td> </td>
<td> <td style="width 70px;">
<?php <?php
if (($bild = yoothemeBild("spieler", !$details_anzeigen && $row->bild_ausblenden ? '' : $row->spieler_id, $row->geschlecht == 'M' ? 'm' : 'w', '#resize=75', 'border="1" style="text-align: left" hspace="8" vspace="2"')) != null) if (($bild = yoothemeBild("spieler", !$details_anzeigen && $row->bild_ausblenden ? '' : $row->spieler_id, $row->geschlecht == 'M' ? 'm' : 'w', 'border="1" style="text-align: left; width: 60px;" hspace="8" vspace="2"')) != null)
echo $bild; ?> echo "\n".$bild; ?>
</td> </td>
<td> <td>
<?php <?php