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-08-2008, 08:09 AM
Elite Member
 
Posts: 275
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
Reply With Quote
  #2 (permalink)  
Old 09-15-2008, 07:40 PM
Project Contributor
 
Posts: 67
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>
Reply With Quote
  #3 (permalink)  
Old 09-20-2008, 08:42 AM
Elite Member
 
Posts: 275
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
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.