Australia and AU states support

ivan.g - April 10, 2008 - 03:22
Project:CCK Address Extensions
Version:5.x-1.6
Component:Other
Category:task
Priority:normal
Assigned:ivan.g
Status:patch (to be ported)
Description

Hi.
Attached is the part of the module to support Australia and its States.

To use simply unzip and place the "australia" folder into your modules/cck_address_extensions folder (e.g. /sites/modules/cck_address_extensions/ folder).

AttachmentSize
australia.zip3.1 KB

#1

wad - April 15, 2008 - 09:41

This looks better than the last effort. I actually created almost exactly the same files at exactly the same time as you! D'oh!

One thing though, the zip code regex must be 4 and only 4 digits according to the latest PAF Postcode File, so you need to add a caret to the regex for zip code.

<?php
if (($item['zip'] != '') && (!preg_match("/^[0-9]{4}$/", $item['zip']))) {
?>

Wouldn't it be nice if we could have some kind of fuzzy match on towns in the PAF? How about an AJAX call to look up the postcode based on the city and state?

#2

rconstantine - April 22, 2008 - 02:41

As noted elsewhere, the repository for this project is screwed up, so when it is fixed, I'll combine all such patches.

 
 

Drupal is a registered trademark of Dries Buytaert.