MyBB Community Forums

Full Version: {$usergroup['title']} Variable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Since I'm using CSS ranks I'm using this code below for postbit & memberlist, I've tried to place it in member profile but seems not to work, any ideas how I can make the code below work in member profile please?

<div class="userbar userbar-{$usergroup['gid']}"> {$usergroup['title']}</div>
Try this.

<div class="userbar userbar-{$memprofile['usergroup']}"> {$usertitle}</div>
(2017-12-23, 01:02 AM)Klausen Wrote: [ -> ]Try this.

<div class="userbar userbar-{$memprofile['usergroup']}"> {$usertitle}</div>

Nope I need this just like my postbit and memberlist..
<div class="userbar userbar-{$usergroup['gid']}"> {$usergroup['title']}</div>
(2017-12-23, 01:07 AM)Livewire Wrote: [ -> ]
(2017-12-23, 01:02 AM)Klausen Wrote: [ -> ]Try this.

<div class="userbar userbar-{$memprofile['usergroup']}"> {$usertitle}</div>

Nope I need this just like my postbit and memberlist..
<div class="userbar userbar-{$usergroup['gid']}"> {$usergroup['title']}</div>

I don't understand. From what I gathered you provided a code that you're using on both your postbit and memberlist, and you'd like it to work on your profile as well. The code I just provided would do that, could you elaborate?
(2017-12-23, 01:18 AM)Klausen Wrote: [ -> ]
(2017-12-23, 01:07 AM)Livewire Wrote: [ -> ]
(2017-12-23, 01:02 AM)Klausen Wrote: [ -> ]Try this.

<div class="userbar userbar-{$memprofile['usergroup']}"> {$usertitle}</div>

Nope I need this just like my postbit and memberlist..
<div class="userbar userbar-{$usergroup['gid']}"> {$usergroup['title']}</div>

I don't understand. From what I gathered you provided a code that you're using on both your postbit and memberlist, and you'd like it to work on your profile as well. The code I just provided would do that, could you elaborate?

It doesn't use the right main group title like it does in postbit & memberlist for example Registered, Administrators, Moderators.

Instead your code just uses usergroup set default title which I don't want.

EDIT:
Fixed.

The right code was,
<div class="userbar userbar-{$memprofile['usergroup']}"> {$displaygroup['title']}</div>

Thank you for your help. Smile