[dev] Turba field enhancements

Chuck Hagenbuch chuck at horde.org
Fri Aug 13 21:05:27 PDT 2004


Quoting Karsten Fourmont <fourmont at gmx.de>:

> currently Turba (with sql backend) uses a single field to store
> addresses (WorkAddress, HomeAddress) and names.
>
> IMHO it's better to switch to using the individual Adress, City,
> Province, PostalCode, and Country codes.
> Same for the name which should be stored at least as firstname and
> lastname. (maybe honorific pre/postfixes as well?)
>
> Adding new fields to Turba is of course a piece of cake, but changing
> database tables is something you would not want to do too often.
>
> So while I'm at it I'd also like to include the following new fields
> which are taken from the vcard RFC 2426. These are
>
> PHOTO (if I get binary data in the database right)
> BDAY
> ROLE (easy)
> CATEGORIES (Horde Style category for Turba!)
> UID (to store external IDs)

Okay. Remember to add examples of composite fields for people migrating 
so that
they can keep the old multiple-value fields if they want.

> Here's an outline of my intended changes:
>
> - add the new fields to turba/config/attributes.php and
>    config/sources.php
>
> - add turba sql table format
>
> - as we requires a change to the sql table it might be a good point to
>    think about a (general) way to do table structures changes during an
>    update. Might help us in the release process for the upcoming horde
>    version.
>
> - maybe modify/enhance the _address type in the Forms package. This way
>    we have the address nicely presented as one item (group) in the form.
>    We can also do nifty things like properly displaying international
>    addresses (position of ZipCode etc.) and better linking to map info.
>    But this may be done in a later step.

Sounds good. For that last one, composite fields may be your friend. :)

> Any comments, thoughts, objections before I jump into this?

Just make sure that the address field can handle a single block of 
text, too - I
think all of this should be great as an option, but not be required for people
who don't want to update existing Turba installs, or who want to 
integrate with
a different system that uses single address/name fields.

-chuck

--
"Regard my poor demoralized mule!" - Juan Valdez


More information about the dev mailing list