ich bin gerade dabei ein eigenes Bilderscript auf Basis vom PHPbb zu programieren. Ich kenne den Album Mod. Doch ich möchte ein eigenes haben, dass genau meine Funktionen abdeckt. Leider habe ich jetzt schon mein erstes Problem.
Das Problem liegt in der Galerieübersicht, wo die Thumbnails angezeigt werden. Nach meinem Code wird immer nur eines nebeneinander ausgegeben. Ich möchte aber dass vier Vorschaubilder nebeneinander zu sehen sind. Also so:
+------+-------+-------+-------+
| Bild1 | Bild2 | Bild3 | Bild4 |
+------+-------+-------+-------+
| Bild5 | Bild6 | Bild7 | Bild8 |
+------+-------+-------+-------+
usw.
Bei mir ist das so:
+------+
| Bild1 |
+------+
| Bild2 |
+------+
| Bild3 |
+------+
| Bild4 |
+------+
D. H. ich muss die Verschatelung ändern. Doch leider habe ich keinen Plan wie ich das machen soll. Hat jmd. eine Idee mit einem Beispiel??? Ich steh voll auf dem Schlauch.
Hier mal der auszug aus der PHP-Datei:
Code: Alles auswählen
if(isset($_GET['action']) && $_GET['action'] == "gal")
{
$template->set_filenames(array(
'body' => 'bilder_gal.tpl')
);
$katid = $_GET['id'];
$bilder = "SELECT * FROM $tabelle_bilder WHERE id_kat='$katid' ORDER BY id";
$ergebnis = mysql_query($bilder);
while($row = mysql_fetch_object($ergebnis))
{
$id = $row->id;
$id_kat = $row->id_kat;
$pfad_bild = $row->pfad_bild;
$pfad_thumb = $row->pfad_thumb;
$autor_id = $row->autor_id;
$hits = $row->hits;
$template->assign_block_vars('BILDER', array(
'ID' => $id,
'ID_KAT' => $id_kat,
'PFAD_BILD' => $pfad_bild,
'PFAD_THUMB' => $pfad_thumb,
'autor_id' => $autor_id,
'hits' => $hits,
));
}
$kat_titel = "SELECT * FROM $tabelle_kat WHERE id ='$katid' ";
$erg_kat_titel = mysql_query($kat_titel);
while($row_kat_titel = mysql_fetch_object($erg_kat_titel))
{
$kat_titel = $row_kat_titel->titel;
}
$template->assign_vars(array(
'kat_titel' => $kat_titel,
));
$template->pparse('body');
}
Code: Alles auswählen
<table width="458" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="458" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><img src="images/balken_v2_1_01.jpg" width="83" height="22" alt=""></td>
<td colspan="3" class="headline" style="background-image: url(images/balken_v2_1_02.jpg)">{kat_titel}</td>
</tr>
<tr>
<td colspan="3"><img src="images/balken_v2_1_03.jpg" width="83" height="7" alt=""></td>
<td colspan="3"><img src="images/balken_v2_1_04.jpg" width="375" height="7" alt=""></td>
</tr>
<tr>
<td colspan="3" style="background-image: url(images/balken_v2_1_08.jpg); background-repeat:repeat-y;" class="text_l_f" height="23" ><img src="images/balken_v2_1_05.jpg" alt="" width="83" height="23" border="0"><br><div style="background-image: url(images/balken_v2_1_08.jpg); background-repeat:repeat-y;" class="text_fett_c_f"></div></td>
<td width="370" colspan="2" rowspan="2" class="text_l_f ">
// hier müsste dann die Tabelle mit den Zeilen und Spalten beginnen
<!-- BEGIN BILDER -->
<table width="90" cellpadding="0" cellspacing="0" border="1">
<tr>
<td class="text" height="28"><a href="{BILDER.PFAD_BILD}"><img src="{BILDER.PFAD_THUMB}" border="0"></a></td>
</tr>
</table>
<!-- END BILDER -->
// und hier wäre dann das Ende
<td rowspan="2" style="background-image: url(images/balken_v2_1_07.jpg)"></td>
</tr>
<tr>
<td style="background-image: url(images/balken_v2_1_08.jpg)"></td>
<td colspan="2" class="text_fett_c_f"></td>
</tr>
<tr>
<td colspan="2"><img src="images/balken_v2_1_10.jpg" width="15" height="13" alt=""></td>
<td><img src="images/balken_v2_1_11.jpg" width="68" height="13" alt=""></td>
<td><img src="images/balken_v2_1_12.jpg" width="360" height="13" alt=""></td>
<td colspan="2"><img src="images/balken_v2_1_13.jpg" width="15" height="13" alt=""></td>
</tr>
<tr>
<td><img src="images/Abstandhalter.gif" width="3" height="1" alt=""></td>
<td><img src="images/Abstandhalter.gif" width="12" height="1" alt=""></td>
<td><img src="images/Abstandhalter.gif" width="68" height="1" alt=""></td>
<td><img src="images/Abstandhalter.gif" width="360" height="1" alt=""></td>
<td><img src="images/Abstandhalter.gif" width="10" height="1" alt=""></td>
<td><img src="images/Abstandhalter.gif" width="5" height="1" alt=""></td>
</tr>
</table>
SKYSURFER