Jump to content

PHP Fusion - Editing user profile


Dzo

Recommended Posts

Hello,

What I am wanting to do is change the the user profile when viewing topics on the forum. I want to move the user avatar to the top on the profile rather than having NICKNAME, USER GROUP then USER AVATAR.

[b]So, after modifying the code, it should look like this.[/b]

[img]http://img92.imageshack.us/img92/7942/profileev1.png[/img]

[b]This is what it looks like NOW![/b]

[img]http://img291.imageshack.us/img291/6239/profilefalsefi4.png[/img]

[b]Here is the code that needs editing for this to work.[/b]

[code]echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";

if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."\n\n<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb($message);
$message = nl2br($message);
if ($data['post_edittime'] != "0") {
$edituser = "<a href='../profile.php?lookup=".$data['post_edituser']."'>".$data['edit_name']."</a>";
$edittime = showdate("forumdate", $data['post_edittime']);
}
$is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < "102" ? true : false;
echo "<tr>
<td width='145' class='tbl2'>".$locale['501']."</td>
<td class='tbl2'><a name='post_".$data['post_id']."' id='post_".$data['post_id']."'></a>".$data['post_subject']."</td>
</tr>
<tr>
<td valign='top' rowspan='3' width='145' class='tbl1'>
<a href='../profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($data['user_level']))."</span><br><br>\n";
if ($data['user_avatar'] != "") {
if ($data['user_avatar'] != "") {
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."'><br><br>\n";
$height = "185";
} else {
$height = "70";
} }echo "<span class='alt'>".$locale['502']."</span> ".$data['user_posts']."<br>\n";
if ($data['user_location']) echo "<span class='alt'>".$locale['503']."</span> ".$data['user_location']."<br>\n";
echo "<span class='alt'>".$locale['504']."</span> ".showdate("%d.%m.%y", $data['user_joined'])."</td>
[/code]

[b]Thanks...[/b]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.