Not Solved [How To?] (header) top panel username isn't getting group colour
#1
Not Solved
{$mybb->user['username']}
I've got this in my top panel on my header but it isn't grabbing the primary group colour like the rest of the forum is. I've tried putting {$formattedname} in it's place but nothing shows up.

I'm using this plugin - https://mods.mybb.com/view/style-usernames

It's probably a really simple fix but I don't know the correct variable to replace it with so the coloured name appears.
Reply
#2
Not Solved
(2016-10-27, 11:37 AM)DarkMatter66 Wrote:
{$mybb->user['username']}
I've got this in my top panel on my header but it isn't grabbing the primary group colour like the rest of the forum is. I've tried putting {$formattedname} in it's place but nothing shows up.

I'm using this plugin - https://mods.mybb.com/view/style-usernames

It's probably a really simple fix but I don't know the correct variable to replace it with so the coloured name appears.

I am not familiar with that plugin as I have never used it but, have you tried {$username}
Reply
#3
Not Solved
(2016-10-27, 12:08 PM)vintagedaddyo Wrote:
(2016-10-27, 11:37 AM)DarkMatter66 Wrote:
{$mybb->user['username']}
I've got this in my top panel on my header but it isn't grabbing the primary group colour like the rest of the forum is. I've tried putting {$formattedname} in it's place but nothing shows up.

I'm using this plugin - https://mods.mybb.com/view/style-usernames

It's probably a really simple fix but I don't know the correct variable to replace it with so the coloured name appears.

I am not familiar with that plugin as I have never used it but, have you tried {$username}

Yes I have. Nothing shows up when I put it in. No username, coloured or not.
Reply
#4
Not Solved
That plugin is for 1.6 not 1.8. I found this that might be similar and is made for 1.8: https://community.mybb.com/mods.php?action=view&pid=368
Reply
#5
Not Solved
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);
Reply
#6
Not Solved
(2016-10-27, 12:30 PM)dragonexpert Wrote: That plugin is for 1.6 not 1.8. I found this that might be similar and is made for 1.8: https://community.mybb.com/mods.php?action=view&pid=368

Upgraded it to 1.8 - https://github.com/lukasamd/MyBB-Style_U...ngelog.txt Author updated it to 1.8 a few months ago so I just updated it.

(2016-10-27, 01:41 PM)vintagedaddyo Wrote: 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);

Added but it didn't seem to work. Username is still white.
Reply
#7
Not Solved
(2016-10-27, 02:25 PM)DarkMatter66 Wrote:
(2016-10-27, 12:30 PM)dragonexpert Wrote: That plugin is for 1.6 not 1.8.  I found this that might be similar and is made for 1.8: https://community.mybb.com/mods.php?action=view&pid=368

Upgraded it to 1.8 - https://github.com/lukasamd/MyBB-Style_U...ngelog.txt Author updated it to 1.8 a few months ago so I just updated it.

(2016-10-27, 01:41 PM)vintagedaddyo Wrote: 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);

Added but it didn't seem to work. Username is still white.
Default welcomeblock message result:
* using the 1.6 plugin and global.php edit. ** only change I made in plugin was 18* for compat and changed administrator group from green to orange as you see in the mobile screen capture.
[Image: iw6806.png]
Reply
#8
Not Solved
(2016-10-27, 02:28 PM)vintagedaddyo Wrote:
(2016-10-27, 02:25 PM)DarkMatter66 Wrote:
(2016-10-27, 12:30 PM)dragonexpert Wrote: That plugin is for 1.6 not 1.8.  I found this that might be similar and is made for 1.8: https://community.mybb.com/mods.php?action=view&pid=368

Upgraded it to 1.8 - https://github.com/lukasamd/MyBB-Style_U...ngelog.txt Author updated it to 1.8 a few months ago so I just updated it.

(2016-10-27, 01:41 PM)vintagedaddyo Wrote: 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);

