Add support for City and/or Zip

JStarcher - August 30, 2009 - 21:10
Project:Profile Location
Version:6.x-1.2
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:country, spanish, translate
Description

Great module the only thing I wish is it had address support for cities or at least zip codes, especially considering the location module provides a city table. Otherwise seems solid, thanks for the commit.

#1

Bacteria Man - August 31, 2009 - 03:32

Yeah, cities add an extra layer of bloat (database wise) if you're expecting a cities dropdown to be populated for a particular state/province. I suppose a text field could be added to allow the user to manually enter their city. I have actually considered doing this for zip code/postal code, which would be more useful because it'd be easy to look-up the user's city.

I'll keep this in mind. A bounty would be gladly welcomed.

#2

Bacteria Man - August 31, 2009 - 18:07
Title:No support for City» Add support for City and/or Zip

#3

Summit - November 8, 2009 - 15:47

would love to have this also on D6!

#4

mguarinoni - November 10, 2009 - 03:16
Title:Add support for City and/or Zip» Spanish Country Translate - simple script
Version:5.x-1.2» 6.x-1.2
Component:Code» Documentation
Category:feature request» support request
Assigned to:Anonymous» mguarinoni

This script translate countries names in profile_location_country table, it need paises.txt that is attached in this post.

<?php
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

$handle = fopen("paises.txt", "rb");
$contents = '';
while (!
feof($handle)) {
 
$contents = fgets($handle, 4096);
 
$aux=explode(",",$contents);
 
db_query("UPDATE {profile_location_country} SET name = '".$aux[3]."' WHERE iso = '".$aux[2]."';");
}
fclose($handle);
?>

AttachmentSize
paises.txt 5.31 KB

#5

Bacteria Man - November 10, 2009 - 03:23
Title:Spanish Country Translate - simple script» Add support for City and/or Zip

Thanks for the sharing the script, but please leave the original title intact.

#6

Bacteria Man - November 26, 2009 - 01:43
Assigned to:mguarinoni» Anonymous
 
 

Drupal is a registered trademark of Dries Buytaert.