Seite 1 von 2

Bilder Galerie

Verfasst: 26.10.2002 22:41
von bootmaker
Moin!

Ich würde gerne in einem bestimmten Forum meinen Gästen erlauben eigene Bilder zu einem Posting hochzuladen. Da ich die Startseite mit einem Portalhack aufgewertet habe sollte hier nach möglichkeit immer das neuste Bild angezeigt werden (als Thumb).

Es wäre auch sehr gut, wenn man als Admin sagen kann, das das Thumb z.b. max. XXX Pixel breit sein soll und automatisch das bild resizt wird.

Deswegen hier meine Frage - gibt es schon so einen Hack für phpBB??

Es solltem it phpBB 2.01 laufen!

Greetz bOOt

Verfasst: 26.10.2002 22:51
von AWSW
Hi Boot,
also dazu verwende ich den Album MOD von Smator. Er hat dazu auch eine Erweiterung, die Dein Vorhaben mit dem letzten Bild im Portal ermöglicht... Schau mal dort nach. mit der Such(t)funktion dort müsstest Du auch noch eine Anfrage zu Umsetzung mit den letzten x Bildern im Portal von mir finden: Latest Picture in Portal - Thumbnail above possible ?!?

Gruß & HTH - AWSW

Verfasst: 27.10.2002 00:31
von bootmaker
Hi!

Erstmal ein dickes Merci :) Ich hab den Hack gerade eingebaut und das dingen läuft. ich muss jetzt nurnoch mein Portal erweitern :)

THX :)

Verfasst: 27.10.2002 01:02
von bootmaker
So .. es geht nicht! Ich hab folgenden Source:

portal.php

Code: Alles auswählen

// 
// Get Newest Pic 
// 
$sql = "SELECT id, title, username, timestamp, cat_id FROM DAG_phpBB2_album ORDER BY timestamp DESC LIMIT 0,1"; 

if (!$result = $db->sql_query($sql)) 
{ 
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql); 
} 

$picrow = $db->sql_fetchrow($sql); 

$template->assign_vars(array( 
'U_IMAGE' => append_sid("album_thumbnail.$phpEx?id=".$picrow['id']),//modif alain 
'U_CAT_LINK' => append_sid("album.$phpEx?cat_id=".$picrow['cat_id']),//modif alain 
'PIC_TIME' => create_date($board_config['default_dateformat'], $picrow['timestamp'], $board_config['board_timezone'])
));


// 
// END - Get Newest Pic 
// 
portal_body.php

Code: Alles auswählen

<table width="100%" border="0" cellpadding="1" cellspacing="1" style="border-collapse: collapse" class="forumline"> 
<tr> 
<td class="catHead" colspan="2" height="25"><span class="cattitle"><center><b>Das neueste Bild:</b></center></span></td> 
</tr>
<tr> 
<td colspan="2" height="1" class="row3"><div align="center"><a href="{U_CAT_LINK}"><img src="{U_IMAGE}" width="40" height="40" border="0"></a></div></td> 
</tr> 
<tr> 
<td align="center" nowrap="nowrap" class="row3">&nbsp;<span class="genmed"><br> 
<a href="{U_PIC_LINK}"><b>{PIC_TITLE}</b></a><br />von <b>{PIC_POSTER}</b><br />am {PIC_TIME} 
<br></span>&nbsp;</td> 
</tr> 
</table> 
<br> 
Es wird kein Bild angezeigt und der Text sieht so aus:
von
am 01 Jan 1970 01:00 am
Das SQl-Queryy ist jedoch korrekt!

Hat jemand eine Idee?

Verfasst: 27.10.2002 09:46
von AWSW
Hi,
ich glaube Du hast den Beitrag nicht richtig gelesen. Dort habe ich Deine letzte Frage doch auch gestellt und wurd auf diesen Beitrag verwiesen, der einen entsprechenden Code enthält...: http://smartor.is-root.com/viewtopic.php?t=86

HTH

Verfasst: 27.10.2002 10:39
von bootmaker
Ja ich wiess .. und ich habe ja versucht da was zu finden .. nur ich bin zu plöd oder es war letzte n8 einfach zu spät.

