Locations Plugin

@Canapin once this is mature I’d definitely welcome this as a PR to the main plugin repo so long as:

  • the behaviour was behind a plugin setting

  • the CSS designed in such a way that it doesn’t disturb things if there are other uses of the outlet in addition to this one.

    For example, Topic Ratings also uses the same plugin outlet. Turns out you can chain things via the same outlet. I tested this and it appears they both show if active at the same time (good :+1: ), but you wouldn’t want the CSS to disturb the ratings section unnecessarily.

  • ditto if the setting was OFF

  • Also, if the setting was OFF you’d want the icon to remain in its original position.

2 Likes

Hi!
Any quick clue on how to add or remove CSS rules regarding a site setting? I don’t know how to do that. :see_no_evil:


I also add that images in the documentation links don’t work anymore:

Example:

Hello,

I just updated Discourse (1b56a55f50) and our Locations Plugin is broken. When clicking a button related to the plugin, I get that:

everything is up-to-date, and it was working fine before updating. Please let me know how I can assist in fixing this :slight_smile:

3 Likes

Thanks for the report.

This is now fixed: FIX: Show Map button failure by merefield · Pull Request #69 · paviliondev/discourse-locations · GitHub

4 Likes

Thanks :slight_smile:

This fixes the map! But the other buttons are also broken: when clicking on “find address” when creating a discussion, and clicking the small location icon in a topic list shows the pin button instead.

Btw thank you for this plugin, it’s so convenient.

3 Likes

Ah, sorry, there were more. My quick text search didn’t pick them up.

For now I’ve additionally fixed: FIX: Find Address button not functioning by merefield · Pull Request #70 · paviliondev/discourse-locations · GitHub

You might have to wait a little while for the other one.

3 Likes

Hi folks - I’m interested in adding a State/City field to my new user sign up process, which would then populate the locations map. Is there an easy way to accomplish this? Thanks!

2 Likes

I am having the exact same problem. Can someone help @Don and me? :slight_smile: Thank you!

I have another question. When I try to add a location to a new post and click “Save”, the window does not close anymore. In the developer console of the browser I see everytime I hit “Save” the following:

Deprecation notice: DButton no longer supports @action as a string. Please refactor to use an closure action instead. [deprecation id: discourse.d-button-action-string]

User problem or maybe problem with another plugin or component or just a bug?

1 Like

Must be due to a core change as it is also happening on the Events plugin:

1 Like

This PR is in progress, I’ll let you know when it’s done.

5 Likes

PR merged, let me know if you encounter any issues

@Roi

3 Likes

Thank you, it works now :slight_smile:

2 Likes

We’ve actually merged a second tranche of fixes and updates, please update the plugin.

3 Likes

Thank you for this :slight_smile:

It’s minor, but I still see this bug:

When clicking on the location icon on a list of topics, the pinned icon appears, instead of going to the first post in the topic.

1 Like

Yeah this was reported above, I haven’t had time to look at this yet, sorry.

1 Like

Hello,

is it possible to still show the Discourse core field “Location” in the user profile? I am asking because in the old forum system I was using the users were able to put in something into the location like “Miami” or “Florida” and their exact location as GPS coordinates if they wanted to appear on the user map.

With the Discourse Location plugin the location entered for the user map is very precise and also looks ugly and is very long. In Germany for example something like: 20, Benzstraße, Herrenberg (Stadt), Herrenberg, Vereinbarte Verwaltungsgemeinschaft der Stadt Herrenberg, Landkreis Böblingen, Baden-Württemberg, 71083, Deutschland
This also busts the user information page and the user card.

So better would be to select if the Discourse core field is still shown in the user profile to fill it and also to select what of the two fields is shown on the user information page and the user card.

Thanks and regards,
Roi

PS: I totally forgot that I already was on the problem just by adjusting what is shown: Locations Plugin - #780 by Roi
Can somebody help here? I was not able to enter a working setting into location user post format. For my forum a perfect setting would be to just show city and country, or city, state and country.

1 Like

I also noticed that when entering something into location user post format like “town” or “country” or “town, country” (I checked what names the fields have here) I see the website (the user entered in his profile) twice on the user page. So I think there seems to be a bug somewhere…

I believe the existing field is hidden by CSS. Have a go and see if you can unhide it.

PR welcome for any genuine improvements.

This example works for me:

image