53 $xoops->loadLanguage(
'blocks',
'system');
54 if ($this->obj->isNew()) {
57 $groups = array(FixedGroups::USERS, FixedGroups::ANONYMOUS, FixedGroups::ADMIN);
58 $this->obj->setVar(
'block_type',
'C');
59 $this->obj->setVar(
'visible', 1);
65 $blockmodulelink_handler =
$xoops->getHandlerBlockmodulelink();
67 $blockmodulelink = $blockmodulelink_handler->getObjects(
$criteria);
69 foreach ($blockmodulelink as
$link) {
70 $modules[] = $link->getVar(
'module_id');
73 $groupperm_handler =
$xoops->getHandlerGroupperm();
74 $groups = $groupperm_handler->getGroupIds(
'block_read', $this->obj->getVar(
'bid'));
81 $this->obj->setVar(
'bid', 0);
82 if ($this->obj->isCustom()) {
83 $this->obj->setVar(
'block_type',
'C');
85 $this->obj->setVar(
'block_type',
'D');
91 parent::__construct(
$title,
'blockform',
'admin.php',
'post',
true);
92 if (!$this->obj->isNew()) {
122 $mod_select->addOptionArray($module_list);
126 if ($this->obj->isNew() || $this->obj->isCustom()) {
127 $editor_configs = array();
128 $editor_configs[
"name"] =
"content_block";
129 $editor_configs[
"value"] = $this->obj->getVar(
'content',
'e');
130 $editor_configs[
"rows"] = 15;
131 $editor_configs[
"cols"] = 6;
132 $editor_configs[
"editor"] =
$xoops->getModuleConfig(
'blocks_editor',
'system');
134 if (in_array($editor_configs[
"editor"], array(
'dhtmltextarea',
'textarea'))) {
147 if ($this->obj->getVar(
'template') !=
'') {
148 $tplfile_handler =
$xoops->getHandlerTplfile();
149 $btemplate = $tplfile_handler->
150 find(
$xoops->getConfig(
'template_set'),
'block', $this->obj->getVar(
'bid'));
151 if (count($btemplate) > 0) {
154 '<a href="' . \
XoopsBaseConfig::get(
'url') .
'/modules/system/admin.php?fct=tplsets&op=edittpl&id='
158 $btemplate2 = $tplfile_handler->find(
'default',
'block', $this->obj->getVar(
'bid'));
159 if (count($btemplate2) > 0) {
162 '<a href="' . \
XoopsBaseConfig::get(
'url') .
'/modules/system/admin.php?fct=tplsets&op=edittpl&id='
163 . $btemplate2[0]->getVar(
'tpl_id') .
'" rel="external">'
169 if ($this->obj->getOptions() !=
false) {
172 $this->
addElement(
new Xoops\Form\Hidden(
'options', $this->obj->getVar(
'options')));
179 $this->obj->getVar(
'bcachetime')
198 $this->
addElement(
new Xoops\Form\Hidden(
'block_type', $this->obj->getVar(
'block_type')));
199 $this->
addElement(
new Xoops\Form\Hidden(
'mid', $this->obj->getVar(
'mid')));
200 $this->
addElement(
new Xoops\Form\Hidden(
'func_num', $this->obj->getVar(
'func_num')));
201 $this->
addElement(
new Xoops\Form\Hidden(
'func_file', $this->obj->getVar(
'func_file')));
202 $this->
addElement(
new Xoops\Form\Hidden(
'show_func', $this->obj->getVar(
'show_func')));
203 $this->
addElement(
new Xoops\Form\Hidden(
'edit_func', $this->obj->getVar(
'edit_func')));
204 $this->
addElement(
new Xoops\Form\Hidden(
'template', $this->obj->getVar(
'template')));
205 $this->
addElement(
new Xoops\Form\Hidden(
'dirname', $this->obj->getVar(
'dirname')));
206 $this->
addElement(
new Xoops\Form\Hidden(
'name', $this->obj->getVar(
'name')));
207 $this->
addElement(
new Xoops\Form\Hidden(
'bid', $this->obj->getVar(
'bid')));
211 if ($this->obj->isNew() || $this->obj->isCustom()) {
213 $preview->setExtra(
"onclick=\"blocks_preview();\"");
const E_YOU_NEED_A_POSITIVE_INTEGER
const AUTO_FORMAT_SMILIES_DISABLED
const AUTO_FORMAT_SMILIES_ENABLED