Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 6 years ago

#5502 closed enhancement (maybelater)

Custom xprofile field: Address

Reported by: sooskriszta's profile sooskriszta Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Extended Profile Keywords: trac-tidy-2018
Cc: vivek@…

Description

Address field type:

This will probably be best as a progressively populated field.

Frontend:
Address line 1: Textbox
Address line 2: Textbox
City: Textbox
Postcode: Textbox
Region: Dropdown. List depends on country. Some countries may not have regions in which cases, we should hide the field.
Country: Dropdown.
3 options: Show country only, show region only, show city only, show full address on profile. (progressive: if someone selects city only, then city, region and country are shown)

Backend
Apart from the regular stuff (field name, required/not), the address field will also have the checkbox: Use for geolocation if available.
If checked, then address is ALSO converted into latlong and saved (to be used for friends/members near me feature #5496).

Change History (15)

#1 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to Future Release

I don't know enough about addresses worldwide to know how to build this in a really general way. Is anybody out there an expert?

It wouldn't really be worth building this unless we had some sort of validation routines. But validation will mean either pinging external services, or bundling libraries (like those that contain lists of US states and Canadian provinces). For philosophical reasons, I think we want to avoid the external services bit (unless there's a non-commercial, community resource out there). For libraries, we'd want to find something that is properly maintained and correctly licensed. Does anyone know of something?

The connection to geolocation would depend on a whole host of other factors, which I think are better covered in #5496. If the geolocation exists, then linking together this kind of field type is fairly trivial.

#2 @sooskriszta
10 years ago

I don't know if we should tear our hair w.r.t. the database/library. We could potentially set up a GlotPress-style crowdsourced database for this.

The total number of records would be well-under 1500 (300 x 50), so utterly manageable.

#3 @sooskriszta
10 years ago

P.S. I am happy to create the initial list if it helps.

Last edited 10 years ago by sooskriszta (previous) (diff)

#4 @sooskriszta
10 years ago

  • Cc vivek@… added

Just in case, here's one database that goes all the way to cities: http://download.maxmind.com/download/worldcities/worldcitiespop.txt.gz

#5 follow-up: @boonebgorges
10 years ago

Thanks for the link to the cities database. Unfortunately it's labeled CC-BY-SA, which is not compatible with the GPL.

I've got to emphasize that I do *not* want the BP team to be responsible for maintaining an up-to-date database of countries/regions/states/cities. It's complicated, and outside our core expertise, and potentially controversial (is Sevastapol in Russia or Ukraine?). So, while 300x50 doesn't sound terrible on the surface, I think it's an understatement of the amount of work that'll actually be necessary. If we can't find a compatible license or totally non-commercial service, I think this is a no-go.

I know you don't like to hear this :) but it may well be that this is a task best suited for a plugin.

#6 in reply to: ↑ 5 @sooskriszta
10 years ago

Replying to boonebgorges:

Thanks for the link to the cities database. Unfortunately it's labeled CC-BY-SA, which is not compatible with the GPL.

Didn't intend for it to be used. Was just an example of how easy it is to find databases :-)

Plus this is a database of cities...I think we need to go only up to the region/state/province level.

I've got to emphasize that I do *not* want the BP team to be responsible for maintaining an up-to-date database of countries/regions/states/cities.

Not sure what you mean by that - do you mean the core team or the community?

It's complicated, and outside our core expertise...300x50 ...is an understatement of the amount of work that'll actually be necessary.

