Hook to customize template WHMCS without directly changing the template

The WHMCS allows you to create custom templates, which can be created "from scratch" or can be made from copies of the standard templates that accompany the product (template six, for example), this prevents users from directly editing the standard templates of Whmcs to Customize or introduce code and new features, because if they do, when the WHMCS is updated the changes will be lost. In several cases, even if the changes/customizations have been performed in a "child template", when updating the WHMCS it is necessary to re-edit the template to suit the new versions, which from time to time require adaptation of the templates.

Many WHMCS users need to perform only small customizations in the templates, such as introducing some CSS lines or the Google Analytics tracking code, for example, for these cases, we created the following hook that allows you to add HTML to the head of any Template WHMCS, without editing it.

The installation and configuration is very simple, download the file gofas_ClientAreaHeadOutput. php and download it to the folder/includes/hooks/do your WHMCS.

Edit the examples in the file according to the HTML that you want to add to the head, on the line 11, 12, and 13 of the hook I added an example of how to insert a JavaScript block directly from the header, such as the Google Analytics code or some chat service.

On line 14 There is an example of how to upload a JavaScript file from your URL and on line 15 how to upload a CSS file from the URL, the hook can be seen in full as soon as follows:

This is more a simple and functional way to customize your WHMCS, so that you can upgrade your system whenever necessary without losing your customizations.

I hope the tip helps just like you helped us, good business and even next!

Leave a Comment

You must be logged in to post a comment.