Locations Plugin 🌍

If you are paying, yes :slight_smile:

This is an independent plugin, support is not free and I do not provide any guarantees - you use it at your own risk.

I could have easily not shared that at all, anywhere.

Link to support options.

4 Likes

This is now merged, thanks again to the sponsors @祁同伟 and @nathank :heart:

Extensive details on the PR.

@Roi I note you are not paying for support - however I believe I may have improved the code in this PR, please try that script I published again. If you need me to take a closer look, you can hire me.

5 Likes

@merefield not yet. :wink:

I just checked, the bad entry stayed with the new version as well.

But as it only was one user, I checked manually and he had a city in the “normal” location field and I recreated the location field with this information. Now the query is empty.

2 Likes

Hey, I posted a bug report elsewhere and got redirected to repost it in this topic.

Turns out if you enable locations for a category and set the default view for the category to the Map navigating to that category results in a crash.

Here are some screenshots (pardon the localization, the words mean “Appearance: Default topic list: Hot, Latest, Top, Map):

Seems the plugin accesses siteSettings assuming it is defined when it isn’t

Original bug report:

1 Like

thanks, if this is important enough for you, you can hire me to fix it. PR welcome.

1 Like


How do I hide location info from topic rows in the topic list?

Hello:

  1. Features
    (1) Some users never post and skip setting a location in their profile, so even their user card gives nothing away. Could we grab their location the moment they log in?
    (2) Instead of a fixed interval, let us set our own refresh rate—say, once every 12 hours.
    (3) For i18n, can we render the location in whichever language the viewer prefers?

  2. Bug
    When a topic is set to “use user’s location,” the location comes back empty, yet the topic row still shows the location pin. Turning the pin off in the category settings does nothing; you have to open the topic, delete the blank location, and save before the icon finally disappears.

2 Likes

I have a display issue since the Discourse update.

I am on version 2026.2.0 latest

Here is what I have

Maybe there is a way to fix it with CSS

Thanks :grinning_face:

1 Like

I had a look out of curiosity. Seems that the locations are inside a button, which CSS has changed in the modern foundation theme and constrains the content.
There may be a future incompatibility between locations and this theme, but the latter is still experimental, so we need to wait for the official release and see how it goes :slight_smile:

4 Likes

Maintenance release:

followed by fixes:

Highlights include:

  • you can now update people’s location automatically upon login (not just when they post) (@祁同伟)
    • controlled by new setting DEFAULT OFF - so if you use this feature, set your preference now or Locations will stop updating users locations completely - necessary as style of setting was changed to accommodate the new feature.
  • Map can now once again be selected as default view for a Category (via Category Settings) (@Quacken)
  • Topic default location from user location works again. (@祁同伟)

Plus a thousand modernisations to latest linting rules.

9 Likes

Is there any chance that we can have user-location page per group specifically?

So practically I can provide a list of group names, and for each of them, create a user map. In our use-case for example we were thinking to map users, NGOs, and/or Companies separately.

I mean, one can always put ‘ngo_’ in front of the name/username and filter by that, but thats not really nice :blush:

4 Likes

If you’d like to provide some nominal sponsorship, sure I’d back that - DM me if you have budget.

6 Likes

Ok, going to make this a crowd funding effort

If I see an increase from current recurring monthly sponsorship from the community by at least $37 (I’m currently sponsored $43 a month by my existing kind sponsors) I will add the following:

User Map improvements:

  • group filter on map
    • For logged in users only, group list at least visible by all logged in users
    • ability to link to map for specific user group (same limit on choice of groups)
  • filter for number of max users shown (prioritising last seen) - performance win for user map if you have a lot of users who don’t visit anymore and prefer just active users.
  • apply default map view settings that currently applies only to topic map - so it always shows your area of interest.

One more monthly business sponsorship (>=$40) would clinch it straight away (SILVER tier)

I will also accept a one-time sponsorship from an individual for $150

Sponsor me here:

https://github.com/sponsors/merefield

Note the rewards for higher levels.

4 Likes