H-Sphere Documentation Customization Guide


Template Customization

(updated for version 2.4)


Related Docs:   Understanding Templates Interface Controls and Colors Skin and Icon Set Customization Compiling Templates Template Packages

This document will guide you through the generic step-by-step instruction on customizing templates. This implies you are already familiar with the concept of templates in H-Sphere.

Starting from HS 2.4, it became possible to create and install packages of templates. Read more about template packages in Developer Guide.



1. Advanced customization may produce unpredictable results after updating H-Sphere, since updates affect the template structure and the page generation.

2. Advanced customization performed by H-Sphere customers is done at their own risk and is not supported by the PSoft team.

3. You may order customization from the PSoft team. Such customization is supported hereafter. Please contact for pricing details.

4. Template customization affects ALL H-Sphere accounts, regardless of their plans!
In terms of H-Sphere customization, only two types of accounts are customized, regardless of plans: admin accounts which are H-Sphere administrative accounts, and user accounts - all other accounts. Reseller accounts are regarded as user accounts, except for the reseller administrative account which relates to the admin account type.



  • Before you do any customization, log into CP server under root as the cpanel user.


    1) To implement customization correctly, all template files and directories must have cpanel:cpanel ownership. 2) The make directive which is performed to rebuild *.html templates should be run ONLY under cpanel.

  • Do not use whitespaces in the template filenames!

    1) You may need them to restore the original setup;
    2) You will lose all your changes with the next upgrade.
    Instead, follow the step-by-step instructions specified below.


Step-By-Step Template Customization Procedure

Step 1. On the CP server, log in as cpanel user.

Step 2. In the ~cpanel/shiva/ directory, create the custom template directory custom/templates/ if it doesn't exist.

Step 3. In the ~cpanel/shiva/psoft_config/hsphere.properties file, find the USER_TEMPLATE_PATH parameter. Here, the full to your custom template directory must be specified:


The directory name must end with a slash. Don't do anything if the directory name is already there.

Don't change the TEMPLATE_PATH variable in hsphere.properties!
TEMPLATE_PATH points to the default template directory. If you change it, you won't see any updates in the default templates.

Step 4. Copy the templates you would like to customize into shiva/custom/templates/, preserving their file paths relative to this directory. E.g., if you are going to customize the
copy it to

The original configuration can be restored without server restart by simply deleting your custom files from the custom template directory.

Don't copy the whole directory content! Your custom templates will override the default templates and you won't see the new features and bugfixes that come with new versions!

Step 5. Make sure all template files are owned by cpanel:cpanel.

Step 6. Modify the templates you have copied to the ~cpanel/shiva/custom/templates/ directory.

The following documents will be helpful:

- Interface Controls and Colors
- Skin and Icon Set Customization
- Edit Interface Texts


1) We don't recommend inserting the text directly into the templates. Use text labels defined in language bundles to ensure multilingual support.

2) Starting from version 2.4, H-Sphere uses the UTF-8 charset for all languages. Therefore, text directly inserted into templates (i.e., not by means of text labels defined in language bundles) must be in the UTF-8 encoding.

Step 7. Restart H-Sphere.

Related Docs:   Understanding Templates Interface Controls and Colors Skin and Icon Set Customization Compiling Templates Template Packages

Warning: main(/usr/local/lib/php/DB/DataObject.php): failed to open stream: No such file or directory in /hsphere/local/home/wwwuser/psoft.net/comments/DataObjects/User.php on line 5

Fatal error: main(): Failed opening required '/usr/local/lib/php/DB/DataObject.php' (include_path='.:/usr/local/lib/php:/hsphere/local/home/wwwuser/psoft.net/my-psoft/includes:/hsphere/local/home/wwwuser/psoft.net/comments/DataObjects:/hsphere/local/home/wwwuser/psoft.net/my-psoft/lib:/hsphere/local/home/wwwuser/psoft.net/my-psoft/lib/Smarty') in /hsphere/local/home/wwwuser/psoft.net/comments/DataObjects/User.php on line 5