Posted by Aren Cambre on September 9, 2007 at 8:25pm
| Project: | Phone |
| Version: | 6.x-2.17 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
Right now, the only display option in Views is "Default." Please give us other display options such as the ability to show US phone numbers without the leading 1.
Comments
#1
+1, got this request to display without a 1 from a client.
#2
I love this module, but I run a very local website with no international attraction.
Would it be possible to adjust the views so that I can strip the +44 (for UK phones) or have a template where I could specify the display format?
I'm not great at PHP but if you point me in the right direction I'd be happy to have a look at doing it myself ?
#3
I'd say the root of this is that the module stores the formatted number into the database rather than a raw value that can be formatted as desired.
Though you should be able to create custom formatter to display the number any way you'd like.
#4
subscribe
#5
+1 to have a generic or local phone field.
Let a local number be stored without a country code and validate them to a default country code.
#6
+1 for storing raw number and formatting output.
The other issue involved here is that since the format is stored if it is changed after nodes are created then each node has to be re-saved in order to see the changes. Whereas most cck modules use the display settings for this and the changes are instant.
Aside: anyone know a way to "touch" (re-save) all nodes of a certain content type so that the display changes take effect without doing it one by one?
#7
Try views_bulk_operations to work on mass nodes.
#8
attached converts ca_phone types to be stored raw and formatted for display based on a per field configurable 'mask'. i'm guessing the other countries would be pretty easy to convert, but i wanted to get this up as a proof of concept.
also, we'd need an update function for folks that have numbers stored in the old format. if i get the green light from the module maintainer on the approach used in this patch, i can work out the rest of the code for the full patch.
#9
hunmonk,
Nice Patch! I hope you get the green light to go ahead with this.