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 03-09-2007, 07:06 AM
Project Contributor
 
Posts: 47
Default com_zimbra_ymaps drag-and-drop canada

This address works if I enter it in the yahoo maps pop-up window:

2924 11 St. N.E. Calgary, AB T2E 7L7 CA

but does not work if it is an email message (text is not identified as being hoverable)

and drag and drop of a CA address does not work because it looks like the zimbra java code is alwaysing putting in country=US

Any idea how we can correct this?
Thanks,
Jim...
Reply With Quote
  #2 (permalink)  
Old 03-09-2007, 07:22 AM
Project Contributor
 
Posts: 47
Default a Fix?

Well, I knew I shuld have played around with it before posting ;-(

I added this line in com_zimbra_ymaps.xml in the <dragSource> tag:

<param name="country">${obj.workCountry}</param>

and it seems to work.
Jim...
Reply With Quote
  #3 (permalink)  
Old 04-15-2007, 10:23 AM
Junior Member
 
Posts: 8
Default

Don't know if it can help you, but I worked this morning on a regex to identify canadian addresses...

Haven't tested it extensively yet, but it seems to work so far... (for Canadian and US addresses at least)

Code:
\b\d+[A-Za-z]?[ ]+([ewns]\.?[ ]+)?[A-Za-z0-9]+([ ]+[A-Za-z0-9]+)*[\s,\.](\s*(\#|[A-Za-z]+[,\.]?)[ ]*\d+[\s,\.])?\s*[A-Za-z]+([ ]+[A-Za-z]+)*[ ,][ ]*[A-Za-z]{2}([A-Za-z]+([ ][A-Za-z]+)?)?[ ]+((\d{5})|(-\d{4})|([ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d))\b
It doesn't need the CA at the end to identify Canada, since there is the postal code... In any case, this regex works if you enter "2924 11 Calgary, AB T2E 7L7"

If you plan on using this zimlet, delete the one you already have and rename this one com_zimbra_ymaps.zip if you want to integrate correctly... if you don't rename it, it will complain that it can't find the zimlet or report installation successful over it will not be active
Attached Files
File Type: zip com_zimbra_ymaps_modifiedregex.zip (3.9 KB, 64 views)

Last edited by Tenshi; 07-01-2007 at 06:58 AM..
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.