
Warum bin ich nicht darauf gekommen, dass es hier ja eine schlaufe braucht? Vielen Dank

Code: Alles auswählen
while ( $row = $db->sql_fetchrow($result) )
{
$newbild = $row['pic'];
$username = $row['username'];
$u_link = append_sid($phpbb_root_path.'nickpage.php?user=' .$userdata['username']);
$template->assign_block_vars('newbild', array(
'NEWBILD' => $phpbb_root_path.'images/nickpage/'.$newbild,
'USERNAME' => $username,
'U_LINK' => $u_link));
}
[quote]
ich weiss nicht genau an was es liegt....
ja und 2.
wie bringe ich dich bilder auf eine horizontale darstellung? Mir kommt da nur in den sinn, dass im portal auch html tags eingefügt werden müssen...[/quote]
Code: Alles auswählen
$sql = "SELECT np.gal_id, np.pic, u.username
FROM ".GALERIE_TABLE." np, ".USERS_TABLE." u
WHERE np.uid = u.user_id
ORDER BY np.gal_id DESC
LIMIT 0 , 10";
if(!$result = $db->sql_query($sql))
{
message_die(CRITICAL_ERROR, "Konnte neue Bilder nicht abrufen!", "", __LINE__, __FILE__, $sql);
}
$cols = 5;
$i = $cols;
$anfang = 1;
$ende = 0;
while ( $row = $db->sql_fetchrow($result) )
{
if (!($i%$cols) && $anfang) {
$prefix = '<tr valign="bottom"><td align="center">';
$suffix = '</td>';
$ende = 1;
}
elseif ($i%$cols) {
$prefix = '<td align="center">';
$suffix = '</td>';
}
elseif (!($i%$cols) && $ende) {
$prefix = '<td align="center">';
$suffix = '</td></tr>';
$anfang = 1;
}
$i++;
$newbild = $row['pic'];
$username = $row['username'];
$u_link = append_sid($phpbb_root_path.'nickpage.php?user=' .$username);
$template->assign_block_vars('newbild', array(
'PREFIX' => $prefix,
'SUFFIX' => $suffix,
'NEWBILD' => $phpbb_root_path.'images/nickpage/TN'.$newbild,
'USERNAME' => $username,
'U_LINK' => $u_link));
}
Code: Alles auswählen
<table class="forumline">
<!-- BEGIN newbild -->
{newbild.PREFIX}
<a href="{newbild.NEWBILDLINK}"><img width="120" src="{newbild.NEWBILD}"></a>
<b><a href="{newbild.U_LINK}">{newbild.USERNAME}</a></b>
{newbild.SUFFIX}
<!-- END newbild -->
</table>