National Flags - Display user nationality in Discourse


(Diego Barreiro) #63

Yep, it’s fixed :+1:


(Neil) #64

Really great to see the improvements made here, everyone.
Really awesome!


(Dylan Hunt) #66

Click on mobile? Where is this again?


(Jeff Wong) #67

You’re close! Click Edit CSS/HTML, editing the mobile styling is one of the tabs in there.


(Jay Dawg) #68

Jeff Thanks for updating did you find it Dylan?


#69

Is it possible to use that plugin with other images except flags?

Solution: It is possible to edit flaglist.js.es6 file

{
      "name": "fo",
      "value": "fo.png"
    }

#70

How you can add string variables? What is the user-inputted location?

Solution: I forked plugin repo and customize for my purpose. It seems work.


(Christoph) #71

With that fix, the flag is displayed to the left of the user’s name. How do I move it to the right of the name?


#72

I was added “url” to that component in flaglist.js.es6 file:

{
      "name": "name",
      "value": "name.png",
      "url": "name-link"
    }

How can I print the URL value in show-user-card.hbs?

{{model.custom_fields.nationalflag_iso.url}}


(Ruxan) #73

Nice plugin indeed!

I have problem, when i go to user options, and select flag…click SAVE, when i refresh it wont save it it goes back to default.

Any clue why? :slight_smile:

p.s. i did full system and discourse backup this morning, could that be the problem?

Thanks


(David Taylor) #74

This was caused by a recent change in Discourse. It will require a small change to the plugin to fix the problem.

@Ebs I have made a pull request on your repository with the change: FIX: Update for changes to Discourse core by davidtaylorhq · Pull Request #3 · Ebsy/discourse-nationalflags · GitHub


(Ruxan) #75

Thank you i was confused :slight_smile: @david


(Neil) #76

Merged. Thanks a lot!


(Ruxan) #77

Problem solved, i can save national flag now!

Thanks @david and @Ebs


(Nichalas Petranek) #78

Small issue regarding style/alignment with the mobile view of discourse. The national flag seems to be stretched vertically and is aligned above the username. Would it be possible to move the alignment of the icon to the right of the username/title (to coincide with the respective placement on the desktop view) and fix the distortion?

Desktop:

Mobile:

Please note that the only thing that was done was clicking on the view toggle link in the hamburger menu.