MyBB Community Forums

Full Version: Formatted Username in Welcome Block
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
[Image: 5b64e339180162225e4ba13e85e2e4e9.png]

How can I do this in MyBB 1.6.9? I have seen it on 1.6.3 & 1.6.4 but the username wasn't clickable.

I hope it can be using templates.


Thanks.
and i want also how to make whose online list in index italic font and how to enable bots count like username i found here a plugins but too old.
I really hope someone can answer it.
{$formattedname}
Can you tell how to use this fully?
header_welcomeblock_guest template:

Replace
{$mybb->user['profilelink']}
with
{$formattedname}

If you want it to be clickable, then replace it with
<a href="{$mybb->settings['bburl']}/member.php?action=profile&uid={$mybb->user['uid']}">{$formattedname}</a>
instead.
<br />
<table class="tborder" cellpadding="2px" cellspacing="1px" border="0" width="100%" align="center">
<tr>
	<td class="alt1" width="100%">
<script type="text/javascript">
<!--
	lang.username = "{$lang->login_username}";
	lang.password = "{$lang->login_password}";
	lang.login = "{$lang->login}";
	lang.lost_password = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=lostpw\">{$lang->lost_password}<\/a>";
	lang.register_url = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=register\">{$lang->welcome_register}<\/a>";
	lang.remember_me = "{$lang->remember_me}";
// -->
</script>
			<table cellpadding="0" cellspacing="0" border="0">
			<tr valign="top">
				<td width="100%"><font size="1px"><span style="float: left;">
<font size="1px"><span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin(); return false;">{$lang->welcome_login}</a> &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>)</span></font>	</span></font></td>
			</tr>
			</table>

	<td class="alt2" nowrap="nowrap" style="padding:0px">
<table cellpadding="0" cellspacing="1px" border="0">
		<tr>			
<font size="1px">{$lang->welcome_current_time}</font>
&nbsp;</tr>
		</table>
</tr>
</table>

{$mybb->user['profilelink']} isn't there.
Why the heck am I messing up template names?

Its header_welcomeblock_member!
Open ./global.php
Find:
	// Format the welcome back message
	$lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($mybb->user['username'], $mybb->user['uid']), $lastvisit);
Replace With:
	// Format the welcome back message
	$welcome_back_user = format_name($mybb->user['username'], $mybb->user['usergroup'], $mybb->user['displaygroup']);
	$lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($welcome_back_user, $mybb->user['uid']), $lastvisit);


As the link is built in the global.php you can't change it by editing templates.
@ES: header_welcomeblock_member doesn't have the variable.

@Jordan: Is it clickable?
Pages: 1 2