Customizing
iManager
The iManager software can be relabelled
and even renamed to match your branding needs. This will allow you to provide
your clients with a web-based virtual server administration suite that is
unique to your company.
The iManager Installation Heirarchy
Before you attempt to customize iManager, it is necessary that you familiarize
yourself with the default iManager installation heirarchy. When you Install
iManager, it is unpacked and installed into your ~/www/htdocs/imanager
directory (which will be hereafter referred to as ~imanager). In
the main ~imanager directory, you will find the following files
and subdirectories of interest:
ABOUT
|
The contents of this file contain a summary description of the software
and its design purpose. References to the original software title,
iManager is contained in this file. The contents of this file are
displayed in the main window of the 'about.cgi'
script. |
VERSION
|
This file defines the 'current version identifier' and the 'remote
master site' which the software uses to determine if a newer version
exists. References to the original software title, iManager is contained
in this file, and the original master site 'http://192.41.5.172/imanager/'.
The contents of the file are primarily used by the 'about.cgi'
script. |
label/
|
This directory contains the 'header' and 'footer' files which are
used by iManager to present content and information. The contents
of this subdirectory are explained in detail below. |
strings/
|
This directory contains the language subdirectories, each of which
has a set of the langauage string files that iManager includes to
present content and information. In the main string library (which
coincidentally is named main)
of each language subdirectory, a reference to the original software
title 'iManager' is found. |
Relabelling iManager
iManager allows you to add your company name and logo by customizing the
'headers' and 'footers' of the content displayed by the program. The structure
of each page that iManager builds has the following form:
[ header ]
---------------------
[ dynamic content ]
---------------------
[ footer ]
The header and footer part of each page are stored in separate files
in the ~imanager/label/ subdirectories. The header and footer files
are opened, parsed line by line, and then displayed as part of the complete
session output.
In iManager there are three types of pages: 'generic', 'help', and 'login'.
The 'login' files are used for the login page; the 'help' files are used
for any help pop-up windows; and the 'generic' header and footer files
are used for everything else. For each type of page there is a separate
header and footer:
generic_footer
help_footer
login_footer
generic_header
help_header
login_header
The default revisions of each of these files can be found in the ~imanager/label/default/
directory. It is recommended that you keep these files intact (for your
future reference) and place your custom versions of these files in the
~imanager/label/custom/ directory. You can also create "hostname"
subdirectories in the label
directory and then store separate versions of these six files for each
Virtual Subhost
(see the examples found in the 'mail.sorenson.org' directory found
in the default iManager distribution).
iManager will look for the label header and footer files in a specific
order, namely:
- ~imanager/label/{hostname}/[file]
- ~imanager/label/custom/[file]
- ~imanager/label/default/[file]
Caveats
When iManager reads a specific header or footer file, it looks for a few
special tags:
__TITLE__ (parsed for in header only)
__JAVASCRIPT__ (parsed for in header only)
__NAVIGATION_MENU__ (parsed for header and footer)
__ROOT_DIR__ (parsed for in header and footer)
__AUTH_CREDENTIALS__ (parsed for in header and footer)
The __TITLE_
and __JAVASCRIPT__
tags are looked for when a header is parsed. The __TITLE__
tag is the title of the page that iManager is building. If the page being
built has some supplementary JavaScript code, then it is passed into the
label header function to be inserted into the header where the string
"__JAVASCRIPT__"
occurs. Typically, a header file would include a string in this manner:
<html>
<head>
<title>__TITLE__</title>
__JAVASCRIPT__</head>
For an example of how this works, see the generic_header file.
Both the label footer and label header functions parse the __NAVIGATION_MENU__,
but typically you would include this tag in the footer. iManager will
replace this string with the text navigation menu appropriate for the
page being built. Here is an example:
<hr noshade>
<!-- begin navigation menu -->
__NAVIGATION_MENU__
<!-- end navigation menu -->
<p>
For an example of how this works, see the generic_footer file.
The __ROOT_DIR__
is used to indicate to iManager the relative location of the imanager
root directory that should be used. This is necessary to allow for sub
hosts to link to iManager resources using relative URLs rather than absolute
URLs. Here is an example:
<img width="350" height="100" src="__ROOT_DIR__/graphics/entry.gif">
The __AUTH_CREDENTIALS__
is scanned for and replaced by the session authorization string before
the header and/or footer are displayed. It is necessary to include this
tag in any hypertext references to iManager wizards inside header and
footer files. For example:
<a
href="__ROOT_DIR__/wizards/filemanager.cgi?__AUTH_CREDENTIALS__"> File
Manager Wizard</a>
For further clarification, refer to the example files located in the
~imanager/label/default/ directory. These files illustrate how
to use these special tags in a complete context.
Renaming iManager
You can rename iManager by simply finding and replacing the references
to the original title 'iManager in the following files:
~imanager/ABOUT
~imanager/VERSION
~imanager/strings/en/main
~imanager/strings/{other language subdirectories}/main
You will probably want to rename the root ~imanager directory
to a name of your choosing. You would then access your renamed virtual
server administration suite using the URL:
http://YOUR-DOMAIN.NAME/new_software_title/