ich hab jetzt mal das Modul gun Gallery (http://www.redaxo.org/de/download/modul ... =&cat_id=6) ausprobiert und wollte es so umstellen, dass über das resize-Addon die Vorschaubilder automatisch aus den Gallerie-Bildern skaliert werden und man nicht extra Vorschaubilder in einen Order "thumbnails" kopieren muss. Nur leider klappt das bei mir nicht so richtig.
Ich habe das Ausgabe-Modul wie folgt verändert:
Code: Alles auswählen
<?php
...
//==============================
// Ausgabe zusammenstellen
//==============================
$picCount = 0;
foreach ($ggFiles as $pic)
{
$picCount++;
$picDim = getimagesize[b][u]($fullPath[/u][/b].$pic);
$picDivWidth = ($imgBorderColor != "") ? $picDim[0]+2 : $picDim[0];
$picDivHeight = ($imgBorderColor != "") ? $picDim[1]+2 : $picDim[1];
switch ($imgDisplay)
{
case "nw":
$linkStart = "<a href='" . $fullPath.$pic . "' onclick='popup=window.open(\"".$fullPath.$pic."\",\"gunNewWin\",\"scrollbars=no,resizable=yes,status=yes,menubar=no,top=0,left=0\"); popup.focus(); return false;'>";
$linkEnd = "</a>";
break;
case "lb":
$linkStart = "<a href='" . $fullPath.$pic . "' rel='lightbox[".$ggID."]'>";
$linkEnd = "</a>";
break;
case "sb":
$linkStart = "<a href='" . $fullPath.$pic . "' rel='lightbox[".$ggID."]'>";
$linkEnd = "</a>";
break;
default:
$linkStart = "";
$linkEnd = "";
}
$allPix .= "\t<div style='float:left; width:" . [b][u]150[/u][/b] . "px; height:" . $picDivHeight . "px; ";
$allPix .= "padding:0px 0px " . $imgPadding . "px " . $imgPadding . "px;'>";
$allPix .= $linkStart."<img src='" .[b][u] $fullPath .'index.php?rex_resize=150w__'[/u][/b] . $pic . "' " . $picDim[3] . " alt='' style='" . $imgBorderColor . "' />".$linkEnd."</div>\n";
if ($picCount % $imgPerRow == 0)
{
$allPix .= "<div style='clear:both;'></div>\n";
}
}
$mainWidth = (($picDivWidth + $imgPadding) * $imgPerRow) + $imgPadding;
?>
<div class="gallery-container" style="width:<?php echo $mainWidth; ?>px;<?php echo $mainBorderColor; ?><?=$mainBackColor?>margin:0;padding:<?=$imgPadding?>px 0px 0px 0px;">
<?php echo $allPix; ?>
<div style='clear:both;'></div>
</div>
Bei der Ausgabe der Vorschaubilder habe ich dann das resize-Addon mit einer festen Breite von 150px eingebaut. Nur leider funzt das net so...
Kann mir jemand sagen, woran das liegt