Hi!
Anpassen kann man das natürlich. Allerdings bin ich nicht sicher ob es auch updatesicher funktioniert.
Ich habe es gemacht unt es funktioniert soweit auch.
Ab TL Version 2.8 hab ich die Datei ContentGallery angepasst.
Nach Lightbox gesucht und durch highslide ersetzt.
PHP-Code:
$strLightboxId = 'highslide';
Dadurch bekommst du ein rel="highslide" in den link hinein.
Das Template gallery_default.tpl gehört auch noch angepasst.
PHP-Code:
<table cellspacing="0" cellpadding="0" summary="Image gallery">
<tbody>
<?php foreach ($this->body as $class=>$row): ?>
<tr class="<?php echo $class; ?>">
<?php foreach ($row as $col): ?>
<?php if (!$col->addImage): ?>
<td class="<?php echo $col->class; ?> empty">*</td>
<?php else: ?>
<td class="<?php echo $col->class; ?>" style="width:<?php echo $col->colWidth; ?>;">
<div class="image_container"<?php if ($col->margin): ?> style="<?php echo $col->margin; ?>"<?php endif; ?>>
<?php if ($col->href): ?>
<a href="<?php echo $col->href; ?>"<?php echo $col->attributes; ?> title="<?php echo $col->alt; ?>" class="highslide" ><img src="<?php echo $col->src; ?>" <?php echo $col->imgSize; ?> alt="<?php echo $col->alt; ?>" /></a>
<?php else: ?>
<img src="<?php echo $col->src; ?>"<?php echo $col->imgSize; ?> alt="<?php echo $col->alt; ?>" />
<?php endif; ?>
<?php if ($col->caption): ?>
<div class="caption"><?php echo $col->caption; ?></div>
<?php endif; ?>
</div>
</td>
<?php endif; ?>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
Also die klasse highslide dem Link hinzugefügt.
Dann musst du natürlich das Skript über das Seitenlayout einbinden und dort den Pfad zu den Verzeichnissen anpassen.
Bei mir sieht das so aus:
PHP-Code:
<script type="text/javascript" src="plugins/highslide/highslide.js"></script>
<script type="text/javascript">
hs.graphicsDir = 'plugins/highslide/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.outlineType = 'rounded-white';
hs.fadeInOut = true;
hs.numberPosition = 'caption';
hs.dimmingOpacity = 0.75;
// Add the controlbar
if (hs.addSlideshow) hs.addSlideshow({
//slideshowGroup: 'group1',
interval: 5000,
repeat: false,
useControls: true,
fixedControls: 'fit',
overlayOptions: {
opacity: .75,
position: 'bottom center',
hideOnMouseOut: true
}
});
</script>
Auf der Highslide Seite musst du dann noch die Version von Highslide herunterladen die das rel Attribut verwendent. siehe
http://highslide.com/doc.php
Ich denke das wars dann auch schon. Wie gesagt diese Methode ist sicher nicht updatefähig da eben die Datei ContentGallery verändert wird.
Ich bin mir sicher es gäbe auch eine elegantere und bessere Lösung..
Vermutlich kann man das highslide Skript so anpassen dass auch ein rel="lightbox" verwendet werden kann.
mfg savi
Lesezeichen