.pdf)
WHM Plugins
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | Branding::file( file, isvar, pkg, inline, needfile, skipdefault, checkmain ) |
| Description: | Search for a particular file within a theme, and return the URI fragment pointing to its location, with the current "cpanel magic revision" built in, such as: /cPanel_magic_revision_1267840609/branding/contactinfo_include.html |
| Parameters: | |
| file (string) | |
| The name of the file for which to search. | |
| isvar (boolean) | |
| A value of 1 returns the variable instead of the URI path to the file. This parameter is not useable via any API. Set this parameter to 0 or null. | |
| pkg (string) | |
| A value of 1 causes the function to check the specified style under the account's /cpanelbranding directory. Values can be any style name, such as 'the_beach' or 'falltheme'. | |
| inline (boolean) | |
| A value of 1 prints contents of the file from the function. | |
| needfile (boolean) | |
| A value of 1 causes the function to return the location of the file. This parameter is not useable via API. Set this parameter to 0 or null. | |
| skipdefault (boolean) | |
| A value of 1 causes the function to only search the branding package. This parameter is not useable via API. | |
| checkmain (boolean) | |
| A value of 1 specifies that the account's /cpanelbranding directory should be searched. | |
| Returns: | |
The output depends on the parameters used as input. If the file is not found or is not an HTML file, the function may return: /unprotected/broken.tmpl Where '*.tmpl' will match the extension of the file specified in the $file parameter. |
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | Branding::setupdirs( ) |
| Description: | Verify and create the account's ~/cpanelbranding directory and subdirectories, setting permissions accordingly. Non-resellers may lack sufficient permissions to create the directories, if they do not exist. |
| Returns: | |
This function will not display any output.
|
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | Branding::image( imagefile, isvar, pkg, needfile, nomagic, needboth, reqext, skip_logo_check ) |
| Description: | Display the URL to a branding image. |
| Parameters: | |
| imagefile (string) | |
| The name of the image file, without the path or extension. | |
| isvar (boolean) | |
| A value of 1 returns the URL value as a variable rather than printing it. This parameter is only used when the function is called from a Perl script. | |
| pkg (string) | |
| The name of the branding package from which to retrieve the image. | |
| needfile (boolean) | |
| A value of 1 causes the function to truncate the /cPanel_magic_revision_.../ section of the URL. | |
| nomagic (boolean) | |
| A value of 1 causes the function to return the full path to the file, rather than using the cpanel_magic_revision URL. | |
| needboth (boolean) | |
| A value of 1 causes the function to return both the file and the URL. This parameter is only used when the function is called from a Perl script. | |
| reqext (boolean) | |
| A value of 1 causes the function to include the filename extension of the image. | |
| skip_logo_check (boolean) | |
| A value of 1 causes the function to return the file rather than the URL to the file. | |
| Returns: | |
The output should resemble the following: /cPanel_magic_revision_1161741169/frontend/x3/branding/image.jpg. |
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | Branding::killimg( imgname ) |
| Description: | Remove an image from a branding style. |
| Parameters: | |
| imgname (string) | |
| The name of the image to remove. | |
| Returns: | |
This function does not produce any output.
|
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | Branding::setmyacctspkg( brandingpkg, allaccounts ) |
| Description: | Change the branding package for a reseller and all accounts owned by that reseller. |
| Parameters: | |
| brandingpkg (string) | |
| The name of the branding package for the reseller to use. | |
| allaccounts (boolean) | |
| A value of 1 specifies that accounts owned by the reseller should also use the specified package. | |
| Returns: | |
This function does not produce any output.
|
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | Branding::setbrandingpkg( brandingpkg ) |
| Description: | Change the account's branding package. |
| Parameters: | |
| brandingpkg (string) | |
| The name of the branding package to use for the account. | |
| Returns: | |
This function does not produce any output.
|
| API Version: | 1 - Click here for documentation |
|---|---|
| Syntax: | Branding::tempsetbrandingpkg( brandingpkg ) |
| Description: | Temporarily change an account's branding package. |
| Parameters: | |
| brandingpkg (string) | |
| The name of the branding package to use temporarily. | |
| Returns: | |
This function does not produce any output.
|