Results 1 to 8 of 8

Thread: How to make my zimlet work on the address book

  1. #1
    JAdj is offline New Member
    Join Date
    May 2007
    Posts
    4
    Rep Power
    8

    Default How to make my zimlet work on the address book

    Hello All.

    I have developed a Zimlet, and it is working fine on email bodies' text, but unfortunately when it comes to address books it doesn't work. Email zimlet works on address book, Phone zimlet works too, but my zimlet only works on the text of user messages, not on the phone book.

    How can I fix this problem?

  2. #2
    easytouch's Avatar
    easytouch is offline Senior Member
    Join Date
    Nov 2006
    Location
    Vienna, Austria (Europe)
    Posts
    59
    Rep Power
    8

    Default

    Could you provide your code please?

    Have a look on MatchOn...

  3. #3
    JAdj is offline New Member
    Join Date
    May 2007
    Posts
    4
    Rep Power
    8

    Default

    Hi!

    I think the problem is not on the matchon Expression, 'cause I tried writing a phone number in the 'City' blank on a contact on my address book and Phone Zimlet is not recognizing that as a phone number.

    Given that, I'm guessing that there may be some kind of properties file in which you can tell Zimbra where you want your zimlets to work and where not.

    Anyway, here you have my <matchon>, if it helps.

    <matchOn>
    <regex attrs="ig">\b(sip\{1}[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b</regex>
    </matchOn>

    Any help will be appreciated.
    Thank you very much

  4. #4
    easytouch's Avatar
    easytouch is offline Senior Member
    Join Date
    Nov 2006
    Location
    Vienna, Austria (Europe)
    Posts
    59
    Rep Power
    8

    Default

    *bump* I am not that brainy and because of limited time, I can not directly help you debugging this regex.

    I would advise two things:

    Look in detail on the regular expression, or simply take one from the original phone number zimlet and try to change it very slowly, by taking care after each step if it works, and where it is active.

    Have a look at an article here in the forums, where there are problems described about international phone numbers and other related context zimlets.

    Another good tip is: Deploy your zimlet and then copy the zimlets folder into a newly created subfolder _dev. If it is there, it will be loaded every time you refresh the clients webbrowser. you save a lot of time if you do not need to undeploy, deploy every time you do debugging.

    Sorry that I have no more concrete answer today, greetings, Robert

  5. #5
    pgonzalez is offline New Member
    Join Date
    Oct 2008
    Posts
    4
    Rep Power
    6

    Default

    Hello, and thanks to everyone for this wanderfull forum.

    We are developping a zimlet in order to perform a regex match on phone numbers (not quite like the com_zimbra_phone one, but using spanish format) and, once clicked over the selected phone, automatically make a phone call using zimbra and your extension. Every thing fine so far, but the problem comes on matching phone numbers inside the address book. I can only get matches on "notes" inside contacts, but no inside anything else. I can't understand why, and I've tryed nearly everything. The most embarrasing thing is that com_zimbra_url is quite simple, and DOES recognize urls inside contacts (although not on every field).

    How comes such a thing?, What do I need to know?. I'm sure my regular expression matches just what I need, but just to be sure I tried to use another one, quite simple:

    <regex attrs="ig">(xpollas)</regex>

    and nop: it doesn't work inside contacts either (but contact notes, offcourse). It works flawlessly everywhere but inside contacts.

    I've taken a look inside a lot of other zimlets, even com_zimbra_phone, and I can't figure out what is failing on mine. I've even tryed to debug printing the line passed to the ".match(" method inside the javascript file, and the most amazing thing is that... It never prints the lines inside contacts!!!. I did the same change to com_zimbra_url... ¡and it does!



    If someone could please bring some light to this matter, I would really apreciate it. Thanks in advance.

    Pedro.

  6. #6
    tdesorbaix is offline Zimlet Guru & Moderator
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    367
    Rep Power
    8

    Lightbulb

    To get your expression detected in the phone fields of a contact use the type "phone" for the contentObject (like the zimlet phone) :
    Code:
    <contentObject type="phone">

  7. #7
    pgonzalez is offline New Member
    Join Date
    Oct 2008
    Posts
    4
    Rep Power
    6

    Default

    amazing, ¿just that?, ¿that easy?... I was about to get crazy, really. ¿what other types are there predefined?, or where can I read about them?

    Thanks a lot, really!

  8. #8
    tdesorbaix is offline Zimlet Guru & Moderator
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    367
    Rep Power
    8

    Default

    The other types I know and that works with the contacts:
    "date"
    "url"
    "email"
    "address"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 10:06 AM
  2. How to make entries in the global address book?
    By jannik.sueltz in forum Administrators
    Replies: 48
    Last Post: 11-05-2009, 05:57 PM
  3. [SOLVED] Zimbra not syncing properly with Address Book and iCal
    By Colin Day in forum CalDAV / CardDAV / iSync
    Replies: 4
    Last Post: 07-13-2007, 08:52 AM
  4. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •