Zimbra News
Zimbra: RT @sotaventure So my Outlook crashed this morning (no surprise) decided to switch to @Zimbra desktop.I think it rocks. http://bit.ly/qpcBG
Zimbra: Using Templates to Simplify HTML and Zimlets http://is.gd/a32uw
Using Templates to Simplify HTML and Zimlets
If you have ever written a Zimlet that includes HTML markup directly in JavaScript, you know that escaping and formatting the HTML can be a cumbersome and error prone process.
There is an easier way: Templates. Templates allow you to separate HTML markup from JavaScript code. This enables you to leverage HTML in your Zimlets without the formatting hassles.
The Problem
A common technique for using HTML markup within JavaScript is to use an Array() and append HTML markup data as array entries. Once you have all of the HTML markup in the Array(), you perform an Array.join() to create a single String that represents the HTML markup.
For example, say you wanted you to use the following HTML in your Zimlet:
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tbody>
<tr>
<td colspan="2">This is a sample table HTML code...</td>
</tr>
</tbody>
</table>
Using the Array() technique, your JavaScript would look like:
var htmlArray = new Array(); var i = 0;
htmlArray[i++] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\"><tbody><tr><td colspan=\"2\">";
htmlArray[i++] = "This is a sample table HTML code...";
htmlArray[i++] = "</td></tr></tbody></table>";
htmlMarkup = html.join("");
Even with this simple HTML <table> example, you can see formatting the HTML into an Array() can be tedious. Plus, the extensive use of escaped characters makes it harder to debug the HTML markup. And if you include CSS and style elements with your HTML, the challenge only increases. It’s easy to see that using the JavaScript Array() technique can quickly become out-of-control.
The Solution
With Templates, you separate the HTML markup from your JavaScript code. You create a Template file that contains the HTML markup. That Template file gets compiled into JavaScript and that compiled Template can be referenced from your Zimlet JavaScript.
So instead of the JavaScript Array() technique described above, you can put the HTML markup directly in a Template file (just wrap the HTML in a <template> identification element) and compile.
Here is the same simple HTML <table> example from before in a Template file:
<template id="Simple">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tbody>
<tr>
<td colspan="2">This is a sample table HTML code...</td>
</tr>
</tbody>
</table>
</template>
Compiling the Template file converts the HTML markup into JavaScript that can be referenced and used from your Zimlet. No longer do you have to format and escape the HTML markup by hand.
To reference the compiled Template from your Zimlet, first, in your Zimlet Definition File XML, <include> the compiled Template as a resource. Then, in your Zimlet JavaScript, use AjxTemplate.expand() to retrieve the HTML markup from the Template.
var html = AjxTemplate.expand("com_zimbra_template.templates.Simple#Simple");
Now the HTML markup is available for use in your Zimlet as you see fit.
A Word about Compiling Templates
Prior to Zimbra Collaboration Suite 6.0.5, you had to compile your Templates manually and include the compiled Templates with your Zimlet ZIP package. We have tried to make that manual compilation process a little easier by providing a simple Template Compiler utility found here.
But new with is ZCS 6.0.5 is automatic template compilation. Template files included with your Zimlet are compiled at Zimlet deploy time, eliminating the need for manual compilation. This automatic compilation is also supported when using the Development Directory, which makes iterative development even easier.
One More Thing
Your Template can be more than just static HTML markup. You can pass data to the compiled Template when you call AjxTemplate.expand() and reference dynamic data within your Template.
var dataArray = {phone: "123-456-7890"}; canvas.innerHTML = AjxTemplate.expand("com_zimbra_template.templates.Simple#Simple", dataArray);
Useful Links
More information on creating, compiling and using dynamic data with Templates can be found here:
http://wiki.zimbra.com/index.php?title=ZCS_6.0:Zimlet_Developers_Guide:Templates
There are also examples available in the Zimlet Developer’s Guide:
- This example shows using a simple Template to display HTML in a tab.
http://wiki.zimbra.com/index.php?title=ZCS_6.0:Zimlet_Developers_Guide:Examples:Tab_Template
- This example shows using a Template to display HTML in a dialog.
Happy coding!
Zimbra: Zimbra headed to #nc2010 to speak with Plymouth State. Any great restaurant recommendations in Providence RI! http://bit.ly/blJtYb
Zimbra: RT @crythias Almost a complete convert to using Zimbra Desktop as a client to Gmail.
Upgrade from 4.5.11 to 6.0.4
All went well as I follow different thread on this forum, like moving from one server to another
Zimbra: RT @sshoup Is loving Zimbra Social Networking Features!!!!
5.0.11 to 6.0.5 upgrade (more-or-less) successful
Nice work guys, the only problems I had with the upgrade were self inflicted and the process was nicely logged and explained!
5.0.19 to 6.0.5 Multinode upgrade
There were minor post upgrade issues with the language files, but was otherwise a smooth upgrade.
KB shortcuts like Ctrl+X, Ctrl+C is not working for text selection using mouse in IE for html compose, not sure if it is a bug.
Regards.
Migration Mac OS 10.5 (ZCS 6.05 - 32bit) -> Ubuntu 8.04LTS (ZCS 6.05 - 64bit)
Basically I followed this procedure :
Network Edition: Moving from 32-bit to 64-bit Server - Zimbra :: Wiki
And instead of entering "zmcontrol start" at the end, I had to go back and do another install and choose the upgrade option (although 6.05 was already on the system). It didn't eat any mail and all the SSL stuff cranked right up afterward.
If I tried to run "zmcontrol start" at the end of the document above, mailboxd failed and there were numerous errors in LDAP and SSL.
Successful update from 6.0.3 to 6.0.5 NE CentOS x64
Upgrade 5.0.21 to 6.0.5 on CentOS 5.4 x64
I followed the following documents:
- Optimizing 5.0 to 6.0 LDAP upgrade
- Managing Customized BDB configurations
- Installing custom ldap schema 6.0
Errors encountered:
While none of the ldap start command did work, in the end the upgrade completed successfully.
ldap start
Failed to start slapd. Attempting debug start to determine error.
While those documents explain it all, it wasn't a step by step guide.
It took me about 1hour and a half and it worked first time!
Thanks to Zimbra for such a great product.
5.0.21 to 6.0.5 MultiServer Upgrade with 6000 Users
For some reason, Zimbra required us to modify our hosts file. When we did this on the other systems, everything went fine. When we did it on the Mailbox servers, one of them got upset:
Code: Upgrading from 5.0.21_GA_3150 to 6.0.5_GA_2213
Stopping zimbra services...done.
Verifying /opt/zimbra/conf/my.cnf
Starting mysql...done.
ERROR 1033 (HY000) at line 1: Incorrect information in file: './zimbra/config.frm'
Thu Feb 18 00:24:19 2010: Error while running '/opt/zimbra/bin/mysql --user=zimbra --password=************** --database=zimbra --batch --skip-column-names'. After I restored the /etc/hosts file back, I then tried to start Zimbra and got this error:
Code: 2010-02-18 00:42:03,940 ERROR [main] [] Versions - DB Version Mismatch: ours="64" from DB="53"
2010-02-18 00:42:03,940 FATAL [main] [] system - Data version mismatch. Reinitialize or upgrade the backend data store. I found some posts about DB Version Mismatches, which said to run the setup again, which we did and it corrected the problem.
The last problem we had was that the new convertd was selected (I forget it we chose to run it or if it defaulted YES). The new convertd caused some anomalies with search results. We haven't turned this off - instead we've done a few Mailbox Reindexes which seems to work (rather slowly) with correcting the search indexes.
Zimbra: Zimbra Transition to VMware is Complete http://is.gd/8tKAy
Zimbra Transition to VMware is Complete
It’s official– Zimbra is now a part of VMware.
As we settle into our new digs in Palo Alto, you can bet we remain as focused as ever on building and supporting the best open source email and collaboration software for our community, customers and partners. We’re committed to our mission to set the standard for Web-based collaboration and to VMware’s overall mission to simplify IT.
We’re excited to join VMware’s Cloud Services organization, helping to meet increasing customer demand for more public and private on-premises cloud computing services delivered through VMware’s innovative virtualization platform. Zimbra’s modular architecture and APIs make it ideal for virtualization, and for offering cloud-based email and collaboration services.
With VMware’s support, we’re looking forward to accelerating our product roadmap, optimizing Zimbra products for VMware’s vSphere cloud infrastructure, and continuing to build on the record growth that has allowed us to reach more than 55 million paid mailboxes in just five years.
Here’s to Zimbra and VMware!
6.0.4 - 6.0.5
Smooth and simple as usual.
Still need to stop memcached re-asserting itself at upgrades, any suggestions?
From 6.0.4 to 6.0.5
Before:
Release 6.0.4_GA_2038.RHEL5_20091214191028 CentOS5 FOSS edition
After:
Release 6.0.5_GA_2213.RHEL5_20100202220948 CentOS5 FOSS edition
The script /service/zimlet/res/Zimlets-nodev_all.js.zgz?language=nl seems to cause some trouble.
Posted here but no solutions:
http://www.zimbra.com/forums/install...ow-script.html
Should I install over the current installation?
Are you both a Z & V user?
If so, let us know by contacting vmware[~at~]zimbra.com We'd like to take a quick survey of deployments, and will be engaging in further communication on an individual basis, to examine areas were we can improve service and performance of both platforms (ie Zimbra running on VMware).
Yes you can participate even if using Zimbra Open Source or VMware free server.
Some helpful things to include in your first email to vmware@:
-Is your Zimbra instance running on a VMware deployment, or are you just using VMware elsewhere in your organization? (Have you given thought to virtualizing Zimbra at some point?)
-Zimbra Hardware setup; both physical (and virtual if it applies) server specs, cpu, mem, storage, net, etc?
-How many users?
-Are you a Network Edition customer of Zimbra? Direct or Partner (on-prem or HSP)?
-Are you a customer of VMware? Direct or Channel? (A provider datacenter setup, on-prem, or both.)
-VMware products used?
-In addition to VMware, are you using other virtualization solutions from another provider for x reason?
-Besides your Zimbra installation what's your ratio of virtual machines to physical.
-What is most likely your weakest link? ie: CPU, Disk, etc.
Zimbra: Revisiting the Zimbra REST API… http://tinyurl.com/yegf9dl
Successfull Installation on SLES 11 64 bit+Zimbra 6.0.5 FOSS Edition
Installing Zimbra 6.0.5 64 bit on SLES 11 64 bit


