以 PDF 格式下载本书 (1087 KB)
Chapter 4 Customizing Advanced Features in Messenger ExpressThis chapter describes how to perform advanced customizations. It also provides HTML files and their location and details on features that are fully customizable for the Sun Java System Messenger Express user interface. This chapter contains the following sections: Understanding Advanced CustomizationIn addition to the Messenger Express features discussed in Chapter 2, Customizing General Features in Messenger Express, and Chapter 3, Customizing User Interface Features in Messenger Express, many others are fully customizable. However, to take advantage of these features, an in-depth knowledge of JavaScript is required. In addition, migration problems might be encountered, for example, when attempting to reconfigure JavaScript files. Note – This chapter does not provide code samples for the advanced customizations. Also, an advanced knowledge of JavaScript and HTML is assumed. Locating the Customizable Files in Messenger Express User InterfaceLocating the Customizable Files in Messenger Express User Interface lists the features of the Messenger Express user interface that are fully customizable. Table 4–1 Messenger Express User Interface Customizable Features
Modifying AttachmentsYou can modify the following attachments options: HTML File MappingThe HTML file that controls the attachment related features is attach_fs.html. Collecting Mail from Another ServerYou can modify the following when collecting mail from another server:
HTML File MappingThe HTML file that controls the mail collection feature is collect_fs.html. Modifying Message CompositionThe message composition feature enables basic mail functions. You can modify the following message composition options:
HTML File MappingThe HTML file that controls the message composition feature is msg_fs.html. Modifying Folder Management TabThe folder management tab enables access to server-side folders. You can modify the following folder management tab options:
HTML File MappingThe HTML file that controls the folder management tab feature is fldr_fs.html. Modifying Mailbox Management TabThe mailbox management tab enables access to a mailbox. You can modify the following mailbox management tab options:
HTML File MappingThe HTML file that controls the mailbox management tab feature is mbox_fs.html. Modifying Personal Option Management (Options Tab)You can modify the following Options tab options:
HTML File MappingThe HTML file that controls the options tab features is opts_fs.html. Modifying Return ReceiptThe return receipt feature enables the management of return receipts. HTML File MappingThe file that controls the return receipt feature is receipt_fs.html. Modifying Shared FoldersA shared folder is folder in which you can store messages that can be accessed by other users. Sun Java System Messenger Express manages access to the shared folders by granting others access to the shared folders. Sharing folders is a two-step process that involves sharing and subscribing:
|
....
' <select name="attr"\>\\n' +
....
'<option value="'+ main.attr_list['telephonenumber']+
'"\>Phone #</option\>\\n' +
'<option value="'+
main.attr_list['pager']+
'""\>Pager #</option\>\\n' +
'</select\>\\n' +
....
|
Add the following lines to the getSearchResults() function in the lookup.js file:
if(forGroup) s = '<form name="form"\>\\n' + main.tableStart +
....
'<td width=1% nowrap\><nobr\>' + main.font() +
(pab ? i18n_lu['work'] : i18n['ldap phone']) '</td\>\\n'+
'<td width=1% nowrap\><nobr\>' +
main.font() + (pab ? i18n_lu['pager'] : i18n['ldap pager']) +'</td\>
else s = '</form\><form name="form"\>\\n' + main.tableStart +
'<td width=1% nowrap\><nobr\>' + main.font() +
(pab ? i18n_lu['work'] : i18n['ldap phone']) '</td\>\\n'+
'<td width=1% nowrap\><nobr\>' +
main.font() + (pab ? i18n_lu['pager'] : i18n['ldap pager']) +'</td\>
....
|
Add the following lines to the lookup.js file:
....
if (list[i].telephoneNumber)
s += '<td nowrap\>' + main.font() +
main.unescape_crlf(list[i].telephoneNumber) + '</td\>\\n';
else if (list[i].telephonenumber)
s += '<td nowrap\>' + main.font() +
main.unescape_crlf(list[i].telephonenumber) + '</td\>\\n';
else
s += blank;
if (list[i].pager)
s += '<td nowrap\>' + main.font() +
main.unescape_crlf(list[i].pager) + '</td\>\\n';
else if (list[i].pager)
s += '<td nowrap\>' + main.font() +
main.unescape_crlf(list[i].pager) + '</td\>\\n';
else
s += blank;
s += '\\n';
}
....
|
Add the following line to the updatePabAttrList() function in the main.js file:
....
attr_list['telephonenumber']=
pabFrame.attrs?pabFrame.attrs.telephonenumber.name:'telephonenumber';
attr_list['pager']=
pabFrame.attrs?pabFrame.attrs.pager.name:'pager';
....
|
This section describes how to customize the Sun Java System Messenger Express client interface for a specific domain.
You can perform the following tasks to customize the Sun Java System Messenger Express client interface:
Create a directory with the domain name under msg_svr_base/html directory.
Populate this directory with the customized versions of the files from the original directory hierarchy.
For example, assume that you have a domain called siroe. To change the icon for siroe domain, add a new icon in the imx directory of siroe.com and change the reference to it in the main.js file. The following is the directory structure for the domain siroe.com
|
html/... |
// default interface |
|---|---|
|
html/imx/... |
// default interface |
|
html/en/... |
// default interface |
|
html/siroe.com/main.js |
// refers to imx/bottle.gif |
|
html/siroe.com/imx/bottle.gif |
After login, the server refers the user agent to pick the main.html file which is located in the domain/lang directory. The main.html file contains the relative references to the rest of the interface. The client requests all the files in the directory to make the interface. If these files exist in the domain/lang directory, they are displayed otherwise the default setup files from html/en/ are displayed.
If you have many domains and only a few distinct ”brands’ then you can use links to make the server point to the correct brand:
|
html/... |
// default interface |
|---|---|
|
html/sesta.com/... |
// customized interface for brand 1 |
|
html/varrius.com -\> sesta.com |
// default interface |
The server listens to all IP addresses and can present a customized interface before the authentication occurs. The server does this by looking at the URL and determines if it contains a known domain and presents the per domain Login screen for the domain.
For example, for the per domain Login screen: http://webmail.sesta.com/, the server presents the page from the location: html/sesta.com/en/default.html.
In this case a user does not have to suffix @domain to the username to login.