patch to manage more country codes without having to edit the whole module

tiziano - September 15, 2007 - 16:14
Project:Phone (CCK)
Version:5.x-2.1
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

I edited your module in such a way that adding new country is now as simple as add a single line in the first array (and, of course, create a new phone..inc file).

One more step should be to move the field name (like 'French phone number') to a variable in the .inc file and then searching for available language in the directory. This way, phone.module should not need to be edited when adding a new country.

AttachmentSize
phone.patch6.05 KB

#1

tiziano - October 10, 2007 - 19:52
Title:patch to manage more country code without having to edit the whole module» patch to manage more country codes without having to edit the whole module

I found a couple of typos in my own implementation (I used 'array' instead of 'array_keys' in phone_{widget,field_formatter}_info functions), so I resubmit my patch.

AttachmentSize
phone_0.patch 6.06 KB
 
 

Drupal is a registered trademark of Dries Buytaert.