[owncloud-devel] Owncloud contacts and address stickers

Bert Haverkamp bert at bertenselena.net
Mon Dec 15 19:18:22 GMT 2014


Hello all,

I'd like to post an update on my progress with the formatted Address LABEL
field
I discovered that besides my own ticket 284, an older ticket 114, refers to
the same problem.
So at least I know now there are others in the world with the same
problem/wish:-)

I have started digging in the owncloud sourcecode and it is slowly growing
on me.
But I started with a stand-alone php script to play with the sabredav
library.
This script is now able to read in a vcard, take the FN and ADR field
and create or update the LABEL field. 
I have a few country specific address-formats in there now, based on the
list I found in the evolution code. But I need to write a more versatile
script to do them all. That's what I will be starting now.

Next I would need some help hooking this up with the ownclouds contact code.
I have still only a rudimentary understanding of how to do this.

(first) two questions here:
1) How can I find out in owncloud what the home-country is? Is there a
location set somewhere? Maybe for the timezone? How can I access that. I
need the home-country for the default formatting when the country field in
the address is empty.

2) How best to get the country from an address? Or set it in a new address?
The country name will often be written in the local language, or in the
target-countries language. At least not always in English. This will make it
hard to recognize. I was thinking to solve the problem at least for new or
edited contacts by using a dropdown box with all countrynames for the
country field. That way it is at least a controlled  set of names. Maybe we
can store the country shortcode (DE, NL, US, .. ) somewhere to make this
even more streamlined. Any ideas are welcome.

Kind regards,

Bert



--
View this message in context: http://owncloud.10557.n7.nabble.com/Owncloud-contacts-and-address-stickers-tp13561p13690.html
Sent from the Developers mailing list archive at Nabble.com.


More information about the Devel mailing list