Verfasst: 27.09.2006 15:37
sorry, funktioniert genauso wenig
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Klüsen aufscheibenbrot hat geschrieben:ja, aber ich finde zu dem userpic nichts in der nickpage.php was das definiert
Und schon hast Du Dein $row['pic'].... Musst es nur noch an die viewtopic anpassen und vor allen die poster_id benutzen anstelle der user_id ... Die SQL Abfrage kannst Du auch 'ne ganze Ecke kürzen.$sql = "SELECT a.username, a.user_session_time, a.user_lastvisit, a.user_email, a.user_from, a.user_website, a.user_interests, a.user_viewemail, b.uid, b.name, b.info, b.visits, b.born, b.specialnick, b.pic, b.kreatives FROM ".USERS_TABLE." a, ".NICKPAGE_TABLE." b WHERE a.user_id='".$uid."' AND b.uid = '".$uid."'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql);
}
Code: Alles auswählen
//
// This rather complex gaggle of code handles querying for topics but
// also allows for direct linking to a post (and the calculation of which
// page the post is on and the correct display of viewtopic)
//
$join_sql_table = (!$post_id) ? '' : ", " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2 ";
$join_sql = (!$post_id) ? "t.topic_id = $topic_id" : "p.post_id = $post_id AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= $post_id";
$count_sql = (!$post_id) ? '' : ", COUNT(p2.post_id) AS prev_posts";
$order_sql = (!$post_id) ? '' : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC";
Code: Alles auswählen
$sql = "SELECT a.username, a.user_session_time, a.user_lastvisit, a.user_email, a.user_from, a.user_website, a.user_interests, a.user_viewemail, b.uid, b.name, b.info, b.visits, b.born, b.specialnick, b.pic, b.kreatives FROM ".USERS_TABLE." a, ".NICKPAGE_TABLE." b WHERE a.user_id='".$uid."' AND b.uid = '".$uid."'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql);
}
Code: Alles auswählen
for($i = 0; $i < $total_posts; $i++)
{
$poster_id = $postrow[$i]['user_id'];
Code: Alles auswählen
// Bild aus NP je Poster auslesen
$sql = "SELECT pic FROM " . NICKPAGE_TABLE . " WHERE uid = '" . $poster_id . "'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user nickpage pic', '', __LINE__, __FILE__, $sql);
}
if ($row = $db->sql_fetchrow($result))
$poster_np_pic = "<img src=" . $row['pic'] ." alt=\"\" title=\"\">";
// Ende Bild aus NP auslesen
Code: Alles auswählen
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'POSTER_NAME' => $poster,
Code: Alles auswählen
'POSTER_NP_PIC' => $poster_np_pic,
Code: Alles auswählen
{postrow.POSTER_NP_PIC}
Code: Alles auswählen
UPDATE phpbb_nickpagemod SET pic = 'images/nickpage/nopic.jpg' WHERE pic = '';
ALTER TABLE `phpbb_nickpagemod` CHANGE `pic` `pic` VARCHAR( 255 ) NOT NULL DEFAULT 'images/nickpage/nopic.jpg';
Code: Alles auswählen
if ($row = $db->sql_fetchrow($result))
$poster_np_pic = "<img src=" . $row['pic'] ." alt=\"\" title=\"\">";
Code: Alles auswählen
if ($row = $db->sql_fetchrow($result))
$poster_np_pic = ($row['pic'] == '') ? ("<img src=\"images/nickpage/nopic.jpg\" alt=\"\" title=\"\">") : ("<img src=" . $row['pic'] . " alt=\"\" title=\"\">");