Customizing SMF > SMF Coding Discussion
Help getting Users Group
NIAB:
Ah thanks, that gave me what I was looking for, just another issue though. How do I use it correctly?
--- Code: ---if($message['member']['group_id'] = 1){
echo '
<div class="editedposterdiv">';
}else
echo' <div class="normalposterdiv">';
};
--- End code ---
The code above changes the poster background-color, but if it seems to apply to all.
Suki:
You need to change just the avatar not the entire div, just change the avatar, the code I gave you before, just do a ternary or an if/else statement.
NIAB:
Figured out a nifty way to do it :)
--- Code: ---class="' , $message['member']['group_id'] == 1 ? 'class11' : 'class2' , '"
--- End code ---
Navigation
[0] Message Index
[*] Previous page
Go to full version