[Kolab-devel] SyncKolab and Kolab2
Niko Berger
niko.berger at corinis.com
Fri Apr 29 01:36:43 CEST 2005
Hi all,
I am wirting the synckolab extension, but hence I do not have too much
time at my hands I am looking for someone who could write/fix
contact<->kolab2xml calendar<->kolab2xml format functions. kolab1 is
done and hsould work quite well. If anyone wants to help you can get the
extension+souce from www.gargan.org/extensions/synckolab.html (current
version is 0.4.7).
Some informations on how/where to implement it:
The calendar conversion functions are found in
contactTools.js/calTools.js the reading of kolab2 are the functions:
xml2Card (contacts) and xml2Event (calendar). They do work, but I dont
know if they have everything covered.
The other way round should be card2Xml(card) (returns the xml-content as
String) and event2Xml(event) (return String).
The best start would be to look at card2Message in contactTools, which
converts a tbird card into a vcard.
Just add:
Line 466:
if (card.custom4 == null || card.custom4.length < 2)
return null;
+ if (format == "Xml")
+ return card2Xml(card);
// save the date in microseconds
and implement card2Xml(card). Make sure to add the email headers (see
from line 484). To test it just remove following 3 lines from adressbook.js:
Line 25:
this.format =
pref.getCharPref("SyncKolab."+config+".AddressBookFormat");
this.gSaveImap =
pref.getBoolPref("SyncKolab."+config+".saveToContactImap");
- // since Imap saving does not work with xml - disable this
- if (this.format == "Xml")
- this.gSaveImap = false;
} catch(e) {
return;
similar way for calendar (but a little differnt since i dont have a
message2event instead using the calendar internal functions).
Thanks in advance
Niko
More information about the devel
mailing list