Jump to content

SOLVED: Making the "Author"/"Management" etc badges appear


Recommended Posts

EDIT: solution part 1 | Solution part 2.

One of the nicer things I wanted to implement in our community are the badges the appear at the top of posts made by "noteworthy" individuals, like management team members, topic authors and members of distinct user groups (like in the screenshots):

image.thumb.png.a4ad4d60249864708bddd757e7373018.png
image.thumb.png.689088c48dcf998d91b07356163abc6e.png

 

But for some reason (we all know "I'm dumb" is a possible reason. I'm just saying what everyone is thinking) I can't find where to enable this feature. 
Anyone can point me in there right direction?

Thanks.

Edited by Pavel Chernitsky
Link to comment
Share on other sites

Nope, Stock theme, only edited through the back-end editor (fonts/colors and such). no css edits and no custom theme installed. 
And the tags don't appear. I did edit a random member for something else (made his name inherit the group color using a plugin) and it made the tag appear. I DID NOT enable anything related or resembling a "enable tags" or anything. Weird... 

Link to comment
Share on other sites

1 hour ago, Pavel Chernitsky said:

Nope, Stock theme, only edited through the back-end editor (fonts/colors and such). no css edits and no custom theme installed. 
And the tags don't appear. I did edit a random member for something else (made his name inherit the group color using a plugin) and it made the tag appear. I DID NOT enable anything related or resembling a "enable tags" or anything. Weird... 

Could you have made changes in the past to the default theme?

Link to comment
Share on other sites

2 minutes ago, Pavel Chernitsky said:

I have, but as I said, I deleted it and made a new one without any major edits.

If the changes have been applied to the parent skin, I believe it's carried down. You might want to revert any templates which might have been altered in the parent skin.

My site was missing the mobile navigation due to edits applied to the parent skin within the globalTemplate file.

Link to comment
Share on other sites

There's a lot of misinformation in this topic, or maybe people simply misunderstand the question?

@Pavel Chernitsky: The badges you've marked with a red square in your first post is a feature called "Highlight replies", and you can enable or disable this per group under Groups > [Group] > Content. Enabling this feature for a group will highlight posts made by members of this group with a border defined in your theme, and add a small badge in the upper right corner displaying the name of the group.

The background and border color of the badge is defined by the Highlighted Post Background and Highlighted Post Border colors of your theme. To change the border color added to the post itself, you'll have to edit the theme and overwrite the --ipsComment_highlighted—boxShadow variable.

The author badge is something different, and will be shown regardless of the setting mentioned above.

Screenshot 2020-09-12 at 21.32.43.png

Screenshot 2020-09-12 at 21.41.35.png

Edited by Runar
Formatting
Link to comment
Share on other sites

@Davyc I don't think the things you pointed too are what I'm looking for, The group icon was present before the update, and the ranks are a different thing entirely, they are based on content count. 

@Runar Those also aren't highlighted posts. Matt's post is highlighted, yes, but that's not what I'm looking for, unless someone can confirm we can only get the badges on highlighted posts, which is pretty limiting. I don't want mod posts to be highlighted, it's too much of an attention grabber. I just want the badge (similar to the the "Author" badge on the first screenshot in the first post). If there is no way to make it happen it'll be pretty sucky. 

Link to comment
Share on other sites

47 minutes ago, Pavel Chernitsky said:

@Davyc I don't think the things you pointed too are what I'm looking for, The group icon was present before the update, and the ranks are a different thing entirely, they are based on content count. 

My bad, I didn't see the highlighted oblongs in your first post on the images.  Looking in the CSS these appear under the term authorBadge:

.ipsComment .ipsComment_authorBadge {
    --badge--color: rgb( var(--theme-mentions) );
}

If you notice in Matt's clip his group name is the same as the author Badge, so perhaps they are connected somehow 🙂

 

Link to comment
Share on other sites

1 hour ago, Pavel Chernitsky said:

@Runar Those also aren't highlighted posts. Matt's post is highlighted, yes, but that's not what I'm looking for, unless someone can confirm we can only get the badges on highlighted posts, which is pretty limiting. I don't want mod posts to be highlighted, it's too much of an attention grabber. I just want the badge (similar to the the "Author" badge on the first screenshot in the first post). If there is no way to make it happen it'll be pretty sucky. 

So, if I understand you correctly, you want to add custom badges to posts? What kind of badges would you like to add?

To add custom badges this you'll have to edit the theme, as there are no settings (as far as I know) you can enable to achieve this. The only badge-related setting available is the "Highlight replies" I mentioned. Edit the theme, then find the template file post in the following location: forums > front > topics > post, and near the top of the file you'll see the following code:

{{if ! $comment->isFirst() and $comment->author()->member_id AND $comment->author()->member_id == $item->author()->member_id}}
	<li><strong class="ipsBadge ipsBadge_large ipsComment_authorBadge">{lang="author"}</strong></li>
{{endif}}
{{if $comment->author()->hasHighlightedReplies()}}
	<li><strong class='ipsBadge ipsBadge_large ipsBadge_highlightedGroup'>{expression="\IPS\Member\Group::load( $comment->author()->member_group_id )->name" raw="true"}</strong></li>
{{endif}}
{{if ( $comment->item()->isSolved() and $comment->item()->mapped('solved_comment_id') == $comment->pid )}}
	<li><strong class='ipsBadge ipsBadge_large ipsBadge_positive ipsBadge_reverse'><i class='fa fa-check'></i> {lang="this_is_a_solved_post"}</strong></li>
{{endif}}
{{if $comment->isFeatured()}}
	<li><strong class='ipsBadge ipsBadge_large ipsBadge_popular'>{lang="this_is_a_featured_post"}</strong></li>
{{endif}}
{{if ( settings.reputation_enabled and settings.reputation_highlight and $comment->reactionCount() >= settings.reputation_highlight ) }}
	<li><strong class='ipsBadge ipsBadge_large ipsBadge_popular'>{lang="this_is_a_popular_post"}</strong></li>
{{endif}}

This code generates the built-in badges, such as the Author or group badges. Use these as a starting point, or give me an example of a badge you'd like to add and I'll give you a few lines of code.

 

30 minutes ago, Davyc said:

If you notice in Matt's clip his group name is the same as the author Badge, so perhaps they are connected somehow 🙂

Indeed they are connected. If you enable the group setting "Highlight replies", posts by members of this group will be given a badge with the name of the group.

Edited by Runar
Link to comment
Share on other sites

Thanks a lot for the help. I re-read the blog post about the feature and I can now see the badge and highlight really are connected. Since I have zero coding knowledge, I don't want to get into trying (and probably failing) to edit the CSS, so I'll just ask my mods whether they want both or none. 

Thanks again, everyone.

Link to comment
Share on other sites

I wouldn't want to bother you, but I won't lie, that could be awesome 😄 
If you could make a plugin or something that just adds a "show badge" toggle for the mods/admins in the moderators ACP section (I guess it's makes the most sense under the "General" tab), or if you want to go even further, in each user group (I think it's not needed, it could make it have wider appeal), that'd be awesome. I'd be willing to pay a few bucks for something like that.  

Edited by Pavel Chernitsky
Link to comment
Share on other sites

I'm not sure I understand what you're looking for, but it sounds like the ability to add an extra text title? Above the avatar/photo. 

We used to insert these for individual members at their request, from the ACP.  Members can do it if allowed by Admin by setting a minimum post value. We left our's at 0 so only Admin would be changing them to prevent pranksters.

Selection_010.png.94ffdc2ed1c1288e24e2d239de3c3711.pngSelection_009.png.39392cc3861f13db7e71c9f04fc6d5f0.png

That option is found in the Ranks Area of the ACP. The member (if you allow them to) is found in the member's profile.

Selection_011.thumb.png.7cd75a259f9e630ba93647453691c96d.png

Link to comment
Share on other sites

5 hours ago, Davyc said:

There is an addon in the marketplace that 'may' be what you're looking for:

Not sure if it's what you want or need, but give it a once over and see if it fits your needs 🙂

 

Thanks, I've seen this plugin before, but I don't like the way it looks. Especially now with the "Author" badge that does work.

Link to comment
Share on other sites

5 hours ago, Pavel Chernitsky said:

I wouldn't want to bother you, but I won't lie, that could be awesome 😄 
If you could make a plugin or something that just adds a "show badge" toggle for the mods/admins in the moderators ACP section (I guess it's makes the most sense under the "General" tab), or if you want to go even further, in each user group (I think it's not needed, it could make it have wider appeal), that'd be awesome. I'd be willing to pay a few bucks for something like that.  

It wouldn’t bother me at all!

I’ll send you a message in a bit. It sounds useful and I’m sure we can work something out.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...