Added but it didn't seem to work. Username is still white.
Default welcomeblock message result:
* using the 1.6 plugin and global.php edit.
[Image: iw6806.png]

Ah, I'm not using the default one.

What templates would you like me to copy & paste to the forums?
Reply
#9
Not Solved
(2016-10-27, 02:52 PM)DarkMatter66 Wrote:
(2016-10-27, 02:28 PM)vintagedaddyo Wrote:
(2016-10-27, 02:25 PM)DarkMatter66 Wrote:
(2016-10-27, 12:30 PM)dragonexpert Wrote: That plugin is for 1.6 not 1.8.  I found this that might be similar and is made for 1.8: https://community.mybb.com/mods.php?action=view&pid=368

Upgraded it to 1.8 - https://github.com/lukasamd/MyBB-Style_U...ngelog.txt Author updated it to 1.8 a few months ago so I just updated it.

(2016-10-27, 01:41 PM)vintagedaddyo Wrote: 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);

Added but it didn't seem to work. Username is still white.
Default welcomeblock message result:
* using the 1.6 plugin and global.php edit.
[Image: iw6806.png]

Ah, I'm not using the default one.

What templates would you like me to copy & paste to the forums?

In theory the theme should not matter unless the welcome messages are changed or there is css override in the style.

Make sure your header has this
   {$welcomeblock}

Make sure your header_welcomeblock_guest has this:
             <span class="welcome">{$lang->welcome_guest} <a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }); return false;" class="login">{$lang->welcome_login}</a> <a href="{$mybb->settings['bburl']}/member.php?action=register" class="register">{$lang->welcome_register}</a></span>

Make sure your  header_welcomeblock_member
<span class="welcome">{$lang->welcome_back} <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}" class="logout">{$lang->welcome_logout}</a></span>
Note: * I am  currently on the side of the road via cellphone trying to give you support so due to that fact there is only so much I can do for you, but I just did this on my localhost on android and it worked fine.

(2016-10-27, 04:15 PM)vintagedaddyo Wrote:
(2016-10-27, 02:52 PM)DarkMatter66 Wrote:
(2016-10-27, 02:28 PM)vintagedaddyo Wrote:
(2016-10-27, 02:25 PM)DarkMatter66 Wrote:
(2016-10-27, 12:30 PM)dragonexpert Wrote: That plugin is for 1.6 not 1.8.  I found this that might be similar and is made for 1.8: https://community.mybb.com/mods.php?action=view&pid=368

Upgraded it to 1.8 - https://github.com/lukasamd/MyBB-Style_U...ngelog.txt Author updated it to 1.8 a few months ago so I just updated it.

(2016-10-27, 01:41 PM)vintagedaddyo Wrote: 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);

Added but it didn't seem to work. Username is still white.
Default welcomeblock message result:
* using the 1.6 plugin and global.php edit.
[Image: iw6806.png]

Ah, I'm not using the default one.

What templates would you like me to copy & paste to the forums?

In theory the theme should not matter unless the welcome messages are changed or there is css override in the style.

Make sure your header has this
   {$welcomeblock}

Make sure your header_welcomeblock_guest has this:
             <span class="welcome">{$lang->welcome_guest} <a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }); return false;" class="login">{$lang->welcome_login}</a> <a href="{$mybb->settings['bburl']}/member.php?action=register" class="register">{$lang->welcome_register}</a></span>

Make sure your  header_welcomeblock_member
<span class="welcome">{$lang->welcome_back} <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}" class="logout">{$lang->welcome_logout}</a></span>
Note: * I am  currently on the side of the road via cellphone trying to give you support so due to that fact there is only so much I can do for you, but I just did this on my localhost on android and it worked fine.

Just tried it on my laptop with the 1.8 version you listed https://github.com/lukasamd/MyBB-Style_U...ngelog.txt of the plugin and it ALSO worked..., as did the 1.6 version https://mods.mybb.com/view/style-usernames in several different themes I might add Smile

Example:

[Image: our0gj.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)