本文整理汇总了PHP中XoopsLists::getDirListAsArray方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsLists::getDirListAsArray方法的具体用法?PHP XoopsLists::getDirListAsArray怎么用?PHP XoopsLists::getDirListAsArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsLists
的用法示例。
在下文中一共展示了XoopsLists::getDirListAsArray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_rm_plugins
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();
}
示例2: array
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;
}
示例3: setPlugins
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;
}
}
}
}
示例4: render
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;
}
示例5: getGuis
/**
* 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;
}
示例6: getForm
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;
}
示例7: xoops_gethandler
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;
}
示例8: getAvailableDecorators
/**
* @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;
}
示例9: array
//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' => 'xoopsfoundation@gmail.com', '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')));
示例10: make_data
//.........这里部分代码省略.........
$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;
}
示例11: __construct
/**
* __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>";
//.........这里部分代码省略.........
示例12: array
<?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 <i.bitcero@gmail.com>
// 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 ---------------------------- */
示例13: getInstalledGatewaysList
/**
* Retourne la liste des passerelles de paiement installées
*
* @return array
*/
function getInstalledGatewaysList()
{
return XoopsLists::getDirListAsArray(OLEDRION_ADMIN_PATH . 'gateways/');
}
示例14: newbb_setModuleConfig
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;
}
示例15: menus_block_edit
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();
}