Bildergallery LGW-Problem

Gesperrt
newbie
Beiträge: 1
Registriert: Fr 30. Jul 2004, 12:24
Kontaktdaten:

Bildergallery LGW-Problem

Beitrag von newbie »

Hallo, contenido läuft, hab aber immer ein Problem mit der Bildergallery, statt der Foto wird folgendes angezeigt:

$imagedir="wurst_gross/"; $thumbnails="wurst_klein/"; $imagetypes=explode(";",".jpg"); $rows="3"; $cols="3"; $thb_x_size="50"; $thb_y_size="50"; $image_idcat="1"; $image_idside=""; $im_path=""; //-- 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 ""; } else { // Gallery anzeigen $handle=opendir($imagedir); echo ""; $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 " \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 " ".($thumbnail ? "":"$file")." \n"; $n++; if ($n%$cols==0) echo "
\n"; // nur solange wie's not tut... if ($n>=$rows*$cols) break; } echo " "; if ($mmstart>0) { $url=$sess->url("front_content.php?client=$client&lang=$lang&idcat=$idcat&subid=$subid&idside=$idside&mmstart=".($mmstart-$rows*$cols)); echo "vorherige Bilder..."; } echo " | zeige Bilder ".($mmstart+1)." - ".($mmstart+$n)." | "; if ($n+$mmstarturl("front_content.php?client=$client&lang=$lang&idcat=$idcat&subid=$subid&idside=$idside&mmstart=".($mmstart+$rows*$cols)); echo "weitere Bilder..."; } echo " \n"; echo "
"; } // Ende Gallery anzeigen


Bin Anfänger, was mach ich nur falsch[/code]
emergence
Beiträge: 10653
Registriert: Mo 28. Jul 2003, 12:49
Wohnort: Austria
Kontaktdaten:

Beitrag von emergence »

php code sollte von <? ?> oder <?php ?> umgeben sein.

wenn du dir das orginal modul ansiehst wirst du bemerken das diese tags vorhanden sind.
*** make your own tools (wishlist :: thx)
Gesperrt