ich benutze das bildergaleriemodul von LGW. besser gesagt benutze ich das modul dreimal, damit komme ich zu meinem problem. ich habe zwar den CMS_VALUEs und CMS_VAR in den verschiedenen modulen unterschiedliche zahlen gegeben (code wird unten aufgeführt) aber sobald in einem themenbereich (eins von drei modulen) mehr bilder, als bei der thumb-ansicht pro seite festgelegt, vorhanden sind und ich auf den link "weitere Bilder" klicke, werden keine thumbs mehr angezeigt. klicke ich jetzt wieder auf den link lande ich bei meinem startartikell, der ein anderer ist.
kann mir jemand netterweise sagen wo ich im quellcode der module die änderungen vornehmen muss (tippe es hat etwas mit der "idcat20" zu tun) damit sich die einzelnen module nicht in die quere kommen?
so erstmal einpaar infos:
code des LGW moduls - besucher (startartikell)
eingabe
Code: Alles auswählen
$selected = "CMS_VALUE[10]";
echo "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\">
<tr valign=\"top\">
<td>Einzelbild-Seite</td>
<td>
<select name=\"CMS_VAR[10]\">";
$sql = "SELECT * FROM $cfgTab_cat_tree AS TREE, $cfgTab_cat_side AS CATSIDE, $cfgTab_cat AS CAT, $cfgTab_cat_lang AS CATLANG, $cfgTab_side_lang AS SIDELANG WHERE TREE.idcat=CATSIDE.idcat AND CATSIDE.idcat=CATLANG.idcat AND CATLANG.idlang='$lang' AND CATSIDE.idside=SIDELANG.idside AND SIDELANG.idlang='$lang' AND CAT.idcat=TREE.idcat AND CAT.idclient='$client' ORDER BY TREE.idtree";
$db->query($sql);
if ($selected != 0) {
echo "<option value=0>diese Seite</option>";
} else {
echo "<option value=0 selected>diese Seite</option>";
}
while ($db->next_record()) {
$spaces = "";
for ($i=0; $i<$db->f("level"); $i++) {
$spaces = $spaces . " ";
}
if ( $db->f("idcatside") != $selected ) {
echo "<option value=\"".$db->f("idcatside")."\">$spaces ".$db->f("name")."---".$db->f("title")."</option>";
} else {
echo "<option value=\"".$db->f("idcatside")."\" selected>$spaces ".$db->f("name")."---".$db->f("title")."</option>";
}
}
echo "</select>";
echo " </td>
</tr>
<tr>
<td>
Image-Directory:
</td>
<td>
<input size=40 type=\"text\" name=\"CMS_VAR[12]\" value=\"CMS_VALUE[12]\">
</td>
</tr>
<tr>
<td>
Thumbnail-Directory:
</td>
<td>
<input size=40 type=\"text\" name=\"CMS_VAR[13]\" value=\"CMS_VALUE[13]\">
</td>
</tr>
<tr>
<td>
Image-Dateieendung (z.B. .jpg;.gif):
</td>
<td>
<input size=20 type=\"text\" name=\"CMS_VAR[14]\" value=\"CMS_VALUE[14]\">
</td>
</tr>
<tr>
<td>
Thumbnailtabelle in Spalten x Zeilen:
</td>
<td>
<input size=3 maxlength=2 type=\"text\" name=\"CMS_VAR[15]\" value=\"CMS_VALUE[15]\">x<input size=3 maxlength=2 type=\"text\" name=\"CMS_VAR[16]\" value=\"CMS_VALUE[16]\">
</td>
</tr>
<tr>
<td>
Thumbnailgrösse in XxY:
</td>
<td>
<input size=3 maxlength=2 type=\"text\" name=\"CMS_VAR[17]\" value=\"CMS_VALUE[17]\">x<input size=3 maxlength=2 type=\"text\" name=\"CMS_VAR[18]\" value=\"CMS_VALUE[18]\">
</td>
</tr>
<tr>
<td>
Pfad zum ImageMagick (optional):
</td>
<td>
<input size=20 type=\"text\" name=\"CMS_VAR[19]\" value=\"CMS_VALUE[19]\">
</td>
</tr>
</table>";
Code: Alles auswählen
<?php
$imagedir="CMS_VALUE[12]";
$thumbnails="CMS_VALUE[13]";
$imagetypes=explode(";","CMS_VALUE[14]");
$rows="CMS_VALUE[16]";
$cols="CMS_VALUE[15]";
$thb_x_size="CMS_VALUE[17]";
$thb_y_size="CMS_VALUE[18]";
$image_idcat="CMS_VALUE[10]";
$image_idside="CMS_VALUE[11]";
$im_path="CMS_VALUE[19]";
//-- 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 "<center><img src=\"$subfile\"><br><a href=\"javascript:history.back()\" title=\"Zurück zur Übersicht.\">zurück</a></center>";
} else {
// Gallery anzeigen
$handle=opendir($imagedir);
echo "<center><table border=\"1\" cellpadding=\"4\" cellspacing=\"0\" width=\"75%\">";
$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 align=\"center\" height=\"$thb_y_size\"><a href=\"$url\" title=\"Zur Detail-Ansicht.\">".($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\">";
echo " <p>| zeige Bilder ".($mmstart+1)." - ".($mmstart+$n)." |<br>";
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> ";
}
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></p>";
}
echo "</tr>\n";
echo "</table></center>";
}
?>
im 2. LGW modul - events habe ich den wert bei CMS_VALUE und CMS_VAR um zehn erhöht, z.b.: CMS_VALUE[10] -> CMS_VALUE[20]
im 3. LGW modul - location den wert wieder um zehn erhöht, z.b.:CMS_VALUE[20] -> CMS_VALUE[30].
um euch ein besseres bild zu machen benutzt folgenden link: http://www.getaway-online.de scrollt bis ans ende der seite und klickt auf "test", die galerie öffnet sich in einem popup. bei location handelt es sich um die seite mit den zahlreichen bildern, bei besucher handelt es sich um den startartikell.
ich hoffe euch alle nötigen infos gepostet zu haben und bedanke mich schon mal im voraus.