Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: MarcusJ on March 26, 2010, 07:00:48 PM

Title: Hide Membergroup Titles v1.0
Post by: MarcusJ on March 26, 2010, 07:00:48 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=2485)

This mod removes the Member Group title below the user name on topic view.  This is useful on forums when you use member group stars/icons that contain the membergroup title or description in them.  In which case the text above the star/icon become redundant.

To enable/disable: Configuration > Modification Settings > Miscellaneous > Display Membergroup Titles on Posts
Title: Re: Hide Membergroup Titles v1.0
Post by: Yahmez on March 27, 2010, 04:31:57 PM
Awesome! I have seen this requested many times. Thanks
Title: Re: Hide Membergroup Titles v1.0
Post by: Sakae on March 27, 2010, 07:14:06 PM
Does not work on SMF 2.0 RC2?

I installed fine on mine, but it just keep displaying the titles.
Title: Re: Hide Membergroup Titles v1.0
Post by: Ataru Moroboshi on March 27, 2010, 07:21:10 PM
wonderful! were you reading my mind?
Title: Re: Hide Membergroup Titles v1.0
Post by: TheListener on March 28, 2010, 04:46:23 PM
This may answer my current problems too.

HOWEVER

Does it affect the membergroups in the Users online?

How would it affect the postcount groups?

Edit:

Postcount Groups are NOT affected. Nor is the membergroup list in Users Online.
Title: Re: Hide Membergroup Titles v1.0
Post by: MarcusJ on March 28, 2010, 05:55:23 PM
Quote from: Sakae on March 27, 2010, 07:14:06 PM
Does not work on SMF 2.0 RC2?

This small mod was written for and tested only on RC3.  Sorry.

Quote from: Brack1 on March 28, 2010, 04:46:23 PM

How would it affect the postcount groups?

Edit:

Postcount Groups are NOT affected. Nor is the membergroup list in Users Online.

I didn't think about hiding the title for post count based groups.  I also see that the group title is displayed when viewing private messages.

I am brand new to this sort of thing.  I'll see about getting these features added to a future version.   :)
Title: Re: Hide Membergroup Titles v1.0
Post by: TheListener on March 28, 2010, 05:57:49 PM
Hey bud

The mod is a good one believe me.

I asked about the post counts because I still want them to show.

Good job.
Title: Re: Hide Membergroup Titles v1.0
Post by: TheListener on March 30, 2010, 05:16:31 PM
Hey guys.

Is there anyway this can be extended to a persons pm?

Title: Re: Hide Membergroup Titles v1.0
Post by: MarcusJ on March 30, 2010, 08:21:40 PM
Quote from: Brack1 on March 30, 2010, 05:16:31 PM
Hey guys.

Is there anyway this can be extended to a persons pm?

Yes I would like to extend the functionality.  I know Labradoodle has a few things he is working on currently.  I haven't had any time to study up and do it on my own.  But I would like to include that in the next release.  Perhaps not until SMF goes gold however.
Title: Re: Hide Membergroup Titles v1.0
Post by: GoldieFR on May 13, 2010, 09:46:40 AM
Exactly what I was looking for !
Nice mod :)
thanks :)
Title: Re: Hide Membergroup Titles v1.0
Post by: Afro on May 16, 2010, 12:04:04 PM
congrats, good mod.
easy way without using mod is to go to display template.php of your theme and remove this code.

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



my reasons is that if we keep installing all the mods we like/need.
we will have over 100 mods in a few weeks and thats bad news for forum perfomance.
Title: Re: Hide Membergroup Titles v1.0
Post by: improv on July 31, 2010, 08:58:46 AM
Easy and simple, thanks.
Title: Re: Hide Membergroup Titles v1.0
Post by: OnlineFunCorner on October 21, 2010, 03:37:52 AM
Thanks
I Really Need That
Now I Can Use Administrator Image/Badge Instead Of Text "Administrator"
Same For Other Regular Groups
Again Thanks
Title: Re: Hide Membergroup Titles v1.0
Post by: npiccoli on July 12, 2011, 05:35:26 PM
Could you update this so it will work with SMF 2.0 Gold?
Title: Re: Hide Membergroup Titles v1.0
Post by: npiccoli on July 12, 2011, 06:13:59 PM
Quote from: rica.carv on July 12, 2011, 06:07:01 PM
Well, i've been working on this today, and come up with a modification to an existing mod that does this and a few more, in v2.0....

Have a look....

