News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Replace post groups with custom titles

Started by confuseamuse, July 04, 2017, 09:14:21 PM

Previous topic - Next topic

confuseamuse

I'm not sure this is a feature in SMF.

Instead of having separate lines for postgroup and custom titles, is there a mod that lets you toggle between them.

So if a user only has a post group, that is displayed. If they have a custom title, the post group is replaced by the custom title?

Kindred

You can hide post count groups for people who belong to other groups...

However, custom titles are not groups, therefore, they are treated completely differently and do not affect each other at all

For example, I am a member of the support specialist group...  my post count group is "SMF legend" and my custom title is "The Mean 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."

confuseamuse

Quote from: Kindred on July 04, 2017, 09:17:14 PM
You can hide post count groups for people who belong to other groups...

However, custom titles are not groups, therefore, they are treated completely differently and do not affect each other at all

I know that. However, I'd like to keep that area as minimalist as possible. Plus, I feel that the 'Personal Text' setting does the same thing. Custom titles replacing the post group section diversifies the author section a bit.

Kindred

So, disable post count groups?

And the difference between custom title and personal text is that one is setable by the user and the other is set by the admin
Сл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."

confuseamuse

Quote from: Kindred on July 04, 2017, 09:26:38 PM
So, disable post count groups?

And the difference between custom title and personal text is that one is setable by the user and the other is set by the admin

Wouldn't it be more accurate to say that it is set via permissions, as you can allow a user to edit their custom title?

Plus, I really like the disable post count groups feature for particular users (such as mods). However, I'd like to make particular users distinguishable from the post based groups, even if they aren't in a membergroup.

Arantor

Well, they will be in a membergroup - always, even if you don't make use of the post count groups stuff.

confuseamuse

Quote from: Arantor on July 05, 2017, 01:38:50 AM
Well, they will be in a membergroup - always, even if you don't make use of the post count groups stuff.

I meant if they aren't in the default membergroup (which I think is called 'Regular Members').

I'm not sure if this is in the right section anyway, as what I'm asking for is just a edit to the Display.template.php file. (If some other threads I've seen are to be believed.)

I wanted the hierarchy (for want of a better word) to go Custom Title > Membergroup > Post group, instead of having them all on separate lines.

Although, in my case, it would be karma group.

Arantor

Do you use per board moderators? This is a different thing on top again...

confuseamuse


Arantor

You can assign moderators to individual boards. In those boards they get a different badge and title...

confuseamuse

I don't think you understand what I'm talking about.

I'm trying to integrate the author section so that it is arranged in a particular way.

The idea is so that you only have three possible lines of text above the avatar.

*Username
*Whether the poster was the OP
*Member group OR Post group OR Custom Title

I've attached below the styling that I'm trying to describe. I desire something of this nature because of how minimalist it is.

Forgot to mention that thanks to a mod made by a generous soul, Custom Titles allow BBCode. This opens up the possibilities of what can be included in the author area. Hopefully, this promotes the idea better.

Arantor

I understand you just fine.

I'm just getting at the fact there is a different group title to the assigned group title in some cases and wanted to know if it was relevant (because it sure is for the code)

confuseamuse

Ah, so it seems that I haven't been understanding you the whole time.

What cases would change the group title? When a moderator isn't on a board they moderate?

Illori

if you are a moderator of a board, as defined in the board settings. your badge and group title will change to moderator in that board only. which has been explained to already in this topic.

confuseamuse

Quote from: Illori on July 05, 2017, 08:45:30 AM
if you are a moderator of a board, as defined in the board settings. your badge and group title will change to moderator in that board only. which has been explained to already in this topic.

I have no problems with this at all. I'd just like custom titles to have more importance than any of the member or post/karma groups.

Illori

so you dont want your users to be able to see who the moderators are when in the topic view of the user has posted in that topic?

that would bother me that i cant easily see who are moderators and who are not.

confuseamuse

Quote from: Illori on July 05, 2017, 09:07:33 AM
so you dont want your users to be able to see who the moderators are when in the topic view of the user has posted in that topic?

that would bother me that i cant easily see who are moderators and who are not.

That isn't a problem. Moderators are visible because the colour of their name differs from a standard user. I have mods that make users aware of the role of a member. This request is to make things neater.

confuseamuse

I know what I want now.

In the code I'm requesting, if a user has a custom title, it hides the membergroup only. I say this under the pretence that if I activate the 'Hide post group titles for grouped members' in Theme Settings, then the post group won't be displayed, thus meaning the post group doesn't have to be modified.

So my title should read, "Custom Titles to replace membergroups" instead.

confuseamuse

Ok, I worked out how to do this myself, so I'm going to mark this topic solved. For anyone that wanted to know how to do this, do as follows.

In Display.template.php:

Code (Find) Select

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

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


Code (Replace) Select

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

Kindred

Сл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."

Advertisement: