function show_rm_plugins() { $path = RMCPATH . '/plugins'; $dir_list = XoopsLists::getDirListAsArray($path); $available_plugins = array(); $installed_plugins = array(); foreach ($dir_list as $dir) { if (!file_exists($path . '/' . $dir . '/' . strtolower($dir) . '-plugin.php')) { continue; } $phand = new RMPlugin($dir); // PLugin handler if ($phand->isNew()) { $phand->setVar('dir', $dir); $available_plugins[] = $phand; } else { $installed_plugins[] = $phand; } } rm_reload_plugins(); RMFunctions::create_toolbar(); xoops_cp_header(); include RMTemplate::get()->get_template('rmc_plugins.php', 'module', 'rmcommon'); xoops_cp_footer(); }
function &getList($noHtml = false) { static $editors; if (!isset($editors)) { $order = array(); $list = XoopsLists::getDirListAsArray($this->root_path . '/'); foreach ($list as $item) { if (is_readable($this->root_path . '/' . $item . '/editor_registry.php')) { include $this->root_path . '/' . $item . '/editor_registry.php'; if (empty($config['order'])) { continue; } $editors[$config['name']] = $config; $order[] = $config['order']; } } array_multisort($order, $editors); } $_list = array(); foreach ($editors as $name => $item) { if (!empty($noHtml) && empty($item['nohtml'])) { continue; } $_list[$name] = $item['title']; } return $_list; }
function setPlugins() { if (is_dir($dir = $GLOBALS['xoops']->path('modules/mymenus/plugins/'))) { $plugins_list = XoopsLists::getDirListAsArray($dir, ''); foreach ($plugins_list as $plugin) { if (file_exists($GLOBALS['xoops']->path("modules/mymenus/plugins/{$plugin}/{$plugin}.php"))) { $this->_plugins[] = $plugin; } } } }
function render() { if ($this->section == 'GUI') { $dirs = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/modules/rmcommon/themes', ''); } else { $dirs = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/themes', ''); } $themes = array(); foreach ($dirs as $dir => $v) { if ($this->section == 'GUI') { if (!file_exists(XOOPS_ROOT_PATH . '/modules/rmcommon/themes/' . $dir . '/admin-gui.php')) { continue; } } else { if (!file_exists(XOOPS_ROOT_PATH . '/themes/' . $dir . '/theme.html')) { continue; } } // Read theme name $file = file_get_contents(XOOPS_ROOT_PATH . '/modules/rmcommon/themes/' . $dir . '/admin-gui.php'); preg_match("/Theme name:\\s{0,}(.*)?\n/m", $file, $name); $themes[$dir] = isset($name[1]) ? $name[1] : __('Unknow', 'rmcommon'); } unset($name); if ($this->type) { $rtn = '<ul class="rmoptions_container">'; foreach ($themes as $k => $name) { if ($this->multi) { $rtn .= "<li><label><input type='checkbox' value='{$k}' name='" . $this->getName() . "[]' id='" . $this->id() . "'" . (is_array($this->selected) ? in_array($k, $this->selected) ? " checked='checked'" : '' : '') . " /> {$name}</label></li>"; } else { $rtn .= "<li><label><input type='radio' value='{$k}' name='" . $this->getName() . "' id='" . $this->id() . "'" . (!empty($this->selected) ? $k == $this->selected ? " checked='checked'" : '' : '') . " /> {$name}</label></li>"; } } $rtn .= "</ul>"; } else { if ($this->multi) { $rtn = "<select name='" . $this->getName() . "[]' id='" . $this->id() . "' size='6' multiple='multiple' class=\"form-control " . $this->getClass() . "\">"; foreach ($themes as $k => $name) { $rtn .= "<option value='{$k}'" . (is_array($this->selected) ? in_array($k, $this->selected) ? " selected='selected'" : '' : '') . ">{$name}</option>"; } $rtn .= "</select>"; } else { $rtn = "<select name='" . $this->getName() . "' id='" . $this->id() . "' class=\"form-control " . $this->getClass() . "\">"; foreach ($themes as $k => $name) { $rtn .= "<option value='{$k}'" . (!empty($this->selected) ? $k == $this->selected ? " selected='selected'" : '' : '') . ">{$name}</option>"; } $rtn .= "</select>"; } } return $rtn; }
/** * Get a list of Xoops Admin Gui * * @return unknown */ function getGuis() { $guis = array(); xoops_load('XoopsLists'); $lists = XoopsLists::getDirListAsArray(XOOPS_ADMINTHEME_PATH); foreach (array_keys($lists) as $gui) { if (file_exists($file = XOOPS_ADMINTHEME_PATH . '/' . $gui . '/' . $gui . '.php')) { include_once $file; if (class_exists($class = 'XoopsGui' . ucfirst($gui))) { if (call_user_func(array($class, 'validate'))) { $guis[$gui] = $gui; } } } } return $guis; }
function getForm($action = false) { if ($action === false) { $action = $_SERVER['REQUEST_URI']; } include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php"; $title = $this->isNew() ? _AM_SPOTLIGHT_ADD_PAGE : _AM_SPOTLIGHT_EDIT_PAGE; $form = new XoopsThemeForm($title, 'form', $action, 'post', true); $form->setExtra("enctype=\"multipart/form-data\""); $form->addElement(new XoopsFormText(_AM_SPOTLIGHT_SLIDE_NAME, 'sp_name', 60, 255, $this->getVar('sp_name', 'e')), true); $form->addElement(new XoopsFormTextArea(_AM_SPOTLIGHT_EXPLAIN, 'sp_desc', $this->getVar('sp_desc', 'e'), 5, 80)); //component $component_name = $this->getVar('component_name', 'e'); if (empty($component_name)) { $component_name = 'default'; } include_once XOOPS_ROOT_PATH . "/modules/spotlight/components/{$component_name}/config.php"; //include component logo $components_list = XoopsLists::getDirListAsArray(dirname(dirname(__FILE__)) . '/components'); foreach ($components_list as $key => $val) { include_once XOOPS_ROOT_PATH . "/modules/spotlight/components/{$val}/config.php"; $_name = isset($config['name']) ? $config['name'] : $val; $component_names[$val] = $_name; unset($_name); unset($config['name']); } $component = new XoopsFormElementTray(_AM_SPOTLIGHT_COMPONENTS); $component_select = new XoopsFormSelect('', 'component_name', $component_name); $component_select->addOptionArray($component_names); $component->addElement($component_select); $component->addElement(new XoopsFormLabel('', '<div id="component_logo">')); if (isset($config['logo']) && file_exists(dirname(dirname(__FILE__)) . "/components/{$component_name}/{$config['logo']}")) { $img_patch = XOOPS_URL . "/modules/spotlight/components/{$component_name}/{$config['logo']}"; $component->addElement(new XoopsFormLabel('', "<img src='{$img_patch}'>")); } else { $component->addElement(new XoopsFormLabel('', _AM_SPOTLIGHT_NO)); } $component->addElement(new XoopsFormLabel('', '</div>')); $form->addElement($component); $form->addElement(new XoopsFormHidden('sp_id', $this->getVar('sp_id'))); $form->addElement(new XoopsFormHidden('ac', 'insert')); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); return $form; }
function &getList() { global $xoopsConfig, $xoopsModule; $module_handler =& xoops_gethandler("module"); $criteria = new CriteriaCompo(new Criteria("isactive", 1)); $module_list =array_keys( $module_handler->getList($criteria, true) ); $_list = XoopsLists::getDirListAsArray($this->root_path."/"); foreach($_list as $item){ if(is_readable($this->root_path."/".$item."/config.php")){ require($this->root_path."/".$item."/config.php"); if(empty($config["level"])) continue; if(!empty($config["module"]) && !in_array($config["module"], $module_list)) continue; $list[$item] = $config["title"]; unset($config); } } unset($_list); return $list; }
/** * @return array */ static function getAvailableDecorators() { static $decorators = false; if (!is_array($decorators)) { $decorators = array(); $helper = Menus::getInstance(); $dirnames = XoopsLists::getDirListAsArray($helper->path('decorators/'), ''); foreach ($dirnames as $dirname) { if (XoopsLoad::loadFile($helper->path("decorators/{$dirname}/decorator.php"))) { $className = 'Menus' . ucfirst($dirname) . 'Decorator'; $class = new $className($dirname); if ($class instanceof MenusDecoratorAbstract && $class instanceof MenusDecoratorInterface) { $decorators[$dirname] = $class; } } } } return $decorators; }
//about $modversion['release_date'] = '2012/10/01'; $modversion['module_website_url'] = 'dugris.xoofoo.org'; $modversion['module_website_name'] = 'XooFoo.org - Laurent JEN'; $modversion['module_status'] = 'alpha'; $modversion['min_php'] = '5.3.7'; $modversion['min_xoops'] = '2.6.0'; // paypal $modversion['paypal'] = array('business' => '*****@*****.**', 'item_name' => _MI_XLANGUAGE_DESC, 'amount' => 0, 'currency_code' => 'USD'); // Admin menu $modversion['system_menu'] = 1; // Manage extension $modversion['extension'] = 1; $modversion['extension_module'][] = 'system'; // Admin things $modversion['hasAdmin'] = 1; $modversion['adminindex'] = 'admin/index.php'; $modversion['adminmenu'] = 'admin/menu.php'; // Scripts to run upon installation or update $modversion['onInstall'] = 'include/install.php'; $modversion['onUpdate'] = 'include/install.php'; // SQL informations $modversion['schema'] = 'sql/schema.yml'; $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; $modversion['tables'] = array('xlanguage'); //language selection block $modversion['blocks'][] = array('file' => 'xlanguage_blocks.php', 'name' => _MI_XLANGUAGE_BNAME, 'description' => '', 'show_func' => 'b_xlanguage_select_show', 'edit_func' => 'b_xlanguage_select_edit', 'options' => 'images| |5', 'template' => 'xlanguage_block.tpl'); // Config XoopsLoad::load('xoopslists'); $modversion['config'][] = array('name' => 'theme', 'title' => '_MI_XLANGUAGE_THEME', 'description' => '_MI_XLANGUAGE_THEME_DESC', 'formtype' => 'select', 'valuetype' => 'text', 'default' => '64', 'options' => XoopsLists::getDirListAsArray(Xoops::getInstance()->path('media/xoops/images/flags')));
/** * @param $dbm * @param $adminname * @param $hashedAdminPass * @param $adminmail * @param $language * @param $groups * * @return mixed */ function make_data(&$dbm, $adminname, $hashedAdminPass, $adminmail, $language, $groups) { // $xoopsDB = Database::getInstance(); // $dbm = new Db_manager; $tables = array(); // data for table 'groups_users_link' $dbm->insert('groups_users_link', ' VALUES (0, ' . $groups['XOOPS_GROUP_ADMIN'] . ', 1)'); $dbm->insert('groups_users_link', ' VALUES (0, ' . $groups['XOOPS_GROUP_USERS'] . ', 1)'); // data for table 'group_permission' $dbm->insert('group_permission', ' VALUES (0,' . $groups['XOOPS_GROUP_ADMIN'] . ",1,1,'module_admin')"); $dbm->insert('group_permission', ' VALUES (0,' . $groups['XOOPS_GROUP_ADMIN'] . ",1,1, 'module_read')"); $dbm->insert('group_permission', ' VALUES (0,' . $groups['XOOPS_GROUP_USERS'] . ",1,1,'module_read')"); $dbm->insert('group_permission', ' VALUES (0,' . $groups['XOOPS_GROUP_ANONYMOUS'] . ",1,1,'module_read')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",1,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",2,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",3,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",4,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",5,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",6,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",7,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",8,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",9,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",10,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",11,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",12,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",13,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",14,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",15,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",16,1,'system_admin')"); $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",17,1,'system_admin')"); // data for table 'banner' $dbm->insert('banner', " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (0, 1, 0, 1, 0, '" . XOOPS_URL . "/images/banners/xoops_flashbanner2.htm', 'http://www.xoops.org/', 1008813250, 1,'')"); $dbm->insert('banner', " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (0, 1, 0, 1, 0, '" . XOOPS_URL . "/images/banners/xoops_banner_2.gif', 'http://www.xoops.org/', 1008813250, 0, '')"); $dbm->insert('banner', " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (0, 1, 0, 1, 0, '" . XOOPS_URL . "/images/banners/banner.htm', 'http://www.xoops.org/', 1008813250, 1, '')"); $dbm->insert('banner', " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (0, 1, 0, 1, 0, '" . XOOPS_URL . "/images/banners/xoopsifyIt.gif', 'http://www.xoops.org/', 1008813250, 1, '')"); // default theme $time = time(); $dbm->insert('tplset', " VALUES (1, 'default', 'XOOPS Default Template Set', '', " . $time . ')'); // system modules if (file_exists('../modules/system/language/' . $language . '/modinfo.php')) { include '../modules/system/language/' . $language . '/modinfo.php'; } else { include '../modules/system/language/english/modinfo.php'; $language = 'english'; } $modversion = array(); include_once '../modules/system/xoops_version.php'; $time = time(); // RMV-NOTIFY (updated for extra column in table) $dbm->insert('modules', " VALUES (1, '" . _MI_SYSTEM_NAME . "', " . $modversion['version'] * 100 . ', ' . $time . ", 0, 1, 'system', 0, 1, 0, 0, 0, 0)"); foreach ($modversion['templates'] as $tplfile) { // Main templates if ($fp = fopen('../modules/system/templates/' . $tplfile['file'], 'r')) { $newtplid = $dbm->insert('tplfile', " VALUES (0, 1, 'system', 'default', '" . addslashes($tplfile['file']) . "', '" . addslashes($tplfile['description']) . "', " . $time . ', ' . $time . ", 'module')"); // $newtplid = $xoopsDB->getInsertId(); $tplsource = fread($fp, filesize('../modules/system/templates/' . $tplfile['file'])); fclose($fp); $dbm->insert('tplsource', ' (tpl_id, tpl_source) VALUES (' . $newtplid . ", '" . addslashes($tplsource) . "')"); } // Admin templates if ($fp = fopen('../modules/system/templates/admin/' . $tplfile['file'], 'r')) { $newtplid = $dbm->insert('tplfile', " VALUES (0, 1, 'system', 'default', '" . addslashes($tplfile['file']) . "', '" . addslashes($tplfile['description']) . "', " . $time . ', ' . $time . ", 'admin')"); // $newtplid = $xoopsDB->getInsertId(); $tplsource = fread($fp, filesize('../modules/system/templates/admin/' . $tplfile['file'])); fclose($fp); $dbm->insert('tplsource', ' (tpl_id, tpl_source) VALUES (' . $newtplid . ", '" . addslashes($tplsource) . "')"); } } foreach ($modversion['blocks'] as $func_num => $newblock) { if ($fp = fopen('../modules/system/templates/blocks/' . $newblock['template'], 'r')) { $visible = 0; if (in_array($newblock['template'], array('system_block_user.tpl', 'system_block_login.tpl', 'system_block_mainmenu.tpl'))) { $visible = 1; } $options = !isset($newblock['options']) ? '' : trim($newblock['options']); $edit_func = !isset($newblock['edit_func']) ? '' : trim($newblock['edit_func']); $newbid = $dbm->insert('newblocks', ' VALUES (0, 1, ' . $func_num . ", '" . addslashes($options) . "', '" . addslashes($newblock['name']) . "', '" . addslashes($newblock['name']) . "', '', 0, 0, " . $visible . ", 'S', 'H', 1, 'system', '" . addslashes($newblock['file']) . "', '" . addslashes($newblock['show_func']) . "', '" . addslashes($edit_func) . "', '" . addslashes($newblock['template']) . "', 0, " . $time . ')'); // $newbid = $xoopsDB->getInsertId(); $newtplid = $dbm->insert('tplfile', ' VALUES (0, ' . $newbid . ", 'system', 'default', '" . addslashes($newblock['template']) . "', '" . addslashes($newblock['description']) . "', " . $time . ', ' . $time . ", 'block')"); // $newtplid = $xoopsDB->getInsertId(); $tplsource = fread($fp, filesize('../modules/system/templates/blocks/' . $newblock['template'])); fclose($fp); $dbm->insert('tplsource', ' (tpl_id, tpl_source) VALUES (' . $newtplid . ", '" . addslashes($tplsource) . "')"); $dbm->insert('group_permission', ' VALUES (0, ' . $groups['XOOPS_GROUP_ADMIN'] . ', ' . $newbid . ", 1, 'block_read')"); // $dbm->insert("group_permission", " VALUES (0, ".$groups['XOOPS_GROUP_ADMIN'].", ".$newbid.", 'xoops_blockadmiin')"); $dbm->insert('group_permission', ' VALUES (0, ' . $groups['XOOPS_GROUP_USERS'] . ', ' . $newbid . ", 1, 'block_read')"); $dbm->insert('group_permission', ' VALUES (0, ' . $groups['XOOPS_GROUP_ANONYMOUS'] . ', ' . $newbid . ", 1, 'block_read')"); } } // data for table 'users' $temp = $hashedAdminPass; $regdate = time(); // $dbadminname= addslashes($adminname); // RMV-NOTIFY (updated for extra columns in user table) $dbm->insert('users', " VALUES (1,'','" . addslashes($adminname) . "','" . addslashes($adminmail) . "','" . XOOPS_URL . "/','avatars/blank.gif','" . $regdate . "','','','',1,'','','','','" . $temp . "',0,0,7,5,'default','0.0'," . time() . ",'flat',0,1,0,'','','',0)"); // data for table 'block_module_link' $sql = 'SELECT bid, side FROM ' . $dbm->prefix('newblocks'); $result = $dbm->query($sql); while ($myrow = $dbm->fetchArray($result)) { if ($myrow['side'] == 0) { $dbm->insert('block_module_link', ' VALUES (' . $myrow['bid'] . ', 0)'); } else { $dbm->insert('block_module_link', ' VALUES (' . $myrow['bid'] . ', -1)'); } } // data for table 'config' $dbm->insert('config', " VALUES (1, 0, 1, 'sitename', '_MD_AM_SITENAME', 'XOOPS Site', '_MD_AM_SITENAMEDSC', 'textbox', 'text', 0)"); $dbm->insert('config', " VALUES (2, 0, 1, 'slogan', '_MD_AM_SLOGAN', 'Just Use it!', '_MD_AM_SLOGANDSC', 'textbox', 'text', 2)"); $dbm->insert('config', " VALUES (3, 0, 1, 'language', '_MD_AM_LANGUAGE', '" . addslashes($language) . "', '_MD_AM_LANGUAGEDSC', 'language', 'other', 4)"); $dbm->insert('config', " VALUES (4, 0, 1, 'startpage', '_MD_AM_STARTPAGE', '--', '_MD_AM_STARTPAGEDSC', 'startpage', 'other', 6)"); $dbm->insert('config', " VALUES (5, 0, 1, 'server_TZ', '_MD_AM_SERVERTZ', '0', '_MD_AM_SERVERTZDSC', 'timezone', 'float', 8)"); $dbm->insert('config', " VALUES (6, 0, 1, 'default_TZ', '_MD_AM_DEFAULTTZ', '0', '_MD_AM_DEFAULTTZDSC', 'timezone', 'float', 10)"); $dbm->insert('config', " VALUES (7, 0, 1, 'theme_set', '_MD_AM_DTHEME', 'default', '_MD_AM_DTHEMEDSC', 'theme', 'other', 12)"); $dbm->insert('config', " VALUES (8, 0, 1, 'anonymous', '_MD_AM_ANONNAME', '" . addslashes(_INSTALL_ANON) . "', '_MD_AM_ANONNAMEDSC', 'textbox', 'text', 15)"); $dbm->insert('config', " VALUES (9, 0, 1, 'gzip_compression', '_MD_AM_USEGZIP', '0', '_MD_AM_USEGZIPDSC', 'yesno', 'int', 16)"); $dbm->insert('config', " VALUES (10, 0, 1, 'usercookie', '_MD_AM_USERCOOKIE', 'xoops_user_" . dechex(time()) . "', '_MD_AM_USERCOOKIEDSC', 'textbox', 'text', 18)"); $dbm->insert('config', " VALUES (11, 0, 1, 'session_expire', '_MD_AM_SESSEXPIRE', '15', '_MD_AM_SESSEXPIREDSC', 'textbox', 'int', 22)"); $dbm->insert('config', " VALUES (12, 0, 1, 'banners', '_MD_AM_BANNERS', '1', '_MD_AM_BANNERSDSC', 'yesno', 'int', 26)"); $dbm->insert('config', " VALUES (13, 0, 1, 'debug_mode', '_MD_AM_DEBUGMODE', '0', '_MD_AM_DEBUGMODEDSC', 'select', 'int', 24)"); $dbm->insert('config', " VALUES (14, 0, 1, 'my_ip', '_MD_AM_MYIP', '127.0.0.1', '_MD_AM_MYIPDSC', 'textbox', 'text', 29)"); $dbm->insert('config', " VALUES (15, 0, 1, 'use_ssl', '_MD_AM_USESSL', '0', '_MD_AM_USESSLDSC', 'yesno', 'int', 30)"); $dbm->insert('config', " VALUES (16, 0, 1, 'session_name', '_MD_AM_SESSNAME', 'xoops_session_" . dechex(time()) . "', '_MD_AM_SESSNAMEDSC', 'textbox', 'text', 20)"); $dbm->insert('config', " VALUES (17, 0, 2, 'minpass', '_MD_AM_MINPASS', '5', '_MD_AM_MINPASSDSC', 'textbox', 'int', 1)"); $dbm->insert('config', " VALUES (18, 0, 2, 'minuname', '_MD_AM_MINUNAME', '3', '_MD_AM_MINUNAMEDSC', 'textbox', 'int', 2)"); $dbm->insert('config', " VALUES (19, 0, 2, 'new_user_notify', '_MD_AM_NEWUNOTIFY', '1', '_MD_AM_NEWUNOTIFYDSC', 'yesno', 'int', 4)"); $dbm->insert('config', " VALUES (20, 0, 2, 'new_user_notify_group', '_MD_AM_NOTIFYTO', " . $groups['XOOPS_GROUP_ADMIN'] . ", '_MD_AM_NOTIFYTODSC', 'group', 'int', 6)"); $dbm->insert('config', " VALUES (21, 0, 2, 'activation_type', '_MD_AM_ACTVTYPE', '0', '_MD_AM_ACTVTYPEDSC', 'select', 'int', 8)"); $dbm->insert('config', " VALUES (22, 0, 2, 'activation_group', '_MD_AM_ACTVGROUP', " . $groups['XOOPS_GROUP_ADMIN'] . ", '_MD_AM_ACTVGROUPDSC', 'group', 'int', 10)"); $dbm->insert('config', " VALUES (23, 0, 2, 'uname_test_level', '_MD_AM_UNAMELVL', '0', '_MD_AM_UNAMELVLDSC', 'select', 'int', 12)"); $dbm->insert('config', " VALUES (24, 0, 2, 'avatar_allow_upload', '_MD_AM_AVATARALLOW', '0', '_MD_AM_AVATARALWDSC', 'yesno', 'int', 14)"); $dbm->insert('config', " VALUES (27, 0, 2, 'avatar_width', '_MD_AM_AVATARW', '120', '_MD_AM_AVATARWDSC', 'textbox', 'int', 16)"); $dbm->insert('config', " VALUES (28, 0, 2, 'avatar_height', '_MD_AM_AVATARH', '120', '_MD_AM_AVATARHDSC', 'textbox', 'int', 18)"); $dbm->insert('config', " VALUES (29, 0, 2, 'avatar_maxsize', '_MD_AM_AVATARMAX', '35000', '_MD_AM_AVATARMAXDSC', 'textbox', 'int', 20)"); $dbm->insert('config', " VALUES (30, 0, 1, 'adminmail', '_MD_AM_ADMINML', '" . addslashes($adminmail) . "', '_MD_AM_ADMINMLDSC', 'textbox', 'text', 3)"); $dbm->insert('config', " VALUES (31, 0, 2, 'self_delete', '_MD_AM_SELFDELETE', '0', '_MD_AM_SELFDELETEDSC', 'yesno', 'int', 22)"); $dbm->insert('config', " VALUES (32, 0, 1, 'com_mode', '_MD_AM_COMMODE', 'flat', '_MD_AM_COMMODEDSC', 'select', 'text', 34)"); $dbm->insert('config', " VALUES (33, 0, 1, 'com_order', '_MD_AM_COMORDER', '0', '_MD_AM_COMORDERDSC', 'select', 'int', 36)"); $dbm->insert('config', " VALUES (34, 0, 2, 'bad_unames', '_MD_AM_BADUNAMES', '" . addslashes(serialize(array('webmaster', '^xoops', '^admin'))) . "', '_MD_AM_BADUNAMESDSC', 'textarea', 'array', 24)"); $dbm->insert('config', " VALUES (35, 0, 2, 'bad_emails', '_MD_AM_BADEMAILS', '" . addslashes(serialize(array('xoops.org$'))) . "', '_MD_AM_BADEMAILSDSC', 'textarea', 'array', 26)"); $dbm->insert('config', " VALUES (36, 0, 2, 'maxuname', '_MD_AM_MAXUNAME', '10', '_MD_AM_MAXUNAMEDSC', 'textbox', 'int', 3)"); $dbm->insert('config', " VALUES (37, 0, 1, 'bad_ips', '_MD_AM_BADIPS', '" . addslashes(serialize(array('127.0.0.1'))) . "', '_MD_AM_BADIPSDSC', 'textarea', 'array', 42)"); $dbm->insert('config', " VALUES (38, 0, 3, 'meta_keywords', '_MD_AM_METAKEY', 'xoops, web applications, web 2.0, sns, news, technology, headlines, linux, software, download, downloads, free, community, forum, bulletin board, bbs, php, survey, polls, kernel, comment, comments, portal, odp, open source, opensource, FreeSoftware, gnu, gpl, license, Unix, *nix, mysql, sql, database, databases, web site, blog, wiki, module, modules, theme, themes, cms, content management', '_MD_AM_METAKEYDSC', 'textarea', 'text', 0)"); $dbm->insert('config', " VALUES (39, 0, 3, 'footer', '_MD_AM_FOOTER', 'Powered by XOOPS © 2001-" . date('Y', time()) . " <a href=\"http://xoops.org\" rel=\"external\" title=\"The XOOPS Project\">The XOOPS Project</a>', '_MD_AM_FOOTERDSC', 'textarea', 'text', 20)"); $dbm->insert('config', " VALUES (40, 0, 4, 'censor_enable', '_MD_AM_DOCENSOR', '0', '_MD_AM_DOCENSORDSC', 'yesno', 'int', 0)"); $dbm->insert('config', " VALUES (41, 0, 4, 'censor_words', '_MD_AM_CENSORWRD', '" . addslashes(serialize(array('f**k', 'shit'))) . "', '_MD_AM_CENSORWRDDSC', 'textarea', 'array', 1)"); $dbm->insert('config', " VALUES (42, 0, 4, 'censor_replace', '_MD_AM_CENSORRPLC', '#OOPS#', '_MD_AM_CENSORRPLCDSC', 'textbox', 'text', 2)"); $dbm->insert('config', " VALUES (43, 0, 3, 'meta_robots', '_MD_AM_METAROBOTS', 'index,follow', '_MD_AM_METAROBOTSDSC', 'select', 'text', 2)"); $dbm->insert('config', " VALUES (44, 0, 5, 'enable_search', '_MD_AM_DOSEARCH', '1', '_MD_AM_DOSEARCHDSC', 'yesno', 'int', 0)"); $dbm->insert('config', " VALUES (45, 0, 5, 'keyword_min', '_MD_AM_MINSEARCH', '5', '_MD_AM_MINSEARCHDSC', 'textbox', 'int', 1)"); $dbm->insert('config', " VALUES (46, 0, 2, 'avatar_minposts', '_MD_AM_AVATARMP', '0', '_MD_AM_AVATARMPDSC', 'textbox', 'int', 15)"); $dbm->insert('config', " VALUES (47, 0, 1, 'enable_badips', '_MD_AM_DOBADIPS', '0', '_MD_AM_DOBADIPSDSC', 'yesno', 'int', 40)"); $dbm->insert('config', " VALUES (48, 0, 3, 'meta_rating', '_MD_AM_METARATING', 'general', '_MD_AM_METARATINGDSC', 'select', 'text', 4)"); $dbm->insert('config', " VALUES (49, 0, 3, 'meta_author', '_MD_AM_METAAUTHOR', 'XOOPS', '_MD_AM_METAAUTHORDSC', 'textbox', 'text', 6)"); $dbm->insert('config', " VALUES (50, 0, 3, 'meta_copyright', '_MD_AM_METACOPYR', 'Copyright © 2001-" . date('Y', time()) . "', '_MD_AM_METACOPYRDSC', 'textbox', 'text', 8)"); $dbm->insert('config', " VALUES (51, 0, 3, 'meta_description', '_MD_AM_METADESC', 'XOOPS is a dynamic Object Oriented based open source portal script written in PHP.', '_MD_AM_METADESCDSC', 'textarea', 'text', 1)"); $dbm->insert('config', " VALUES (52, 0, 2, 'allow_chgmail', '_MD_AM_ALLWCHGMAIL', '0', '_MD_AM_ALLWCHGMAILDSC', 'yesno', 'int', 3)"); $dbm->insert('config', " VALUES (53, 0, 1, 'use_mysession', '_MD_AM_USEMYSESS', '0', '_MD_AM_USEMYSESSDSC', 'yesno', 'int', 19)"); $dbm->insert('config', " VALUES (54, 0, 2, 'reg_dispdsclmr', '_MD_AM_DSPDSCLMR', 1, '_MD_AM_DSPDSCLMRDSC', 'yesno', 'int', 30)"); $dbm->insert('config', " VALUES (55, 0, 2, 'reg_disclaimer', '_MD_AM_REGDSCLMR', '" . addslashes(_INSTALL_DISCLMR) . "', '_MD_AM_REGDSCLMRDSC', 'textarea', 'text', 32)"); $dbm->insert('config', " VALUES (56, 0, 2, 'allow_register', '_MD_AM_ALLOWREG', 1, '_MD_AM_ALLOWREGDSC', 'yesno', 'int', 0)"); $dbm->insert('config', " VALUES (57, 0, 1, 'theme_fromfile', '_MD_AM_THEMEFILE', '0', '_MD_AM_THEMEFILEDSC', 'yesno', 'int', 13)"); $dbm->insert('config', " VALUES (58, 0, 1, 'closesite', '_MD_AM_CLOSESITE', '0', '_MD_AM_CLOSESITEDSC', 'yesno', 'int', 26)"); $dbm->insert('config', " VALUES (59, 0, 1, 'closesite_okgrp', '_MD_AM_CLOSESITEOK', '" . addslashes(serialize(array('1'))) . "', '_MD_AM_CLOSESITEOKDSC', 'group_multi', 'array', 27)"); $dbm->insert('config', " VALUES (60, 0, 1, 'closesite_text', '_MD_AM_CLOSESITETXT', '" . _INSTALL_L165 . "', '_MD_AM_CLOSESITETXTDSC', 'textarea', 'text', 28)"); $dbm->insert('config', " VALUES (61, 0, 1, 'sslpost_name', '_MD_AM_SSLPOST', 'xoops_ssl', '_MD_AM_SSLPOSTDSC', 'textbox', 'text', 31)"); $dbm->insert('config', " VALUES (62, 0, 1, 'module_cache', '_MD_AM_MODCACHE', '', '_MD_AM_MODCACHEDSC', 'module_cache', 'array', 50)"); $dbm->insert('config', " VALUES (63, 0, 1, 'template_set', '_MD_AM_DTPLSET', 'default', '_MD_AM_DTPLSETDSC', 'tplset', 'other', 14)"); $dbm->insert('config', " VALUES (64,0,6,'mailmethod','_MD_AM_MAILERMETHOD','mail','_MD_AM_MAILERMETHODDESC','select','text',4)"); $dbm->insert('config', " VALUES (65,0,6,'smtphost','_MD_AM_SMTPHOST','a:1:{i:0;s:0:\"\";}', '_MD_AM_SMTPHOSTDESC','textarea','array',6)"); $dbm->insert('config', " VALUES (66,0,6,'smtpuser','_MD_AM_SMTPUSER','','_MD_AM_SMTPUSERDESC','textbox','text',7)"); $dbm->insert('config', " VALUES (67,0,6,'smtppass','_MD_AM_SMTPPASS','','_MD_AM_SMTPPASSDESC','password','text',8)"); $dbm->insert('config', " VALUES (68,0,6,'sendmailpath','_MD_AM_SENDMAILPATH','/usr/sbin/sendmail','_MD_AM_SENDMAILPATHDESC','textbox','text',5)"); $dbm->insert('config', " VALUES (69,0,6,'from','_MD_AM_MAILFROM','','_MD_AM_MAILFROMDESC','textbox','text', 1)"); $dbm->insert('config', " VALUES (70,0,6,'fromname','_MD_AM_MAILFROMNAME','','_MD_AM_MAILFROMNAMEDESC','textbox','text',2)"); $dbm->insert('config', " VALUES (71, 0, 1, 'sslloginlink', '_MD_AM_SSLLINK', 'https://', '_MD_AM_SSLLINKDSC', 'textbox', 'text', 33)"); $dbm->insert('config', " VALUES (72, 0, 1, 'theme_set_allowed', '_MD_AM_THEMEOK', '" . serialize(array('default')) . "', '_MD_AM_THEMEOKDSC', 'theme_multi', 'array', 13)"); // RMV-NOTIFY... Need to specify which user is sender of notification PM $dbm->insert('config', " VALUES (73,0,6,'fromuid','_MD_AM_MAILFROMUID','1','_MD_AM_MAILFROMUIDDESC','user','int',3)"); $dbm->insert('config', " VALUES (74,0,7,'auth_method','_MD_AM_AUTHMETHOD','xoops','_MD_AM_AUTHMETHODDESC','select','text',1)"); $dbm->insert('config', " VALUES (75,0,7,'ldap_port','_MD_AM_LDAP_PORT','389','_MD_AM_LDAP_PORT','textbox','int',2)"); $dbm->insert('config', " VALUES (76,0,7,'ldap_server','_MD_AM_LDAP_SERVER','your directory server','_MD_AM_LDAP_SERVER_DESC','textbox','text',3)"); $dbm->insert('config', " VALUES (77,0,7,'ldap_base_dn','_MD_AM_LDAP_BASE_DN','dc=xoops,dc=org','_MD_AM_LDAP_BASE_DN_DESC','textbox','text',4)"); $dbm->insert('config', " VALUES (78,0,7,'ldap_manager_dn','_MD_AM_LDAP_MANAGER_DN','manager_dn','_MD_AM_LDAP_MANAGER_DN_DESC','textbox','text',5)"); $dbm->insert('config', " VALUES (79,0,7,'ldap_manager_pass','_MD_AM_LDAP_MANAGER_PASS','manager_pass','_MD_AM_LDAP_MANAGER_PASS_DESC','password','text',6)"); $dbm->insert('config', " VALUES (80,0,7,'ldap_version','_MD_AM_LDAP_VERSION','3','_MD_AM_LDAP_VERSION_DESC','textbox','text', 7)"); $dbm->insert('config', " VALUES (81,0,7,'ldap_users_bypass','_MD_AM_LDAP_USERS_BYPASS','" . serialize(array('admin')) . "','_MD_AM_LDAP_USERS_BYPASS_DESC','textarea','array',8)"); $dbm->insert('config', " VALUES (82,0,7,'ldap_loginname_asdn','_MD_AM_LDAP_LOGINNAME_ASDN','uid_asdn','_MD_AM_LDAP_LOGINNAME_ASDN_D','yesno','int',9)"); $dbm->insert('config', " VALUES (83,0,7,'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_D', 'textbox', 'text', 10)"); $dbm->insert('config', " VALUES (84,0,7,'ldap_filter_person','_MD_AM_LDAP_FILTER_PERSON','','_MD_AM_LDAP_FILTER_PERSON_DESC','textbox','text',11)"); $dbm->insert('config', " VALUES (85,0,7,'ldap_domain_name','_MD_AM_LDAP_DOMAIN_NAME','mydomain','_MD_AM_LDAP_DOMAIN_NAME_DESC','textbox','text',12)"); $dbm->insert('config', " VALUES (86,0,7,'ldap_provisionning','_MD_AM_LDAP_PROVIS','0','_MD_AM_LDAP_PROVIS_DESC','yesno','int',13)"); $dbm->insert('config', " VALUES (87,0,7,'ldap_provisionning_group','_MD_AM_LDAP_PROVIS_GROUP','a:1:{i:0;s:1:\"2\";}','_MD_AM_LDAP_PROVIS_GROUP_DSC','group_multi','array',14)"); $dbm->insert('config', " VALUES (88,0,7,'ldap_mail_attr','_MD_AM_LDAP_MAIL_ATTR','mail','_MD_AM_LDAP_MAIL_ATTR_DESC','textbox','text',15)"); $dbm->insert('config', " VALUES (89,0,7,'ldap_givenname_attr','_MD_AM_LDAP_GIVENNAME_ATTR','givenname','_MD_AM_LDAP_GIVENNAME_ATTR_DSC','textbox','text',16)"); $dbm->insert('config', " VALUES (90,0,7,'ldap_surname_attr','_MD_AM_LDAP_SURNAME_ATTR','sn','_MD_AM_LDAP_SURNAME_ATTR_DESC','textbox','text',17)"); $dbm->insert('config', " VALUES (91,0,7,'ldap_field_mapping','_MD_AM_LDAP_FIELD_MAPPING_ATTR','email=mail|name=displayname','_MD_AM_LDAP_FIELD_MAPPING_DESC','textarea','text',18)"); $dbm->insert('config', " VALUES (92,0,7,'ldap_provisionning_upd', '_MD_AM_LDAP_PROVIS_UPD', '1', '_MD_AM_LDAP_PROVIS_UPD_DESC', 'yesno', 'int', 19)"); $dbm->insert('config', " VALUES (93,0,7,'ldap_use_TLS','_MD_AM_LDAP_USETLS','0','_MD_AM_LDAP_USETLS_DESC','yesno','int', 20)"); $dbm->insert('config', " VALUES (94, 0, 1, 'cpanel', '_MD_AM_CPANEL', 'default', '_MD_AM_CPANELDSC', 'cpanel', 'other', 11)"); $dbm->insert('config', " VALUES (95, 0, 2, 'welcome_type', '_MD_AM_WELCOMETYPE', '1', '_MD_AM_WELCOMETYPE_DESC', 'select', 'int', 3)"); // Module System $dbm->insert('config', " VALUES (96, 1, 0, 'break1', '_MI_SYSTEM_PREFERENCE_BREAK_GENERAL', 'head', '', 'line_break', 'textbox', 0)"); $dbm->insert('config', " VALUES (97, 1, 0, 'usetips', '_MI_SYSTEM_PREFERENCE_TIPS', '1', '_MI_SYSTEM_PREFERENCE_TIPS_DSC', 'yesno', 'int', 10)"); $dbm->insert('config', " VALUES (98, 1, 0, 'typeicons', '_MI_SYSTEM_PREFERENCE_ICONS', 'default', '', 'select', 'text', 20)"); $dbm->insert('config', " VALUES (99, 1, 0, 'typebreadcrumb', '_MI_SYSTEM_PREFERENCE_BREADCRUMB', 'default', '', 'select', 'text', 30)"); $dbm->insert('config', " VALUES (100, 1, 0, 'break2', '_MI_SYSTEM_PREFERENCE_BREAK_ACTIVE', 'head', '', 'line_break', 'textbox', 40)"); $dbm->insert('config', " VALUES (101, 1, 0, 'active_avatars', '_MI_SYSTEM_PREFERENCE_ACTIVE_AVATARS', '1', '', 'yesno', 'int', 50)"); $dbm->insert('config', " VALUES (102, 1, 0, 'active_banners', '_MI_SYSTEM_PREFERENCE_ACTIVE_BANNERS', '1', '', 'yesno', 'int', 60)"); $dbm->insert('config', " VALUES (103, 1, 0, 'active_blocksadmin', '_MI_SYSTEM_PREFERENCE_ACTIVE_BLOCKSADMIN', '1', '', 'hidden', 'int', 70)"); $dbm->insert('config', " VALUES (104, 1, 0, 'active_comments', '_MI_SYSTEM_PREFERENCE_ACTIVE_COMMENTS', '1', '', 'yesno', 'int', 80)"); $dbm->insert('config', " VALUES (105, 1, 0, 'active_filemanager', '_MI_SYSTEM_PREFERENCE_ACTIVE_FILEMANAGER', '1', '', 'yesno', 'int', 90)"); $dbm->insert('config', " VALUES (106, 1, 0, 'active_groups', '_MI_SYSTEM_PREFERENCE_ACTIVE_GROUPS', '1', '', 'hidden', 'int', 100)"); $dbm->insert('config', " VALUES (107, 1, 0, 'active_images', '_MI_SYSTEM_PREFERENCE_ACTIVE_IMAGES', '1', '', 'yesno', 'int', 110)"); $dbm->insert('config', " VALUES (108, 1, 0, 'active_mailusers', '_MI_SYSTEM_PREFERENCE_ACTIVE_MAILUSERS', '1', '', 'yesno', 'int', 120)"); $dbm->insert('config', " VALUES (109, 1, 0, 'active_modulesadmin', '_MI_SYSTEM_PREFERENCE_ACTIVE_MODULESADMIN', '1', '', 'hidden', 'int', 130)"); $dbm->insert('config', " VALUES (110, 1, 0, 'active_maintenance', '_MI_SYSTEM_PREFERENCE_ACTIVE_MAINTENANCE', '1', '', 'yesno', 'int', 140)"); $dbm->insert('config', " VALUES (111, 1, 0, 'active_preferences', '_MI_SYSTEM_PREFERENCE_ACTIVE_PREFERENCES', '1', '', 'hidden', 'int', 150)"); $dbm->insert('config', " VALUES (112, 1, 0, 'active_smilies', '_MI_SYSTEM_PREFERENCE_ACTIVE_SMILIES', '1', '', 'yesno', 'int', 160)"); $dbm->insert('config', " VALUES (113, 1, 0, 'active_tplsets', '_MI_SYSTEM_PREFERENCE_ACTIVE_TPLSETS', '1', '', 'hidden', 'int', 170)"); $dbm->insert('config', " VALUES (114, 1, 0, 'active_userrank', '_MI_SYSTEM_PREFERENCE_ACTIVE_USERRANK', '1', '', 'yesno', 'int', 180)"); $dbm->insert('config', " VALUES (115, 1, 0, 'active_users', '_MI_SYSTEM_PREFERENCE_ACTIVE_USERS', '1', '', 'yesno', 'int', 190)"); $dbm->insert('config', " VALUES (116, 1, 0, 'break3', '_MI_SYSTEM_PREFERENCE_BREAK_PAGER', 'head', '', 'line_break', 'textbox', 200)"); $dbm->insert('config', " VALUES (117, 1, 0, 'avatars_pager', '_MI_SYSTEM_PREFERENCE_AVATARS_PAGER', '10', '', 'textbox', 'int', 210)"); $dbm->insert('config', " VALUES (118, 1, 0, 'banners_pager', '_MI_SYSTEM_PREFERENCE_BANNERS_PAGER', '10', '', 'textbox', 'int', 220)"); $dbm->insert('config', " VALUES (119, 1, 0, 'comments_pager', '_MI_SYSTEM_PREFERENCE_COMMENTS_PAGER', '20', '', 'textbox', 'int', 230)"); $dbm->insert('config', " VALUES (120, 1, 0, 'groups_pager', '_MI_SYSTEM_PREFERENCE_GROUPS_PAGER', '15', '', 'textbox', 'int', 240)"); $dbm->insert('config', " VALUES (121, 1, 0, 'images_pager', '_MI_SYSTEM_PREFERENCE_IMAGES_PAGER', '15', '', 'textbox', 'int', 250)"); $dbm->insert('config', " VALUES (122, 1, 0, 'smilies_pager', '_MI_SYSTEM_PREFERENCE_SMILIES_PAGER', '20', '', 'textbox', 'int', 260)"); $dbm->insert('config', " VALUES (123, 1, 0, 'userranks_pager', '_MI_SYSTEM_PREFERENCE_USERRANKS_PAGER', '20', '', 'textbox', 'int', 270)"); $dbm->insert('config', " VALUES (124, 1, 0, 'users_pager', '_MI_SYSTEM_PREFERENCE_USERS_PAGER', '20', '', 'textbox', 'int', 280)"); $dbm->insert('config', " VALUES (125, 1, 0, 'break4', '_MI_SYSTEM_PREFERENCE_BREAK_EDITOR', 'head', '', 'line_break', 'textbox', 290)"); $dbm->insert('config', " VALUES (126, 1, 0, 'blocks_editor', '_MI_SYSTEM_PREFERENCE_BLOCKS_EDITOR', 'dhtmltextarea', '_MI_SYSTEM_PREFERENCE_BLOCKS_EDITOR_DSC', 'select', 'text', 300)"); $dbm->insert('config', " VALUES (127, 1, 0, 'comments_editor', '_MI_SYSTEM_PREFERENCE_COMMENTS_EDITOR', 'dhtmltextarea', '_MI_SYSTEM_PREFERENCE_COMMENTS_EDITOR_DSC', 'select', 'text', 310)"); $dbm->insert('config', " VALUES (128, 1, 0, 'general_editor', '_MI_SYSTEM_PREFERENCE_GENERAL_EDITOR', 'dhtmltextarea', '_MI_SYSTEM_PREFERENCE_GENERAL_EDITOR_DSC', 'select', 'text', 320)"); $dbm->insert('config', " VALUES (129, 1, 0, 'redirect', '_MI_SYSTEM_PREFERENCE_REDIRECT', 'admin.php?fct=preferences', '', 'hidden', 'text', 330)"); $dbm->insert('config', " VALUES (130, 1, 0, 'com_anonpost', '_MI_SYSTEM_PREFERENCE_ANONPOST', '', '', 'hidden', 'text', 340)"); $dbm->insert('config', " VALUES (133, 1, 0, 'jquery_theme', '_MI_SYSTEM_PREFERENCE_JQUERY_THEME', 'base', '', 'select', 'text', 35)"); $dbm->insert('config', " VALUES (134, 0, 1, 'redirect_message_ajax', '_MD_AM_CUSTOM_REDIRECT', '1', '_MD_AM_CUSTOM_REDIRECT_DESC', 'yesno', 'int', 12)"); require_once '../class/xoopslists.php'; $editors = XoopsLists::getDirListAsArray('../class/xoopseditor'); $conf = 35; foreach ($editors as $dir) { $dbm->insert('configoption', ' VALUES (' . $conf . ", '" . $dir . "', '" . $dir . "', 126)"); ++$conf; } foreach ($editors as $dir) { $dbm->insert('configoption', ' VALUES (' . $conf . ", '" . $dir . "', '" . $dir . "', 127)"); ++$conf; } foreach ($editors as $dir) { $dbm->insert('configoption', ' VALUES (' . $conf . ", '" . $dir . "', '" . $dir . "', 128)"); ++$conf; } $icons = XoopsLists::getDirListAsArray('../modules/system/images/icons'); foreach ($icons as $dir) { $dbm->insert('configoption', ' VALUES (' . $conf . ", '" . $dir . "', '" . $dir . "', 98)"); ++$conf; } $breadcrumb = XoopsLists::getDirListAsArray('../modules/system/images/breadcrumb'); foreach ($breadcrumb as $dir) { $dbm->insert('configoption', ' VALUES (' . $conf . ", '" . $dir . "', '" . $dir . "', 99)"); ++$conf; } $jqueryui = XoopsLists::getDirListAsArray('../modules/system/css/ui'); foreach ($jqueryui as $dir) { $dbm->insert('configoption', ' VALUES (' . $conf . ", '" . $dir . "', '" . $dir . "', 133)"); ++$conf; } return $groups; }
/** * __construct * * @param XoopsGroup|XoopsObject &$obj group object */ public function __construct(XoopsGroup &$obj) { $xoops = Xoops::getInstance(); if ($obj->isNew()) { $s_cat_value = ''; $a_mod_value = array(); $r_mod_value = array(); $r_block_value = array(); } else { $sysperm_handler = $xoops->getHandlerGroupperm(); $s_cat_value = $sysperm_handler->getItemIds('system_admin', $obj->getVar('groupid')); $member_handler = $xoops->getHandlerMember(); $thisgroup = $member_handler->getGroup($obj->getVar('groupid')); $moduleperm_handler = $xoops->getHandlerGroupperm(); $a_mod_value = $moduleperm_handler->getItemIds('module_admin', $thisgroup->getVar('groupid')); $r_mod_value = $moduleperm_handler->getItemIds('module_read', $thisgroup->getVar('groupid')); $gperm_handler = $xoops->getHandlerGroupperm(); $r_block_value = $gperm_handler->getItemIds('block_read', $obj->getVar('groupid')); } include_once $xoops->path('/modules/system/constants.php'); $title = $obj->isNew() ? SystemLocale::ADD_NEW_GROUP : SystemLocale::EDIT_GROUP; parent::__construct($title, "groupform", 'admin.php', "post", true); $this->setExtra('enctype="multipart/form-data"'); $name_text = new Xoops\Form\Text(SystemLocale::GROUP_NAME, "name", 4, 50, $obj->getVar('name')); $desc_text = new Xoops\Form\TextArea(SystemLocale::GROUP_DESCRIPTION, "desc", $obj->getVar('description')); $system_catids = new Xoops\Form\ElementTray(SystemLocale::SYSTEM_ADMIN_RIGHTS, ''); $s_cat_checkbox_all = new Xoops\Form\Checkbox('', "catbox", 1); $s_cat_checkbox_all->addOption('allbox', XoopsLocale::ALL); $s_cat_checkbox_all->setExtra(" onclick='xoopsCheckGroup(\"groupform\", \"catbox\" , \"system_catids[]\");' "); $s_cat_checkbox_all->setClass('xo-checkall'); $system_catids->addElement($s_cat_checkbox_all); $s_cat_checkbox = new Xoops\Form\Checkbox('', "system_catids", $s_cat_value); //$s_cat_checkbox->columns = 6; $admin_dir = \XoopsBaseConfig::get('root-path') . '/modules/system/admin/'; $dirlist = XoopsLists::getDirListAsArray($admin_dir); foreach ($dirlist as $file) { include \XoopsBaseConfig::get('root-path') . '/modules/system/admin/' . $file . '/xoops_version.php'; if (!empty($modversion['category'])) { if ($xoops->getModuleConfig('active_' . $file, 'system') == 1) { $s_cat_checkbox->addOption($modversion['category'], $modversion['name']); } } unset($modversion); } unset($dirlist); $system_catids->addElement($s_cat_checkbox); $admin_mids = new Xoops\Form\ElementTray(SystemLocale::MODULE_ADMIN_RIGHTS, ''); $s_admin_checkbox_all = new Xoops\Form\Checkbox('', "adminbox", 1); $s_admin_checkbox_all->addOption('allbox', XoopsLocale::ALL); $s_admin_checkbox_all->setExtra(" onclick='xoopsCheckGroup(\"groupform\", \"adminbox\" , \"admin_mids[]\");' "); $s_admin_checkbox_all->setClass('xo-checkall'); $admin_mids->addElement($s_admin_checkbox_all); $a_mod_checkbox = new Xoops\Form\Checkbox('', "admin_mids[]", $a_mod_value); //$a_mod_checkbox->columns = 5; $module_handler = $xoops->getHandlerModule(); $criteria = new CriteriaCompo(new Criteria('hasadmin', 1)); $criteria->add(new Criteria('isactive', 1)); $criteria->add(new Criteria('dirname', 'system', '<>')); $a_mod_checkbox->addOptionArray($module_handler->getNameList($criteria)); $admin_mids->addElement($a_mod_checkbox); $read_mids = new Xoops\Form\ElementTray(SystemLocale::MODULE_ACCESS_RIGHTS, ''); $s_mod_checkbox_all = new Xoops\Form\Checkbox('', "readbox", 1); $s_mod_checkbox_all->addOption('allbox', XoopsLocale::ALL); $s_mod_checkbox_all->setExtra(" onclick='xoopsCheckGroup(\"groupform\", \"readbox\" , \"read_mids[]\");' "); $s_mod_checkbox_all->setClass('xo-checkall'); $read_mids->addElement($s_mod_checkbox_all); $r_mod_checkbox = new Xoops\Form\Checkbox('', "read_mids[]", $r_mod_value); //$r_mod_checkbox->columns = 5; $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); $criteria->add(new Criteria('isactive', 1)); $r_mod_checkbox->addOptionArray($module_handler->getNameList($criteria)); $read_mids->addElement($r_mod_checkbox); $criteria = new CriteriaCompo(new Criteria('isactive', 1)); $criteria->setSort("mid"); $criteria->setOrder("ASC"); $module_list = $module_handler->getNameList($criteria); $module_list[0] = SystemLocale::CUSTOM_BLOCK; $block_handler = $xoops->getHandlerBlock(); $blocks_obj = $block_handler->getDistinctObjects(new Criteria("mid", "('" . implode("', '", array_keys($module_list)) . "')", "IN"), true); $blocks_module = array(); foreach (array_keys($blocks_obj) as $bid) { $title = $blocks_obj[$bid]->getVar("title"); $blocks_module[$blocks_obj[$bid]->getVar('mid')][$blocks_obj[$bid]->getVar('bid')] = empty($title) ? $blocks_obj[$bid]->getVar("name") : $title; } ksort($blocks_module); $r_block_tray = new Xoops\Form\ElementTray(SystemLocale::BLOCK_ACCESS_RIGHTS, "<br /><br />"); $s_checkbox_all = new Xoops\Form\Checkbox('', "blocksbox", 1); $s_checkbox_all->addOption('allbox', XoopsLocale::ALL); $s_checkbox_all->setExtra(" onclick='xoopsCheckGroup(\"groupform\", \"blocksbox\" , \"read_bids[]\");' "); $s_checkbox_all->setClass('xo-checkall'); $r_block_tray->addElement($s_checkbox_all); foreach (array_keys($blocks_module) as $mid) { $new_blocks_array = array(); foreach ($blocks_module[$mid] as $key => $value) { $new_blocks_array[$key] = "<a href='" . \XoopsBaseConfig::get('url') . "/modules/system/admin.php?fct=blocksadmin&op=edit&bid={$key}' " . "title='ID: {$key}' rel='external'>{$value}</a>"; } $r_block_checkbox = new Xoops\Form\Checkbox('<strong>' . $module_list[$mid] . '</strong><br />', "read_bids[]", $r_block_value); //$r_block_checkbox->columns = 5; $r_block_checkbox->addOptionArray($new_blocks_array); $r_block_tray->addElement($r_block_checkbox); unset($r_block_checkbox); } if (!$obj->isNew()) { $this->addElement(new Xoops\Form\Hidden('g_id', $obj->getVar('groupid'))); $this->addElement(new Xoops\Form\Hidden("op", "groups_save_update")); } else { $this->addElement(new Xoops\Form\Hidden("op", "groups_save_add")); } $this->addElement(new Xoops\Form\Hidden('fct', 'groups')); $this->addElement($name_text, true); $this->addElement($desc_text); $this->addElement($system_catids); $this->addElement($admin_mids); $this->addElement($read_mids); $this->addElement($r_block_tray); $this->addElement(new Xoops\Form\Button("", "submit", XoopsLocale::A_SUBMIT, "submit")); }
<?php // $Id: options.php 838 2011-12-10 19:06:27Z i.bitcero $ // -------------------------------------------------------------- // Lightbox plugin for Common Utilities // Add lightbox behaviour to your links // Author: Eduardo Cortés <*****@*****.**> // Email: i.bitcero@gmail.com // License: GPL 2.0 // -------------------------------------------------------------- /* ------------------------------- THEME -------------------------------- */ $options['theme'] = array('caption' => __('Lightbox theme', 'lightbox'), 'desc' => __('Select the appearance taht you wish for Lightbox plugin', 'lightbox'), 'fieldtype' => 'select', 'valuetype' => 'text', 'value' => 'default'); // Load themes include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; $dirs = XoopsLists::getDirListAsArray(RMCPATH . '/plugins/lightbox/css/'); $opts = array(); foreach ($dirs as $dir) { if (is_file(RMCPATH . '/plugins/lightbox/css/' . $dir . '/colorbox.css')) { $opts[$dir] = $dir; } } $options['theme']['options'] = $opts; /* -------------------------- TRANSITION TYPE --------------------------- */ $options['transition'] = array('caption' => __('Lightbox transition type', 'lightbox'), 'desc' => '', 'fieldtype' => 'select', 'valuetype' => 'text', 'value' => 'elastic', 'options' => array(__('Elastic', 'lightbox') => 'elastic', __('Fade', 'lightbox') => 'fade', __('None', 'lightbox') => 'none')); /* -------------------------- TRANSITION SPEED -------------------------- */ $options['speed'] = array('caption' => __('Transition speed', 'lightbox'), 'desc' => __('Sets the speed of the fade and elastic transitions, in milliseconds.', 'lightbox'), 'fieldtype' => 'text', 'valuetype' => 'int', 'value' => '350'); /* ----------------------------- MAX WIDTH ------------------------------ */ $options['width'] = array('caption' => __('Max width', 'lightbox'), 'desc' => __('Set a maximum width for loaded content. Example: "100%", 500, "500px". Leave 0 for no limit.', 'lightbox'), 'fieldtype' => 'text', 'valuetype' => 'text', 'value' => '90%'); /* ----------------------------- MAX HEIGHT ----------------------------- */ $options['height'] = array('caption' => __('Max height', 'lightbox'), 'desc' => __('Set a maximum height for loaded content. Example: "100%", 500, "500px". Leave 0 for no limit.', 'lightbox'), 'fieldtype' => 'text', 'valuetype' => 'text', 'value' => '90%'); /* ---------------------------- SCALE PHOTOS ---------------------------- */
/** * Retourne la liste des passerelles de paiement installées * * @return array */ function getInstalledGatewaysList() { return XoopsLists::getDirListAsArray(OLEDRION_ADMIN_PATH . 'gateways/'); }
function newbb_setModuleConfig(&$module, $isUpdate = false) { require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; $imagesets =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/modules/newbb/images/imagesets/'); $forum_options = array(_NONE => 0); if (!empty($isUpdate)) { $forum_handler =& xoops_getmodulehandler('forum', 'newbb'); $forums = $forum_handler->getForumsByCategory(0, '', false); foreach (array_keys($forums) as $c) { foreach (array_keys($forums[$c]) as $f) { $forum_options[$forums[$c][$f]["title"]] = $f; if (!isset($forums[$c][$f]["sub"])) { continue; } foreach (array_keys($forums[$c][$f]["sub"]) as $s) { $forum_options["-- " . $forums[$c][$f]["sub"][$s]["title"]] = $s; } } } unset($forums); } $modconfig =& $module->getInfo("config"); $count = count($modconfig); for ($i = 0; $i < $count; $i++) { if ($modconfig[$i]["name"] == "image_set") { $modconfig[$i]["options"] = $imagesets; } if ($modconfig[$i]["name"] == "welcome_forum") { $modconfig[$i]["options"] =& $forum_options; } } return true; }
function menus_block_edit($options) { //Unique ID if (!$options[4] || isset($_GET['op']) && $_GET['op'] == 'clone') { $options[4] = uniqid(); } $helper = Xoops::getModuleHelper('menus'); $helper->loadLanguage('admin'); $criteria = new CriteriaCompo(); $criteria->setSort('title'); $criteria->setOrder('ASC'); $menus = $helper->getHandlerMenus()->getList($criteria); unset($criteria); if (count($menus) == 0) { $form = "<a href='" . $helper->url('admin/admin_menus.php') . "'>" . _AM_MENUS_MSG_NOMENUS . "</a>"; return $form; } //Menu $form = new Xoops\Form\BlockForm(); $element = new Xoops\Form\Select(_MB_MENUS_SELECT_MENU, 'options[0]', $options[0], 1); $element->addOptionArray($menus); $element->setDescription(_MB_MENUS_SELECT_MENU_DSC); $form->addElement($element); //Skin $temp_skins = XoopsLists::getDirListAsArray(\XoopsBaseConfig::get('root-path') . "/modules/menus/skins/", ""); $skins_options = array(); foreach ($temp_skins as $skin) { if (XoopsLoad::fileExists($helper->path('skins/' . $skin . '/skin_version.php'))) { $skins_options[$skin] = $skin; } } $element = new Xoops\Form\Select(_MB_MENUS_SELECT_SKIN, 'options[1]', $options[1], 1); $element->addOptionArray($skins_options); $element->setDescription(_MB_MENUS_SELECT_SKIN_DSC); $form->addElement($element); //Use skin from,theme $element = new Xoops\Form\RadioYesNo(_MB_MENUS_USE_THEME_SKIN, 'options[2]', $options[2]); $element->setDescription(_MB_MENUS_USE_THEME_SKIN_DSC); $form->addElement($element); //Display method $display_options = array('block' => _MB_MENUS_DISPLAY_METHOD_BLOCK, 'template' => _MB_MENUS_DISPLAY_METHOD_TEMPLATE); $element = new Xoops\Form\Select(_MB_MENUS_DISPLAY_METHOD, 'options[3]', $options[3], 1); $element->addOptionArray($display_options); $element->setDescription(sprintf(_MB_MENUS_DISPLAY_METHOD_DSC, $options[4])); $form->addElement($element); //Unique ID $element = new Xoops\Form\Text(_MB_MENUS_UNIQUEID, 'options[4]', 2, 20, $options[4]); $element->setDescription(_MB_MENUS_UNIQUEID_DSC); $form->addElement($element); return $form->render(); }
$modversion['min_xoops'] = '2.6.0'; // paypal $modversion['paypal'] = array(); $modversion['paypal']['business'] = '*****@*****.**'; $modversion['paypal']['item_name'] = 'Donation : ' . _MI_MAILUSERS_DESC; $modversion['paypal']['amount'] = 0; $modversion['paypal']['currency_code'] = 'USD'; // Admin menu // Set to 1 if you want to display menu generated by system module $modversion['system_menu'] = 1; /* Manage extension */ $modversion['extension'] = 1; $modversion['extension_module'][] = 'system'; // Admin things $modversion['hasAdmin'] = 1; $modversion['adminindex'] = 'admin/index.php'; $modversion['adminmenu'] = 'admin/menu.php'; // JQuery $modversion['jquery'] = 1; // Preferences $i = 0; $editors = XoopsLists::getDirListAsArray(\XoopsBaseConfig::get('root-path') . '/class/xoopseditor'); $modversion['config'][$i]['name'] = 'mailusers_editor'; $modversion['config'][$i]['title'] = '_AM_MAILUSERS_EDITOR'; $modversion['config'][$i]['description'] = ''; $modversion['config'][$i]['formtype'] = 'select'; $modversion['config'][$i]['valuetype'] = 'text'; $modversion['config'][$i]['default'] = 'dhtmltextarea'; $modversion['config'][$i]['options'] = $editors;
$adminmenu[1]['icon'] = "images/modules.png"; $adminmenu[1]['location'] = "modules"; $adminmenu[2]['title'] = __('Blocks', 'rmcommon'); $adminmenu[2]['link'] = "blocks.php"; $adminmenu[2]['icon'] = "images/blocks.png"; $adminmenu[2]['location'] = "blocks"; $adminmenu[2]['options'] = array(0 => array('title' => __('Blocks list', 'rmcommon'), 'link' => 'blocks.php', 'selected' => 'blocks'), 1 => array('title' => __('Edit Positions', 'rmcommon'), 'link' => '#" id="add-pos-menu', 'selected' => '')); $adminmenu[3]['title'] = __('Images', 'rmcommon'); $adminmenu[3]['link'] = "images.php"; $adminmenu[3]['icon'] = "images/images.png"; $adminmenu[3]['location'] = "imgmanager"; $adminmenu[3]['options'] = array(0 => array('title' => __('Categories', 'rmcommon'), 'link' => 'images.php?action=showcats', 'selected' => 'rmc_imgcats'), 1 => array('title' => __('New category', 'rmcommon'), 'link' => 'images.php?action=newcat', 'selected' => 'rmc_imgnewcat'), 2 => array('title' => __('Images', 'rmcommon'), 'link' => 'images.php', 'selected' => 'rmc_images'), 4 => array('title' => __('Add images', 'rmcommon'), 'link' => 'images.php?action=new', 'selected' => 'rmc_newimages')); $adminmenu[4]['title'] = __('Comments', 'rmcommon'); $adminmenu[4]['link'] = "comments.php"; $adminmenu[4]['icon'] = "images/comments.png"; $adminmenu[4]['location'] = "comments"; $adminmenu[5]['title'] = __('Plugins', 'rmcommon'); $adminmenu[5]['link'] = "plugins.php"; $adminmenu[5]['icon'] = "images/plugin.png"; $adminmenu[5]['location'] = "plugins"; $adminmenu[6]['title'] = __('Themes', 'rmcommon'); $adminmenu[6]['link'] = "#"; $adminmenu[6]['icon'] = "images/themes.png"; $adminmenu[6]['location'] = ""; include XOOPS_ROOT_PATH . '/class/xoopslists.php'; $themes = XoopsLists::getDirListAsArray(RMCPATH . '/themes'); foreach ($themes as $dir) { if (file_exists(RMCPATH . '/themes/' . $dir . '/admin_gui.php')) { $adminmenu[6]['options'][] = array('title' => ucfirst($dir), 'link' => 'index.php?action=theme&theme=' . $dir, 'selected' => ''); } }
$modversion['config'][17]['formtype'] = 'textbox'; $modversion['config'][17]['valuetype'] = 'int'; $modversion['config'][17]['default'] = 1; $modversion['config'][18]['name'] = 'mods_number'; $modversion['config'][18]['title'] = '_MI_RMC_MODSNUMBER'; $modversion['config'][18]['description'] = ''; $modversion['config'][18]['formtype'] = 'textbox'; $modversion['config'][18]['valuetype'] = 'int'; $modversion['config'][18]['default'] = 6; $modversion['config'][19]['name'] = 'theme'; $modversion['config'][19]['title'] = '_MI_RMC_ADMTHEME'; $modversion['config'][19]['description'] = ''; $modversion['config'][19]['formtype'] = 'select'; $modversion['config'][19]['valuetype'] = 'text'; $modversion['config'][19]['default'] = 'designia'; $dirs = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/modules/rmcommon/themes', ''); $options = array(); $options['default'] = 'default'; foreach ($dirs as $dir => $v) { if (!file_exists(XOOPS_ROOT_PATH . '/modules/rmcommon/themes/' . $dir . '/admin_gui.php')) { continue; } $options[$dir] = $dir; } $modversion['config'][19]['options'] = $options; // Update config options $fct = isset($_GET['fct']) ? $_GET['fct'] : ''; $mid = isset($_GET['mod']) ? $_GET['mod'] : ''; $mh = xoops_gethandler('module'); $mod = $mh->getByDirname('rmcommon'); if ($fct == 'preferences' && $mid == $mod->mid()) {
/** * XoopsEditorHandler::getList() * * @param mixed $noHtml * * @return array */ function getList($noHtml = false) { /* Do NOT use this method statically, please use $editor_handler = XoopsEditorHandler::getInstance(); $result = array_flip($editor_handler->getList()); */ if (!isset($this->root_path)) { $this->root_path = XOOPS_ROOT_PATH . '/class/xoopseditor'; $GLOBALS['xoopsLogger']->addDeprecated(__CLASS__ . '::' . __FUNCTION__ . '() should not be called statically.'); } xoops_load('XoopsCache'); $list = XoopsCache::read('editorlist'); if (empty($list)) { $list = array(); $order = array(); xoops_load('XoopsLists'); $_list = XoopsLists::getDirListAsArray($this->root_path . '/'); foreach ($_list as $item) { if (file_exists($file = $this->root_path . '/' . $item . '/language/' . $GLOBALS['xoopsConfig']['language'] . '.php')) { include_once $file; } else { if (file_exists($file = $this->root_path . '/' . $item . '/language/english.php')) { include_once $file; } } if (file_exists($file = $this->root_path . '/' . $item . '/editor_registry.php')) { include $file; if (empty($config['order'])) { continue; } $order[] = $config['order']; $list[$item] = array('title' => $config['title'], 'nohtml' => $config['nohtml']); } } array_multisort($order, $list); XoopsCache::write('editorlist', $list); } $editors = array_keys($list); if (!empty($this->allowed_editors)) { $editors = array_intersect($editors, $this->allowed_editors); } $_list = array(); foreach ($editors as $name) { if (!empty($noHtml) && empty($list[$name]['nohtml'])) { continue; } $_list[$name] = $list[$name]['title']; } return $_list; }
/** * @return bool */ public function apply_config() { $dbm = new Db_manager(); $sql = 'SELECT conf_id FROM `' . $GLOBALS['xoopsDB']->prefix('config') . "` WHERE `conf_name` IN ('cpanel')"; if (!($result = $GLOBALS['xoopsDB']->queryF($sql))) { return false; } $count = $GLOBALS['xoopsDB']->fetchRow($result); $sql = 'UPDATE `' . $GLOBALS['xoopsDB']->prefix('config') . "` SET `conf_value` = 'default' WHERE `conf_id` = " . $count[0]; if (!($result = $GLOBALS['xoopsDB']->queryF($sql))) { return false; } $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'break1', '_MI_SYSTEM_PREFERENCE_BREAK_GENERAL', 'head', '', 'line_break', 'textbox', 0)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'usetips', '_MI_SYSTEM_PREFERENCE_TIPS', '1', '_MI_SYSTEM_PREFERENCE_TIPS_DSC', 'yesno', 'int', 10)"); $icon_id = $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'typeicons', '_MI_SYSTEM_PREFERENCE_ICONS', 'default', '', 'select', 'text', 20)"); $bc_id = $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'typebreadcrumb', '_MI_SYSTEM_PREFERENCE_BREADCRUMB', 'default', '', 'select', 'text', 30)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'break2', '_MI_SYSTEM_PREFERENCE_BREAK_ACTIVE', 'head', '', 'line_break', 'textbox', 40)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_avatars', '_MI_SYSTEM_PREFERENCE_ACTIVE_AVATARS', '1', '', 'yesno', 'int', 50)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_banners', '_MI_SYSTEM_PREFERENCE_ACTIVE_BANNERS', '1', '', 'yesno', 'int', 60)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_blocksadmin', '_MI_SYSTEM_PREFERENCE_ACTIVE_BLOCKSADMIN', '1', '', 'hidden', 'int', 70)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_comments', '_MI_SYSTEM_PREFERENCE_ACTIVE_COMMENTS', '1', '', 'yesno', 'int', 80)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_filemanager', '_MI_SYSTEM_PREFERENCE_ACTIVE_FILEMANAGER', '1', '', 'yesno', 'int', 90)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_groups', '_MI_SYSTEM_PREFERENCE_ACTIVE_GROUPS', '1', '', 'hidden', 'int', 100)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_images', '_MI_SYSTEM_PREFERENCE_ACTIVE_IMAGES', '1', '', 'yesno', 'int', 110)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_mailusers', '_MI_SYSTEM_PREFERENCE_ACTIVE_MAILUSERS', '1', '', 'yesno', 'int', 120)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_modulesadmin', '_MI_SYSTEM_PREFERENCE_ACTIVE_MODULESADMIN', '1', '', 'hidden', 'int', 130)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_maintenance', '_MI_SYSTEM_PREFERENCE_ACTIVE_MAINTENANCE', '1', '', 'yesno', 'int', 140)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_preferences', '_MI_SYSTEM_PREFERENCE_ACTIVE_PREFERENCES', '1', '', 'hidden', 'int', 150)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_smilies', '_MI_SYSTEM_PREFERENCE_ACTIVE_SMILIES', '1', '', 'yesno', 'int', 160)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_tplsets', '_MI_SYSTEM_PREFERENCE_ACTIVE_TPLSETS', '1', '', 'hidden', 'int', 170)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_userrank', '_MI_SYSTEM_PREFERENCE_ACTIVE_USERRANK', '1', '', 'yesno', 'int', 180)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'active_users', '_MI_SYSTEM_PREFERENCE_ACTIVE_USERS', '1', '', 'yesno', 'int', 190)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'break3', '_MI_SYSTEM_PREFERENCE_BREAK_PAGER', 'head', '', 'line_break', 'textbox', 200)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'avatars_pager', '_MI_SYSTEM_PREFERENCE_AVATARS_PAGER', '10', '', 'textbox', 'int', 210)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'banners_pager', '_MI_SYSTEM_PREFERENCE_BANNERS_PAGER', '10', '', 'textbox', 'int', 220)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'comments_pager', '_MI_SYSTEM_PREFERENCE_COMMENTS_PAGER', '20', '', 'textbox', 'int', 230)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'groups_pager', '_MI_SYSTEM_PREFERENCE_GROUPS_PAGER', '15', '', 'textbox', 'int', 240)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'images_pager', '_MI_SYSTEM_PREFERENCE_IMAGES_PAGER', '15', '', 'textbox', 'int', 250)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'smilies_pager', '_MI_SYSTEM_PREFERENCE_SMILIES_PAGER', '20', '', 'textbox', 'int', 260)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'userranks_pager', '_MI_SYSTEM_PREFERENCE_USERRANKS_PAGER', '20', '', 'textbox', 'int', 270)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'users_pager', '_MI_SYSTEM_PREFERENCE_USERS_PAGER', '20', '', 'textbox', 'int', 280)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'break4', '_MI_SYSTEM_PREFERENCE_BREAK_EDITOR', 'head', '', 'line_break', 'textbox', 290)"); $block_id = $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'blocks_editor', '_MI_SYSTEM_PREFERENCE_BLOCKS_EDITOR', 'dhtmltextarea', '_MI_SYSTEM_PREFERENCE_BLOCKS_EDITOR_DSC', 'select', 'text', 300)"); $com_id = $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'comments_editor', '_MI_SYSTEM_PREFERENCE_COMMENTS_EDITOR', 'dhtmltextarea', '_MI_SYSTEM_PREFERENCE_COMMENTS_EDITOR_DSC', 'select', 'text', 310)"); $main_id = $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'general_editor', '_MI_SYSTEM_PREFERENCE_GENERAL_EDITOR', 'dhtmltextarea', '_MI_SYSTEM_PREFERENCE_GENERAL_EDITOR_DSC', 'select', 'text', 320)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'redirect', '_MI_SYSTEM_PREFERENCE_REDIRECT', 'admin.php?fct=preferences', '', 'hidden', 'text', 330)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'com_anonpost', '_MI_SYSTEM_PREFERENCE_ANONPOST', '', '', 'hidden', 'text', 340)"); $jquery_id = $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (1, 0, 'jquery_theme', '_MI_SYSTEM_PREFERENCE_JQUERY_THEME', 'base', '', 'select', 'text', 35)"); $dbm->insert('config', " (conf_modid,conf_catid,conf_name,conf_title,conf_value,conf_desc,conf_formtype,conf_valuetype,conf_order) VALUES (0, 1, 'redirect_message_ajax', '_MD_AM_CUSTOM_REDIRECT', '1', '_MD_AM_CUSTOM_REDIRECT_DESC', 'yesno', 'int', 12)"); require_once '../class/xoopslists.php'; $editors = XoopsLists::getDirListAsArray('../class/xoopseditor'); foreach ($editors as $dir) { $dbm->insert('configoption', " (confop_name,confop_value,conf_id) VALUES ('" . $dir . "', '" . $dir . "', {$block_id})"); } foreach ($editors as $dir) { $dbm->insert('configoption', " (confop_name,confop_value,conf_id) VALUES ('" . $dir . "', '" . $dir . "', {$com_id})"); } foreach ($editors as $dir) { $dbm->insert('configoption', " (confop_name,confop_value,conf_id) VALUES ('" . $dir . "', '" . $dir . "', {$main_id})"); } $icons = XoopsLists::getDirListAsArray('../modules/system/images/icons'); foreach ($icons as $dir) { $dbm->insert('configoption', " (confop_name,confop_value,conf_id) VALUES ('" . $dir . "', '" . $dir . "', {$icon_id})"); } $breadcrumb = XoopsLists::getDirListAsArray('../modules/system/images/breadcrumb'); foreach ($breadcrumb as $dir) { $dbm->insert('configoption', " (confop_name,confop_value,conf_id) VALUES ('" . $dir . "', '" . $dir . "', {$bc_id})"); } $jqueryui = XoopsLists::getDirListAsArray('../modules/system/css/ui'); foreach ($jqueryui as $dir) { $dbm->insert('configoption', " (confop_name,confop_value,conf_id) VALUES ('" . $dir . "', '" . $dir . "', {$jquery_id})"); } return true; }
/** * @param bool $action * * @return XoopsThemeForm */ public function getForm($action = false) { if ($action === false) { $action = $_SERVER['REQUEST_URI']; } if ($this->isNew()) { $s_cat_value = ''; $a_mod_value = array(); $r_mod_value = array(); $r_block_value = array(); } else { $sysperm_handler = xoops_getHandler('groupperm'); $s_cat_value = $sysperm_handler->getItemIds('system_admin', $this->getVar('groupid')); $member_handler = xoops_getHandler('member'); $thisgroup = $member_handler->getGroup($this->getVar('groupid')); $moduleperm_handler = xoops_getHandler('groupperm'); $a_mod_value = $moduleperm_handler->getItemIds('module_admin', $thisgroup->getVar('groupid')); $r_mod_value = $moduleperm_handler->getItemIds('module_read', $thisgroup->getVar('groupid')); $gperm_handler = xoops_getHandler('groupperm'); $r_block_value = $gperm_handler->getItemIds('block_read', $this->getVar('groupid')); } xoops_load('XoopsFormLoader'); xoops_load('XoopsLists'); include_once XOOPS_ROOT_PATH . '/modules/system/constants.php'; $title = $this->isNew() ? sprintf(_AM_SYSTEM_GROUPS_ADD) : sprintf(_AM_SYSTEM_GROUPS_EDIT); $form = new XoopsThemeForm($title, 'groupform', $action, 'post', true); $form->setExtra('enctype="multipart/form-data"'); $name_text = new XoopsFormText(_AM_SYSTEM_GROUPS_NAME, 'name', 30, 50, $this->getVar('name')); $desc_text = new XoopsFormTextArea(_AM_SYSTEM_GROUPS_DESCRIPTION, 'desc', $this->getVar('description')); $system_catids = new XoopsFormElementTray(_AM_SYSTEM_GROUPS_SYSTEMRIGHTS, ''); $s_cat_checkbox_all = new XoopsFormCheckBox('', 'catbox', 1); $s_cat_checkbox_all->addOption('allbox', _AM_SYSTEM_ALL); $s_cat_checkbox_all->setExtra(" onclick='xoopsCheckGroup(\"groupform\", \"catbox\" , \"system_catids[]\");' "); $s_cat_checkbox_all->setClass('xo-checkall'); $system_catids->addElement($s_cat_checkbox_all); $s_cat_checkbox = new XoopsFormCheckBox('', 'system_catids', $s_cat_value); $s_cat_checkbox->columns = 6; $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin/'; $dirlist = XoopsLists::getDirListAsArray($admin_dir); foreach ($dirlist as $file) { include XOOPS_ROOT_PATH . '/modules/system/admin/' . $file . '/xoops_version.php'; if (!empty($modversion['category'])) { if (xoops_getModuleOption('active_' . $file, 'system') == 1) { $s_cat_checkbox->addOption($modversion['category'], $modversion['name']); } } unset($modversion); } unset($dirlist); $system_catids->addElement($s_cat_checkbox); $admin_mids = new XoopsFormElementTray(_AM_SYSTEM_GROUPS_ACTIVERIGHTS, ''); $s_admin_checkbox_all = new XoopsFormCheckBox('', 'adminbox', 1); $s_admin_checkbox_all->addOption('allbox', _AM_SYSTEM_ALL); $s_admin_checkbox_all->setExtra(" onclick='xoopsCheckGroup(\"groupform\", \"adminbox\" , \"admin_mids[]\");' "); $s_admin_checkbox_all->setClass('xo-checkall'); $admin_mids->addElement($s_admin_checkbox_all); $a_mod_checkbox = new XoopsFormCheckBox('', 'admin_mids[]', $a_mod_value); $a_mod_checkbox->columns = 5; $module_handler = xoops_getHandler('module'); $criteria = new CriteriaCompo(new Criteria('hasadmin', 1)); $criteria->add(new Criteria('isactive', 1)); $criteria->add(new Criteria('dirname', 'system', '<>')); $a_mod_checkbox->addOptionArray($module_handler->getList($criteria)); $admin_mids->addElement($a_mod_checkbox); $read_mids = new XoopsFormElementTray(_AM_SYSTEM_GROUPS_ACCESSRIGHTS, ''); $s_mod_checkbox_all = new XoopsFormCheckBox('', 'readbox', 1); $s_mod_checkbox_all->addOption('allbox', _AM_SYSTEM_ALL); $s_mod_checkbox_all->setExtra(" onclick='xoopsCheckGroup(\"groupform\", \"readbox\" , \"read_mids[]\");' "); $s_mod_checkbox_all->setClass('xo-checkall'); $read_mids->addElement($s_mod_checkbox_all); $r_mod_checkbox = new XoopsFormCheckBox('', 'read_mids[]', $r_mod_value); $r_mod_checkbox->columns = 5; $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); $criteria->add(new Criteria('isactive', 1)); $r_mod_checkbox->addOptionArray($module_handler->getList($criteria)); $read_mids->addElement($r_mod_checkbox); $criteria = new CriteriaCompo(new Criteria('isactive', 1)); $criteria->setSort('mid'); $criteria->setOrder('ASC'); $module_list = $module_handler->getList($criteria); $module_list[0] = _AM_SYSTEM_GROUPS_CUSTOMBLOCK; $block_handler = xoops_getHandler('block'); $blocks_obj = $block_handler->getObjects(new Criteria('mid', "('" . implode("', '", array_keys($module_list)) . "')", 'IN'), true); $blocks_module = array(); foreach (array_keys($blocks_obj) as $bid) { $title = $blocks_obj[$bid]->getVar('title'); $blocks_module[$blocks_obj[$bid]->getVar('mid')][$blocks_obj[$bid]->getVar('bid')] = empty($title) ? $blocks_obj[$bid]->getVar('name') : $title; } ksort($blocks_module); $r_block_tray = new XoopsFormElementTray(_AM_SYSTEM_GROUPS_BLOCKRIGHTS, '<br><br>'); $s_checkbox_all = new XoopsFormCheckBox('', 'blocksbox', 1); $s_checkbox_all->addOption('allbox', _AM_SYSTEM_ALL); $s_checkbox_all->setExtra(" onclick='xoopsCheckGroup(\"groupform\", \"blocksbox\" , \"read_bids[]\");' "); $s_checkbox_all->setClass('xo-checkall'); $r_block_tray->addElement($s_checkbox_all); foreach (array_keys($blocks_module) as $mid) { $new_blocks_array = array(); foreach ($blocks_module[$mid] as $key => $value) { $new_blocks_array[$key] = "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=blocksadmin&op=edit&bid={$key}' title='ID: {$key}' rel='external'>{$value}</a>"; } $r_block_checkbox = new XoopsFormCheckBox('<strong>' . $module_list[$mid] . '</strong><br>', 'read_bids[]', $r_block_value); $r_block_checkbox->columns = 5; $r_block_checkbox->addOptionArray($new_blocks_array); $r_block_tray->addElement($r_block_checkbox); unset($r_block_checkbox); } if (!$this->isNew()) { $form->addElement(new XoopsFormHidden('g_id', $this->getVar('groupid'))); $form->addElement(new XoopsFormHidden('op', 'groups_save_update')); } else { $form->addElement(new XoopsFormHidden('op', 'groups_save_add')); } $form->addElement($name_text, true); $form->addElement($desc_text); $form->addElement($system_catids); $form->addElement($admin_mids); $form->addElement($read_mids); $form->addElement($r_block_tray); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); return $form; }
/** * get_xoopsPlugins - return all xoops plugins * * @return array plugins */ public function get_xoopsPlugins() { $xoopsPlugins = array(); $xoops_root_path = \XoopsBaseConfig::get('root-path'); $allplugins = XoopsLists::getDirListAsArray($xoops_root_path . $this->rootpath . "/plugins"); foreach ($allplugins as $plugin) { if (strpos(strtolower($plugin), "xoops") !== false && file_exists($xoops_root_path . $this->config["rootpath"] . "/include/{$plugin}.php")) { if ($right = @(include $xoops_root_path . $this->config["rootpath"] . "/include/{$plugin}.php")) { $xoopsPlugins[$plugin] = $plugin; } } } return $xoopsPlugins; }
$modversion['config'][$cpto]['name'] = 'urlrewriting'; $modversion['config'][$cpto]['title'] = '_MI_OLEDRION_URL_REWR'; $modversion['config'][$cpto]['description'] = ''; $modversion['config'][$cpto]['formtype'] = 'yesno'; $modversion['config'][$cpto]['valuetype'] = 'int'; $modversion['config'][$cpto]['default'] = 0; /** * Editor to use */ $cpto++; $modversion['config'][$cpto]['name'] = 'bl_form_options'; $modversion['config'][$cpto]['title'] = '_MI_OLEDRION_FORM_OPTIONS'; $modversion['config'][$cpto]['description'] = '_MI_OLEDRION_FORM_OPTIONS_DESC'; $modversion['config'][$cpto]['formtype'] = 'select'; $modversion['config'][$cpto]['valuetype'] = 'text'; $modversion['config'][$cpto]['options'] = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/class/xoopseditor'); $modversion['config'][$cpto]['default'] = 'dhtmltextarea'; /** * Tooltips, or infotips are some small textes you can see when you * move your mouse over an article's title. This text contains the * first (x) characters of the story */ $cpto++; $modversion['config'][$cpto]['name'] = 'infotips'; $modversion['config'][$cpto]['title'] = '_MI_OLEDRION_INFOTIPS'; $modversion['config'][$cpto]['description'] = '_MI_OLEDRION_INFOTIPS_DES'; $modversion['config'][$cpto]['formtype'] = 'textbox'; $modversion['config'][$cpto]['valuetype'] = 'int'; $modversion['config'][$cpto]['default'] = '0'; /** * MAX Filesize Upload in kilo bytes
$modversion['config'][] = array('name' => 'ldap_domain_name', 'title' => 'CONF_LDAP_DOMAIN_NAME', 'description' => 'CONF_LDAP_DOMAIN_NAME_DESC', 'category' => 'authentication', 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => 'mydomain'); $modversion['config'][] = array('name' => 'ldap_provisionning', 'title' => 'CONF_LDAP_PROVIS', 'description' => 'CONF_LDAP_PROVIS_DESC', 'category' => 'authentication', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0); $modversion['config'][] = array('name' => 'ldap_provisionning_group', 'title' => 'CONF_LDAP_PROVIS_GROUP', 'description' => 'CONF_LDAP_PROVIS_GROUP_DESC', 'category' => 'authentication', 'formtype' => 'group_multi', 'valuetype' => 'array', 'default' => '2'); $modversion['config'][] = array('name' => 'ldap_mail_attr', 'title' => 'CONF_LDAP_MAIL_ATTR', 'description' => 'CONF_LDAP_MAIL_ATTR_DESC', 'category' => 'authentication', 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => 'mail'); $modversion['config'][] = array('name' => 'ldap_givenname_attr', 'title' => 'CONF_LDAP_GIVENNAME_ATTR', 'description' => 'CONF_LDAP_GIVENNAME_ATTR_DESC', 'category' => 'authentication', 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => 'givenname'); $modversion['config'][] = array('name' => 'ldap_surname_attr', 'title' => 'CONF_LDAP_SURNAME_ATTR', 'description' => 'CONF_LDAP_SURNAME_ATTR_DESC', 'category' => 'authentication', 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => 'sn'); $modversion['config'][] = array('name' => 'ldap_field_mapping', 'title' => 'CONF_LDAP_FIELD_MAPPING_ATTR', 'description' => 'CONF_LDAP_FIELD_MAPPING_DESC', 'category' => 'authentication', 'formtype' => 'textarea', 'valuetype' => 'text', 'default' => 'email=mail|name=displayname'); $modversion['config'][] = array('name' => 'ldap_provisionning_upd', 'title' => 'CONF_LDAP_PROVIS_UPD', 'description' => 'CONF_LDAP_PROVIS_UPD_DESC', 'category' => 'authentication', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1); $modversion['config'][] = array('name' => 'ldap_use_TLS', 'title' => 'CONF_LDAP_USETLS', 'description' => 'CONF_LDAP_USETLS_DESC', 'category' => 'authentication', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0); // no category? $modversion['config'][] = array('name' => 'usetips', 'title' => 'CONF_HELP_ONLINE', 'description' => 'CONF_HELP_ONLINE_DESC', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1); $icons = XoopsLists::getDirListAsArray(\XoopsBaseConfig::get('root-path') . '/modules/system/images/icons'); $modversion['config'][] = array('name' => 'typeicons', 'title' => 'CONF_ICONS', 'description' => '', 'formtype' => 'select', 'valuetype' => 'text', 'default' => 'default', 'options' => $icons); $breadcrumb = XoopsLists::getDirListAsArray(\XoopsBaseConfig::get('root-path') . '/modules/system/images/breadcrumb'); $modversion['config'][] = array('name' => 'typebreadcrumb', 'title' => 'CONF_BREADCRUMB', 'description' => '', 'formtype' => 'select', 'valuetype' => 'text', 'default' => 'default', 'options' => $breadcrumb); $jquery_theme = XoopsLists::getDirListAsArray(\XoopsBaseConfig::get('root-path') . '/media/jquery/ui/themes'); $modversion['config'][] = array('name' => 'jquery_theme', 'title' => 'CONF_JQUERY_THEME', 'description' => '', 'formtype' => 'select', 'valuetype' => 'text', 'default' => 'base', 'options' => $jquery_theme); $modversion['config'][] = array('name' => 'active_blocksadmin', 'title' => '', 'description' => '', 'formtype' => 'hidden', 'valuetype' => 'int', 'default' => 1); $modversion['config'][] = array('name' => 'active_extensions', 'title' => '', 'description' => '', 'formtype' => 'hidden', 'valuetype' => 'int', 'default' => 1); $modversion['config'][] = array('name' => 'active_filemanager', 'title' => '', 'description' => '', 'formtype' => 'hidden', 'valuetype' => 'int', 'default' => 1); $modversion['config'][] = array('name' => 'active_groups', 'title' => '', 'description' => '', 'formtype' => 'hidden', 'valuetype' => 'int', 'default' => 1); $modversion['config'][] = array('name' => 'active_modulesadmin', 'title' => '', 'description' => '', 'formtype' => 'hidden', 'valuetype' => 'int', 'default' => 1); $modversion['config'][] = array('name' => 'active_preferences', 'title' => '', 'description' => '', 'formtype' => 'hidden', 'valuetype' => 'int', 'default' => 1); $modversion['config'][] = array('name' => 'active_services', 'title' => '', 'description' => '', 'formtype' => 'hidden', 'valuetype' => 'int', 'default' => 1); $modversion['config'][] = array('name' => 'active_tplsets', 'title' => '', 'description' => '', 'formtype' => 'hidden', 'valuetype' => 'int', 'default' => 1); $modversion['config'][] = array('name' => 'active_users', 'title' => '', 'description' => '', 'formtype' => 'hidden', 'valuetype' => 'int', 'default' => 1); $modversion['config'][] = array('name' => 'groups_pager', 'title' => 'CONF_GROUPS_PER_PAGE', 'description' => '', 'formtype' => 'textbox', 'valuetype' => 'int', 'default' => 15); $modversion['config'][] = array('name' => 'users_pager', 'title' => 'CONF_USERS_PER_PAGE', 'description' => '', 'formtype' => 'textbox', 'valuetype' => 'int', 'default' => 20); $modversion['config'][] = array('name' => 'blocks_editor', 'title' => 'CONF_BLOCKS_EDITOR', 'description' => '', 'formtype' => 'select_editor', 'valuetype' => 'text', 'default' => 'dhtmltextarea'); $modversion['config'][] = array('name' => 'general_editor', 'title' => 'CONF_GENERAL_EDITOR', 'description' => '', 'formtype' => 'select_editor', 'valuetype' => 'text', 'default' => 'dhtmltextarea'); $modversion['config'][] = array('name' => 'redirect', 'title' => '', 'description' => '', 'formtype' => 'hidden', 'valuetype' => 'textbox', 'default' => 'admin.php?fct=preferences');
/** * gets list of locale folders inside default language directory * * @static * @return array */ public static function getLocaleList() { $lang_list = XoopsLists::getDirListAsArray(\XoopsBaseConfig::get('root-path') . '/locale/'); return $lang_list; }
function get_xoopsPlugins() { $xoopsPlugins = array(); $allplugins = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . $this->rootpath . "/plugins"); foreach ($allplugins as $plugin) { if (strpos(strtolower($plugin), "xoops") != false && file_exists(XOOPS_ROOT_PATH . $this->config["rootpath"] . "/include/{$plugin}.php")) { if ($right = @(include XOOPS_ROOT_PATH . $this->config["rootpath"] . "/include/{$plugin}.php")) { $xoopsPlugins[$plugin] = $plugin; } } } return $xoopsPlugins; }
$xoTheme->addScript('modules/system/js/admin.js'); // Define Breadcrumb and tips $xoBreadCrumb->addLink(_AM_SYSTEM_CONFIG); $xoBreadCrumb->addTips(_AM_SYSTEM_TIPS_MAIN); $xoBreadCrumb->render(); $groups = $xoopsUser->getGroups(); $all_ok = false; if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { $sysperm_handler = xoops_getHandler('groupperm'); $ok_syscats = $sysperm_handler->getItemIds('system_admin', $groups); } else { $all_ok = true; } xoops_load('xoopslists'); $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin'; $dirlist = XoopsLists::getDirListAsArray($admin_dir); $inactive_section = array('blocksadmin', 'groups', 'modulesadmin', 'preferences', 'tplsets'); foreach ($dirlist as $directory) { if (file_exists($admin_dir . '/' . $directory . '/xoops_version.php')) { require $admin_dir . '/' . $directory . '/xoops_version.php'; if ($modversion['hasAdmin']) { if (xoops_getModuleOption('active_' . $directory, 'system')) { $category = isset($modversion['category']) ? (int) $modversion['category'] : 0; if (false !== $all_ok || in_array($modversion['category'], $ok_syscats)) { $menu['file'] = $directory; $menu['title'] = trim($modversion['name']); $menu['desc'] = str_replace('<br>', ' ', $modversion['description']); $menu['icon'] = $modversion['image']; $menu['status'] = true; } } else {
/** * @param bool $noHtml * @return array */ public function buildEditorList() { $list = array(); $order = array(); $fileList = XoopsLists::getDirListAsArray($this->root_path . '/'); foreach ($fileList as $item) { if (XoopsLoad::fileExists($file = $this->root_path . '/' . $item . '/language/' . XoopsLocale::getLegacyLanguage() . '.php')) { include_once $file; } else { if (XoopsLoad::fileExists($file = $this->root_path . '/' . $item . '/language/english.php')) { include_once $file; } } if (XoopsLoad::fileExists($file = $this->root_path . '/' . $item . '/editor_registry.php')) { include $file; if (empty($config['order'])) { continue; } $order[] = $config['order']; $list[$item] = array('title' => $config['title'], 'nohtml' => $config['nohtml']); } } array_multisort($order, $list); return $list; }
function &getLangList() { $lang_list = array(); $lang_list =& XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . "/language/"); return $lang_list; }
/** * gets list of language folders inside default language directory */ public static function getLangList() { $lang_list = array(); $lang_list = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/language/'); return $lang_list; }