Post Badges

Thanks for updating in the future :slight_smile:

4 Likes

Many thanks for this great theme component :grinning:
We also use the Babble plugin on our site. Unfortunately, the badge icons show up there too, which makes quite a mess out of the chat. Any chance you could deactivate it for Babble?

Edit: I could hack it with this css, so at least the badge icons are a little more contained:

.poster-icon-container span.poster-icon img {
    height: 1em !important;
    width: 1em !important;
}
2 Likes

Iā€™m seeing an exception coming from this theme component.

Source: https://github.com/tshenry/discourse-post-badges/blob/master/common/head_tag.html#L26

4 Likes

Hmm, Iā€™m not immediately able to repro. Can you provide a little more context on how youā€™re triggering the error? Are you logged-in when you get the error? I assume the site is up to date? Is this a dev environment or production? Anything else thatā€™s noteworthy?

1 Like

This is actually on my site, Angus was trying to help out because this exception is causing a problem with his multilingual plugin. Iā€™m on 2.5.0.beta1, production environment with quite a few plugins and customizations. Iā€™m not sure what steps to take troubleshooting from here.

2 Likes

Thanks for the clarification :+1: It definitely gets tricky as you add more and more plugins and other customizations from various sources.

The implementation of this component is certainly not my favoriteā€¦ At the time of building it, I had to work around the limitations the best I knew how. Iā€™m crossing my fingers weā€™ll get something in place will allow for a much more robust solution, but Iā€™m not sure if/when that will be.

In the mean time, I wonā€™t be able to guarantee this component will ā€œplay niceā€ with other customizations. Your best luck would probably be hiring someone from the #marketplace to convert it into a plugin thatā€™s properly serializing the required badge information.

5 Likes

Sorry for being brief in my last message. You can repro it with no other customisations if you disable the basic badge and create a post with a new user. The code assumes that every user has at least one badge.

Hereā€™s a fix: https://github.com/tshenry/discourse-post-badges/pull/1

6 Likes

This is nice!

Would be great to have something like this in core or as an official plugin :+1:

4 Likes

Agreed! This is the most indispensable non-official plugin I have installed. We use it, along with titles, to denote special responsibilities in our group, for example ā€œLiaisonā€ and ā€œArea Leaderā€. Users really do care about having their bling prominently displayed.

image

image

5 Likes

Thanks for the PR @angus. It has been merged!

In other news, this component has been transferred into our official repository :tada:

@joffreyjaffeux will be taking care of the long-overdue refactor this component has needed. Expect some updates in the not-too-distant future :slight_smile:

13 Likes

Thatā€™s awesome!! Well done all :+1:

1 Like

Hi thank you very much for this awesome addon!

After adding Country Flags plugin we are having a spacing issue.

Is there css coding that could be used to correct this below


SOLVED!!

Using code example here was able to create a fix.

.nationalflag-post { width: 16px; margin-right: 3px }

Result

3 Likes

I was wondering though what is the post badge identifier to use to modify position and sizing?

1 Like

You are going to need a fairly specific selector for this one:

.topic-meta-data .names .poster-icon-container span.poster-icon {
    font-size: 16px;
    margin-right: 3px;
}

Friendly suggestion - I would look into how to use your web browserā€™s inspector to find the CSS selector required to style an element (hereā€™s a guide for Chrome for example).

4 Likes

Thank you very much. Have been using Firefox but recently a good friend reccommended switching to Chrome or Vivaldi as it has better inspect element.

3 Likes

This setting is not working when selected:

3 Likes

Doesnā€™t work for me, too.

4 Likes

I see where the issue is. Thanks for the reports. Iā€™ll try to get a fix in the next 24hrs.

Edit: it should be fixed now @tpetrov and @Anatolia. Let me know if you still have any issues.

7 Likes

There isnā€™t an update yet and still same.

Ah, I think I know what happened. We moved the repo over to the official Discourse GitHub organization, but the version of the component you installed is still pointing to the original repo. I believe there are supposed to be automatic redirects to ensure everything still works. Sometime after it was transferred, I created a fork which may have compromised the redirect.

I just deleted my fork. Can you try updating again to see if the redirect kicks back in? If that doesnā€™t work, I would recommend re-installing the component from the new repository link.

https://github.com/discourse/discourse-post-badges

6 Likes