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 09-13-2006, 02:34 AM
Member
 
Posts: 14
Default Uk tel no and zimlets

I have just setup Zimbra and i am looking at the zimlets and noticed the one that recognizes telephone numbers only seems to work on US based numbers. Is there a version of pattern matching which works on UK numbers or is there anywhere I can configure it ?

Thanks Nick
Reply With Quote
  #2 (permalink)  
Old 09-13-2006, 02:41 AM
Zimbra Consultant & Moderator
 
Posts: 20,319
Default

You're correct, the zimlet only recognises the US phone number format. The only place to modify it would be in the zimlet code itself.
__________________
Regards


Bill
Reply With Quote
  #3 (permalink)  
Old 09-13-2006, 02:50 AM
Member
 
Posts: 14
Default Access

Thanks Bill, do you know how I can access the code ? what is the zimlet called ?Nick
Reply With Quote
  #4 (permalink)  
Old 09-13-2006, 03:19 AM
Zimbra Consultant & Moderator
 
Posts: 20,319
Default

You'll find the code for all the zimlets in /opt/zimbra/zimlets and the extra ones in /opt/zimbra/zimlets-extra - I suppose the most useful thing would be to add an option for the phone number format based on the browser language. You'll need to deploy the zimlet after you've modified it, have a look at these two articles in the wiki here and here

HTH
__________________
Regards


Bill
Reply With Quote
  #5 (permalink)  
Old 09-13-2006, 07:12 AM
Moderator
 
Posts: 2,207
Default

It's the same for the day names when you have a non-english language...
Reply With Quote
  #6 (permalink)  
Old 09-27-2006, 06:16 AM
New Member
 
Posts: 3
Thumbs up

I have been using this regular expression to recognise UK telephone numbers.

It will recognise telephone numbers in the following UK formats as well as the default US format;
  • (0nnnn) nnnnnn
  • 0nnnn nnnnnn
  • (0nnn) nnn nnnn
  • 0nnn nnn nnnn
  • 0nnnnnnnnnn
  • +ccnnnnnnnnnn (c = countrycode)
  • +cnnnnnnnnnn

Code:
(^|\W)(?:\+\d{12}|\+\d{11}|0\d{10}|(?:\+1\s+)?(?:(?:\((?:\d{3}|0\d{3}|0\d{4})\)[-.\s]?|(?:\d{3}|0\d{3}|0\d{4})[-.\s]))?(?:\d{6}|\d{3}[-.\s]\d{4}))(\W|$)
Reply With Quote
  #7 (permalink)  
Old 09-27-2006, 09:21 AM
Moderator
 
Posts: 927
Default

Looks good. I'll make this same change on our server, I just wish there was an easier way than copying the file to a windows box, unzipping it, editing the file, rezipping, copying back to the zimbra server, removing the zimlet, redeploy the zimlet and restarting tomcat... it's just a pain!

So much so, that I feel I must be doing something wrong, or is this really the only way to make any changes?

I'm also curious what would happen to the changed file when the next version of zimbra is installed.

Ideally, having that regex setup by the zimbra team would be nice, but I know that as soon as they do that then people in regions that still dont match will want theirs to work also and then the zimbra crew need to make the phone zimlet i18n in order to shut people up!

I'll do it myself But is there an easier way than the process I said at the start?
Reply With Quote
  #8 (permalink)  
Old 09-28-2006, 12:10 AM
New Member
 
Posts: 3
Lightbulb

I don't think there is any better way at the moment.

Maybe in the future it would be a good idea to have the default RegEx overridable in the zimlet configuration file. That way, it wouldn't change when the system is upgraded and you would be able to apply changes with the zmzimletctl configure command.
Reply With Quote
  #9 (permalink)  
Old 09-28-2006, 12:16 AM
Zimbra Consultant & Moderator
 
Posts: 20,319
Default

I guess you can always add an RFE in bugzilla for features relating to zimlets, KevinH is also the man to answer questions about zimlets.
__________________
Regards


Bill
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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.