Group Titles

Started by ColdXX, September 23, 2015, 03:58:18 PM

Previous topic - Next topic

ColdXX

Hello!
So to get straight to the point...i am trying to hide the non-post based group titles and post based group titles.
So i've go into display.template.php and edited 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>';

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


Ok,so far so good,the non-post based groups names are hidden and only the stars are showing,yet the post based groups names still showing up on regular members.
Then i googled again and i changed in the same Display.template.php this
echo '
                        <li class="postgroup">', $message['member']['post_group'], '</li>';

to this
/*echo '
                        <li class="postgroup">', $message['member']['post_group'], '</li>';*/


Now the name of the post based group is not showing anymore but the starts fom non-post based groups don't show anymore.

What the problem might be?

Sir Osis of Liver



// 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 '
<li class="postgroup">', $message['member']['post_group'], '</li>'; */
echo '
<li class="stars">', $message['member']['group_stars'], '</li>';


The if statement applies only to the first echo statement following it, not the second (note the indents).  If you remove the first echo statement, the conditional then applies to the second echo statement, and you lose the stars.  You have to remove the if statement and first echo statement.  That will lose the group title, but you'll always have the stars.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

ColdXX

Thank you for fixing my mess!

Advertisement: