MyBB Community Forums

Full Version: How do I link this
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Where it says "Welcome Back XXXX", the name does not link to the user's profile. How can I fix this?
What is the link to your forum?

It is set in the global.php file.

Circa line 350:

$lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($mybb->user['username'], $mybb->user['uid']), $lastvisit);

The build_profile_link makes it a link, so post the contents of your header_welcomeblock_member template.
The link to my forum is profitplayers.net.

I'm still confused as to what I put in the global.php file though. Do I just copy and paste my entire header_welcomeblock_member template?

Could you elaborate a bit more?
Sorry, I wasn't too clear on that.

I don't think you have edited your global.php, but you may want to upload a fresh copy.

Put the contents of your entire header_welcomeblock_member into code tags on this forum for me to see.
Here try this:
Welcome Back, <a href={$mybb->settings['bburl']}/member.php?action=profile&uid={$mybb->user['uid']}>{$mybb->user['username']}</a>
Use this code in templates (Admin Control Panel -> Templates & Style -> Templates -> YOUR_TEMPLATE -> Header Templates -> header_welcomeblock_member)
That is my header_welcomeblock_ member template.


@Jordan. Now where do I paste that? What do I paste it over?
Replace it with this:

<span style="float:right;">{$lang->welcome_current_time}</span>
        Welcome back, <strong>{$lang->welcome_back}</strong>&nbsp;(<a href="{$mybb->settings['bburl']}/usercp.php"><strong>{$lang->welcome_usercp}</strong></a>{$modcplink}{$admincplink} &ndash; <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a>)<br />
                <span class="links">
                    <a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup', 'buddyList', 350, 350);">{$lang->welcome_open_buddy_list}</a>
                </span>
<span class="panellink">
<a href="search.php?action=finduser&uid={$mybb->user['uid']}">View my posts</a> <a href="search.php?action=finduserthreads&uid={$mybb->user['uid']}">View my threads</a>
<a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a>  <a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a>  <a class="pm-count" href="{$mybb->settings['bburl']}/private.php" title="{$lang->welcome_pms_usage}">{$lang->welcome_pms}</a>
</span>

That should allow the username to be clickable. It will link to the user's profile page.
Worked perfectly. THanks!