Zeigt der hinterlegte Link auf ein jpeg, jpg, gif oder png, wird dieses im Lightbox-Modus geöffnet, vorausgesetzt natürlich, dass Lightbox installiert ist*.
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : Bild(1)
* Beschreibung: im Gegensatz zum Originalmodul wird das Bild
* nur dann mit einem Link hinterlegt, wenn auch
* tatsächlich ein Link angegeben wurde
* Version : 1.2 - lightbox
* Author : irgendwer von 4fb ;-)
* Created : keine Ahnung, 4fb fragen
* Last Modified : 04-05-2005 by Christa Tabara mit Hilfe von
* Andreas Kummer und emergence :-)
* Lightbox hinzugefügt von Thorsten G.
* (all credits to the authors of the original modul and of lightbox)
************************************************/
if ("CMS_IMG[1]" != "") {
$img = '<img class="image" src="CMS_IMG[1]">';
$imagelink = trim("CMS_LINK[1]");
$rel = "";
$values = explode (".", $imagelink);
$ext = $values[1];
if ($ext == "jpeg" or $ext == "jpg" or $ext == "gif" or $ext == "png") {
$rel = "lightbox"; }
if ($imagelink != "http://" && $imagelink != "" && $imagelink != $cfgClient[$client]["path"]["htmlpath"])
{
$img = sprintf('<a href="%s" rel="%s" target="%s">%s</a>',"$imagelink", "$rel", "CMS_LINKTARGET[1]", $img);
}
else {$img = '<img class="image" src="CMS_IMG[1]" >';}
echo $img;
}
if ($edit) {
echo "<br>";
echo "CMS_IMGDESCR[1]";
echo "<br>";
echo "CMS_LINKDESCR[1]";
echo "<br>";
}
?>
Code: Alles auswählen
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>