On Thu, 4 Jun 2009 07:00:01 +0200, "Roland Liebl" <[email protected]>
wrote:
> IMO you can add a separate table into RoundCube database without a
problem.

Ok, I will use that method.
Another question is : how is a plugin supposed to manage it's "initial
setup" ; it's to say here, creating the dedicated table.
I didn't fond any plugin installation script example in the SVN. Is there
any way to trigger an action when a plugin is enabled/disabled in config ?


> Personally I would prefer to add just a "type" field to the default 
> addressbook table to indicate that the contact
> was added automatically.
> 
> It would also fit my plans to introduce global (editable/write protected)

> contacts by a future plugin.
> 
> So lets say ....
> - type 0 or NULL = indiviually created
> - type 1 = automatically created
> - type 2 = global editable
> - type 3 = global write protected

I prefer at the moment using a separate table, as it don't change the
existing addressbook  behavior. And well...  it's much more simpler for me.
But your proposal is interesting as it enable to "promote" a contact to
"individually created" if the user wants to add extra info to a collected
contact. It also make the "conflicts" (doubles) between collected and other
contact sources. It may be the best solution but would require work in
roundcube code, and I just want to write a plugin.


Anyway, thanks for your explanations Roland.

Regards, 

Jocelyn


> 
> ----- Original Message ----- 
> From: "Jocelyn Delalande" <[email protected]>
> To: <[email protected]>
> Sent: Thursday, June 04, 2009 2:16 AM
> Subject: [RCD] sql extra table ?
> 
> 
>> Hi,
>>
>> I am planning to write a plugin to reproduce the "collected addressbook"
>> feature of thunderbird (ie: each email address you send a mail to is
>> collected in a special automatic addressbook, usefull for completion).
>>
>> I need to store the completed addresses somewhere of course, watching at
>> some code and existing plugins, I see 3 ways to do that :
>>
>> - store it into the main address book of the user, but it's not a good
>> solution as "explicit" contacts will get lost in collected addresses.
>> - store it in the "cache" table, but I then have only one field and I
>> need to use serializing/unserializing,  that is bad for performances (&
>> with a quicly growing collected list...).
>> - creating a new SQL table for the plugin, that would be the cleaner
>> solution at the moment but I wonder if there is some caveats adding
>> "freely" tables to the roundcube base...
>>
>> ... Can you guys give me some advice on that ?
>>
>> Thanks for your help & anyway for that great piece of code !
>>
>> Jocelyn
>> _______________________________________________
>> List info: http://lists.roundcube.net/dev/
>>

-- 
Jocelyn Delalande
_______________________________________________
List info: http://lists.roundcube.net/dev/

Reply via email to