Results 1 to 9 of 9

Thread: Uk tel no and zimlets

  1. #1
    nickteagle is offline Member
    Join Date
    Sep 2006
    Posts
    14
    Rep Power
    8

    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

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,201
    Rep Power
    56

    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


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    nickteagle is offline Member
    Join Date
    Sep 2006
    Posts
    14
    Rep Power
    8

    Default Access

    Thanks Bill, do you know how I can access the code ? what is the zimlet called ?Nick

  4. #4
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,201
    Rep Power
    56

    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


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    Klug's Avatar
    Klug is offline Moderator
    Join Date
    Mar 2006
    Location
    Beaucaire, France
    Posts
    2,292
    Rep Power
    13

    Default

    It's the same for the day names when you have a non-english language...

  6. #6
    colinc is offline New Member
    Join Date
    Jan 2006
    Location
    Manchester, UK
    Posts
    3
    Rep Power
    9

    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|$)

  7. #7
    Dirk's Avatar
    Dirk is offline Moderator
    Join Date
    May 2006
    Location
    England.
    Posts
    927
    Rep Power
    9

    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?

  8. #8
    colinc is offline New Member
    Join Date
    Jan 2006
    Location
    Manchester, UK
    Posts
    3
    Rep Power
    9

    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.

  9. #9
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,201
    Rep Power
    56

    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


    Acompli: A new adventure for Co-Founder KevinH.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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