National Flags - Display user nationality in Discourse

(Tobias Eigen) #52

The user list is oriented more towards activity than demographics.

Maybe a model for you would be cakeday.

https://meta.discourse.org/cakeday/anniversaries/today

Or the groups page, which could benefit from demographic info about the people in the group. I for one would be interested to know who in the groups I am in are nearby or where they are. Maybe not on meta but in my community.

https://meta.discourse.org/groups/plugin_authors

0 Likes

(Tobias Eigen) #54

Don’t worry about it - I updated my post.

0 Likes

(Tobias Eigen) #56

This is off topic - let’s wrap up this side conversation. I will send you a PM. :slight_smile:

0 Likes

(Allen) #57

Thanks for your input. Unfortunately, none of those really wok for my use case (and I suppose neither for @Andy_Cleff ). I am investigating if we can move a patient group from phpBB to Discourse. The patients often want to get in contact with other patients living in the same country (perhaps for setting up local conferences etc.). So what I would basically need is some kind of directory, where the patients (only user name, no further details) are listed along with their country, and perhaps some configurable custom use fields to go along with it.

Wordpress for example has standard functionality that will fulfills this need. I guess in the Discourse status quo we are probably talking about a custom plugin at this stage. @ebs, I would want to integrate your flag functionality though. Would you be interested in increasing the scope of your plugin on a paid basis, or should we fork your plugin, or should we extend it and submit a PR?

0 Likes

(Tobias Eigen) #58

In my community, we have a member directory in wordpress. Details are updated in discourse via API so they are kept in sync. This works reasonably well, but doesn’t allow members to quickly contact each other based on their location.

It would be neat to see this in discourse, and you’re right that it seems to be heading down the path of a custom plugin.

Have you looked at the locations plugin? appears to be more about topics than users, but still perhaps something you can get involved in to add in the ability to plot and see users on a map based on their location field.

1 Like

(Ivan Rapekas) #59

Hello @Ebs , possible due to hardcoded path below the pictures do not appear in the environment located in folder (/forum) instead of root (/). Is there any way to fix it without nginx proxy?

0 Likes

(Craig Davison) #60

I’ve just released a modifed version of this which includes the latest up-to-date plugin + @abrambailey’s modifications + support for the Locations Plugin user field. Would be good to get this merged in. https://github.com/davisonio/discourse-nationalflags

Edit: Ok it doesn’t work lol…if anyone knows what’s up let me know

2 Likes

(Diego Barreiro) #61

This happens on mobile:

Using latest plugin and Discourse versions

1 Like

(Jay Dawg) #62

go to admin settings customize click on mobile and add for quick fix

.nationalflag-post {
    width: 24px !important;
    height:18px !important ;
    vertical-align: top;
}
3 Likes

(Diego Barreiro) #63

Yep, it’s fixed :+1:

0 Likes

(Neil) #64

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

0 Likes

(Dylan Hunt) #66

Click on mobile? Where is this again?

0 Likes

(Jeff Wong) #67

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

4 Likes

(Jay Dawg) #68

Jeff Thanks for updating did you find it Dylan?

0 Likes

#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"
    }
0 Likes

#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.

0 Likes

(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?

2 Likes

#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}}

0 Likes

(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

0 Likes

(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: https://github.com/Ebsy/discourse-nationalflags/pull/3

4 Likes