Australia and AU states support
truecms.net.au - April 10, 2008 - 03:22
| Project: | CCK Address Extensions |
| Version: | 5.x-1.6 |
| Component: | Other |
| Category: | task |
| Priority: | normal |
| Assigned: | truecms.net.au |
| Status: | patch (to be ported) |
Jump to:
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).
| Attachment | Size |
|---|---|
| australia.zip | 3.1 KB |

#1
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.
<?phpif (($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
As noted elsewhere, the repository for this project is screwed up, so when it is fixed, I'll combine all such patches.