--- phone.cr.inc 1969-12-31 18:00:00.000000000 -0600 +++ phone.cr.inc 2008-10-05 14:43:36.000000000 -0600 @@ -0,0 +1,64 @@ + array('label' => t('Russian Phone Numbers')), 'es_phone' => array('label' => t('Spanish Phone Numbers')), 'au_phone' => array('label' => t('Australian Phone Numbers')), - 'cs_phone' => array('label' => t('Czech Phone Numbers')) + 'cs_phone' => array('label' => t('Czech Phone Numbers')), + 'cr_phone' => array('label' => t('Costa Rican Phone Numbers')), ); } @@ -67,6 +68,7 @@ || $field['type'] == 'es_phone' || $field['type'] == 'au_phone' || $field['type'] == 'cs_phone' + || $field['type'] == 'cr_phone' ){ $columns = array( 'value' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE), @@ -114,7 +116,8 @@ 'ru_phone', 'es_phone', 'au_phone', - 'cs_phone' + 'cs_phone', + 'cr_phone' ), ), ); @@ -154,7 +157,8 @@ 'ru_phone', 'es_phone', 'au_phone', - 'cs_phone' + 'cs_phone', + 'cr_phone' ), ), ); @@ -245,7 +249,11 @@ } if ($field['type'] == 'cs_phone') { $node_field[0]['value'] = format_phone_number('cs', $node_field[0]['value'], $field); + } + if ($field['type'] == 'cr_phone') { + $node_field[0]['value'] = format_phone_number('cr', $node_field[0]['value'], $field); } + } } } @@ -280,7 +288,10 @@ } if ($field['type'] == 'cs_phone' && !valid_phone_number('cs', $item['value'])) { form_set_error($field['field_name'],t('"%value" is not a valid Czech phone number!
Czech phone numbers should contain only numbers and spaces be like 999 999 999 with an optional prefix of "+420" or "00420".', array('%value' => $item['value']))); - } + } + if ($field['type'] == 'cr_phone' && !valid_phone_number('cr', $item['value'])) { + form_set_error($field['field_name'],t('"%value" is not a valid Costa Rican phone number!
Costa Rican phone numbers should contain only numbers and spaces be like 99 99 99 99 with an optional prefix of "+506" or "00506".', array('%value' => $item['value']))); + } } } } @@ -307,7 +318,8 @@ || $countrycode == 'ru' || $countrycode == 'es' || $countrycode == 'au' - || $countrycode == 'cs' + || $countrycode == 'cs' + || $countrycode == 'cr' ) { //drupal_set_message('langue = ' . $countrycode, 'error'); @@ -347,7 +359,8 @@ || $countrycode == 'ru' || $countrycode == 'es' || $countrycode == 'au' - || $countrycode == 'cs' + || $countrycode == 'cs' + || $countrycode == 'cr' ) { //drupal_set_message('langue = ' . $countrycode, 'error'); --- README.txt 2008-05-28 16:45:50.000000000 -0600 +++ README.txt 2008-10-05 11:23:55.000000000 -0600 @@ -18,7 +18,8 @@ + Spanish, + Czech, + US - and Canadian phone numbers + and Canadian phone numbers, + + Costa Rican * Formating of phone numbers * Option for internationalization phone numbers * IPhone support @@ -50,7 +51,7 @@ Author ------ -Thierry Guégan (http://www.arvoriad.com) +Thierry Gu�gan (http://www.arvoriad.com) If you use this module, find it useful, and want to send the author a thank you note, then use the Feedback/Contact page at the URL above.