MyBB Community Forums

Full Version: Add link to User Profile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Guys how can I add a link to user profile?
I have this code:
<a href='member.php?action=profile&uid={$thread['uid']}'></a>

I want code that will return something like this:
user-73521.html
or
User-marcus123
where you want to add such link and for whom ? profile links already exist along with the posts !
Replace your code with this:
<?=build_profile_link($thread['username'], $thread['uid'])?>
It works only with enabled Template Conditionals and .txt file which contains allowed functions. It will show the thread's author profile link if that's what you want.
I am talking about his conditional.
if(!$thread['avatar']) {
     $thread_avatar = "<a href='member.php?action=profile&uid={$thread['uid']}'><img src='images/default_avatar.gif' alt='' title='{$thread['username']}' /></a>";
     }
if(!$thread['avatar']) {
     $thread_avatar = build_profile_link('<img src="images/default_avatar.gif" alt="'. $thread['username'] .'" title="'. $thread['username'] .'" />', $thread['uid']);
}
@Destroy666 my love thanks very much you are my hero really dude you are awesome thanks very much I very appreciate time you spend crunching this question.
where to add this code?
(2013-11-20, 11:51 AM)$kull Wrote: [ -> ]where to add this code?

Here replace the link to user profile with the one Destroy666 posted
//avatar
     if(!$thread['avatar']) {
     $thread_avatar = "<a href='member.php?action=profile&uid={$thread['uid']}'><img src='images/default_avatar.gif' alt='' title='{$thread['username']}' /></a>";
     }
     else
     {
     $thread_avatar = "<a href='member.php?action=profile&uid={$thread['uid']}'><img src='{$thread['avatar']}' alt='' title='{$thread['username']}' /></a>";
     }