本文整理汇总了PHP中XoopsModule类的典型用法代码示例。如果您正苦于以下问题:PHP XoopsModule类的具体用法?PHP XoopsModule怎么用?PHP XoopsModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了XoopsModule类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getModule
/**
* getModule
*
* @param Legacy_AbstractModule &$obj
* @param XoopsModule $module
*
* @return void
**/
public static function getModule(&$obj, $module)
{
if ($module->getInfo('trust_dirname') == 'lecat') {
require_once LECAT_TRUST_PATH . '/class/Module.class.php';
$obj = new Lecat_Module($module);
}
}
开发者ID:nouphet,项目名称:rata,代码行数:15,代码来源:AssetPreload.class.php
示例2: eventCoreIncludeCommonLanguage
/**
* To prevent errors when upload images with closed site
*/
public function eventCoreIncludeCommonLanguage()
{
global $xoopsConfig;
if ($xoopsConfig['cpanel'] != 'redmexico') {
$db = XoopsDatabaseFactory::getDatabaseConnection();
$db->queryF("UPDATE " . $db->prefix("config") . " SET conf_value='redmexico' WHERE conf_modid=0 AND conf_catid=1 AND conf_name='cpanel'");
}
/**
* Check before to a rmcommon native module be installed
*/
$fct = RMHttpRequest::get('fct', 'string', '');
$op = RMHttpRequest::get('op', 'string', '');
if ('modulesadmin' == $fct && 'install' == $op) {
$dirname = RMHttpRequest::get('module', 'string', '');
if ('' != $dirname) {
$module = new XoopsModule();
$module->loadInfoAsVar($dirname);
if ($module->getInfo('rmnative')) {
RMUris::redirect_with_message(__('Please install %s using the modules manager from Common Utilities to prevent errors during install.', 'rmcommon'), RMCURL . '/modules.php?action=install&dir=' . $dirname, RMMSG_WARN);
}
}
}
if (RMUris::current_url() == RMCURL . '/include/upload.php' && $xoopsConfig['closesite']) {
$security = rmc_server_var($_POST, 'rmsecurity', 0);
$data = TextCleaner::getInstance()->decrypt($security, true);
$data = explode("|", $data);
// [0] = referer, [1] = session_id(), [2] = user, [3] = token
$xoopsUser = new XoopsUser($data[0]);
if ($xoopsUser->isAdmin()) {
$xoopsConfig['closesite'] = 0;
}
}
RMEvents::get()->run_event('rmcommon.include.common.language');
}
开发者ID:txmodxoops,项目名称:rmcommon,代码行数:37,代码来源:core.php
示例3: getModule
/**
* getModule
*
* @param Legacy_AbstractModule &$obj
* @param XoopsModule $module
*
* @return void
**/
public static function getModule(&$obj, $module)
{
if ($module->getInfo('trust_dirname') == 'playermap') {
require_once PLAYERMAP_TRUST_PATH . '/class/Module.class.php';
$obj = new Playermap_Module($module);
}
}
开发者ID:kilica,项目名称:playermap,代码行数:15,代码来源:AssetPreload.class.php
示例4: getModule
/**
* getModule
*
* @param Legacy_AbstractModule &$obj
* @param XoopsModule $module
*
* @return void
**/
public static function getModule(&$obj, $module)
{
if ($module->getInfo('trust_dirname') == 'rpglink') {
require_once RPGLINK_TRUST_PATH . '/class/Module.class.php';
$obj = new Rpglink_Module($module);
}
}
开发者ID:kilica,项目名称:playermap,代码行数:15,代码来源:AssetPreload.class.php
示例5: xoops_module_install_publisher
/**
* @param $xoopsModule
*
* @return bool|string
*/
function xoops_module_install_publisher(XoopsModule $xoopsModule)
{
include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
xoops_loadLanguage('admin', $xoopsModule->getVar('dirname'));
xoops_loadLanguage('modinfo', $xoopsModule->getVar('dirname'));
$moduleDirName = $xoopsModule->getVar('dirname');
include_once $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/include/config.php');
foreach (array_keys($uploadFolders) as $i) {
PublisherUtilities::createFolder($uploadFolders[$i]);
}
$file = PUBLISHER_ROOT_PATH . '/assets/images/blank.png';
foreach (array_keys($copyFiles) as $i) {
$dest = $copyFiles[$i] . '/blank.png';
PublisherUtilities::copyFile($file, $dest);
}
return true;
/*
include_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/include/functions.php');
$ret = true;
$msg = '';
// Create content directory
$dir = $GLOBALS['xoops']->path('uploads/' . $xoopsModule->getVar('dirname') . '/content');
if (!publisherMkdir($dir)) {
$msg .= sprintf(_AM_PUBLISHER_DIRNOTCREATED, $dir);
}
if (empty($msg)) {
return $ret;
} else {
return $msg;
}
*/
}
开发者ID:trabisdementia,项目名称:publisher,代码行数:38,代码来源:oninstall.php
示例6: xoops_module_update_search
/**
* XXX
*
* @copyright XOOPS Project (http://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @since 2.6.0
* @author Mage Grégory (AKA Mage)
* @version $Id: $
*/
function xoops_module_update_search(XoopsModule &$module)
{
$xoops = Xoops::getInstance();
// Copy old configs in new configs and delete old configs
$config_handler = $xoops->getHandlerConfig();
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('conf_modid', 0));
$criteria->add(new Criteria('conf_catid', 5));
$configs = $config_handler->getConfigs($criteria);
$confcount = count($configs);
if ($confcount > 0) {
for ($i = 0; $i < $confcount; ++$i) {
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('conf_modid', $module->getVar('mid')));
$criteria->add(new Criteria('conf_name', $configs[$i]->getvar('conf_name')));
$new_configs = $config_handler->getConfigs($criteria);
$new_confcount = count($new_configs);
if ($new_confcount > 0) {
for ($j = 0; $j < $new_confcount; ++$j) {
$obj = $config_handler->getConfig($new_configs[$j]->getvar('conf_id'));
}
$obj->setVar("conf_value", $configs[$i]->getvar('conf_value'));
$config_handler->insertConfig($obj);
$config_handler->deleteConfig($configs[$i]);
}
}
}
return true;
}
开发者ID:RanLee,项目名称:XoopsCore,代码行数:38,代码来源:update.php
示例7: xoops_module_install_profile
/**
* @param XoopsModule $module
* @return bool
*/
function xoops_module_install_profile($module)
{
$xoops = Xoops::getInstance();
$xoops->registry()->set('profile_id', $module->getVar('mid'));
// Create registration steps
profile_install_addStep(_PROFILE_MI_STEP_BASIC, '', 1, 0);
profile_install_addStep(_PROFILE_MI_STEP_COMPLEMENTARY, '', 2, 1);
// Create categories
profile_install_addCategory(_PROFILE_MI_CATEGORY_PERSONAL, 1);
profile_install_addCategory(_PROFILE_MI_CATEGORY_MESSAGING, 2);
profile_install_addCategory(_PROFILE_MI_CATEGORY_SETTINGS, 3);
profile_install_addCategory(_PROFILE_MI_CATEGORY_COMMUNITY, 4);
profile_install_addField('name', XoopsLocale::REAL_NAME, '', 1, 'textbox', 1, 1, 1, array(), 2, 255);
profile_install_addField('user_from', XoopsLocale::LOCATION, '', 1, 'textbox', 1, 2, 1, array(), 2, 255);
profile_install_addField('timezone', XoopsLocale::TIME_ZONE, '', 1, 'timezone', 1, 3, 1, array(), 2, 0);
profile_install_addField('user_occ', XoopsLocale::OCCUPATION, '', 1, 'textbox', 1, 4, 1, array(), 2, 255);
profile_install_addField('user_intrest', XoopsLocale::INTEREST, '', 1, 'textbox', 1, 5, 1, array(), 2, 255);
profile_install_addField('bio', XoopsLocale::EXTRA_INFO, '', 1, 'textarea', 2, 6, 1, array(), 2, 0);
profile_install_addField('user_regdate', XoopsLocale::MEMBER_SINCE, '', 1, 'datetime', 3, 7, 0, array(), 0, 10);
profile_install_addField('user_icq', XoopsLocale::ICQ, '', 2, 'textbox', 1, 1, 1, array(), 2, 255);
profile_install_addField('user_aim', XoopsLocale::AIM, '', 2, 'textbox', 1, 2, 1, array(), 2, 255);
profile_install_addField('user_yim', XoopsLocale::YIM, '', 2, 'textbox', 1, 3, 1, array(), 2, 255);
profile_install_addField('user_msnm', XoopsLocale::MSNM, '', 2, 'textbox', 1, 4, 1, array(), 2, 255);
profile_install_addField('user_viewemail', XoopsLocale::ALLOW_OTHER_USERS_TO_VIEW_EMAIL, '', 3, 'yesno', 3, 1, 1, array(), 2, 1, false);
profile_install_addField('attachsig', XoopsLocale::ALWAYS_ATTACH_MY_SIGNATURE, '', 3, 'yesno', 3, 2, 1, array(), 0, 1, false);
profile_install_addField('user_mailok', XoopsLocale::Q_RECEIVE_OCCASIONAL_EMAIL_NOTICES_FROM_ADMINISTRATORS, '', 3, 'yesno', 3, 3, 1, array(), 2, 1, false);
profile_install_addField('theme', _PROFILE_MA_THEME, '', 3, 'theme', 1, 4, 1, array(), 0, 0, false);
profile_install_addField('url', _PROFILE_MI_URL_TITLE, '', 4, 'textbox', 1, 1, 1, array(), 2, 255);
profile_install_addField('posts', XoopsLocale::POSTS, '', 4, 'textbox', 3, 2, 0, array(), 0, 255);
profile_install_addField('rank', XoopsLocale::RANK, '', 4, 'rank', 3, 3, 2, array(), 0, 0);
profile_install_addField('last_login', XoopsLocale::LAST_LOGIN, '', 4, 'datetime', 3, 4, 0, array(), 0, 10);
profile_install_addField('user_sig', XoopsLocale::SIGNATURE, '', 4, 'textarea', 1, 5, 1, array(), 0, 0);
profile_install_initializeProfiles();
return true;
}
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:39,代码来源:install.php
示例8: getModule
/**
* getModule
*
* @param Legacy_AbstractModule &$obj
* @param XoopsModule $module
*
* @return void
**/
public static function getModule(&$obj, $module)
{
if ($module->getInfo('trust_dirname') == 'xupdate') {
require_once XUPDATE_TRUST_PATH . '/class/Module.class.php';
$obj = new Xupdate_Module($module);
}
}
开发者ID:nao-pon,项目名称:xupdate,代码行数:15,代码来源:AssetPreload.class.php
示例9: get_modules_ajax
function get_modules_ajax()
{
XoopsLogger::getInstance()->activated = false;
XoopsLogger::getInstance()->renderingEnabled = false;
$db = Database::getInstance();
$sql = "SELECT COUNT(*) FROM " . $db->prefix("modules");
$page = rmc_server_var($_POST, 'page', 1);
$limit = RMFunctions::configs('mods_number');
list($num) = $db->fetchRow($db->query($sql));
$tpages = ceil($num / $limit);
$page = $page > $tpages ? $tpages : $page;
$start = $num <= 0 ? 0 : ($page - 1) * $limit;
$nav = new RMPageNav($num, $limit, $page, 5);
$nav->target_url('javascript:;" onclick="get_mods_page({PAGE_NUM})');
$sql = 'SELECT * FROM ' . $db->prefix('modules') . " ORDER BY mid, weight LIMIT {$start},{$limit}";
$result = $db->query($sql);
$installed_mods = array();
while ($row = $db->fetchArray($result)) {
$mod = new XoopsModule();
$mod->assignVars($row);
$installed_mods[] = $mod;
}
include RMTemplate::get()->get_template('rmc_mods_installed.php', 'module', 'rmcommon');
die;
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:25,代码来源:index.php
示例10: getModule
/**
* get module.
*
* @param Legacy_AbstractModule &$obj
* @param XoopsModule $module
*/
public static function getModule(&$obj, $module)
{
if ($module->getInfo('trust_dirname') == COSMOAPI_TRUST_DIRNAME) {
$mytrustdirname = COSMOAPI_TRUST_DIRNAME;
require_once XOOPS_TRUST_PATH . '/modules/' . COSMOAPI_TRUST_DIRNAME . '/class/Module.class.php';
$className = ucfirst(COSMOAPI_TRUST_DIRNAME) . '_Module';
$obj = new $className($module);
}
}
开发者ID:neuroinformatics,项目名称:xcl-module-cosmoapi,代码行数:15,代码来源:AssetPreload.class.php
示例11: loadRolesByModule
/**
* Loads roles of the specific module with $module, and set loaded roles to
* the current principal.
* @static
* @param XoopsModule $module
*/
function loadRolesByModule(&$module)
{
static $cache;
$root =& XCube_Root::getSingleton();
$context =& $root->mContext;
if ($module == null) {
return;
}
if (isset($cache[$module->get('mid')])) {
return;
}
$groups = is_object($context->mXoopsUser) ? $context->mXoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
$handler =& xoops_gethandler('groupperm');
if ($handler->checkRight('module_read', $module->get('mid'), $groups)) {
$context->mUser->addRole('Module.' . $module->get('dirname') . '.Visitor');
}
if (is_object($context->mXoopsUser) && $handler->checkRight('module_admin', $module->get('mid'), $groups)) {
$context->mUser->addRole('Module.' . $module->get('dirname') . '.Admin');
}
$handler =& xoops_getmodulehandler('group_permission', 'legacy');
$roleArr = $handler->getRolesByModule($module->get('mid'), $groups);
foreach ($roleArr as $role) {
$context->mUser->addRole('Module.' . $module->get('dirname') . '.' . $role);
}
$cache[$module->get('mid')] = true;
}
开发者ID:hiro1173,项目名称:legacy,代码行数:32,代码来源:Legacy_RoleManager.class.php
示例12: test_insertModule
public function test_insertModule()
{
$instance = new $this->myclass($this->conn);
$module = new XoopsModule();
$module->setDirty(true);
$module->setNew(true);
$module->setVar('name', 'MODULE_DUMMY_FOR_TESTS', true);
$value = $instance->insertModule($module);
$this->assertTrue($value);
$value = $instance->deleteModule($module);
$this->assertTrue($value);
}
开发者ID:RanLee,项目名称:XoopsCore,代码行数:12,代码来源:moduleHandlerTest.php
示例13: xoops_module_update_system
/**
* xoops_module_update_system
*
* @param XoopsModule &$module
*
* @return bool
*/
function xoops_module_update_system(XoopsModule &$module)
{
$xoops = Xoops::getInstance();
if ($module->getVar('version') == 100) {
$qb = $xoops->db()->createXoopsQueryBuilder();
$eb = $qb->expr();
$sql = $qb->select('t1.tpl_id')->fromPrefix('tplfile', 't1')->fromPrefix('tplfile', 't2')->where($eb->eq('t1.tpl_module', 't2.tpl_module '))->andWhere($eb->eq('t1.tpl_tplset', 't2.tpl_tplset'))->andWhere($eb->eq('t1.tpl_file', 't2.tpl_file'))->andWhere($eb->eq('t1.tpl_id', 't2.tpl_id'));
$result = $sql->execute();
$tplids = array();
while (list($tplid) = $result->fetch(PDO::FETCH_NUM)) {
$tplids[] = $tplid;
}
if (count($tplids) > 0) {
$tplfile_handler = $xoops->getHandlerTplfile();
$duplicate_files = $tplfile_handler->getTplObjects(new Criteria('tpl_id', "(" . implode(',', $tplids) . ")", "IN"));
if (count($duplicate_files) > 0) {
foreach (array_keys($duplicate_files) as $i) {
$tplfile_handler->deleteTpl($duplicate_files[$i]);
}
}
}
}
// Copy old configs in new configs and delete old configs
// Not for conf_catid =5 (Update in search extension)
// Not for conf_catid =6 (Update in mail user extension)
$config_handler = $xoops->getHandlerConfig();
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('conf_modid', 0));
$criteria->add(new Criteria('conf_catid', 5, '!='));
$criteria->add(new Criteria('conf_catid', 6, '!='));
$configs = $config_handler->getConfigs($criteria);
$confcount = count($configs);
if ($confcount > 0) {
for ($i = 0; $i < $confcount; ++$i) {
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('conf_modid', 1));
$criteria->add(new Criteria('conf_name', $configs[$i]->getvar('conf_name')));
$new_configs = $config_handler->getConfigs($criteria);
$new_confcount = count($new_configs);
if ($new_confcount > 0) {
for ($j = 0; $j < $new_confcount; ++$j) {
$obj = $config_handler->getConfig($new_configs[$j]->getvar('conf_id'));
}
$obj->setVar("conf_value", $configs[$i]->getvar('conf_value'));
$config_handler->insertConfig($obj);
$config_handler->deleteConfig($configs[$i]);
}
}
}
return true;
}
开发者ID:RanLee,项目名称:XoopsCore,代码行数:58,代码来源:update.php
示例14: __construct
function __construct(XoopsModule $module)
{
parent::__construct($this);
$this->module = $module;
$module->loadAdminMenu();
$this->adminmenu = $this->module->adminmenu;
foreach ($this->adminmenu as $menu) {
if (stripos($_SERVER['REQUEST_URI'], $menu['link']) !== false) {
$this->title = $menu['title'];
$this->icon = $menu['link'];
$this->icon = $menu['icon'];
}
}
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:14,代码来源:Adminnav.php
示例15: execute
/**
* Do execute porting. This member function is added to Delegate.
*
* @access public
* @param XoopsModule $module
* @param Legacy_ModuleInstallLog $log
*/
function execute(&$module, &$log)
{
if ($module->get('dirname') != 'XUpgrade') {
return;
}
$this->mLog =& $log;
$log->add(_MI_XUPGRADE_MESSAGE_START_PORTING);
$this->_portConfigs();
if (XUPGRADE_ENABLE_TEMPLATEPORTING == true) {
$this->_portTemplates();
}
if ($this->mIsInstall) {
$this->_adjustModules();
}
}
开发者ID:nouphet,项目名称:rata,代码行数:22,代码来源:UpgradeProcessor.class.php
示例16: xoops_module_install_profile
/**
* Extended User Profile
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright (c) 2000-2016 XOOPS Project (www.xoops.org)
* @license GNU GPL 2 (http://www.gnu.org/licenses/gpl-2.0.html)
* @package profile
* @since 2.3.0
* @author Jan Pedersen
* @author Taiwen Jiang <[email protected]>
* @param $module
* @return bool
*/
function xoops_module_install_profile(XoopsModule $module)
{
global $module_id;
$module_id = $module->getVar('mid');
xoops_loadLanguage('user');
// Create registration steps
profile_install_addStep(_PROFILE_MI_STEP_BASIC, '', 1, 0);
profile_install_addStep(_PROFILE_MI_STEP_COMPLEMENTARY, '', 2, 1);
// Create categories
profile_install_addCategory(_PROFILE_MI_CATEGORY_PERSONAL, 1);
profile_install_addCategory(_PROFILE_MI_CATEGORY_MESSAGING, 2);
profile_install_addCategory(_PROFILE_MI_CATEGORY_SETTINGS, 3);
profile_install_addCategory(_PROFILE_MI_CATEGORY_COMMUNITY, 4);
// Add user fields
xoops_loadLanguage('notification');
xoops_loadLanguage('main', $module->getVar('dirname', 'n'));
include_once $GLOBALS['xoops']->path('include/notification_constants.php');
$umode_options = array('nest' => _NESTED, 'flat' => _FLAT, 'thread' => _THREADED);
$uorder_options = array(0 => _OLDESTFIRST, 1 => _NEWESTFIRST);
$notify_mode_options = array(XOOPS_NOTIFICATION_MODE_SENDALWAYS => _NOT_MODE_SENDALWAYS, XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE => _NOT_MODE_SENDONCE, XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT => _NOT_MODE_SENDONCEPERLOGIN);
$notify_method_options = array(XOOPS_NOTIFICATION_METHOD_DISABLE => _NOT_METHOD_DISABLE, XOOPS_NOTIFICATION_METHOD_PM => _NOT_METHOD_PM, XOOPS_NOTIFICATION_METHOD_EMAIL => _NOT_METHOD_EMAIL);
profile_install_addField('name', _US_REALNAME, '', 1, 'textbox', 1, 1, 1, array(), 2, 255);
profile_install_addField('user_from', _US_LOCATION, '', 1, 'textbox', 1, 2, 1, array(), 2, 255);
profile_install_addField('timezone_offset', _US_TIMEZONE, '', 1, 'timezone', 1, 3, 1, array(), 2, 0);
profile_install_addField('user_occ', _US_OCCUPATION, '', 1, 'textbox', 1, 4, 1, array(), 2, 255);
profile_install_addField('user_intrest', _US_INTEREST, '', 1, 'textbox', 1, 5, 1, array(), 2, 255);
profile_install_addField('bio', _US_EXTRAINFO, '', 1, 'textarea', 2, 6, 1, array(), 2, 0);
profile_install_addField('user_regdate', _US_MEMBERSINCE, '', 1, 'datetime', 3, 7, 0, array(), 0, 10);
profile_install_addField('user_icq', _US_ICQ, '', 2, 'textbox', 1, 1, 1, array(), 2, 255);
profile_install_addField('user_aim', _US_AIM, '', 2, 'textbox', 1, 2, 1, array(), 2, 255);
profile_install_addField('user_yim', _US_YIM, '', 2, 'textbox', 1, 3, 1, array(), 2, 255);
profile_install_addField('user_msnm', _US_MSNM, '', 2, 'textbox', 1, 4, 1, array(), 2, 255);
profile_install_addField('user_viewemail', _US_ALLOWVIEWEMAIL, '', 3, 'yesno', 3, 1, 1, array(), 2, 1, false);
profile_install_addField('attachsig', _US_SHOWSIG, '', 3, 'yesno', 3, 2, 1, array(), 0, 1, false);
profile_install_addField('user_mailok', _US_MAILOK, '', 3, 'yesno', 3, 3, 1, array(), 2, 1, false);
profile_install_addField('theme', _PROFILE_MA_THEME, '', 3, 'theme', 1, 4, 1, array(), 0, 0, false);
profile_install_addField('umode', _US_CDISPLAYMODE, '', 3, 'select', 1, 5, 1, $umode_options, 0, 0, false);
profile_install_addField('uorder', _US_CSORTORDER, '', 3, 'select', 3, 6, 1, $uorder_options, 0, 0, false);
profile_install_addField('notify_mode', _NOT_NOTIFYMODE, '', 3, 'select', 3, 7, 1, $notify_mode_options, 0, 0, false);
profile_install_addField('notify_method', _NOT_NOTIFYMETHOD, '', 3, 'select', 3, 8, 1, $notify_method_options, 0, 0, false);
profile_install_addField('url', _PROFILE_MI_URL_TITLE, '', 4, 'textbox', 1, 1, 1, array(), 2, 255);
profile_install_addField('posts', _US_POSTS, '', 4, 'textbox', 3, 2, 0, array(), 0, 255);
profile_install_addField('rank', _US_RANK, '', 4, 'rank', 3, 3, 2, array(), 0, 0);
profile_install_addField('last_login', _US_LASTLOGIN, '', 4, 'datetime', 3, 4, 0, array(), 0, 10);
profile_install_addField('user_sig', _US_SIGNATURE, '', 4, 'textarea', 1, 5, 1, array(), 0, 0);
profile_install_initializeProfiles();
return true;
}
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:67,代码来源:install.php
示例17: anchor
static function anchor($module, $controller = '', $action = '', $parameters = array())
{
global $cuSettings;
if ($module == '') {
return null;
}
$url = XOOPS_URL;
$paths = isset($cuSettings->modules_path) ? $cuSettings->modules_path : array();
$path = isset($paths[$module]) ? $paths[$module] : '/' . $module;
if (defined('XOOPS_CPFUNC_LOADED')) {
if ($cuSettings->permalinks && isset($paths[$module])) {
$url .= '/admin' . $path;
} else {
$objModule = XoopsModule::getByDirName($module);
$url .= '/modules/' . $module . '/' . $objModule->getInfo('adminindex');
}
} else {
$url .= $cuSettings->permalinks ? $path : '/modules/' . $module;
}
if ($controller == '') {
return $url;
}
$url .= $cuSettings->permalinks ? '/' . $controller . '/' : '/' . $controller . '/';
$url .= $action != '' ? $action . '/' : '';
$query = '';
foreach ($parameters as $name => $value) {
$query .= $name . '/' . urlencode($value) . '/';
}
return $url . $query;
}
开发者ID:txmodxoops,项目名称:rmcommon,代码行数:30,代码来源:uris.class.php
示例18: executeViewInput
/**
* @todo no $renderer. It should be $render.
*/
function executeViewInput(&$controller, &$xoopsUser, &$renderer)
{
$renderer->setTemplateName("module_install.html");
$renderer->setAttribute('module', $this->mXoopsModule);
$renderer->setAttribute('actionForm', $this->mActionForm);
$renderer->setAttribute('currentVersion', round($this->mXoopsModule->get('version') / 100, 2));
}
开发者ID:nouphet,项目名称:rata,代码行数:10,代码来源:ModuleInstallAction.class.php
示例19: executeUninstall
/**
* execute uninstall.
*
* @return bool
*/
public function executeUninstall()
{
$this->_uninstallTables();
if (!$this->_mForceMode && $this->mLog->hasError()) {
$this->_processReport();
return false;
}
if ($this->_mXoopsModule->get('mid') != null) {
$this->_uninstallModule();
if (!$this->_mForceMode && $this->mLog->hasError()) {
$this->_processReport();
return false;
}
$this->_uninstallTemplates();
if (!$this->_mForceMode && $this->mLog->hasError()) {
$this->_processReport();
return false;
}
$this->_uninstallBlocks();
if (!$this->_mForceMode && $this->mLog->hasError()) {
$this->_processReport();
return false;
}
$this->_uninstallPreferences();
if (!$this->_mForceMode && $this->mLog->hasError()) {
$this->_processReport();
return false;
}
}
$this->_processReport();
return true;
}
开发者ID:neuroinformatics,项目名称:xcl-module-cosmoapi,代码行数:37,代码来源:Uninstaller.class.php
示例20: getModule
/**
* getModule
*
* @param Legacy_AbstractModule &$obj
* @param XoopsModule $module
*
* @return void
**/
public static function getModule(&$obj, $module)
{
if ($module->getInfo('trust_dirname') == 'trpg') {
require_once TRPG_TRUST_PATH . '/class/Module.class.php';
$obj = new Trpg_Module($module);
}
}
开发者ID:kilica,项目名称:playermap,代码行数:15,代码来源:AssetPreload.class.php
注:本文中的XoopsModule类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论