Guten Abend,
ich wurde auf eine fehlerhafte Anzeige in der turnier_player Ansicht mit Bild hingewiesen.
Unter Firefox geht dabei die Tabelle über die gesamte Seite und wird rechts vom Bild überlappt.
Unter Chrome (ohne es selbst gesehen zu haben) ist das Bild anscheinend unter die Spieler Info gerutscht.
Beides scheint nicht beabsichtigt.
Um das Problem zu beheben habe ich das Bild in die tp_col_playerInfo Tabelle eingebaut.
Außerdem alle Spieler Info Spalten mit einer Klasse versehen.
Das Bild besitzt jetzt außerdem einen kleinen Rahmen und ist leicht abgerundet.
Ohne Bild geht die Informationsansicht weiterhin über die ganze Seite.
Getestet unter clm 1.3.6 J2.5, sah jedoch keine Änderung entsprechender Dateien in 1.4.
edit: unter Chrome wird nur die letzte Spalte größer, korrigiere das noch.
edit: nun mit div und flex gelöst, außerdem war css_path merkwürdig und ist nun an den Rahmen angepasst. Außerdem die Kommentarzeichen in css_path.php entfernt und an die restlichen Änderungen angepasst, diese führten zu ungültigen CSS und machten den Breite Parameter nutzlos.
Getestet unter Firefox und Chrome
includes/css_path.php ab Zeile 33
// JoomGallery-Parameter auswerten
$turParams = new JParameter($this->turnier->params);
$joomGalleryPhotosWidth = $turParams->get('joomGalleryPhotosWidth', '');
if(!is_numeric($joomGalleryPhotosWidth)){$joomGalleryPhotosWidth=0;}
if ($template =="1") {
$document = &JFactory::getDocument();
$cssDir = JURI::base().'components/com_clm/includes';
// $cssDir = JURI::base().'components'.DS.'com_clm'.DS.'includes';
$document->addStyleSheet( $cssDir.'/clm_content.css', 'text/css', null, array() );
// $document->addStyleSheet( $cssDir.DS.'clm_content.css', 'text/css', null, array() );
?>
<style type="text/css">
<?php if($joomGalleryPhotosWidth>0){ ?>
#turnier_player .tp_col_playerPhoto{ max-width:<?php echo $joomGalleryPhotosWidth+8; ?>px;} <?php } ?>
turnier_player/tmpl/default.php
<?php
/**
* @ Chess League Manager (CLM) Component
* @Copyright (C) 2008 Thomas Schwietert & Andreas Dorn. All rights reserved
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.fishpoke.de
* @author Thomas Schwietert
* @email fishpoke@fishpoke.de
* @author Andreas Dorn
* @email webmaster@sbbl.org
*/
defined('_JEXEC') or die('Restricted access');
// Stylesheet laden
require_once(JPATH_COMPONENT.DS.'includes'.DS.'css_path.php');
// Konfigurationsparameter auslesen
$itemid = JRequest::getVar( 'Itemid' );
$config = &JComponentHelper::getParams( 'com_clm' );
$pdf_melde = $config->get('pdf_meldelisten',1);
$turParams = new JParameter($this->turnier->params);
// CLM-Container
echo '<div id="clm"><div id="turnier_player">';
// Componentheading
$heading = $this->turnier->name.": ".JText::_('TOURNAMENT_PARTICIPANTINFO');
echo CLMContent::componentheading($heading);
// Navigationsmenu
require_once(JPATH_COMPONENT.DS.'includes'.DS.'submenu_t.php');
if ( $this->turnier->published == 0) {
echo CLMContent::clmWarning(JText::_('TOURNAMENT_NOTPUBLISHED')."<br/>".JText::_('TOURNAMENT_PATIENCE'));
} else { ?>
<div class="tp_col_playerContent">
<?php
if ($this->playerPhoto != '') { ?>
<div class="tp_col_playerInfoDivWithPhoto">
<?php } else { ?>
<div class="tp_col_playerInfoDivWithoutPhoto">
<?php } ?>
<table cellpadding="0" cellspacing="0" class="tp_col_playerInfo">
<tr>
<th align="left" colspan="2" class="anfang"><?php echo JText::_('TOURNAMENT_PLAYERDATA'); ?></th>
</tr>
<?php
if ($this->player->titel != '') {
?>
<tr>
<td align="left" class="tp_col_1"><?php echo JText::_('TOURNAMENT_TITLE') ?>:</td>
<td class="tp_col_data" ><?php echo $this->player->titel ?></td>
</tr>
<?php
}
?>
<tr>
<td align="left" class="tp_col_1"><?php echo JText::_('TOURNAMENT_PLAYERNAME') ?>:</td>
<td class="tp_col_data"><?php echo $this->player->name ?></td>
</tr>
<tr>
<td align="left" class="tp_col_1"><?php echo JText::_('TOURNAMENT_CLUB') ?>:</td>
<td class="tp_col_data">
<?php
if ($this->tourn_linkclub == 1) {
$link = new CLMcLink();
$link->view = 'verein';
$link->more = array('saison' => $this->player->sid, 'zps' => $this->player->zps, 'Itemid' => $itemid );
$link->makeURL();
echo $link->makeLink($this->player->verein);
} else {
echo $this->player->verein;
}
?>
</td>
</tr>
<?php if ($turParams->get('playerViewDisplaySex',0) == 1 AND $this->player->geschlecht != '') { ?>
<tr>
<td align="left" class="tp_col_1"><?php echo JText::_('TOURNAMENT_PLAYER_SEX') ?>:</td>
<td class="tp_col_data"><?php echo $this->player->geschlecht; ?></td>
</tr>
<?php } ?>
<?php if ($turParams->get('playerViewDisplayBirthYear',0) == 1 AND $this->player->birthYear != '0000') { ?>
<tr>
<td align="left" class="tp_col_1"><?php echo JText::_('TOURNAMENT_PLAYER_BIRTH_YEAR') ?>:</td>
<td class="tp_col_data"><?php echo $this->player->birthYear; ?></td>
</tr><?php } ?></table>
</div>
<?php
if ($this->playerPhoto != '') { ?>
<div class="tp_col_playerPhoto">
<div class="tp_col_playerPhotoFrame">
<img src="<?php echo JRoute::_('index.php?view=image&format=raw&type=img&id='.$this->playerPhoto.'&option=com_joomgallery' ,TRUE,-1); ?>">
</div>
</div>
<?php } ?>
</div>
<?php
if (count($this->matches) > 0) {
?>
<table cellpadding="0" cellspacing="0" class="turnier_rangliste">
<tr>
<th align="left" colspan="5" class="anfang"><?php echo JText::_('TOURNAMENT_MATCHES'); ?></th>
</tr>
<?php
// alle Matches...
foreach ($this->matches as $value) {
// Zeile
echo '<tr>';
// Runde
echo '<td class="tp_col_1">';
$link = new CLMcLink();
$link->view = 'turnier_runde';
$link->more = array('turnier' => $this->turnier->id, 'runde' => $value->runde, 'Itemid' => $itemid );
$link->makeURL();
echo $link->makeLink($value->roundName);
echo "</td>";
if ($value->ergebnis != 8) { // kein spielfrei eingetragen
// Farbe
echo '<td class="tp_col_2">';
if ($value->heim == 1) {
echo JText::_('TOURNAMENT_WHITE_ABB');
} else {
echo JText::_('TOURNAMENT_BLACK_ABB');
}
echo "</td>";
// Gegner
echo '<td class="tp_col_3">';
if (isset($value->gegner) AND $value->gegner > 0) {
$link = new CLMcLink();
$link->view = 'turnier_player';
$link->more = array('turnier' => $this->turnier->id, 'snr' => $value->gegner, 'Itemid' => $itemid );
$link->makeURL();
echo $link->makeLink($value->oppName);
}
echo "</td>";
// TWZ
echo '<td class="tp_col_4">';
if (isset($value->oppTWZ) AND $value->oppTWZ > 0) {
echo CLMText::formatRating($value->oppTWZ);
}
echo "</td>";
// Ergebnis
if ($value->ergebnis != '') {
echo '<td class="tp_col_5">';
if ($value->pgn == '' OR !$this->pgnShow) {
echo CLMText::getResultString($value->ergebnis, 0);
} else {
echo '<span class="editlinktip hasTip" title="'.JText::_( 'PGN_SHOWMATCH' ).'">';
echo '<a onclick="startPgnMatch('.$value->id.', \'pgnArea\');" class="pgn">'.CLMText::getResultString($value->ergebnis, 0).'</a>';
echo '</span>';
?>
<input type='hidden' name='pgn[<?php echo $value->id; ?>]' id='pgnhidden<?php echo $value->id; ?>' value='<?php echo $value->pgn; ?>'>
<?php
}
if ($this->turnier->typ == 3 AND ($value->tiebrS > 0 OR $value->tiebrG > 0)) {
echo '<br /><small>'.$value->tiebrS.':'.$value->tiebrG.'</small>';
}
echo '</td>';
} else {
echo '<td class="tp_col_5">'.JText::_('TOURNAMENT_MATCHNOTYETPLAYED')."</td>";
}
} else { // spielfrei
echo '<td class="tp_col_2">-</td><td class="tp_col_3">-</td><td class="tp_col_4">-</td><td class="tp_col_5">'.JText::_('RESULT_BYE').'</td>';
}
echo '</tr>';
// Ende der Zeile
}
// Abschlußzeile
echo '<tr class="ende">';
// total
echo '<td colspan="3"> ';
echo JText::_('TEAM_TOTAL');
echo '</td>';
// TWZ-Schnitt
echo '<td class="tp_col_4">';
if ($this->player->countTWZplayers > 0) {
echo 'Ø '.floor($this->player->sumTWZ/$this->player->countTWZplayers);
if ($this->player->countTWZplayersNone > 0) {
echo '<br />('.CLMText::sgpl($this->player->countTWZplayers, JText::_('TOURNAMENT_PLAYER'), JText::_('TOURNAMENT_PLAYERS'), $complete_string = TRUE).')';
}
} else {
echo '-';
}
echo '</td>';
// Pkt
echo '<td class="tp_col_5">';
echo $this->player->sum_punkte." / ".$this->player->countMatchesPlayed;
echo '<br />'.CLMText::getPosString($this->player->rankingPos, 2);
echo '</td>';
echo '</tr>';
?>
</table>
<!--Bereich für pgn-Viewer-->
<span id="pgnArea"></span>
<?php
} ?>
<?php
}
require_once(JPATH_COMPONENT.DS.'includes'.DS.'copy.php');
echo '</div></div>';
?>
[/spoiler]
clm_content.css
[spoiler]
Teile des CSS überschreiben Werte des originalen CSS und können zusammen mit diesem weggelassen werden.
#turnier_player .tp_col_playerContent {
display:flex;
margin-bottom: 5px;
}
#turnier_player .tp_col_playerInfoDivWithPhoto {
margin: auto 0;
width:60%;
}
#turnier_player .tp_col_playerInfoDivWithoutPhoto {
width:100%;
}
#turnier_player .tp_col_playerInfo {
margin-bottom:0px;
}
#turnier_player .tp_col_playerPhoto {
border: 0 none;
margin:0px;
width: 35%;
margin: auto;
float:none;
}
#turnier_player .tp_col_playerPhotoFrame img{
border-radius:12px;
-moz-border-radius:12px;
-webkit-border-radius:12px;
-khtml-border-radius:12px;
margin:0px;
width:100%;
height:100%;
}
#turnier_player .tp_col_playerPhotoFrame {
background-color:#F5F5F5;
padding: 4px;
margin: 4px;
border-radius:15px;
-moz-border-radius:15px;
-webkit-border-radius:15px;
-khtml-border-radius:15px;
}