Verfasst: 27.10.2002 11:38
von bootmaker
So - also tatsache ist, das das Query OK ist. Jedoch werden keine vars gesetzt (assign_vars). Ausserdem funktioniert der $picrow['...'] nicht.

Da es keinen Fehler gibt, wird ja wohl dieser Teil korrekt ausgeführt:

Code: Alles auswählen

$sql = "SELECT id, title, username, timestamp, cat_id FROM DAG_phpBB2_album ORDER BY timestamp DESC LIMIT 0,1"; 
$template->assign_vars(array('SQL' => $sql));

if (!$result = $db->sql_query($sql)) 
{ 
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql); 
} 
und ab hier kommen die Fehler:

Code: Alles auswählen

$picrow = $db->sql_fetchrow($sql); 

$template->assign_vars(array( 
'U_IMAGE' => "album_thumbnail.$phpEx?id=".$picrow['id'],//modif alain 
'U_CAT_LINK' => "album.$phpEx?cat_id=".$picrow['cat_id'],//modif alain 
'PIC_TIME' => create_date($board_config['default_dateformat'], $picrow['timestamp'], $board_config['board_timezone'])
));
Ich möchte hinzufügen, dass ich in dem oberen Code ganz bewusst das append_sid weg gelassen hab. So wird immerhin die url übergeben. Es fehlt jedoch die ID und alle Inhalte aus der DB! Ich kann es mir ber nicht erklären!

Greetz bOOt

Verfasst: 27.10.2002 13:02
von AWSW
Hallo,
also das verstehe ich nicht... Wie Du bei mir im Portal sehen kannst funktioniert der Code aus diesem Link: http://smartor.is-root.com/viewtopic.php?t=86

Wenn ich es einstelle, wie in dem Code beschrieben, kann ich schon so bis zu der letzten Bider anzeigen lassen, was bei mir auch klappte. Da ich aber nur das lezte anzeigen lassen wollte habe ich den rot markierten Wert auf 1 gesetzt...
//
// Get Newest Pic
//
$sql = "SELECT id, title, username, timestamp, cat_id FROM phpbb_album ORDER BY timestamp DESC LIMIT 0,3";//3 if you want 3 pictures else 4 or 5

Code: Alles auswählen

# 
#-----[ OPEN ]-------------------------------------------------- 
# 
index.php 

# 
#-----[ FIND ]---------------------------------------- 
# 
// 
// Start session management 
// 
$userdata = session_pagestart($user_ip, PAGE_INDEX); 
init_userprefs($userdata); 
// 
// End session management 
// 


# 
#-----[ AFTER, ADD ]---------------------------------- 
# 


// 
// Get Newest Pic 
// 
$sql = "SELECT id, title, username, timestamp, cat_id FROM phpbb_album ORDER BY timestamp DESC LIMIT 0,3";//3 if you want 3 pictures else 4 or 5 

if (!$result = $db->sql_query($sql)) 
{ 
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql); 
} 

$picrow1 = $db->sql_fetchrow($result); 
$picrow2 = $db->sql_fetchrow($result); 
$picrow3 = $db->sql_fetchrow($result); 
//$picrow4 = $db->sql_fetchrow($result);//if you want 4 pictures 
//$picrow5 = $db->sql_fetchrow($result);//if you want 5 pictures 

// 
// END - Get Newest Pic 
// 

# 
#-----[ FIND ]---------------------------------------- 
# 
$template->set_filenames(array( 
'body' => 'index_body.tpl') 
); 

