[HowTO] Group titles, just images (stars) no group titles in text.

Started by steviss, November 16, 2010, 08:47:18 PM

Previous topic - Next topic

steviss

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!

kadhafi


N i g h t m a r e

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)

GraphicJunki


Neo_TE

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>';*/

Branko.

Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

Burke ♞ Knight

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.

Branko.

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
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

Advertisement: