|
This document provides step-by-step instructions on how to create or modify control panel templates with the
client-side validation of HTML form input fields.
Such templates represented in the .html.in format require pre-compilation to generate HTML source,
unlike .html templates that are used with server-side form validation and don't need to be pre-compiled.
A designer should have root access to the H-Sphere server and log in under the "cpanel" superuser:
# su - cpanel
To implement customization correctly, all template files and directories should have cpanel:cpanel ownership,
and the make directive which is performed to rebuild templates should be run ONLY under the cpanel user.
- Enter paths to JFlex.jar and java_cup.jar into CLASSPATH (bash_profile).
- Enable write permission to H-Sphere's root directory.
- Make sure that the make procedure in psoft/ has been done ('make
shiva').
- Check the following variables in psoft_config/hsphere.properties:
TEMPLATE_PATH = ... - a physical location of templates
; JS = ; IMAGES = .
By default JS(JavaScripts) and IMAGES are blank.
It means that javascripts and images are placed inside each
design directory. Yet, this can be changed if necessary. It
is possible to create symlinks in the Document Root (TEMPLATE_PATH)
directory as follows :
javascript -> /home/hsphere/javascript or images -> /home/hsphere/images.
Then it is necessary to add names of symlinks
to the JS and IMAGES variables (JS=javascript or/and IMAGES=images).
- Go to the templates directory (DocumentRoot). Check and edit
variables in the *configure file:
(1) SHIVA_ROOT - physical location of the 'HSphere' root;
(2) HSPHERE_PROPERTIES - path to the hsphere.properties file;
(3) CFG_FILE - name of the config file for each design
(design.cfg by default).
- If necessary, you may configure design.cfg files in each design.
- Run ./configure in the templates directory. This will create
Makefiles for all of designes. There is a parameter 'clean'
which can help you clear all the created Makefiles.
You may need to install the GNU make utility and/or a java
compiler for *configure to work correctlty.
- Run make (or make all). Html, js and java class
files will be created. Aside from that, it is possible to run
'make all' in each disign directory.
The 'make clean' command clears all of the created files
in the nested directories.
|