# 
#-----[ AFTER ADD ]----------------------------------- 
# 
$template->assign_vars(array( 
'U_IMAGE1' => append_sid("album_thumbnail.$phpEx?id=".$picrow1['id']),//modif alain 
'U_CAT_LINK1' => append_sid("album.$phpEx?cat_id=".$picrow1['cat_id']),//modif alain 
'PIC_TIME1' => create_date($board_config['default_dateformat'], $picrow1['timestamp'], $board_config['board_timezone']), 

'U_IMAGE2' => append_sid("album_thumbnail.$phpEx?id=".$picrow2['id']),//modif alain 
'U_CAT_LINK2' => append_sid("album.$phpEx?cat_id=".$picrow2['cat_id']),//modif alain 
'PIC_TIME2' => create_date($board_config['default_dateformat'], $picrow2['timestamp'], $board_config['board_timezone']), 

'U_IMAGE3' => append_sid("album_thumbnail.$phpEx?id=".$picrow3['id']),//modif alain 
'U_CAT_LINK3' => append_sid("album.$phpEx?cat_id=".$picrow3['cat_id']),//modif alain 
'PIC_TIME3' => create_date($board_config['default_dateformat'], $picrow3['timestamp'], $board_config['board_timezone']) 


) 
); 



# 
#----[ OPEN ]----------------------------------------- 
# 
templates/subSilver/index_body.tpl 


# 
#-----[ PASTE ANY WHERE YOU WANT ]-------------------- 
# You should customize the style 
# 
For me it is in my index_new.tpl 

<tr> 
<th height="28" colspan="3" class="thHead">Dernières images postées</th> 
</tr> 
<tr> 
<td class="row2" align="center" width="33%"><font color="#FFFFFF"><b>3D GameStudio</b></font> 
<p><a href="{U_CAT_LINK1}"><img src="{U_IMAGE1}" width="40" height="40" border="0"></a></p> 
<p>&nbsp;<font color="#FFFFFF" size="1">{PIC_TIME1}</font></p> 
</td> 
<td class="row2" align="center" width="33%" > 
<p>&nbsp;<font color="#FFFFFF"><b>3D GameCreator</b></font></p> 
<p><a href="{U_CAT_LINK2}"><img src="{U_IMAGE2}" width="40" height="40" border="0"></a></p> 
<p>&nbsp;<font color="#FFFFFF" size="1">{PIC_TIME2}</font></p> 
</td> 
<td class="row2" align="center" width="33%" > 
<p><font color="#FFFFFF"><b>Blitz 3D</b></font>&nbsp;</p> 
<p><a href="{U_CAT_LINK3}"><img src="{U_IMAGE3}" width="40" height="40" border="0"></a></p> 
<p>&nbsp;<font color="#FFFFFF" size="1">{PIC_TIME3}</font></p> 
</td> 
</tr> 


An Stelle der Index.php und index_body.tpl hab ich halt die Portaldateien verwendet...

HTH

Verfasst: 27.10.2002 13:22
von bootmaker
Kann es dadran liegen, weil ich es direkt in die portal.php eingefügt habe ?!?!?

Meine Portal.php sieht so aus:

Code: Alles auswählen

