Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 8 Years, 10 Months, 1 Week ago Adding profile link to avatar in portal
#1
Solved: 8 Years, 10 Months, 1 Week ago
Been messing around all morning trying to get this to work in the portal.php file, but I can't, I give in. I'm trying to add a profile link to the avatar image displayed in portal announcements when clicked.

Here is the code for members avatar displayed.

$avatar = "<img src=\"{$announcement['avatar']}\" alt=\"\" {$avatar_width_height} />";

I've tried just about everything I can find and think off using this example below. I've not listed the code I've tried there, because I've tried a lot of different ways to try and make it work with no success. The best I could get was the users ID number displayed only after the forum url. But it doesn't work because it has to have: "bburl/user-1.html" shown. All I could get was: "bburl/1"

$avatar = "<a href=\"profile code here\"><img src=\"{$announcement['avatar']}\" alt=\"\" {$avatar_width_height} /></a>";

So does anybody know what needs to go were it says "profile code here"?
#2
Solved: 8 Years, 10 Months, 1 Week ago
Open portal.php and find; (around line# 496)
$avatar = "<td class=\"trow1\" width=\"1\" align=\"center\" valign=\"top\"><img src=\"{$announcement['avatar']}\" alt=\"\" {$avatar_width_height} /></td>";
and change it to;
$avatar = "<td class=\"trow1\" width=\"1\" align=\"center\" valign=\"top\"><a href=\"member.php?action=profile&uid={$announcement['uid']}\" title=\"{$announcement['uid']}\"><img src=\"{$announcement['avatar']}\" alt=\"\" {$avatar_width_height} /></a></td>";

Now you should have avatars in portal that point you to User's profiles. Wink
#3
Solved: 8 Years, 10 Months, 1 Week ago
Thanks a lot for that, I would never have got that one you used to make it work. Now I'm happy, thanks again!
#4
Solved: 8 Years, 10 Months, 1 Week ago
Thanks. Wink
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)