Country Select for Drupal 6.x

REQUIRED MODULES:  addresses_cck and activeselect
REQUIRED SETTINGS: country and province/state fields turned off
REQUIRED THEMING:  province state field needs to be themed in template.php

INSTRUCTIONS 

Copy country_select.module and country_select.info into the addresses module directory
Install above three modules.  

Go to admin/settings/country_select to select the default country.  Country select recognises the addresses allowed country list.
Make sure that the country and province fields are turned off for the content type.  Country select creates its own form items and writes them to the same database field as the addresses module.  Note that provinces are saved in the form [country code]-[province code] which is different from the addresses module. If both country and province fields are NOT turned off for the content type then country select does not work.


Typical function to add to template.php to get the province field displaying correctly

function phptemplate_addresses_field_province_name($afields) {
  $provinces = _addresses_province_get($afields['country']);
  $parts = explode("-", $afields['province']);
  return '<dt>'. t('Province') .': </dt><dd class="region">'. $provinces[$parts[1]] .'</dd>';
}
