Hallo folkfreund,
habe ein bisschen rumprobiert.
Der ExtendedSlideItMoo-Fehler stammte tatsächlich aus dem Mootools-Template des Sliders. Dieses scheint aber auch nicht mehr notwendig zu sein, denn der Slider läuft auch ohne. Also keine Probleme mehr mit Tooltip und Slider.
Ich habe das Listen-Template noch einmal angepasst, da ich mich entschlossen hatte, doch lieber den Teaser im Tooltip anzuzeigen:
PHP-Code:
<?php
// Inhalt des rel-Attributes zusammensetzen
$rel = "<strong>" . $this->title . "</strong><p class='info'>" . $this->date . "</p><div class='ce_text'>";
if (!$this->addBefore) {
$rel .= $this->details;
}
if ($this->addImage) {
$rel .= "<figure class='image_container" . $this->floatClass . "'";
if ($this->margin || $this->float) {
$rel .= " style='" . trim($this->margin . $this->float) . "'";
}
$rel .= ">";
if ($this->href) {
$rel .= "<a href='" . $this->href . "' " . $this->attributes . " title='" . $this->alt . "'>";
}
$rel .= "<img src='" . $this->src . "' " . $this->imgSize . " alt='" . $this->alt . "'>";
if ($this->href) {
$rel .= "</a>";
}
if ($this->caption) {
$rel .= "<figcaption class='caption' style='width:" . $this->arrSize[0] . "px'>" . $this->caption . "</figcaption>";
}
$rel .= "</figure>";
}
if ($this->addBefore) {
$rel .= "<div class='teaser'>";
$rel .= $this->teaser;
$rel .= "</div>";
}
$rel .= "</div>";
// Anfuehrungszeichen ersetzen
$rel = str_replace('"', "'", $rel);
// Inhalt des title-Attributes zusammensetzen
$title = $this->title . " (";
if ($this->day) {
$title .= $this->day . ", ";
}
$title .= $this->date;
if ($this->time) {
$title .= ", " . $this->time;
}
$title .= ")";
?>
<div class="event_upcoming">
<span class="meta_info" title="<?php echo $this->parseDate("l, j. F Y", $this->startTime); ?>">
<span class="weekday"><?php echo $this->parseDate("l", $this->startTime); ?></span>
<span class="day"><?php echo $this->parseDate("d", $this->startTime); ?></span>
<span class="month"><?php echo $this->parseDate("M", $this->startTime); ?></span>
<span class="year"><?php echo $this->parseDate("Y", $this->startTime); ?></span>
</span>
<div class="event layout_upcoming<?php echo $this->classUpcoming; ?>">
<span class="date"><?php echo $this->date; ?></span>
<div class="event_meta">
<?php if ($this->cep_location): ?>
<span class="cep_location"><?php echo $this->cep_location; ?></span>
<?php endif; ?>
<?php if ($this->cep_participants): ?>
<span class="cep_participants"><?php echo $this->cep_participants; ?></span>
<?php endif; ?>
<?php if ($this->cep_contact): ?>
<span class="cep_contact"><?php echo $this->cep_contact; ?></span>
<?php endif; ?>
</div>
<?php echo '<a class="tooltip" rel="' . $rel . '" href="' . $this->href . '" title="' . $title . '" ' . $this->target . '>';
echo $this->link . '</a>'; ?>
<?php if ($this->time): ?>
<span class="time">(<?php echo $this->time; ?>)</span>
<?php endif; ?>
</div>
</div>
Ist vielleicht nicht sonderlich elegant, funktioniert aber so weit (sieht man von der Platzierung des Bilds ab ...)
Was ich nicht verstehe, ist der Teil
PHP-Code:
if (!$this->addBefore) {
$rel .= $this->details;
}
Muss ich hier auch noch etwas anpassen, bzw. was bewirkt das oder wann greift es?
Der Link wird jetzt in etwa so generiert:
HTML-Code:
<a class="tooltip" rel="<strong>Test</strong><p class='info'>20.12.2013</p><div class='ce_text'><figure class='image_container float_right' style='float:right;'><a href='veranstaltungsansicht/events/test.html?day=20131220&times=1387554360,1387562400' data-lightbox='44fbc5' title=''><img src='system/html/002-7581578a.jpg' width='150' height='105' alt=''></a></figure><div class='teaser'><p>Dies ist ein Teaser</p></div></div>" href="veranstaltungsansicht/events/test.html?day=20131220&times=1387554360,1387562400" title="Test (Freitag, 20.12.2013, 16:46 - 19:00)" >Test</a>
Das funktioniert, validiert allerdings nicht:
Bad value for attribute rel on element a: The string <strong>test is not a registered keyword or absolute URL.
Sollte mir das zu denken geben?
Der Code mit den fehlerhaften Umbrüchen kam übrigens nicht aus der Liste, sondern war ein händisch eingefügtes HTML-Element.
Gruß Alex
Lesezeichen