Documentation

Add

CSmile::add(
  Array(
    'TYPE' => CSmile::TYPE_SMILE,
    'SET_ID' => CSmileSet::getByStringId('default'),
    'SORT' => 300,
    'TYPING' => ':=)',
    'IMAGE' => 'smile_long_hr.png',
    'IMAGE_HR' => 'Y',
    'IMAGE_WIDTH' => '32',
    'IMAGE_HEIGHT' => '32',
    'LANG' => Array(
        'en' => 'Smiley',
    )
));

The method adds a smiley. Static method.

Attention: this method only adds a record into the database. In addition, the file must be copied to the address, issued by the PreparePathToCopy method. Image sizes can be returned via the ResizeImageGet method.

Parameters

Parameter Description
TYPE smiley type
SET_ID smileys set ID
SORT Sorting
TYPING Smiley description in the editor
IMAGE Smiley file
IMAGE_HR High resolution image (image size is double reduced when displayed)
IMAGE_WIDTH image width in pixels
IMAGE_HEIGHT image height in pixels
LANG Smiley name

Returned value

Returns $ID on success and false in case of an error ([link=89669]CAdminException Class[/link] is created).



© «Bitrix24», 2001-2024