<?php 
if($HTTP_SERVER_VARS["HTTP_HOST"]=='www.clixnet.de')
{
	header('location: http://www.clixnet.net/teamforum/portal.php');
}
else
{
// Start standard 
    define('IN_PHPBB', true); 
    $phpbb_root_path = './'; 
    include($phpbb_root_path . 'extension.inc'); 
    include($phpbb_root_path . 'common.'.$phpEx); 
// End standard 

// Start session management 
    $userdata = session_pagestart($user_ip, PAGE_VIEWONLINE); 
    init_userprefs($userdata); 
// End session management 

// Start Output page header 
    $page_title = $lang['Who_is_online']; 
    include($phpbb_root_path . 'includes/page_header.'.$phpEx); 

    $template->set_filenames(array( 
           'body' => 'portal_body.tpl') 
    ); 
// End Output page header 


###### start last_reg_users_##### 
    $sql = "SELECT user_id, username, user_regdate 
        FROM " . USERS_TABLE . " 
        WHERE user_id <> " . ANONYMOUS . " 
        ORDER BY user_regdate DESC 
        LIMIT 5"; 
    if ( !($result = $db->sql_query($sql)) ) 
    { 
            message_die(GENERAL_ERROR, 'Could not obtain user/online forums information', '', __LINE__, __FILE__, $sql); 
    } 

    while ($row = $db->sql_fetchrow($result)) 
    { 
        $user_id=$row['user_id']; 
            $template->assign_block_vars("last_registrations", array( 
                    'USERNAME' => $row['username'], 
                    'REG_DATE' => create_date($board_config['default_dateformat'], $row['user_regdate'], $board_config['board_timezone']), 
            'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id")) 
            ); 
    } 
##### end last_reg_users_####### 


###### start last visits_##### 
    $sql = "SELECT user_id, username, user_lastvisit 
        FROM " . USERS_TABLE . " 
        WHERE user_id <> " . ANONYMOUS . " 
        ORDER BY user_lastvisit DESC 
        LIMIT 5"; 
    if ( !($result = $db->sql_query($sql)) ) 
    { 
            message_die(GENERAL_ERROR, 'Could not obtain user/online forums information', '', __LINE__, __FILE__, $sql); 
    } 

    while ($row = $db->sql_fetchrow($result)) 
    { 
        $user_id=$row['user_id']; 
        $template->assign_block_vars("last_visits", array( 
                    'USERNAME' => $row['username'], 
                    'LAST_VISIT_DATE' => create_date($board_config['default_dateformat'], $row['user_lastvisit'], $board_config['board_timezone']), 
            'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id")) 
            ); 
    } 
##### end last visits_####### 


##### start ranks ##### 
    $sql = "SELECT rank_title, rank_min 
        FROM " . RANKS_TABLE . " 
        WHERE rank_special !='1' 
        ORDER BY rank_id"; 
    if ( !($result = $db->sql_query($sql)) ) 
    { 
            message_die(GENERAL_ERROR, 'Could not obtain user/online forums information', '', __LINE__, __FILE__, $sql); 
    } 

    while ($row = $db->sql_fetchrow($result)) 
    { 
        $user_id=$row['user_id']; 
        $template->assign_block_vars("ranks", array( 
                    'RANK_TITLE' => $row['rank_title'], 
                    'RANK_MIN' => $row['rank_min']) 
            ); 
    } 
##### end ranks ##### 


###### start most posts_##### 
    $sql = "SELECT user_id, username, user_posts 
        FROM " . USERS_TABLE . " 
        WHERE user_id <> " . ANONYMOUS . " 
        ORDER BY user_posts DESC 
        LIMIT 5"; 
    if ( !($result = $db->sql_query($sql)) ) 
    { 
            message_die(GENERAL_ERROR, 'Could not obtain user/online forums information', '', __LINE__, __FILE__, $sql); 
    } 

    while ($row = $db->sql_fetchrow($result)) 
    { 
        $user_id=$row['user_id']; 
            $template->assign_block_vars("most_posts", array( 
                    'USERNAME' => $row['username'], 
                    'POSTS' => $row['user_posts'], 
            'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id")) 
            ); 
    } 
##### end most posts_####### 


##### start beste topics ##### 
    $sql = "SELECT topic_id,topic_title,topic_replies 
        FROM " . TOPICS_TABLE . " t 
        LEFT JOIN " . FORUMS_TABLE . " f 
        ON t.forum_id=f.forum_id 
        WHERE f.auth_view < 2 
        ORDER BY topic_replies DESC 
        LIMIT 5"; 
    if ( !($result = $db->sql_query($sql)) ) 
    { 
            message_die(GENERAL_ERROR, 'Could not obtain user/online forums information', '', __LINE__, __FILE__, $sql); 
    } 

    while ($row = $db->sql_fetchrow($result)) 
    { 
        $topic_id=$row['topic_id']; 
        $template->assign_block_vars("best_topics", array( 
                    'TOPIC_TITLE' => $row['topic_title'], 
                    'REPLIES' => $row['topic_replies'], 
            'VIEWTOPIC' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id")) 
            ); 
    } 
##### end best topics ##### 


##### start last_topics ##### (z123-428) 
$template->assign_vars(array( 
        'FORUM_ID' => $forum_id, 
        'FORUM_NAME' => $forum_row['forum_name'], 
        'MODERATORS' => $forum_moderators, 
        'POST_IMG' => ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $images['post_locked'] : $images['post_new'], 

        'FOLDER_IMG' => $images['folder'], 
        'FOLDER_NEW_IMG' => $images['folder_new'], 
        'FOLDER_HOT_IMG' => $images['folder_hot'], 
        'FOLDER_HOT_NEW_IMG' => $images['folder_hot_new'], 
        'FOLDER_LOCKED_IMG' => $images['folder_locked'], 
        'FOLDER_LOCKED_NEW_IMG' => $images['folder_locked_new'], 
        'FOLDER_STICKY_IMG' => $images['folder_sticky'], 
        'FOLDER_STICKY_NEW_IMG' => $images['folder_sticky_new'], 
        'FOLDER_ANNOUNCE_IMG' => $images['folder_announce'], 
        'FOLDER_ANNOUNCE_NEW_IMG' => $images['folder_announce_new'], 

        'L_TOPICS' => $lang['Topics'], 
        'L_REPLIES' => $lang['Replies'], 
        'L_VIEWS' => $lang['Views'], 
        'L_POSTS' => $lang['Posts'], 
        'L_LASTPOST' => $lang['Last_Post'], 
        'L_MODERATOR' => $l_moderators, 
        'L_MARK_TOPICS_READ' => $lang['Mark_all_topics'], 
        'L_POST_NEW_TOPIC' => ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['Post_new_topic'], 
        'L_NO_NEW_POSTS' => $lang['No_new_posts'], 
        'L_NEW_POSTS' => $lang['New_posts'], 
        'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'], 
        'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'], 
        'L_NO_NEW_POSTS_HOT' => $lang['No_new_posts_hot'], 
        'L_NEW_POSTS_HOT' => $lang['New_posts_hot'], 
        'L_ANNOUNCEMENT' => $lang['Post_Announcement'], 
        'L_STICKY' => $lang['Post_Sticky'], 
        'L_POSTED' => $lang['Posted'], 
        'L_JOINED' => $lang['Joined'], 
        'L_AUTHOR' => $lang['Author'], 

        'S_AUTH_LIST' => $s_auth_can, 

        'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL ."=$forum_id"), 

        'U_MARK_READ' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&mark=topics")) 
); 

    $sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time 
            FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2 
        LEFT JOIN " . FORUMS_TABLE . " f 
        ON t.forum_id=f.forum_id 
            WHERE t.topic_poster = u.user_id 
                    AND p.post_id = t.topic_first_post_id 
                       AND p2.post_id = t.topic_last_post_id 
                       AND u2.user_id = p2.poster_id 
            AND f.auth_view < 2 
           ORDER BY t.topic_last_post_id DESC 
           LIMIT 10"; 
if ( !($result = $db->sql_query($sql)) ) 
{ 
   message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql); 
} 

$total_topics = 0; 
while( $row = $db->sql_fetchrow($result) ) 
{ 
        $topic_rowset[] = $row; 
        $total_topics++; 
} 

$db->sql_freeresult($result); 

// 
// Define censored word matches 
// 
$orig_word = array(); 
$replacement_word = array(); 
obtain_word_list($orig_word, $replacement_word); 

// 
// Post URL generation for templating vars 
// 
$template->assign_vars(array( 
        'L_DISPLAY_TOPICS' => $lang['Display_topics'], 

        'U_POST_NEW_TOPIC' => append_sid("posting.$phpEx?mode=newtopic&" . POST_FORUM_URL . "=$forum_id"), 

        'S_SELECT_TOPIC_DAYS' => $select_topic_days, 
        'S_POST_DAYS_ACTION' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_id . "&start=$start")) 
); 

        for($i = 0; $i < $total_topics; $i++) 
        { 
                $topic_id = $topic_rowset[$i]['topic_id']; 

                $topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title']; 

                $replies = $topic_rowset[$i]['topic_replies']; 

                $topic_type = $topic_rowset[$i]['topic_type']; 

                if( $topic_type == POST_ANNOUNCE ) 
                { 
                        $topic_type = $lang['Topic_Announcement'] . ' '; 
                } 
                else if( $topic_type == POST_STICKY ) 
                { 
                        $topic_type = $lang['Topic_Sticky'] . ' '; 
                } 
                else 
                { 
                        $topic_type = ''; 
                } 

                if( $topic_rowset[$i]['topic_vote'] ) 
                { 
                        $topic_type .= $lang['Topic_Poll'] . ' '; 
                } 

                if( $topic_rowset[$i]['topic_status'] == TOPIC_MOVED ) 
                { 
                        $topic_type = $lang['Topic_Moved'] . ' '; 
                        $topic_id = $topic_rowset[$i]['topic_moved_id']; 

                        $folder_image =  $images['folder']; 
                        $folder_alt = $lang['Topic_Moved']; 
                        $newest_post_img = ''; 
                } 
                else 
                { 
                        if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE ) 
                        { 
                                $folder = $images['folder_announce']; 
                                $folder_new = $images['folder_announce_new']; 
                        } 
                        else if( $topic_rowset[$i]['topic_type'] == POST_STICKY ) 
                        { 
                                $folder = $images['folder_sticky']; 
                                $folder_new = $images['folder_sticky_new']; 
                        } 
                        else if( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) 
                        { 
                                $folder = $images['folder_locked']; 
                                $folder_new = $images['folder_locked_new']; 
                        } 
                        else 
                        { 
                                if($replies >= $board_config['hot_threshold']) 
                                { 
                                        $folder = $images['folder_hot']; 
                                        $folder_new = $images['folder_hot_new']; 
                                } 
                                else 
                                { 
                                        $folder = $images['folder']; 
                                        $folder_new = $images['folder_new']; 
                                } 
                        } 

                        $newest_post_img = ''; 
                        if( $userdata['session_logged_in'] ) 
                        { 
                                if( $topic_rowset[$i]['post_time'] > $userdata['user_lastvisit'] ) 
                                { 
                                        if( !empty($tracking_topics) || !empty($tracking_forums) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) ) 
                                        { 
                                                $unread_topics = true; 

                                                if( !empty($tracking_topics[$topic_id]) ) 
                                                { 
                                                        if( $tracking_topics[$topic_id] >= $topic_rowset[$i]['post_time'] ) 
                                                        { 
                                                                $unread_topics = false; 
                                                        } 
                                                } 

                                                if( !empty($tracking_forums[$forum_id]) ) 
                                                { 
                                                        if( $tracking_forums[$forum_id] >= $topic_rowset[$i]['post_time'] ) 
                                                        { 
                                                                $unread_topics = false; 
                                                        } 
                                                } 

                                                if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) ) 
                                                { 
                                                        if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] >= $topic_rowset[$i]['post_time'] ) 
                                                        { 
                                                                $unread_topics = false; 
                                                        } 
                                                } 

                                                if( $unread_topics ) 
                                                { 
                                                        $folder_image = $folder_new; 
                                                        $folder_alt = $lang['New_posts']; 

                                                        $newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; 
                                                } 
                                                else 
                                                { 
                                                        $folder_image = $folder; 
                                                        $folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts']; 

                                                        $newest_post_img = ''; 
                                                } 
                                        } 
                                        else 
                                        { 
                                                $folder_image = $folder_new; 
                                                $folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts']; 

                                                $newest_post_img = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest") . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> '; 
                                        } 
                                } 
                                else 
                                { 
                                        $folder_image = $folder; 
                                        $folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts']; 

                                        $newest_post_img = ''; 
                                } 
                        } 
                        else 
                        { 
                                $folder_image = $folder; 
                                $folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts']; 

                                $newest_post_img = ''; 
                        } 
                } 

                if( ( $replies + 1 ) > $board_config['posts_per_page'] ) 
                { 
                        $total_pages = ceil( ( $replies + 1 ) / $board_config['posts_per_page'] ); 
                        $goto_page = ' [ <img src="' . $images['icon_gotopost'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" />' . $lang['Goto_page'] . ': '; 

                        $times = 1; 
                        for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page']) 
                        { 
                                $goto_page .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j") . '">' . $times . '</a>'; 
                                if( $times == 1 && $total_pages > 4 ) 
                                { 
                                        $goto_page .= ' ... '; 
                                        $times = $total_pages - 3; 
                                        $j += ( $total_pages - 4 ) * $board_config['posts_per_page']; 
                                } 
                                else if ( $times < $total_pages ) 
                                { 
                                        $goto_page .= ', '; 
                                } 
                                $times++; 
                        } 
                        $goto_page .= ' ] '; 
                } 
                else 
                { 
                        $goto_page = ''; 
                } 

                $view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id"); 

                $topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : ''; 
                $topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] ); 

                $topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; 

                $first_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['topic_time'], $board_config['board_timezone']); 

                $last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']); 

                $last_post_author = ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? ( ($topic_rowset[$i]['post_username2'] != '' ) ? $topic_rowset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '='  . $topic_rowset[$i]['id2']) . '">' . $topic_rowset[$i]['user2'] . '</a>'; 

                $last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' . $topic_rowset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>'; 

                $views = $topic_rowset[$i]['topic_views']; 

                $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; 
                $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; 

                $template->assign_block_vars('topicrow', array( 
                        'ROW_COLOR' => $row_color, 
                        'ROW_CLASS' => $row_class, 
                        'FORUM_ID' => $forum_id, 
                        'TOPIC_ID' => $topic_id, 
                        'TOPIC_FOLDER_IMG' => $folder_image, 
                        'TOPIC_AUTHOR' => $topic_author, 
                        'GOTO_PAGE' => $goto_page, 
                        'REPLIES' => $replies, 
                        'NEWEST_POST_IMG' => $newest_post_img, 
                        'TOPIC_TITLE' => $topic_title, 
                        'TOPIC_TYPE' => $topic_type, 
                        'VIEWS' => $views, 
                        'FIRST_POST_TIME' => $first_post_time, 
                        'LAST_POST_TIME' => $last_post_time, 
                        'LAST_POST_AUTHOR' => $last_post_author, 
                        'LAST_POST_IMG' => $last_post_url, 

                        'L_TOPIC_FOLDER_ALT' => $folder_alt, 

                        'U_VIEW_TOPIC' => $view_topic_url) 
                ); 
        } 

        $template->assign_vars(array( 
                'PAGINATION' => generate_pagination("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&topicdays=$topic_days", $topics_count, $board_config['topics_per_page'], $start), 
                'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $topics_count / $board_config['topics_per_page'] )), 

                'L_GOTO_PAGE' => $lang['Goto_page']) 
        ); 
