H-Sphere Documentation Customization Guide

For more information contact us at info@psoft.net

Compiling Templates With Client-Side Form Validation

 

Related Docs:  

Template Customization

There are two types of templates that are responsible for generating Control Panel web content: *.html.in templates with client-side form validation that require compilation before modifications in them would take effect, and *.html templates that provide server-side form validation and don't need to be recompiled after their modification.

This document provides step-by-step instructions on how to compile control panel templates with the client-side validation of HTML form input fields.

  1. Log into the control panel server as cpanel user:
    # su - cpanel
    To implement customization correctly, all template files and directories should have cpanel:cpanel ownership.

  2. Check settings in /hsphere/local/home/cpanel/shiva/psoft_config/hsphere.properties:

    1) Check the TEMPLATE_PATH parameter. It should point to the default template directory. Default setting is:
    TEMPLATE_PATH = /hsphere/local/home/cpanel/shiva/shiva-templates/

    2) Uncomment the USER_TEMPLATE_PATH parameter and set it to your custom templates directory, e.g.,:
    USER_TEMPLATE_PATH = /hsphere/local/home/cpanel/shiva/custom/templates/

    3) Check the JS (JavaScripts) and IMAGES parameters:
    JS =
    IMAGES =

    By default, JS and IMAGES are left blank. It means that javascripts and images are placed inside each design directory. You don't need to change these parameters if you have default system settings.

  3. Go to the default templates directory (DocumentRoot, /hphere/local/home/cpanel/shiva/shiva-templates by default). Check parameters in the configure file:

    (1) SHIVA_ROOT - H-Sphere Control Panel root directory (/hsphere/local/home/cpanel/shiva by default)
    (2) HSPHERE_PROPERTIES - path to the hsphere.properties file.

  4. Run ./configure in the templates directory. This will create Makefiles for all of designs.

    Warning: Running ./configure clean would remove ALL the compiled templates in the nested directories and delete all Makefiles created by the previous configure execution. After that, your control panel interface would not show up correctly!

  5. To compile all modified templates, run make or make all in your default templates directory. If you need just to modify one template, run make from the directory where this template is located.

    Warning: Running make clean command from a certain template directory would clear all of the compiled template files (*.html) in the nested directories. After that, your control panel interface would not show up correctly!


Related Docs:  

Template Customization



Home   Products   Services   Partners   Support   News   Contact   Forum
© Copyright 1998-2003. Positive Software Corporation.
All rights reserved.