Creating Custom Client Area Pages¶
|Supported Versions||Last Updated|
|1.13.00 & higher||2013/04/03|
For custom client area pages you need the client area development kit. The kit contains 3 types of php files:
client_custom_vserver.php - Use this if your page needs to be virtual server specific
client_custom_generic_logged_in.php - Use this if your page is not virtual server specific but the client needs to be logged in
client_custom_generic.php - Use this if your page is not virtual server specific and no authentication is required (Public page)
Generic template file (generic.tpl) is included in the kit. You can use variables, which are listed in this template.
As an example, below there is an instruction how to add a page to our client area that displays some support options to the client.
1. Upload client_custom_generic_logged_in.php to /usr/local/solusvm/www/ on the master.
2. Rename the php file to a custom filename i.e support.php.
3. Once support.php has been uploaded, edit generic.tpl:
<?php include($this->tpl_header);?> <a href="http://my.support-forum.com" target="_blank">Support Forum</a> <a href="http://my.ticket-system.com" target="_blank">Helpdesk</a> <?php include($this->tpl_footer); ?>
5.Visit this page on your master (http://master-address:5353/support.php)
6. If you want to add a link to this page in any of the client menus, edit header.tpl and update the links.
The development kit can be downloaded here (v1.6 2013/04/03)
Modification of the client area does carry some risks. PHP can be very insecure if you make mistakes in your code. Double check everything before you put your custom template in production!