Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Thread user avatar

Asked Modified Viewed 5,006 times
G
gurami
G
gurami 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

hello
Sorry for the bad english translate miatt.Google
I want you to viewforum.php into the theme author's name to appear next to your avatar in miniature. Right now, try this:

if ($data['user_avatar'] && file_exists(IMAGES."avatars/".$data['user_avatar'])) {
            $src = IMAGES."avatars/".$data['user_avatar'];
         } else {
            $src = IMAGES."avatars/noavatar50.png";
         }
      echo "<td width='1%' class='".$row_color."' style='white-space:nowrap'><a href='".BASEDIR."profile.php?lookup=".$data."' class='profile-link flleft'><span class='user-avatar'><img class='avatar' width='30' src='".$src."' alt='".$src."' /></span></a><a href='".BASEDIR."profile.php?lookup=".$data."' class='profile-link'>".$data."</a>".profile_link($tdata['thread_author'], $tdata['user_author'], $tdata['status_author'])."</td>\n";


but noavatar or to, or for the user avatar shows that I am a user is logged on.
Can you give some guidance for a solution?
Thanks :)
0 replies

11 posts

P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

Try to use data isntead of tdata
0 replies
G
gurami
G
gurami 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Unfortunately, it is not good.
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

Why not?
0 replies
G
gurami
G
gurami 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

I mean that I've tried but it's not good.
Or it could be that bad because my English misunderstand each other?
If you please write more code to what you're sure you do not get that wrong.
thank you
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

profile_link($tdata['thread_author'], $tdata['user_author'], $tdata['status_author'])
=>
profile_link($data['thread_author'], $data['user_author'], $data['status_author'])
0 replies
G
gurami
G
gurami 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Yes, I did $tdata => $data. The author's name and hiding the remains noavatar kép.Ha replaces the $ data => $ userdata it is always the image of the user's name with whom I am logged into the site. I never find what I'm doing wrong.
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
answered
Veteran Member

Do you mean this ?

- see picture.
smokeman attached the following file:
author_avatar.jpg [No information available / 55 Downloads]
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

Ah yes, do the echo $src; before user name.
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
answered
Veteran Member

G
gurami
G
gurami 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

Very cool thank you very much for helping you.
Edited by gurami on 24-12-2012 02:57,
0 replies
— 9 months later —
S
SpaM
S
SpaM 10
SpaM - SpamFusion.
  • Junior Member, joined since
  • Contributed 33 posts on the community forums.
  • Started 11 threads in the forums
answered
Junior Member

I leave my corrected code

Remplace

$result = dbquery(
   "SELECT tt.thread_id, tt.thread_subject, tt.thread_views, tt.thread_lastuser, tt.thread_lastpost, user_avatar,
   tt.thread_poll, tf.forum_id, tf.forum_name, tf.forum_access, tt.thread_lastpostid, tt.thread_postcount, tu.user_id, tu.user_name,
   tu.user_status
   FROM ".DB_THREADS." tt
   INNER JOIN ".DB_FORUMS." tf ON tt.forum_id=tf.forum_id
   INNER JOIN ".DB_USERS." tu ON tt.thread_lastuser=tu.user_id
   WHERE ".groupaccess('tf.forum_access')." AND tt.thread_lastpost >= ".$timeframe." AND tt.thread_hidden='0'
   ORDER BY tt.thread_lastpost DESC LIMIT 0,".$settings['numofthreads']
);


if ($data['user_avatar'] && file_exists(IMAGES."avatars/".$data['user_avatar'])) {
            $src = IMAGES."avatars/".$data['user_avatar'];
         } else {
            $src = IMAGES."avatars/noavatar50.png";
         }
      echo "<td width='1%' class='".$row_color."' style='text-align:center;white-space:nowrap'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' '/><span class='user-avatar'><img class='avatar' width='30' src='".$src."' alt='".$src."' title='".trimlink($data['user_name'],30)."' '/></span></a>".profile_link($data['thread_lastuser'], $data['user_name'], $data['user_status'])."<br />\n".showdate("forumdate", $data['thread_lastpost'])."</td>\n";
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 11 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

S
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
S
S
SpaM 10
SpaM - SpamFusion.
  • Junior Member, joined since
  • Contributed 33 posts on the community forums.
  • Started 11 threads in the forums
G
G
gurami 10
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet