Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-14-2007, 01:46 AM
New Member
 
Posts: 4
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?
Reply With Quote
  #2 (permalink)  
Old 05-15-2007, 03:16 AM
Senior Member
 
Posts: 59
Default

Could you provide your code please?

Have a look on MatchOn...
Reply With Quote
  #3 (permalink)  
Old 05-16-2007, 02:28 AM
New Member
 
Posts: 4
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
Reply With Quote
  #4 (permalink)  
Old 05-16-2007, 06:21 AM
Senior Member
 
Posts: 59
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
Reply With Quote
  #5 (permalink)  
Old 10-09-2008, 03:24 AM
New Member
 
Posts: 4
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.
Reply With Quote
  #6 (permalink)  
Old 10-09-2008, 06:12 AM
Zimlet Guru & Moderator
 
Posts: 265
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">
Reply With Quote
  #7 (permalink)  
Old 10-09-2008, 06:45 AM
New Member
 
Posts: 4
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!
Reply With Quote
  #8 (permalink)  
Old 10-09-2008, 09:06 AM
Zimlet Guru & Moderator
 
Posts: 265
Default

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.