Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: steviss on November 16, 2010, 08:47:18 PM

Title: [HowTO] Group titles, just images (stars) no group titles in text.
Post by: steviss on November 16, 2010, 08:47:18 PM
Since I haven't found an explanation for 2.x forums, after looking at the code, I figured it out. So to spare good people the time posting and waiting for an answer I'll just post one here!

U just need to modify your Display.template.php (an easy "fix" a newbie can do it), open the mentioned file and search for this:

// Show the member's primary group (like 'Administrator') if they have one.
if (!empty($message['member']['group']))
echo '
<li class="membergroup">', $message['member']['group'], '</li>';

(its found about line 240)

and remove the following from the selection:


<li class="membergroup">', $message['member']['group'], '</li>


until it basically looks like this:
// Show the member's primary group (like 'Administrator') if they have one.
if (!empty($message['member']['group']))
echo '';


And that's it!

For ones that don't know what does it do a picture (example1.png) is attached!
Title: Re: [HowTO] Group titles, just images (stars) no group titles in text.
Post by: kadhafi on December 12, 2010, 11:04:47 PM
how about adding 2 or more groups icons in post..?
Title: Re: [HowTO] Group titles, just images (stars) no group titles in text.
Post by: N i g h t m a r e on February 15, 2013, 12:33:38 PM
Thanks a lot! Ive been looking for something like this for ages! This worked perfectly!

Note:

The Display.template.php File is in your Default Theme folder (public_html/Themes/default)
Title: Re: [HowTO] Group titles, just images (stars) no group titles in text.
Post by: GraphicJunki on April 01, 2013, 02:02:37 PM
Thanks it worked for me first time round. 
Title: Re: [HowTO] Group titles, just images (stars) no group titles in text.
Post by: Neo_TE on June 27, 2013, 02:28:32 PM
Removing codes is not suggested. You can just comment them.

Before:

// Show the member's primary group (like 'Administrator') if they have one.
if (!empty($message['member']['group']))
echo '
<li class="membergroup">', $message['member']['group'], '</li>';


After:

// Show the member's primary group (like 'Administrator') if they have one.
/*if (!empty($message['member']['group']))
echo '
<li class="membergroup">', $message['member']['group'], '</li>';*/
Title: Re: [HowTO] Group titles, just images (stars) no group titles in text.
Post by: Branko. on June 27, 2013, 03:53:37 PM
Quote from: ♦PulsiveForums♦ on February 15, 2013, 12:33:38 PM
Thanks a lot! Ive been looking for something like this for ages! This worked perfectly!

Hide Membergroup Titles v1.0 by Labradoodle-360 (http://custom.simplemachines.org/mods/index.php?mod=2485) :laugh:  :laugh:
Title: Re: [HowTO] Group titles, just images (stars) no group titles in text.
Post by: Burke ♞ Knight on July 16, 2013, 11:38:07 PM
How can you get the Group Image to show in the Profile page?
I notice that it just shows the name, and no image.
I'd like to show the image there, and not the name.
Title: Re: [HowTO] Group titles, just images (stars) no group titles in text.
Post by: Branko. on July 22, 2013, 07:08:49 AM
Themes/default/Profile.template.php
Find:<span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4>
Replace With:<span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span>', $context['member']['group_stars'], '</h4>

... or use http://custom.simplemachines.org/mods/index.php?mod=386