I agree that the BP core team should not undertake the task of creating or maintaining the database. However, no reason why this couldn't be handled by the community. The core team doesn't know anything (I assume) about the Italian or Korean or Bulgarian languages either, but we do supply the translations. Community contributions in creating and maintaining the database, a la GlotPress (http://translate.wordpress.org/projects/buddypress/dev), Wikipedia, or Wikimapia could come in handy.

potentially controversial (is Sevastapol in Russia or Ukraine?)

I think you mean "is Crimea in Russia or in Ukraine?", considering we propose going up only to the region, not city, level. Or, "is Kashmir in India or in Pakistan?" for that matter. Yes, address data can often be controversial due to political land disputes, etc.

Well, the answer is it's in both - it's wherever the community thinks it is. Remember - we are not involved in cartography...we don't have to draw up the map for them. If users choose Russia, should they see Crimea listed in regions? Sure, if Russians feel like they should. If users choose Ukraine, should they see Crimea listed in regions? Sure, if Ukrainians feel like they should.

When a user from Crimea is listing his/her address, it's up to him/her to decide the political affiliation...whether (s)he chooses Russia or Ukraine in the country dropdown. We don't need to take a position on that.

Once user has provided the address, we pass it on to Google (for instance) and grab the latlong. That's what we base the markers/pins on for #5496

it may well be that this is a task best suited for a plugin.

If it comes to that, then so be it. At the moment, it doesn't sound like a terrible core idea. To me. But obviously, I'm not the best judge of that.

Also, perhaps after we get #579 in, it might be easier for admins to get in their own versions of the address field...as a combo of textfields and 2 conditional dropdowns....wouldn't provide any amount of coherence or translate into latlong, etc

Version 0, edited 10 years ago by sooskriszta (next)

#7 @sooskriszta
10 years ago

P.S. We might even consider using the ISO 3166-2 http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=63546 (not GNU, but considered standard).

#8 follow-up: @boonebgorges
10 years ago

It's a good idea to have a platform for community members to contribute to a database like this. But that platform doesn't exist (at least not for the WP world - it's worth researching to see what's out there more generally), so there would be some up-front work involved.

Using the ISO database does seem like a promising starting point. That'd take the administrative pressure off of us - we just use whatever ISO provides. Unfortunately, we do have to worry about IP/licensing issues.

Well, the answer is it's in both - it's wherever the community thinks it is.

This is a nice consolation, but it's not viable when doing validation. In any case, it's not as if I'm worried about huge flame wars. But I do think that these sorts of questions, while interesting in and of themselves, add friction and overhead to a project team that's already very strained for resources.

#9 in reply to: ↑ 8 @sooskriszta
10 years ago

Replying to boonebgorges:

a platform for community members to contribute to a database doesn't exist (at least not for the WP world - so there would be some up-front work involved.

I see your point.

P.S. Worth a look: https://github.com/PyBossa/pybossa

Well, the answer is it's in both - it's wherever the community thinks it is.

This is a nice consolation, but it's not viable when doing validation.

What validation? Why would we need to validate anything if the response is closed-ended?

e.g. Dropdown country has list of countries.
Dropdown region/state/province's list is populated only upon selection of a country.

Let's say a joining member at a particular BuddyPress community is from Sevastapol'. How will it work for him/her?

First (s)he will write street address. Then enter city (Sevastapol'). Then, he can't select region because region dropdown is empty/unavailable unless a country is chosen. So, next step for him/her is to choose country. (S)He might choose Ukraine (or Russia). In either case, Crimea shall appear in the regions list. This "self-determination" largely precludes ideological or political friction, I would think. There is no further validation to be done, since the person choose options from a dropdown (as opposed to filling up a freetext field)

Other points well taken.

#10 @sooskriszta
10 years ago

I might have found a good source: http://cldr.unicode.org/index/charts

Maintained by the Unicode organization. Non-commercial. DB-friendly.

They maintain locale info primarily for the purpose of translation of the locale names. But should suit our purpose well.

This ticket was mentioned in IRC in #buddypress-dev by OC2PS. View the logs.


10 years ago

This ticket was mentioned in Slack in #buddypress by oc2ps. View the logs.


9 years ago

#14 @DJPaul
6 years ago

  • Keywords trac-tidy-2018 added

We're closing this ticket because it has not received any contribution or comments for at least two years. We have decided that it is better to close tickets that are good ideas, which have not gotten (or are unlikely to get) contributions, rather than keep things open indefinitely. This will help us share a more realistic roadmap for BuddyPress with you.

Everyone very much appreciates the time and effort that you spent sharing your idea with us. On behalf of the entire BuddyPress team, thank you.

If you feel strongly that this enhancement should still be added to BuddyPress, and you are able to contribute effort towards it, we encourage you to re-open the ticket, or start a discussion about it in our Slack channel. Please consider that time has proven that good ideas without contributions do not get built.

For more information, see https://bpdevel.wordpress.com/2018/01/21/our-awaiting-contributions-milestone-contains/
or find us on Slack, in the #buddypress channel: https://make.wordpress.org/chat/

#15 @DJPaul
6 years ago

  • Milestone Awaiting Contributions deleted
  • Resolution set to maybelater
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.