Country Support for citizenspeak

karlis - March 13, 2009 - 08:47
Project:CitizenSpeak
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Citizenspeak only supports USA addresses, but who lives in the USA? For those of us who don't, this update allows you to choose the country of support in the module configuration if you have the addresses module and zipcode module installed. Since this module is for citizen activism, the country is always pre-selected for the end user, but with this update you should get the the proper province/state selection field for your country. This update also requires the zipcode module, so it can validate the postal code, Addresses module provides for all countries, postal code validation is only for 5 countries I think, see the info in that module.

The code is a little bit hackey, as it uses some module _internal functions from addresses, but we do a module_exists check first. It seems to work for me (drupal 6.9,citizenspeak 6.x-1.x-dev, addresses 6.x-1.05, zipcode 6.x-2.5), your results may vary.

Three updated files included instead of a patch:
citizenspeak.lib.php
citizenspeak.module
citizenspeak.node.php

My client loves this module, so we'll probably be making some more updates in the future.

AttachmentSize
citizenspeak-countries.tar_.gz7.22 KB

#1

SocialNicheGuru - May 27, 2009 - 09:13

are there any plans to integrate with location module?
Chris

 
 

Drupal is a registered trademark of Dries Buytaert.