Customizing SMF > SMF Coding Discussion

Give regular members a fake badge (need help, I fail!)

(1/1)

Jade Elizabeth:
So as usual I have NO IDEA what I'm doing and I can't make this show for members who are just regular members...

I want the first one to work for normal members with groups, and the second to work for members who are just regular members or don't have an image for their group....I don't want to see post group images.



--- Code: --- // Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '<span class="posterpadding replies">' , $message['member']['group_stars'] , '</span><br />';
// Since we can't give them a badge and we don't want to use post group images..
elseif ($message['member']['group'] == '')
echo '<span class="posterpadding replies"><img src="' . $settings['images_url'] . '/badges/regular.png" alt="Regular Member" title="Regular Member" /></span><br />';

--- End code ---

Antechinus:

--- Code: --- // Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ($message['member']['group'] !== '')
echo '<span class="posterpadding replies">' , $message['member']['group_stars'] , '</span><br />';
// Since we can't give them a badge and we don't want to use post group images..
else
echo '<span class="posterpadding replies"><img src="' . $settings['images_url'] . '/badges/regular.png" alt="Regular Member" title="Regular Member" /></span><br />';

--- End code ---

Should work.

Jade Elizabeth:
Hmm no it's still showing the post group icon for members without a group.

Jade Elizabeth:
Wait nevermind I edited the wrong part of the file ha ha. Thank yooou!! :D <3


My brain isn't working lately XD.

Navigation

[0] Message Index

Go to full version