Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Owdy on March 14, 2004, 05:34:02 PM

Title: Post groups and admins
Post by: Owdy on March 14, 2004, 05:34:02 PM
In display.php , how i change code so if user are admin, their posts wont show post group. Is this make any sense? I mean in admins messages arent show their post goups like"newbie". So admins show post group free :)


I belive code is this:

// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
echo '
', $message['member']['post_group'], '<br />
', $message['member']['group_stars'], '<br />';

But how do i change that?
Title: Re: Post groups and admins
Post by: [Unknown] on March 14, 2004, 05:36:28 PM
Replace that with:

// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
if (empty($message['member']['group']))
echo '
', $message['member']['post_group'], '<br />';
echo '
', $message['member']['group_stars'], '<br />';



And members who are in a group will not show a post group.

-[Unknown]
Title: Re: Post groups and admins
Post by: pulpitfire on March 14, 2004, 05:40:44 PM
i think that's your Display.template.php, instead of Display.php, right?

not exactly sure, but might try something like changing this:

if (!$message['member']['is_guest'])

to

if ((!$message['member']['is_guest']) && if (!$message['member']['is_admin']))

edit: was still working on this while UK posted :)
Title: Re: Post groups and admins
Post by: Owdy on March 14, 2004, 05:53:45 PM
Thanks! This was asked in Finnish support area :)