UAPI Functions - Branding::spritelist

Description

This function retrieves a sprite URL. Sprites store the cPanel interface's icons as a single image to conserve bandwidth.

Examples


 cPanel or Webmail Session URL

https://hostname.example.com:2083/cpsess##########/execute/Branding/spritelist?img=getstart&image=getstart&imgtype=icon&method=skip_filetype_gif&subtype=img

 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
  
// Get the spritelist URL.
$spritelist_path $cpanel->uapi(
    'Branding''spritelist',
    array(
            'img'           => 'getstart',
            'image'         => 'getstart',
            'imgtype'       => 'icon',
            'method'        => 'skip_filetype_gif',
            'subtype'       => 'img',
    )
);

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
  
# Get the spritelist URL.
my $spritelist_path $cpliveapi->uapi(
    'Branding''spritelist',
    {
            'img'           => 'getstart',
            'image'         => 'getstart',
            'imgtype'       => 'icon',
            'method'        => 'skip_filetype_gif',
            'subtype'       => 'img',
    }
);

 cPanel Template Toolkit

<!-- Get the spritelist URL. -->
[% execute('Branding', 'spritelist', { 'img' => 'getstart', 'image' => 'getstart', 'imgtype' => 'icon', 'method' => 'skip_filetype_gif', } ) %]

 Command Line

uapi user=username Branding spritelist img=getstart image=getstart imgtype=icon method=skip_filetype_gif subtype=img

 

Notes:

  • You must URI-encode values.
  • username represents your account-level username.

 Output (JSON)

   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{ 
 
   },
   "data":{ 
      "images":[ 
 
      ],
      "spriteurl":"/cPanel_magic_revision_/"
   }
}

 

Note:

Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.

 

Parameters

Input

Type

Description

Possible values

Example

image

string

Set this parameter to heading to force output.

heading

heading

img

string

Required

The image's branding object's name.

The name of a branding object, from thedynamicui.conf file.

getstart

imgtype

string

Required

The image type.

You must supply a value of icon.

The x3 theme does not support group images.

icon

method

string

Required

The method to use to generate sprites.

  • only_filetype_gif — Generate sprites for.gif images only.
  • skip_filetype_gif — Generate sprites for all images except for .gif images. 
  • snap_to_smallest_width — Scale icons to the smallest possible width.
  • scale_60percent — Scale icons to 60% of their size.

 only_filetype_gif 

 skipgroups 

 Boolean 

 Whether to return information for images that begin with group_. 

This value defaults to 0.

  • 1 — Skip images that begin with group_.
  • 0 — Include images that begin with group_.

The x3 theme does not support group images.

0

subtype

string

Required

The image subtype.

  • img
  • bg
  • compleximg 

img

 

Returns

 Return 

 Type 

Description

Possible values

Example

images

string

 The list of images. 

One or more images.

 

 spriteurl 

string

The sprite's path.

 The sprite's path, relative to the user's home directory. 

 /cPanel_magic_revision/ 

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....