Child pages
  • cPanel API 1 Functions - Branding::file

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt
This function searches for a file within a theme and returns its URL.

Warning
titleWarning:

Include Page
LIB:_cPanelAPI1NewerFunctions
LIB:_cPanelAPI1NewerFunctions

  • UAPI (recommended) Branding::file
    Excerpt Include
    UAPI Functions - Branding::file
    UAPI Functions - Branding::file
    nopaneltrue
  • cPanel API 2 Branding::resolve_file
    Excerpt Include
    cPanel API 2 Functions - Branding::resolve_file
    cPanel API 2 Functions - Branding::resolve_file
    nopaneltrue
Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleLiveAPI PHP Class
Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$branding_file = $cpanel->api1('Branding', 'file', array('mythemes', '/0', 'my_theme', '1', '0', '0' '1') ); // Call the function.

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink

 

Expand
titleLiveAPI Perl Module
Code Block
languageperl
linenumberstrue
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $branding_file = $cpliveapi->api1('Branding', file, ['mythemes', '/0', 'my_theme', '1', '0', '0', '1'] ); # Call the function.

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

 

Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelTagsWarning
LIB:_cPanelTagsWarning

Code Block
languagetext
<cpanel Module="Branding::file( $FORM( 'file','isvar','pkg','inline', 'needfile','skipdefault','checkmain') )">
Expand
titleCommand Line
Code Block
languagebash
cpapi1 --user=username Branding file mythemes 0 my_theme 1 0 0 1

Include Page
LIB:_cPanelAPI1CLINote
LIB:_cPanelAPI1CLINote

Expand
titleOutput (URL)
Code Block
languagetext
/cPanel_magic_revision_1267840609/branding/contactinfo_include.html 

 

Parameters

ParameterTypeDescriptionPossible valuesExample
filestring

Required

The file's name.

Any valid filename.mythemes
isvarBoolean

Required  

This is a legacy parameter.

 

 

  • 0
  • null
Warning
titleWarning:

Always set this value to 0 or null.

0
pkgstring

Required  

The style for which to search.

Any valid style name.my_theme
inlineBoolean

Required  

Whether to print the file's contents.

  • 1 — Print the file's contents.
  • 0 — Do not print the file's contents.
1
needfileBoolean

Required

This is a legacy parameter.

 

  • 0
  • null
Warning
titleWarning:

Always set this value to 0 or null.

0
skipdefaultBoolean

Required

This is a legacy parameter.

 

  • 0
  • null
Warning
titleWarning:

Always set this value to 0 or null.

0
checkmainBoolean

Required

Whether the function should search the account's /cpanelbranding directory.

  • 1 — Search the directory.
  • 0 — Do not search the directory.
1

Returns

This function's output depends on the values of the input parameters.