ok. schau ich dann mal.
hab jetzt ein prob bei der übergabe ans template.
in der album.php steht nun folgendes:
Code: Alles auswählen
// BEGIN: Fetch Recent album comments
//
$zcomment=0;
$template->assign_block_vars('recent_comment', array());
$sql = "SELECT *
FROM `phpbb_album_comment`
ORDER BY `comment_id` DESC LIMIT 10";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain information needed.", "", __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
$zcomment++;
//$recent_comment .= $zcomment;
$recent_comment .= '
<a href="album_comment.php?comment_id=' . $row['comment_id'] .'">'. $row['comment_text'] . '</a><hr>
';
}
$template->assign_vars(array(
'RECENT_COMMENT_NAME' => $lang['Recently Submited Comments'],
'COUNT_COMMENT' => $zcomment,
'RECENT_COMMENT' => $recent_comment
));
//
// END: Fetch Recent album comments
es geht um die neu erschaffene variable "$zcomment"
diese soll immer ans template übergeben werden, so das in jeder zeile die nummer steht. von 1 bis 10.
im template schaut so aus:
Code: Alles auswählen
<!-- Neuste Kommentare -->
<br />
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th class="thTop" height="25" nowrap="nowrap">{RECENT_COMMENT_NAME}</th>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">
<!-- BEGIN recent_comment -->
{COUNT_COMMENT} - {RECENT_COMMENT}
<!-- END recent_comment -->
</span>
</td>
</tr>
</table>
<br />
<!-- Neuste Kommentare -->
-> es wird nur in der 1ten zeile die variable ausgeben. inhalt: 10
warum wird nicht von 1 bis 10 ausgeben? was mach ich bei der template-übergabe falsch?
ziel soll später auch mal sein die kategorie mit zu übermittlen...
thx