News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Hide non-post based groups titles

Started by KaienSP, March 29, 2013, 12:16:10 PM

Previous topic - Next topic

KaienSP

Greetings! I'm trying to hide the titles of non-post based groups like admin. Searching on this forums I found some fixes, but all need to edit the display.template.php file, and my theme (orangeline 2.0) does not have that file. Someone can help me? Thanks.



My forum: hxxp:asturfighters.es/foro/ [nonactive]
My theme: http://custom.simplemachines.org/themes/index.php?lemma=600

TheListener

Another but more difficult way is by not leaving the titles in the list.

By this future additions etc would be more difficult however.

KaienSP

The problem is that this group is assigned by request, so if I leave the title blank, it will also appear blank in the group list, right?

TheListener

Quote from: KaienSP on March 29, 2013, 12:22:54 PM
so if I leave the title blank, it will also appear blank in the group list, right?

Correct however it would depend on what the image used for the group is.


Chalky

If the file doesn´t exist in your custom theme, you need to edit the file in the default theme (Themes/default/.....)

kat

Admin

Current theme

Hide post group titles for grouped members:
Enabling this will not display a members post group title on the message view if they are assigned to a non-post based group.


Is that not what you want? Or, is it the reverse of that?

Kindred

he apparently wants to HIDE the titles for any group that has a badge  and only display the badge.


Can be done, but it would require a little mucking around in Display.template.php
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kat

Ah, right.

Maybe it's odd that SMF offers the one option, yet not the other.

Maybe something worth considering for v2.1?

Sir Osis of Liver


In Themes/default/Display.template.php comment out (or delete) these lines -



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



Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

Do note...   That removes ALL the group names... Not just a specific one.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver


Yes.  It could be tweaked to remove titles of specific groups, but would need more info.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

And herein lies the problem: if the user doesn't have a regular group, the post count is substituted in anyway. Now, $user_profile[$message['member']['id']] might, if you're lucky contain separate id_group and id_post_group indexes, in which case you would remove the title if !empty($user_profile[$message['member']['id']]['id_group']) but I don't remember if that's included, or indeed if it is included in some other way.

Sir Osis of Liver


You can do what the OP asked with Hide post group titles for grouped members, but it doesn't hide Admins or Mods (iirc), which the edit does.  Should still display post count groups.  Question would have to be more specific to do more than that.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

No, what the OP is asking for is actually the opposite of what that option in the ACP is for - that hides the *post group* title. Not the *main group* title.

On this forum, for example, it would hide the Beta Tester title from your name, not the SMF Hero title.

Sir Osis of Liver


But the example given is 'admin', which is the primary group, isn't it?  I don't use post count groups on my forums, so I only see the primary group titles, and that's what the edit removes.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

no... the example given above has the text for "Astur Fighters" being removed, while the badge for "Astur Fighters" remains.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

It might be the primary group. It might actually not be the primary group, but it probably is.

As for post count groups, you have them. SMF cannot function without at least one post count group (and will brick itself very quickly if you try it)

Sir Osis of Liver


Hide post group titles for grouped members:
Enabling this will not display a member's post group title on the message view if they are assigned to a non-post based group.


Ok, I see your point.  So there is no ACP option to hide primary group titles.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Quote from: Arantor on March 29, 2013, 11:04:06 PM
SMF cannot function without at least one post count group (and will brick itself very quickly if you try it)

You can delete all the post count groups except the first one (it won't let you), and remove the title from the first one so it doesn't show anywhere.  You'd have to hack the code (or mess with the db) to remove the first one and trash the forum, so it's reasonably idiot-proof.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Quote from: Kindred on March 29, 2013, 11:03:31 PM
no... the example given above has the text for "Astur Fighters" being removed, while the badge for "Astur Fighters" remains.

Actually, it's both.  Guess it's up to the OP if any of this solves the problem.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: