Results 1 to 3 of 3

Thread: Is this possible with a Zimlet? Intranet company DB lookup

  1. #1
    batfastad is offline Elite Member
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    297
    Rep Power
    8

    Question Is this possible with a Zimlet? Intranet company DB lookup

    Hi everyone

    I've been keeping an eye on Zimbra for over 2 years now, happily watching it get better and better.
    Our Exchange hardware is reaching the end of its life soon and Zimbra is looking like a much better replacement! I cannot wait to get rid of Exchange!!
    There's still a few deal-breaker features that I'm waiting on though, but from looking at pm.zimbra ZCS6 should be the one for us!

    I really like the idea of being able to customise some of the features by using Zimlets, but I'm not sure about what Zimlets can and cannot do.

    We have an intranet database running a standard Apache/PHP/MySQL which stores all our company contacts information, orders etc.

    Would it be possible to do something like this:
    When a user hovers over a from name/email address in the mail view, a zimlet sends the from e-mail address to an intranet PHP script which basically searches our DB.
    The PHP script returns a direct link to that particular company and possibly other information (if just 1 result was found).
    This link and info could then be displayed in the popup you get when you hover over an email address, or as an overlay somewhere else on the Zimbra UI (havn't quite thought it through that far yet).

    But that would be a really cool thing for us. So when we receive an email from a customer a quick click can take us straight to their record in our intranet DB.

    Is something like that possible?

    Thanks, Ben

  2. #2
    ab5602 is offline Project Contributor
    Join Date
    Nov 2007
    Location
    Detroit, MI
    Posts
    67
    Rep Power
    7

    Default

    Hi, this is certainly possible and doable with a Zimlet. The Zimlet API lets you define a REGEX match for text within the Web client to launch an action. For instance, in the following code for an example "com_zimbra_myzimlet.xml" file, the 'matchOn' tag specified the regular expression that you want to match and the onClick tag handle what happens when a match to your regex happens. You can add specialized functionality with your own Java or Javascript code as needed.

    Code:
    <zimlet name="com_zimbra_myzimlet" version="0.1"
    	description="My Zimlet" xmlns:html="http://www.w3.org/1999/xhtml">
    	<include>myzimlet.js</include>
    	<includeCSS>myzimlet.css</includeCSS>
    	<handlerObject>Com_Zimbra_Myzimlet</handlerObject>
    	
    	<contentObject type="myzimlet">
    		<matchOn>
    			<regex attrs="ig">([a-zA-Z]{2}[0-9]{4})</regex>
    		</matchOn>
    		<toolTip sticky="true" width="250" height="350">
    			<html:span style="font: 120% Georgia;">Lookup my information externally</html:span>
    		</toolTip>
    		<onClick>
    			<canvas type="window" width="250" height="350"/>
    			<actionUrl method="get" target="http://my.external.url.com">
    				<param name="myparameter">${src.$1}</param>
    			</actionUrl>
    		</onClick>
    	</contentObject>
    
    	<zimletPanelItem label="My Zimlet" icon="MYZIMLET-panelIcon">
    		<toolTipText>Click to search my database.</toolTipText>
    	</zimletPanelItem>
    </zimlet>

  3. #3
    batfastad is offline Elite Member
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    297
    Rep Power
    8

    Default

    Ok that's excellent.
    We don't actually have a Zimbra installation to test on yet, but as soon as we do this is definitely a project I want to work on

    Thanks for the info

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. [SOLVED] Amavisd-Postfix RCPT TO Takes a long time
    By samuraii in forum Administrators
    Replies: 8
    Last Post: 02-11-2009, 03:34 PM
  3. Outlook 2007 Beta error
    By bersrker in forum Zimbra Connector for Outlook
    Replies: 13
    Last Post: 07-17-2008, 07:38 AM
  4. Replies: 5
    Last Post: 01-11-2008, 05:34 AM
  5. 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
  •