Locations Plugin


(Angus McLeod) #142

Both great feature suggestions. Neither is currently possible, but both could be added to this plugin.

I won’t have the time to do either for the next few weeks unforatunely. I’d be happy to accept PRs in the meantime though.


(Angus McLeod) #143

I’ve added a Custom Layouts Plugin widget for the Locations Plugin. See further here:


(Sora &\) #144

Hi @angus!
Can you get location via GPS direct by detect GPS mobile and auto insert to Location Plugin.
We don’t input by text
Can do we?


(Sora &\) #145

@angus Can you create for a Plugin Call
Feature:
input number phone when create new topic and comment topic. When we touch this Button in Mobile will rederect to Phone Call


(Angus McLeod) #146

Hey :slight_smile: , thanks for trying out my plugin.

I have no plans to add a GPS detection feature at this time. It seems like a marginal use case given that we’re talking about locations associated with discussion topics.

But this plugin does support adding direct lat/lon coordinates, either via input fields or the API.

This is quite easy to do, so I’m not averse to the idea.

For both asks, my question is the same: What’s the use case?


(Sora &\) #147

My forum is website discus about location, manager and troubleshoot house.
GPS help user locate the house need help
Phone number help user call to landlord ready to open building, house.
Thank you!


(Angus McLeod) #148

I’m still a little confused. Walk me through the steps involved in the use case and how Discourse is involved. Right now it seems like:

  1. There’s an issue at property.

  2. The landlord goes to the property.

  3. Landlord adds a location topic when they’re at the house using GPS auto-dectection and also adds their phone number…?

  4. Some discussion happens…

  5. Tenant calls landlord…?


(Sora &\) #149

Landlord adds a location topic when they’re at the house using GPS auto-dectection and also adds their phone number and Tenant calls landlord

And number phone only display admin default; about user normal and Moderator , we will grant them


(Angus McLeod) #150

Adding phone numbers

While I can see why you’re connecting it, I think that associating phone numbers with topics is outside the scope of this plugin. It should be done in a seperate plugin, or site customisation.

Adding phone numbers to topics could be used in additional situations outside of adding locations to topics. And as you’ve pointed out, it raises additional issues such as who can see the phone numbers.

GPS -> Address

As for the GPS auto-detection, I don’t really have the bandwidth to tackle that properly at the moment. It actually involves two things:

  1. Auto-detecting lat / lon location. This can be done via HTML 5 geolocation, but there would be edge cases to work out.

  2. Reverse geocoding. This plugin can map lat / lon directly, but in order to actually get an address out of lat / lon coordinates you need to do reverse geocoding, which I would need to add support for.

I may tackle both GPS auto-detection and reverse geocoding in the future, but given that it’s a relatively marginal use case for a plugin that adds locations to discussion topics, they’re not priorities.

You’re welcome to hire someone in #marketplace to tackle both though and I would be happy to accept a PR.


#151

Thinking about the ‘location map max topics’ setting a bit more, if the setting is set low, the map will highlight recent discussions on the map but not the rest. Whereas if the setting is set high, it shows the entire collection of discussions. One idea is that perhaps a filter on the map that lets user flip between ‘Latest’ and ‘All’, because these two are quite different use cases, and let the users enjoy the best of both worlds- either see where the latest discussions are located, or trying to find all discussions by locations (instead of using the search engine) on the map.

Just an idea.


(Angus McLeod) #152

You mean add filters for the map like this?


#153

That’s essentially the idea.


(Anton) #154
  1. required setting.
    Any way to make location required per category? So that one can’t submit/edit their topic until a location is successfully geocoder?

  2. hide “name”
    When specifying location, twi fields are shown: address and name (optional). May you add a per-category setting to remove the name altogether? People just copy topic title to the name OR just get confused about the name — it’d be simpler just to hide it.

Many thanks for your ongoing effort at improving your plugins!


(François Douville) #155

Hello! This is a great plugin. Thanks!

Is it possible to have a french translation? Without buying a plan in Github as explain here :


(Angus McLeod) #156

This plugin is not yet on transifex, but you can submit a PR to the github repo with the translation files. The project is open source so you don’t need a paid Github account.


(François Douville) #157

Ok! How can I do that?


(Angus McLeod) #158
  1. Sign up for a free Github account (and verify your email).

  2. Go to discourse-locations/config/locales at master · angusmcleod/discourse-locations · GitHub

  3. Copy the contents of client.en.yml

  4. Click “Create a new file” and past the contents of client.en.yml. Make the file name client.fr.yml.

  5. Translate the english to french.

  6. Click “Propose New File” at the bottom of the page, then “Create Pull Request” (i.e. PR), then Create Pull Request again.

  7. Then, assuming all looks good, I’ll accept it, and your translation will become part of the plugin.

  8. Repeat steps 3 to 7 for the file server.en.yml.

  9. Once both client and server translation files are translated, then you’ll just need to update to the latest version, i.e. the version with the translation.


(François Douville) #159

I updated it and there is no translation?


(Angus McLeod) #160

Ah, we just had to also change the language key in the yml file.

Pull that update and try again.


(Joe Buhlig) #162

Angus, have you looked into allowing the users current location for this? Tap a button and it pulls current Lat/Lon from the devices location?