Hi,
I developped for my own needs, and for curiosity about roundcube internals an "automatic addressbook" plugin.
As thunderbird or gmail does, this plugin collects the recipients of outgoing mails and store them into a dedicated addressbook. IMHO, the most usefull effect of this behaviour is that each email address you typed once is then avaible for autocompletion.
I still have design issues with the plugin :
MDB2::isError() (always returns false).
It's my first contact with rc code, with mdb2... and I'm far from being a php guru (neither a php lover to be honnest...), so feel realy free to send me any comment about code or design.
I would also need your help to add translations and database backends (just a single sql statement to "translate" in install/<yourdb>.initial.sql folder). At the moment, only sqlite is supported as I don't use other DB systems.
I don't know if you consider such a plugin interesting for svn integration, but I hope so :-).
Regards,
Jocelyn
P.S: As Roland Liebl suggested, a global addressbook mixing smoothly collected and "normal" contacts can be a good thing, but I wanted to keep things "light".
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/kk/JPWVR4At/automatic_addressboo.gz Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/kk/JPWVR4At/automatic_addressboo.gz Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
Detachments ate the filename, rename it to *.tar.gz
List info: http://lists.roundcube.net/dev/
Hi!
I attach a patch with mysql schema, russian translation and 0.3 compatibility fixes. I think it is almost ready for inclusion to trunk. SQL schemas are the same as for 'contacts' table and could be simply copied with table name replace.
Vladislav
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/yb/NPTeCJFJ/automatic_addressboo.patch Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
Hi,
I attach a patch with mysql schema, russian translation and 0.3 compatibility fixes.
Ok, nice ! integrated your patch.
I think it is almost ready for inclusion to trunk. SQL schemas are the same as for 'contacts' table and could be simply copied with table name replace.
Yep, I copied mssql and postgres initial.sql files, but it would be cool if someone(s) can test these the plugin with these two engines, also fixed a plugin bug involving sqlite DBs defined with a relative path in settings.
Get the latest modifications at : http://crapouillou.net/~jocelyn/ressources/roundcube/
That's all folks, nighty night !
Jocelyn
P.S: It was my the first contact with ms-sql... what a weird syntax ! :-s
List info: http://lists.roundcube.net/dev/
Hi all,
I can confirm that an extended addressbook is one of the much requested features in the forum. Please include this patch into trunk. Thanks Phil!
Regards, Roland
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/JL/ZZUwwKZ9/vcard.vcf Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
Hi all,
I can confirm that an extended addressbook is one of the much requested features in the forum. Please include this patch into trunk. Thanks Phil!
Regards, Roland
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/gt/AUVRQtLA/vcard.vcf Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
Hi,
I have modified the code as follows:
#1 config/config.inc.dist
(i) Load config and set default to true (plugin is enabled by default then) (ii) Moved database dsn to config
#2 Intaller
(i) Removed installer (got a http 500 error). I think we do not expect to much if we only provide the sql scripts.
#3 General
(i) I defined the automatic addressbook as readonly *). I think it should not be possible to add manually created items to the automatic addressbook. Does anyone have a clue how to disable the import button aswell? (ii) If a automatically added contact is edited, the contact is moved to the default addressbook and removed from the automatic addressbook. I think when a user edits a contact, we can assume that it is accepted as a permanent personal contact. My code modifications presume that the default addressbook source is always "0". Is this right or would it be better to use a configurable value?
Regards, Roland
*) May be this works only because app.js is inconsequent at this point. It disables the add button, but the import button is still enabled. Also it is still possible to edit a contact, which is inconsequent but necessary for my purpose.
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/UU/11A3LSEh/automatic_addressboo.zip Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
On Thu, 24 Sep 2009 02:12:53 +0200, Jocelyn Delalande jocelyn.lists08@crapouillou.net wrote:
Hi,
I attach a patch with mysql schema, russian translation and 0.3 compatibility fixes.
Ok, nice ! integrated your patch.
Here is one more patch inline, it's trivial:
--- automatic_addressbook.php.orig 2009-09-27 06:32:35.000000000 +0200 +++ automatic_addressbook.php 2009-09-27 06:29:34.000000000 +0200 @@ -134,9 +134,11 @@ class automatic_addressbook extends rcub }
public function save_prefs($args) {
$rcmail = rcmail::get_instance();
$use_auto_abook = $rcmail->config->get('use_auto_abook');
$args['prefs']['use_auto_abook'] =
isset($_POST['_use_auto_abook']) ? true : false;
if ($args['section'] == 'compose') {
$rcmail = rcmail::get_instance();
$use_auto_abook = $rcmail->config->get('use_auto_abook');
$args['prefs']['use_auto_abook'] =
isset($_POST['_use_auto_abook']) ? true : false;
}
return $args;
}Otherwise setting is discarded on the save action in another config section.
Vladislav
List info: http://lists.roundcube.net/dev/
Hi Roland, hi all
On Fri, 25 Sep 2009 15:30:20 +0200, Roland Liebl roland@roland-liebl.de wrote:
(i) I defined the automatic addressbook as readonly *). I think it
should
not be possible to add manually created items to the automatic
addressbook.
But how one can delete unneeded contacts from that addressbook then? We should find a way to only disable 'create' and 'import' actions.
Does anyone have a clue how to disable the import button aswell? (ii) If a automatically added contact is edited, the contact is moved to the default addressbook and removed from the automatic addressbook. I
think
when a user edits a contact, we can assume that it is accepted as a permanent personal contact. My code modifications presume that the
default
addressbook source is always "0". Is this right or would it be better to use a configurable value?
Move to the personal address book on edit is a bit unclear for end user... It leads to hundreds of questions "Where are my contacts?". It is much better to add dragging support to addressbooks... And expand contextmenu plugin to addressbooks too.
Vladislav
List info: http://lists.roundcube.net/dev/
----- Original Message ----- From: "Vladislav Bogdanov" bubble@hoster-ok.com To: roland@roland-liebl.de Cc: "Jocelyn Delalande" jocelyn.lists08@crapouillou.net; dev@lists.roundcube.net Sent: Sunday, September 27, 2009 6:55 AM Subject: Re: [RCD] automatic addressbook plugin
Hi Roland, hi all
On Fri, 25 Sep 2009 15:30:20 +0200, Roland Liebl roland@roland-liebl.de wrote:
(i) I defined the automatic addressbook as readonly *). I think it
should
not be possible to add manually created items to the automatic
addressbook.
But how one can delete unneeded contacts from that addressbook then? We should find a way to only disable 'create' and 'import' actions.
I disabled 'create' and 'import' now by $rcmail->output->command('enable_command','add','import',false);
Does anyone have a clue how to disable the import button aswell? (ii) If a automatically added contact is edited, the contact is moved to the default addressbook and removed from the automatic addressbook. I
think
when a user edits a contact, we can assume that it is accepted as a permanent personal contact. My code modifications presume that the
default
addressbook source is always "0". Is this right or would it be better to use a configurable value?
Move to the personal address book on edit is a bit unclear for end user... It leads to hundreds of questions "Where are my contacts?". It is much better to add dragging support to addressbooks... And expand contextmenu plugin to addressbooks too.
Drag and drop is way out of my javascript skills. Personally I like the 'move on edit' behavior. But you are right, it might not be the behavior a end user is expecting. I made it configurable now (only admin level, not a user setting).
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/T4/SU0YiduP/automatic_addressboo.zip Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
Hi,
I globally agree with modifications you bring to the plugin (especially move-on-edit which is, -at least for myself-, a logical behaviour) I seen that Roland, you reverted the readonly to FALSE, I don't know for what purpose but it's benefic, as it's allow user to delete some automatic contacts (ex: wrong or no longer used address).
just one point :
(i) Removed installer (got a http 500 error). I think we do not expect to much if we only provide the sql scripts.
Well, maybe the kind of installer I made is not the real solution and not working very well. But I think a raw sql script is a bit to raw... roundcube is quite easy to install.
It's surprising me a bit that such a problematic didn't happened with other plugins, I'm really not familliar with the project but do you plan to allow a kind of installation hooks for plugins ?
For the 500 error, it may be due to the fact you put long SQL comments (/* spam egg */) which the installer didn't handle.
I integrated all of your (Vladislav & Roland) edits, see latest release :
http://crapouillou.net/~jocelyn/ressources/roundcube/
Regards,
Jocelyn
P.S : please if you do changes, attach patches instead of/along with zip, it's easier to see/apply modifications, thanks !
#3 General
(i) I defined the automatic addressbook as readonly *). I think it should not be possible to add manually created items to the automatic addressbook. Does anyone have a clue how to disable the import button aswell? (ii) If a automatically added contact is edited, the contact is moved to the default addressbook and removed from the automatic addressbook. I think when a user edits a contact, we can assume that it is accepted as a permanent personal contact. My code modifications presume that the default addressbook source is always "0". Is this right or would it be better to use a configurable value?
Regards, Roland
*) May be this works only because app.js is inconsequent at this point. It disables the add button, but the import button is still enabled. Also it is still possible to edit a contact, which is inconsequent but necessary for my purpose.
List info: http://lists.roundcube.net/dev/
Hi again,
I attach an updated version of my address book expansion patch and also a screenshot of how it looks now. As you can see I have swapped the layout from having a vertical splitter to a horizontal one. I am unsure about which is better and the layout is still a work in progress so any feedback is welcome.
Other changes in this version are the use of tabs to separate the sections of the address book, rather than having it all on one screen and support for expanded LDAP address books.
I have re-structured the code slightly for greater flexibility and now all the address book fields, and what section they are in, are defined in program/steps/addressbook/func.inc. Ultimately perhaps this could be moved to the main config and then people could set which fields they want in their address book.
For the extra fields in LDAP I added this to the setup in my main.inc.php:
… 'title_field' => 'title', // this field represents the contact's title 'telephone_field' => 'homePhone', // this field represents the contact's home telephone number 'cellphone_field' => 'mobile', // this field represents the contact's mobile telephone number 'homeaddress_field' => 'homePostalAddress', // this field represents the contact's home address 'organization_field' => 'o', // this field represents the contact's company name 'orgtelephone_field' => 'telephoneNumber', // this field represents the contact's work telephone number 'orgfax_field' => 'facsimileTelephoneNumber', // this field represents the contact's work fax number 'orgaddress_field' => 'postalAddress', // this field represents the contact's work address 'notes_field' => 'description', // this field represents the contact's notes field …
I don’t really know anything about LDAP so I’m not sure if those field names are standard or just what freeldap.org use. It’s the key names (the *_field bit) which are important, they map to the RC address book fields.
As with the last version no changes to the DB are needed.
One other thing, in the default address book there is a “birthday” field, taken from the vCard, at the moment the input for this is simply a text box and then the data is passed though strtotime(). There is no validation on that field yet. I was thinking perhaps it would be best to use a date picker JS widget to make sure they input is in the right format. Does any one have any other suggestions? I expect there is a nice jQuery plugin we could use.
Phil
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/H9/Z66bnkKF/rc_addressbook.jpg http://detached.gigo.com/rc/H9/Z66bnkKF/rc_addressbook.r3010.patch Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
Phil Weir wrote:
I attach an updated version of my address book expansion patch and also a screenshot of how it looks now. As you can see I have swapped the layout from having a vertical splitter to a horizontal one. I am unsure about which is better and the layout is still a work in progress so any feedback is welcome.
Screenshot looks really cool.
I'll go through the code in few days, it now in my todo tasks.
I don’t really know anything about LDAP so I’m not sure if those field names are standard or just what freeldap.org use. It’s the key names (the *_field bit) which are important, they map to the RC address book fields.
This is usually controlled by an LDAP schema which is quite standard (quick look says me that you use inetOrgPerson objectClass or something similar for mapping).
Vladislav _______________________________________________ List info: http://lists.roundcube.net/dev/
updated patch for latest SVN.
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/gd/eDBcbvdV/rc_addressbook.r3101.patch Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
Hi,
Here is another update to my extended address book patch. There are a couple of big changes this time:
Addition of 'auto_complete' function in the addressbook class, is called from steps/mail/autocomplete.inc: rather than performing one fixed search in all address books moving the function to the class allows each one to search what ever fields it wants – for example multiple email fields.
The patch has been split into 2 parts, the first adds all the extra features but leaves the UI approximately the same as it is now (2 or 3 columns). The second (should be applied after the first) alters the UI so it looks more like the mailbox screen – 2 horizontal blocks, or 1 vertical and 2 horizontal. Which layout do people prefer?
Phil
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/eQ/V5fdNVJA/rc_addressbook.r3105.patch http://detached.gigo.com/rc/eQ/V5fdNVJA/rc_addressbook.r3105.1.patch Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
hey phil,
first thanks for your work on an extended addressbook, i believe that it's an important improvement for roundcube!
On 15/11/2009 Phil Weir wrote:
Here is another update to my extended address book patch. There are a couple of big changes this time:
Addition of 'auto_complete' function in the addressbook class, is called from steps/mail/autocomplete.inc: rather than performing one fixed search in all address books moving the function to the class allows each one to search what ever fields it wants – for example multiple email fields.
The patch has been split into 2 parts, the first adds all the extra features but leaves the UI approximately the same as it is now (2 or 3 columns). The second (should be applied after the first) alters the UI so it looks more like the mailbox screen – 2 horizontal blocks, or 1 vertical and 2 horizontal. Which layout do people prefer?
i think i prefer the original layout without second patch. but maybe that's just me.
but i've two further comments:
first, with your patch applied i always get a error message when browsing the addressbook:
SERVICE CURRENTLY NOT AVAILABLE! Error No. [501]
this error disappears when i browse an existing contact or select 'add new contact', thus i guess it doesn't affect the functionality of the addressbook, but it's still annoying.
second, it would be really great if you could add contact groups to the extended addressbook. that way it would be much easier to maintain big lists of addresses (useful for newsletters or birthday party invites).
and again, thanks for your work on this feature!
greetings, jonas
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/MU/Bkb4K3EV/signature.asc Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
On Sun, 15 Nov 2009 15:45:27 +0100, Jonas Meurer jonas@freesources.org wrote:
first, with your patch applied i always get a error message when browsing the addressbook:
SERVICE CURRENTLY NOT AVAILABLE! Error No. [501]
the patch should have added a new files at skins/default/templates/blankcontact.html. did you see any errors when you applied it? just incase i have attached the template file.
second, it would be really great if you could add contact groups to the extended addressbook. that way it would be much easier to maintain big lists of addresses (useful for newsletters or birthday party invites).
i have seen the contact groups thing on the roadmap and if i am honest i dont really have any idea what it should be like but if some one can give me some suggestions i am happy to give it a go.
and again, thanks for your work on this feature!
i'm glad you like it.
Phil
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/HS/twDwHZNZ/blankcontact.html Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
hey phil,
On 15/11/2009 Phil Weir wrote:
On Sun, 15 Nov 2009 15:45:27 +0100, Jonas Meurer jonas@freesources.org wrote:
first, with your patch applied i always get a error message when browsing the addressbook:
SERVICE CURRENTLY NOT AVAILABLE! Error No. [501]
the patch should have added a new files at skins/default/templates/blankcontact.html. did you see any errors when you applied it? just incase i have attached the template file.
argh, you're right. the new file wasn't created for some reason. i managed to apply the patch cleanly now, and the problem disappeared.
second, it would be really great if you could add contact groups to the extended addressbook. that way it would be much easier to maintain big lists of addresses (useful for newsletters or birthday party invites).
i have seen the contact groups thing on the roadmap and if i am honest i dont really have any idea what it should be like but if some one can give me some suggestions i am happy to give it a go.
i have thought of something like a groups field for contacts, and when chosing recipients at sending mail, you can use groups instead of all seperate contacts.
i.e. some dialog to manage contact groups would be required, and every contact could be added to any existing contact group.
greetings, jonas
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/QQ/6Y3CKTaF/signature.asc Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
Hi,
Here is a small update to my address book patch. There are 2 changes from the previous version:
address book not always the default one and fade the icon out (disable the import function) when the address book is read only.
Phil
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/be/97UpbuPM/rc_addressbook.r3189.patch Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/
On 12/31/2009 8:42 AM, Phil Weir wrote:
Here is a small update to my address book patch. There are 2 changes from the previous version:
- Fade out the "Add Contact" icon when an address book is read only.
- Make the "Import" function import addresses into the currently selected
address book not always the default one and fade the icon out (disable the import function) when the address book is read only.
I have been meaning to test this since the first message in this thread, but work has been unusually busy these past two months.
Unfortunately, this patch no longer applies cleanly to trunk (r3240) - any chance of getting an updated version?
Also, is there some reason this patch hasn't found its way into trunk? Looks like there is already a ticket for this feature: http://trac.roundcube.net/ticket/1327071
Jim _______________________________________________ List info: http://lists.roundcube.net/dev/
On Sun, 31 Jan 2010 19:46:59 -0500, Jim Pingle lists@pingle.org wrote:
On 12/31/2009 8:42 AM, Phil Weir wrote:
Here is a small update to my address book patch. There are 2 changes
from
the previous version:
- Fade out the "Add Contact" icon when an address book is read only.
- Make the "Import" function import addresses into the currently
selected address book not always the default one and fade the icon out (disable the import function) when the address book is read only.
I have been meaning to test this since the first message in this thread, but work has been unusually busy these past two months.
Unfortunately, this patch no longer applies cleanly to trunk (r3240) - any chance of getting an updated version?
Both the changes mentioned above were merged into the trunk last week (r3228) - thanks Thomas!. A version of the patch which works with r3240 can be found in the patches section here http://tehinterweb.co.uk/roundcube/. Let me know how you get on.
Also, is there some reason this patch hasn't found its way into trunk? Looks like there is already a ticket for this feature: http://trac.roundcube.net/ticket/1327071
Alec said he would look into merging this patch once the threaded message listing is done so I think we just need to be patient.
Phil _______________________________________________ List info: http://lists.roundcube.net/dev/
On 2/1/2010 3:23 AM, Phil Weir wrote:
On Sun, 31 Jan 2010 19:46:59 -0500, Jim Pingle lists@pingle.org wrote:
I have been meaning to test this since the first message in this thread, but work has been unusually busy these past two months.
Unfortunately, this patch no longer applies cleanly to trunk (r3240) - any chance of getting an updated version?
Both the changes mentioned above were merged into the trunk last week (r3228) - thanks Thomas!. A version of the patch which works with r3240 can be found in the patches section here http://tehinterweb.co.uk/roundcube/. Let me know how you get on.
Awesome, thanks! That patch applied cleanly and seems to work well. I've got it going on my personal RC install, and as soon as I manage to get a recent trunk going on my work server I'll patch that one up too.
Also, is there some reason this patch hasn't found its way into trunk? Looks like there is already a ticket for this feature: http://trac.roundcube.net/ticket/1327071
Alec said he would look into merging this patch once the threaded message listing is done so I think we just need to be patient.
Fair enough. I saw that ticket and that it hadn't been updated and though perhaps there was something else going on. I'll keep waiting.
Thanks for the update, I'll report back if there are any problems.
Jim _______________________________________________ List info: http://lists.roundcube.net/dev/
On Mon, Feb 1, 2010 at 9:23 AM, Phil Weir roundcube@tehinterweb.co.uk wrote:
On Sun, 31 Jan 2010 19:46:59 -0500, Jim Pingle lists@pingle.org wrote:
On 12/31/2009 8:42 AM, Phil Weir wrote:
Here is a small update to my address book patch. There are 2 changes
from
the previous version:
- Fade out the "Add Contact" icon when an address book is read only.
- Make the "Import" function import addresses into the currently
selected address book not always the default one and fade the icon out (disable the import function) when the address book is read only.
I have been meaning to test this since the first message in this thread, but work has been unusually busy these past two months.
Unfortunately, this patch no longer applies cleanly to trunk (r3240) - any chance of getting an updated version?
Both the changes mentioned above were merged into the trunk last week (r3228) - thanks Thomas!. A version of the patch which works with r3240 can be found in the patches section here http://tehinterweb.co.uk/roundcube/. Let me know how you get on.
Also, is there some reason this patch hasn't found its way into trunk? Looks like there is already a ticket for this feature: http://trac.roundcube.net/ticket/1327071
Alec said he would look into merging this patch once the threaded message listing is done so I think we just need to be patient.
Phil
Hey Phil,
awesome work on the addressbook! Thanks a million!
Till _______________________________________________ List info: http://lists.roundcube.net/dev/