bin in PHP fast überhaupt nicht bewandert, wie schaffe ich es, oder wie muss ich untenstehene Ausgabe von Modul Bildergallerie 0.9.1 ändern, damit ich bei der Großansicht des Bildes einen zurück-TextButton eingeblendet bekomme, der sofort wieder auf die vorherige Thumbnail-Ansichts-Seite gelangt?
Für Antworten wäre ich sehr sehr dankbar, ich habs jetzt nämlich schon 2 Wochen allein probiert und kriegs einfach nicht in meinen Schädel, wie ich diese Ausgabe verändern muß.
hier die gallerie:
http://www.prinzkafka-studio.de/cms/fro ... p?idcat=13
und hier meine Ausgabe vom Modul:
<?php
// ANFANG OUTPUT
$imagedir="CMS_VALUE[2]";
$thumbnails="CMS_VALUE[3]";
$imagetypes=explode(";","CMS_VALUE[4]");
$rows="CMS_VALUE[6]";
$cols="CMS_VALUE[5]";
$thb_x_size="CMS_VALUE[7]";
$thb_y_size="CMS_VALUE[8]";
$image_idcat="CMS_VALUE[0]";
$image_idside="CMS_VALUE[1]";
$im_path="CMS_VALUE[9]";
//-- config ende -------------------------------------
function is_image($filename,$typearray) {
reset($typearray);
while($val=each($typearray)) {
if (strstr($filename,$val[value])!==false) {
return true;
}
}
}
//-- functions ende ----------------------------------
if (!isset($mmstart)) {
$mmstart=0;
}
// Anzeige eines Bildes oder Übersicht?
if ($subfile!="") {
// Bild anzeigen
echo "<img src=\"$subfile\">";
} else {
// Gallery anzeigen
$handle=opendir($imagedir);
echo "<table>";
$n=0;
$filearray=Array();
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && is_image($file,$imagetypes)) {
$filearray[]=$file;
}
}
reset($filearray);
// skip images...
for ($n=0;$n<$mmstart;$n++)
$ffile=each($filearray);
$n=0;
while ($ffile=each($filearray)) {
$file=$ffile[value];
// generate thumbnail, if nessesairy. Now THIS is fun :)
// natuerlich nur, wenn imagemagick vorhanden ist...
if (!file_exists($thumbnails."/thb_".$file) ) {
if ($im_path!="") {
$cmd=$im_path."/convert -scale ".$thb_x_size."x".$thb_y_size." ".$imagedir."/".$file." ".$thumbnails."/thb_".$file;
exec($cmd);
// nochmal prüfen!
$thumbnail=file_exists($thumbnails."/thb_".$file);
} else
$thumbnail=false;
} else
$thumbnail=true;
if ($n%$cols==0)
echo "<tr>\n";
if ($image_idcat!=0)
$url=$sess->url("front_content.php?client=$client&lang=$lang&subid=$subid&idcatside=$image_idcat&subfile=".rawurlencode($imagedir."/".$file));
else
$url=$sess->url("front_content.php?client=$client&lang=$lang&subid=$subid&idcat=$idcat&idside=$idside&subfile=".rawurlencode($imagedir."/".$file));
echo "<td valign=\"middle\" align=\"center\" width=\"$thb_x_size\" height=\"$thb_y_size\"><a href=\"$url\">".($thumbnail ? "<img src=\"$thumbnails/thb_$file\" border=\"0\">":"$file")."</a></td>\n";
$n++;
if ($n%$cols==0)
echo "</tr>\n";
// nur solange wie's not tut...
if ($n>=$rows*$cols)
break;
}
echo "<tr> <td colspan=\"$cols\" align=\"center\">";
if ($mmstart>0) {
$url=$sess->url("front_content.php?client=$client&lang=$lang&idcat=$idcat&subid=$subid&idside=$idside&mmstart=".($mmstart-$rows*$cols));
echo "<a href=\"$url\">vorherige Bilder...</a>";
}
echo " | zeige Bilder ".($mmstart+1)." - ".($mmstart+$n)." | ";
if ($n+$mmstart<count($filearray)) {
$url=$sess->url("front_content.php?client=$client&lang=$lang&idcat=$idcat&subid=$subid&idside=$idside&mmstart=".($mmstart+$rows*$cols));
echo "<a href=\"$url\">weitere Bilder...</a>";
}
echo "</tr>\n";
echo "</table>";
} // Ende Gallery anzeigen
?>