National flags indicating home country of each user?

One thing we had on our old (home made) forum was little flags showing where each user is from. We have members from all over the world, so that is now our #1 most requested feature on Discourse.

Would this be hard to implement? Best place for it would probably be the user card.

Thanks,
Gunnar

4 Likes

It would make a good plugin. Some things to think about, is this set from signup IP, or is it something users have to configure themselves?

2 Likes

I was thinking based on what the user enters about themselves in their personal information/profile. That way it’s voluntary.

Gunnar

Hi Jeff,

I am working on the same site as Gunnar.

From a user viewpoint, the benefit would be that the user could quickly get an idea of location (and therefore timezone, language, and currency) with a single click on the user symbol. Our site pretty much spans the world, so this would save users asking.

Some of the other sites I use have user selectable flags, but on many of them the user can select any flag they wish. This may allow them to express some personal allegiance, but it kind of defeats the main benefit to be had from having this kind of information.

I would say detecting it from ip addy would be a bit too much overhead if you have to do a lookup at every user login (Which is pretty much what you would have to do to handle the case of a user who is travelling), so linking it to the user’s country as defined in their profile would be my choice.

Forgive my imprecise use of Discourse terminology, until a week ago I had never used Discourse. I’m not really quite as obtuse as I initially appear to be. (In fact, it’s a lot worse once you get to know me.)

Andrew

No, I meant once at first logon.

3 Likes

It would be better if user choose the proper flag. Not all people living in there countries and some may have more than one nationality. A nice feature to add :+1:

How about:

Assign it based on IP on first login.
Make it configurable so that you can make it a mod_only, or User editable.
And since I’m in wish concert mode:
If a user wants to change it, and you’ve allowed “Country_Flag_may_mean_nothing”, then pop up a (stern) warning to the user if the flag doesn’t match with the ip addy.

Andrew

5 Likes

Agree.

Related wish some time ago:

2 Likes

Indeed. For us it’s not so much a question of identity or roots, as it is a question of current location for practical purposes.

For example, if a user posts “I get 20 mpg in my Jaguar XJ12”, and another user can’t get more 16 mpg in his identical car, it would help to know that the first poster is in the UK (1 gallon = 4.5 liters) and the second is in the US (1 gallon = 3.8 liters). :wink:

I like the idea of initially populating it from the IP address though. At least we’ll have something to go on, until the user updates it.

Gunnar

2 Likes

I had a go at this.

I believe OP was talking about a plugin for phpBB. I used the same plugin on my forum before we changed over to Discourse a couple of weeks back. A few of the members mentioned they missed the flags, so last Friday I decided to jump in and have a go at a plugin for Discourse.

In its current state, it’s fairy ‘hacky’ and there’s plenty of room for improvement. I’d appreciate some help with the code if anyone is willing to offer their assistance!

https://github.com/Ebsy/discourse-nationalflags

13 Likes

I’m sorry that I am unable to contribute any code, but I wonder whether it would be too much trouble to extend the functionality to allow users to add multiple flags. I guess the reasons are obvious but let me just give an example: I am about to build a website for a global community of people who are themselves often highly mobile internationally so that it makes little sense to them to select a single national identity, such as “I am German” or “I am from Germany”. What makes sense in this context (and I think increasingly for many people) is to say “I’m of German descent, born in Indonesia and living in the UK”. Putting three flags would nicely sum that up…

@Ebs you are in the plugin_authors group, feel free to post a dedicated topic in the #plugin category with some screenshots :wink:

2 Likes

Thanks Sam, I posted the reply first before I applied for #plugin membership so I had something to show for it first.

I’ve just made the post - National Flags - Display user nationality in Discourse

2 Likes