Upgrading Customized Templates Document (HTML Version)
|
|
Purpose
This document is designed to provide assistance for users who
would like to alter the web templates for Web Messaging
v6.04/v6.05 so that these templates will function with Web
Messaging v7.04.
|
|
Back to Top Go to Index
|
Audience
This document assumes that the reader has sufficient knowledge
of HTML, JavaScript, and working experience with the IMail Server.
|
|
Back to Top Go to Index
|
Installation Choices
During the installation process for IMail v7.04, the web
templates are installed or not installed according to the
system administrator's preference. The system administrator
can select from three options before any Web Messaging or Web
Calendaring templates are installed:
- Overwrite existing templates with the new files
- Keep existing files, but copy over new required files
- Do not install any template related files
|
Overwrite existing templates with the new files
This option is ideal for administrators who currently do
not have customized templates, and would like to upgrade
to the standard templates for IMail v7.04. Select this option
if none of your domains have any customized templates, an
altered butontxt.ini file, or an altered message.ini file.
Selecting this option will update only the primary domain's
directory. Note that your existing files will be
overwritten if they share the same file name as the
new templates. This option is also a good way to restore
your primary domain's web templates to the default setting.
Web Messaging:
If this option is selected, the install program will copy
the new Web Messaging templates into the Web folder of the
IMail top directory (i.e. C:\IMail\Web). Note that this will
overwrite any existing files that may be present from previous
IMail installs. Two Web Messaging *.ini files will be copied
over into the IMail top directory. This includes a more recent
copy of butontxt.ini and message.ini, which will be copied into
the IMail top directory (For example, C:\IMail).
|
Web Calendaring:
If this option is selected, the install program will copy
the new Web Calendaring templates into the ...Web\Calendar
folder of the IMail top directory (i.e. C:\IMail\Web\Calendar).
This option will also overwrite any existing files from previous
IMail installs. Note that Web Calendaring does not have its own
butontxt.ini or message.ini file located in the IMail top
directory, so selecting this option for Web Calendaring will
not copy over any existing *.ini files.
|
Keep existing files, but copy over new required files
This option will not overwrite your existing Web Messaging or
Web Calendaring templates. All template related files will be
copied into the ..\Web\New folder from the primary domain's
directory. This option allows the system administrator to
customize the new files accordingly.
Web Messaging:
If this option is selected during the installation process,
only the new Web Messaging templates for version 7.04 will be
installed in the ..\Web\New folder from the IMail top directory.
The contents of this directory should be copied to the ..\Web
folder for the primary or virtual domain(s), and the existing
templates should be updated according to the "UPGRADING CUSTOMIZED
TEMPLATES DOCUMENT" in order for the Web Messaging templates to be
properly read by the web server. Also, a more recent
copy of butontxt.ini and message.ini will be copied to the
..\Web\New\TopDir folder. These *.ini files should be copied
over to the root directory of each desired host. Note
that if a *.ini is present within the primary host's root
directory, the file can be shared with other virtual domains,
unless a virtual domain has its own copy of the given file.
|
Web Calendaring:
If this option is selected during the installation process,
the Web Calendaring templates will be installed in the
..\Web\New\Calendar folder from the IMail top directory.
The contents of this directory should be copied to the
..\Web\Calendar folder in order for the Web Calendaring
templates to be read for a given host. As long as the files
exist within the primary domain's ..\Web\Calendar folder, the
files can be shared by other virtual domains, unless a virtual
domain has its own copy of the given file.
|
Do not install any template related files
If this option is selected during the installation process for
both, Web Messaging and Web Calendaring, no template related
files will be installed. The administrator will have to ensure
that the primary domain's directory is updated with the necessary
files in order to properly use Web Messaging, and Web Calendaring.
|
|
Back to Top Go to Index
|
Changing the Element Named "Action"
In the v6.X templates, several hidden input elements were
created and given the name, action. These elements have been
changed in v7.04 to the name, imail_action. Therefore, all
references to the action element should be renamed to
imail_action. The changes explained in this section should be
made in order to obtain proper functionality.
For example:
In the chgrule.html document, you will find the line of code
written below.
<input type="hidden" name="action" value="">
The value given to the name attribute of the input tag should
be renamed to imail_action for v7.04. So, the new line should
read as follows:
<input type="hidden" name="imail_action" value="">
Since this element has been renamed, all JavaScript references
to the old name must be changed as well. In JavaScript it is
possible to set the value of the above hidden element by
accessing the properties of the document object. In the
chgrule.html document, the above element is located in a form
named, "Rules." Some JavaScript code does refer to this element
as follows:
document.Rules.action.value = "<!--IMAIL.AddButton-->";
Above, we see that the old name of the hidden input element is
being used. This reference must be changed as well to the
imail_action, becoming:
document.Rules.imail_action.value = "<!--IMAIL.AddButton-->";
|
NOTE:
|
|
It is not advisable to simply replace all occurrences of
the word "action" in your files with "imail_action."
This may cause additional problems. You only want to
rename the <INPUT> tag's value of its name attribute,
and all references to that tag's name. If you replaced
all occurrences of the word, you would actually replace
those occurrences where the word "action" is the
attribute of the <FORM> tag, and this is not what you
wish to do.
|
| |
The following files are affected by this change:
- chghostrule.html
- chgrule.html
- msgsum.html
- readmail.html
- vh.html
|
|
|
Back to Top Go to Index
|
Upgrading Templates for Spell Check
The following information is intended for users who DO
NOT wish to use the new set of templates for v7.04, but
would like to make use of the new spell checking feature.
This section will provide instructions for making alterations
to your existing web templates.
Placing the *.clx files in the proper domain
IWebMsg v7.04 has an added spell check feature, which
allows the user to check for spelling errors by using specific
dictionaries. There are a few dictionaries that can be
made available to the user depending on the type of spell
checking required. The number of dictionaries available to the
user can be altered by providing a limited number of *.clx
files in the host's directory or the user's folder. Only the
*.clx files stored in the host directory or the user's folder
will be seen by the user in a list box. This allows the
system administrator to limit or increase the number of
dictionaries available to the user. Placing the *.clx files in
the domain directory makes those dictionary files available to
all users within that domain.
Example:
If the following files are placed in a virtual domain
directory (i.e. C:\VirtualDomain\):
- ssceam2.clx
- sscebr2.clx
All users of the virtual domain will be able to select "ssceam2"
and/or the "sscebr2" dictionary when trying to spell check
for this domain. However, if those files were to only be placed
in a specific user's folder, only that user would have access to
those files when using the spell check feature. Note that all
users will have a UserDic.tlx file within his/her folder. This
allows the user to add words to this dictionary.
|
Changing the web templates to allow for spell checking
Non v7.04 web templates will have to be altered in order to make
use of the spell check feature. Because customized web
templates may vary, these instructions simply explain what
lines of code should be added, and not specifically where they
should be added. To create a list box for selecting the
dictionaries to be used, the following code should be added to
the HTML files. Make the changes explained in this section to
each of the following files:
Example:
Below are six lines of HTML code (ignore the numbering of the
lines; the numbers were added for clarity):
1: <!--IMAIL.BeginIfUserSpellCheckEnable-->
2: <SELECT NAME="lexicons" MULTIPLE SIZE="4">
3: <!--IMAIL.GetDictionaries-->
4: </SELECT>
5: <A HREF="javascript:getStatusForSplChkr()">Spell Check</A>
6: <!--IMAIL.EndBeginIfUserSpellCheckEnable-->
Line #1 is the opening of a conditional IMail tag (For more
information on conditional tags, see "Tags.doc"). The
condition of the tag is to determine if the spell check feature
is enabled for this user. If spell check is enabled, then the client
will be sent lines #2 through #5. Lines #2 - #4 of
the code will create the list box, which the user will use to select the desired dictionaries.
Lines #2 - #4 should be added somewhere between the <FORM> and
</FORM> tag. Note that the NAME and ACTION attributes are a
part of the <FORM> tag. Add the code between the <FORM> and
</FORM> tag, which has a name and action attribute equal to the
following:
NAME="SendMail"
ACTION="sendmail.<!--IMAIL.Number-->.cgi"
In line #5, a link is simply created. This link invokes a
javascript function called, getStatusForSplChkr(). The code for
this function, and other spell check related functions can be
found in spell_js.cgi. Use the IMail Include tag to place the
content of spell_js.cgi inside the HTML files:
<!--IMAIL.Include.spell_js.cgi-->
Please note that the Include tag should be placed between the
<SCRIPT> and </SCRIPT> tag for all of the HTML files
(sendmail.html, draft.html, fwdmsg1.html, & replymsg1.html).
|
|
NOTE:
|
|
A new option should be added to the Edit Preferences
page, allowing the users to choose between Java 1.1 or
Java 1.2 Runtime for the spell checker applet. The spell
checker will be launched with the version of Java
selected in the user's preferences. By default,
Java 1.1 is selected. See pref.html
for more information.
|
|
NOTE:
|
|
Other changes have been made to the compose pages
(sendmail.html, draft.html, fwdmsg1.html, replymsg1.html).
Although these changes do not affect the new spell check feature,
please see sendmail.html, draft.html,
fwdmsg1.html, & replymsg1.html
for more information.
|
Adding the additional files to the web directory
There are a few files that must be added to the web directory
for the primary domain or for each host domain. These files
will be provided specifically for users who do not wish to use
the standard v7.04 web templates. Most of these files do not
require customizing, and should not be altered (i.e.
spell11.jar, spell12.jar, spell11.html, spell12.html).
These files are:
- pspell.html
- spell.gif
- spell_js.cgi
- spell11.html
- spell11.jar
- spell12.html
- spell12.jar
- splckbtn.gif
|
|
|
Back to Top Go to Index
|
New JavaScript Functions
Several JavaScript functions have been added for increased
usability. Most of the new functions have been added to the
following include files for the standard v7.04 web templates:
- functions.cgi
- quickclick.cgi
- sm_js2.cgi
|
If you would like to make use of these additional functions
within your set of customized templates, you may have to make
some additional alterations to the templates that will be
using the new functions.
|
|
Back to Top Go to Index
|