##### end last topics ##### 

// 
// Get Newest Pic 
// 
$sql = "SELECT id, title, username, timestamp, cat_id FROM DAG_phpBB2_album ORDER BY timestamp DESC LIMIT 0,1"; 
$template->assign_vars(array('SQL' => $sql));

if (!$result = $db->sql_query($sql)) 
{ 
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql); 
} 

$picrow = $db->sql_fetchrow($sql); 

$template->assign_vars(array( 
'U_IMAGE' => "album_thumbnail.$phpEx?id=".$picrow['id'],//modif alain 
'U_CAT_LINK' => "album.$phpEx?cat_id=".$picrow['cat_id'],//modif alain 
'PIC_TIME' => create_date($board_config['default_dateformat'], $picrow['timestamp'], $board_config['board_timezone'])
));

// 
// END - Get Newest Pic 
// 

// Start Main Part and Footer 
    include($phpbb_root_path . 'glance.'.$phpEx);
    $template->pparse('body'); 
    include($phpbb_root_path . 'includes/page_tail.'.$phpEx); 
// End Main Part and Footer 
}
?>
Wo ist der Fehler ?!?!?

Verfasst: 27.10.2002 13:26
von AWSW
An Stelle der Index.php und index_body.tpl hab ich halt die Portaldateien verwendet...
Wo bei Dir da der Fehler liegt, kann ich nicht erkennen...

HTH