hallo,
nach etwas längerer zeit bin ich auch mal wieder da, scheinbar funktioniert da leider etwas nicht richtig
folgende fehlermeldung:
Code: Alles auswählen
Parse error: parse error, unexpected '=' in /forum/includes/template.php(929) : eval()'d code on line 33
hier mal beide dateien vollständig, ziemlich frickelcode, der is nur zum testen und wir dann mal überabrietet
gallery_album.php
Code: Alles auswählen
<?php
//Benötigte Dateien und Variablen von phpBB
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
$gal_id = ( isset($HTTP_GET_VARS['gal_id']) ) ? intval($HTTP_GET_VARS['gal_id']) : 0;
//Session auslesen und Benutzer-Informationen laden
$userdata = session_pagestart($user_ip, PAGE_GALLERY);
init_userprefs($userdata);
$page_title = 'Gallery';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'gallery_album' => 'gallery_album.tpl',
));
$alb_sql = 'SELECT * FROM `gallery_pix` WHERE `album_id` = ' . $gal_id . ' ORDER BY `id` ASC LIMIT ' . $start . ', 24';
if(!$alb_result = $db->sql_query($alb_sql)) {
message_die(GENERAL_ERROR, 'Fehler beim Auslesen der Album-Informationen', '', __LINE__, __FILE__, $alb_sql);
}
while($alb_row = $db->sql_fetchrow($alb_result)) {
$cnt_alb = mysql_query("SELECT * FROM `gallery_pix` WHERE `album_id` = '" . $alb_row['album_id'] . "'");
$cnt_alb = mysql_num_rows($cnt_alb);
$cnt_cmt = mysql_query("SELECT * FROM `gallery_comments` WHERE `pic_id` = '" . $alb_row['id'] . "'");
$cnt_cmt = mysql_num_rows($cnt_cmt);
$akt_ptid = $alb_row['id'];
$albpl_sql = mysql_query('SELECT * FROM `gallery_albums` WHERE `id` = ' . $gal_id);
$gal_ord = mysql_fetch_row($albpl_sql);
$rd_datum = $gal_ord['3'];
$day = date("w", $rd_datum);
$days = array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");
$date = date("j", $rd_datum);
$month = date("n", $rd_datum);
$months = array(1=>"Januar", 2=>"Februar", 3=>"März", 4=>"April", 5=>"Mai", 6=>"Juni", 7=>"Juli", 8=>"August", 9=>"September", 10=>"Oktober", 11=>"November", 12=>"Dezember");
$year = date("Y", $rd_datum);
$clc_datum = $days[$day] . ", " . $date . ". " . $months[$month] . " " . $year;
$template->assign_vars(array(
'ALBID' => $gal_ord['0'],
'ALBTITLE' => $gal_ord['1'],
'ALBAUTHOR' => $gal_ord['2'],
'ALBADD_DATE' => $clc_datum
));
// Die Ausgabe der Variablen
$img_url = "<a href=gallery_pic.php?pic_id=" . $akt_ptid . "&pic_dir=" . $alb_row['ordner'] . "&pic_name=" . $alb_row['dateiname'] . "><img src=\"gallery/" . $alb_row['ordner'] . "/_thm/" . $alb_row['dateiname'] . "\"></a><br>";
$zeilen = count($cnt_alb);
for ($x = 1; $x <= $zeilen; $x++)
{
$template->assign_block_vars('zeile', array(
//leer, ist nur wegen dem tr
));
$y = $x;
for ($y = $x; $y <= $x + 5; $y++)
{
$template->assign_block_vars('zeile.bild', array(
'THMIMG' => $img_url,
));
$x++;
if(!isset($cnt_alb[$x]))
break;
}
}
}
$board_config['topics_per_page'] = 24;
if ( $board_config['topics_per_page'] > 10 )
{
$sql = "SELECT count(*) AS total
FROM gallery_albums";
$result = $db->sql_query($sql);
if ( $total = $db->sql_fetchrow($result) )
{
$total_members = $total['total'];
$pagination = generate_pagination("gallery_dir.$phpEx?gal_id=" . $gal_id . "", $total_members, $board_config['topics_per_page'], $start). ' ';
}
$db->sql_freeresult($result);
}
else
{
$pagination = ' ';
$total_members = 24;
}
$template->assign_vars(array(
'PAGINATION' => $pagination,
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_members / $board_config['topics_per_page'] )),
'L_GOTO_PAGE' => $lang['Goto_page'])
);
$template->pparse('gallery_album');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
gallery_album.tpl
Code: Alles auswählen
<table width="100%">
<tr>
<td><center>
<span class="genbig"><b>Gallery</b></span><br><br>
<table class="forumline" width="60%" cellspacing="0" cellpadding="0" align="center">
<tr>
<th class="catHead" height="25" align="left"> {ALBADD_DATE}</th>
</tr>
<tr>
<td class="row1">
<table width="100%" cellspacing="0" cellpadding="5" border="0">
<tr>
<td class="row2"><span class="genmed"><i><b>{ALBTITLE}</a></b></i><br> Fotograf: <a href="profile.php?mode=viewprofile&u={ALBAUTHOR}">{ALBAUTHOR}</a></span></td>
</tr>
<tr>
<td class="row1"> <br>
<table width="100%" cellspacing="0" cellpadding="5" border="0">
<tr>
<!-- BEGIN zeile -->
<tr>
<!-- BEGIN zeile.bild -->
<td> {zeile.bild.THMIMG}</td>
<!-- END zeile.bild -->
</tr>
<!-- END zeile -->
</tr></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
</center></td>
</tr>
</table>
<table width="60%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td><span class="nav">{PAGE_NUMBER}</span></td>
<td align="right"><span class="nav">{PAGINATION}</span></td>
</tr>
</table>
was geht denn da schief ?
lg