31 $blank_img =
'blank.gif';
33 $blank_img = str_replace(
'smilies/',
'', $obj->
getVar(
'smiley_url',
'e'));
38 parent::__construct(
$title,
'form',
$xoops->getEnv(
'PHP_SELF'),
'post',
true);
39 $this->
setExtra(
'enctype="multipart/form-data"');
46 $image_array_img = XoopsLists::getImgListAsArray(\
XoopsBaseConfig::get(
'uploads-url') .
'/smilies');
47 $imageselect_img->addOptionArray($image_array_img);
49 $imageselect_img->setExtra(
'onchange="showImgSelected(\'xo-smilies-img\', \'smiley_url\', \'smilies\', \'\', \'' . \
XoopsBaseConfig::get(
'uploads-url') .
'\' )
"');
50 $imgtray_img->addElement($imageselect_img, false);
51 $imgtray_img->addElement(new Xoops\Form\Label('', "<br /><img src=
'" . \XoopsBaseConfig::get('uploads-url
') . "/smilies/" . $blank_img . "' name=
'image_img' id=
'xo-smilies-img' alt=
''>
"));
53 $fileseltray_img = new Xoops\Form\ElementTray('<br />', '<br /><br />');
54 $fileseltray_img->addElement(new Xoops\Form\File(_AM_SMILIES_UPLOADS, 'smiley_url'), false);
55 $fileseltray_img->addElement(new Xoops\Form\Label(''), false);
56 $imgtray_img->addElement($fileseltray_img);
57 $this->addElement($imgtray_img);
59 $this->addElement(new Xoops\Form\RadioYesNo(_AM_SMILIES_OFF, 'smiley_display', $obj->getVar('smiley_display')));
61 $this->addElement(new Xoops\Form\Hidden('smiley_id', $obj->getVar('smiley_id')));
66 $button_tray = new Xoops\Form\ElementTray('', '');
67 $button_tray->addElement(new Xoops\Form\Hidden('op', 'save'));
69 $button = new Xoops\Form\Button('', 'submit', XoopsLocale::A_SUBMIT, 'submit');
70 $button->setClass('btn btn-success');
71 $button_tray->addElement($button);
73 $button_2 = new Xoops\Form\Button('', 'reset', XoopsLocale::A_RESET, 'reset');
74 $button_2->setClass('btn btn-warning');
75 $button_tray->addElement($button_2);
77 switch (basename($xoops->getEnv('PHP_SELF'), '.php')) {
79 $button_3 = new Xoops\Form\Button('', 'button', XoopsLocale::A_CLOSE, 'button');
80 $button_3->setExtra('onclick="tinyMCEPopup.close();
"');
81 $button_3->setClass('btn btn-danger');
82 $button_tray->addElement($button_3);
87 $button_3 = new Xoops\Form\Button('', 'cancel', XoopsLocale::A_CANCEL, 'button');
88 $button_3->setExtra("onclick=
'javascript:history.go(-1);'");
89 $button_3->setClass('btn btn-danger');
90 $button_tray->addElement($button_3);
94 $this->addElement($button_tray);
getVar($key, $format= 's')
const _AM_SMILIES_DESCRIPTION
const _AM_SMILIES_IMAGE_PATH