It gave me a lot of errors before installation, it doesn't seem to like my theme very much. I would rather just use the mod on this thread.
Title: Re: Hide Membergroup Titles v1.0
Post by: rica.carv on July 13, 2011, 05:00:49 AM
Quote from: npiccoli on July 12, 2011, 06:13:59 PM
Quote from: rica.carv on July 12, 2011, 06:07:01 PM
Well, i've been working on this today, and come up with a modification to an existing mod that does this and a few more, in v2.0....

Have a look....

It gave me a lot of errors before installation, it doesn't seem to like my theme very much. I would rather just use the mod on this thread.

It currently only works on the default SMF standard theme.....
Even the original mod it's based also works only with the default theme....
Maybe if i can see your theme, i can change it to work with it....
Title: Re: Hide Membergroup Titles v1.0
Post by: npiccoli on July 13, 2011, 01:07:48 PM
Quote from: rica.carv on July 13, 2011, 05:00:49 AM
Quote from: npiccoli on July 12, 2011, 06:13:59 PM
Quote from: rica.carv on July 12, 2011, 06:07:01 PM
Well, i've been working on this today, and come up with a modification to an existing mod that does this and a few more, in v2.0....

Have a look....

It gave me a lot of errors before installation, it doesn't seem to like my theme very much. I would rather just use the mod on this thread.

It currently only works on the default SMF standard theme.....
Even the original mod it's based also works only with the default theme....
Maybe if i can see your theme, i can change it to work with it....

Sure. I'm using laGusta from Dzinerstudio.

EDIT: I was able to follow the manual installation instructions for SMF RC3 to get this working with SMF 2.0. I would recommend that if people would like to install this mod that they should simply follow the manual installation instructions.
Title: Re: Hide Membergroup Titles v1.0
Post by: Xarkurai on July 17, 2011, 04:16:21 PM
Works for me through emulating 2.0 RC3.
Title: Re: Hide Membergroup Titles v1.0
Post by: The Wizard on January 22, 2012, 01:26:43 PM
Hello:

These are my notes on how to make this mod with with 1.1.16. Feel free to make a mod of this or update the existing one. Just don't forget to give me credit.


./Sources/ModSettings.php

Find:

Quotefunction ModifyBasicSettings()
{
   global $txt, $scripturl, $context, $settings, $sc, $modSettings;

   $config_vars = array(

After Add:

Quote// Hide Membergroup
         array('check', 'enable_membergroup_display'),

./Themes/default/Display.template.php

Find:

Quote// Show the member's primary group (like 'Administrator') if they have one.
      if (isset($message['member']['group']) && $message['member']['group'] != '')

Replace with:

Quote// Show the member's primary group (like 'Administrator') if they have one.
      if (!empty($modSettings['enable_membergroup_display']) && (!empty($message['member']['group'])))

./Themes/default/languages/Modifications.english.php

Find:
Quote?>

Add Before:

Quote// MarcusJ's Hide Membergroup Titles Mod.
$txt['enable_membergroup_display'] = 'Display Membergroup Titles on Posts';

Notes: In the 1.1.16 control panel this option is found here -
Admin > Configuration> Features and Options > Under the Basic Features

When I installed my code the option was set to hide already. Just go into the control panel and check to box and save. This should make the membergroups show up again.

Enjoy

This is posted as is no support as I'm just a poor coder and not good enough to give support or make a mod.


Title: Re: Hide Membergroup Titles v1.0
Post by: rolltidega on August 13, 2012, 07:00:44 PM
Is there an ETA for updating the MOD to hide the groups from PM's as well?
Title: Re: Hide Membergroup Titles v1.0
Post by: OnlineFunCorner on March 01, 2013, 03:18:43 AM
how to removed post based group tiltles from posts, profile, messages as well ????
Title: Re: Hide Membergroup Titles v1.0
Post by: Sakurachan on March 02, 2013, 02:41:33 PM
This is the best MOD too. :)
Title: Re: Hide Membergroup Titles v1.0
Post by: DeroZ on July 06, 2013, 08:03:46 PM
Quote from: OnlineFunCorner on March 01, 2013, 03:18:43 AM
how to removed post based group tiltles from posts, profile, messages as well ????

same question, and how i can hide membergroup titles in personal messages?
Title: Re: Hide Membergroup Titles v1.0
Post by: Neo_TE on July 07, 2013, 05:44:57 AM
Quote from: Snoopix on July 06, 2013, 08:03:46 PM
same question, and how i can hide membergroup titles in personal messages?

Go to /Themes/default/PersonalMessage.template.php



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



Replace:


/*// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
<li class="membergroup">', $message['member']['group'], '</li>';*/
Title: Re: Hide Membergroup Titles v1.0
Post by: klra on June 13, 2014, 05:56:42 PM
Any chance of this getting updated for 2.0.7?

Thanks!