当前位置: 首页>>代码示例>>PHP>>正文


PHP xoops_getmodulehandler函数代码示例

本文整理汇总了PHP中xoops_getmodulehandler函数的典型用法代码示例。如果您正苦于以下问题:PHP xoops_getmodulehandler函数的具体用法?PHP xoops_getmodulehandler怎么用?PHP xoops_getmodulehandler使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了xoops_getmodulehandler函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

	function execute(&$controller, &$xoopsUser)
	{
		if (xoops_getrequest('_form_control_cancel') != null) {
			return USER_FRAME_VIEW_CANCEL;
		}

		$isNew = $this->mObject->isNew();
		
		$ret = parent::execute($controller, $xoopsUser);
		
		if ($ret == USER_FRAME_VIEW_SUCCESS && $isNew) {
			$handler =& xoops_getmodulehandler('users_search');
			$uidArr = $handler->getUids($this->mFilter->getCriteria(0, 0));
			
			$handler =& xoops_getmodulehandler('mailjob_link');
			foreach ($uidArr as $uid) {
				$obj =& $handler->create();
				$obj->set('mailjob_id', $this->mObject->get('mailjob_id'));
				$obj->set('uid', $uid);
				$handler->insert($obj);
			}
		}
		
		return $ret;
	}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:25,代码来源:MailjobEditAction.class.php

示例2: xoops_getmodulehandler

 function &getMainThemeObject()
 {
     // [TODO]
     // Because get() of the virtual handler is heavy, we have to consider
     // the new solution about this process.
     //
     $handler =& xoops_getmodulehandler('theme', 'legacy');
     $theme =& $handler->get($this->mController->mRoot->mContext->getThemeName());
     if (is_object($theme)) {
         return $theme;
     }
     //-----------
     // Fail safe
     //-----------
     $root =& XCube_Root::getSingleton();
     foreach ($root->mContext->mXoopsConfig['theme_set_allowed'] as $theme) {
         $theme =& $handler->get($theme);
         if (is_object($theme)) {
             $root->mContext->setThemeName($theme->get('dirname'));
             return $theme;
         }
     }
     $objs =& $handler->getObjects();
     if (count($objs) > 0) {
         return $objs[0];
     }
     $theme = null;
     return $theme;
 }
开发者ID:nouphet,项目名称:rata,代码行数:29,代码来源:Legacy_PublicControllerStrategy.class.php

示例3: execute

 public function execute()
 {
     if ($this->root->mContext->mRequest->getRequest('inout') == 'in') {
         $this->inout = 'inbox';
         $this->setUrl('index.php?action=index');
     } else {
         $this->inout = 'outbox';
         $this->setUrl('index.php?action=send');
     }
     $delid = $this->root->mContext->mRequest->getRequest('delmsg');
     if (!is_array($delid) || count($delid) == 0) {
         $this->setErr(_MD_MESSAGE_DELETEMSG2);
         return;
     }
     $modHand = xoops_getmodulehandler($this->inout);
     foreach ($delid as $boxid) {
         $modObj = $modHand->get(intval($boxid));
         if (!is_object($modObj)) {
             $this->setErr(_MD_MESSAGE_ACTIONMSG1);
             return;
         }
         if ($modObj->get('uid') != $this->root->mContext->mXoopsUser->get('uid')) {
             $this->setErr(_MD_MESSAGE_ACTIONMSG2);
             return;
         }
         if ($modHand->delete($modObj)) {
             $this->setErr(_MD_MESSAGE_ACTIONMSG3);
         } else {
             $this->setErr(_MD_MESSAGE_ACTIONMSG4);
             return;
         }
     }
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:33,代码来源:deleteallAction.class.php

示例4: prepare

 /**
  * @public
  */
 function prepare()
 {
     $handler =& xoops_getmodulehandler('definitions');
     $this->mDef = $handler->getFields4DataEdit();
     //
     // Set form properties
     //
     $this->mFormProperties['uid'] = new XCube_IntProperty('uid');
     foreach (array_keys($this->mDef) as $key) {
         $className = $this->mDef[$key]->mFieldType->getFormPropertyClass();
         $this->mFormProperties[$this->mDef[$key]->get('field_name')] = new $className($this->mDef[$key]->get('field_name'));
         //validation checks
         $validationArr = array();
         $this->mFieldProperties[$this->mDef[$key]->get('field_name')] = new XCube_FieldProperty($this);
         //required check
         if ($this->mDef[$key]->get('required') == 1) {
             $validationArr[] = 'required';
             $this->mFieldProperties[$this->mDef[$key]->get('field_name')]->addMessage('required', _MD_PROFILE_ERROR_REQUIRED, $this->mDef[$key]->get('label'));
         }
         //validation check
         switch ($this->mDef[$key]->get('validation')) {
             case 'email':
                 $validationArr[] = 'email';
                 $this->mFieldProperties[$this->mDef[$key]->get('field_name')]->addMessage($this->mDef[$key]->get('field_name'), _MD_PROFILE_ERROR_EMAIL);
                 break;
         }
         $this->mFieldProperties[$this->mDef[$key]->get('field_name')]->setDependsByArray($validationArr);
     }
     //
     // Set field properties
     //
     $this->mFieldProperties['uid'] = new XCube_FieldProperty($this);
     $this->mFieldProperties['uid']->setDependsByArray(array('required'));
     $this->mFieldProperties['uid']->addMessage('required', _MD_PROFILE_ERROR_REQUIRED, _MD_PROFILE_LANG_UID);
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:38,代码来源:DataEditForm.class.php

示例5: b_legacy_themes_show

function b_legacy_themes_show($options)
{
    global $xoopsConfig;
    if (count($xoopsConfig['theme_set_allowed']) == 0) {
        return null;
    }
    $block = array();
    if (xoops_getenv('REQUEST_METHOD') == 'POST') {
        $block['isEnableChanger'] = 0;
        return $block;
    }
    $block['isEnableChanger'] = 1;
    $theme_options = array();
    $handler =& xoops_getmodulehandler('theme', 'legacy');
    foreach ($xoopsConfig['theme_set_allowed'] as $name) {
        $theme =& $handler->get($name);
        if ($theme != null) {
            $theme_option['name'] = $name;
            $theme_option['screenshot'] = $theme->getShow('screenshot');
            $theme_option['screenshotUrl'] = XOOPS_THEME_URL . "/" . $name . "/" . $theme->getShow('screenshot');
            if ($name == $xoopsConfig['theme_set']) {
                $theme_option['selected'] = 'selected="selected"';
                $block['theme_selected_screenshot'] = $theme->getShow('screenshot');
            } else {
                $theme_option['selected'] = '';
            }
            $theme_options[] = $theme_option;
        }
    }
    $block['count'] = count($xoopsConfig['theme_set_allowed']);
    $block['mode'] = $options[0];
    $block['width'] = $options[1];
    $block['theme_options'] = $theme_options;
    return $block;
}
开发者ID:nouphet,项目名称:rata,代码行数:35,代码来源:legacy_themes.php

示例6: getDefaultView

 function getDefaultView(&$controller, &$xoopsUser)
 {
     $id = xoops_getrequest('tpl_id');
     $handler =& xoops_getmodulehandler('tplfile');
     $this->mObject =& $handler->get($id);
     return $this->mObject != null ? LEGACYRENDER_FRAME_VIEW_SUCCESS : LEGACYRENDER_FRAME_VIEW_ERROR;
 }
开发者ID:nunoluciano,项目名称:uxcl,代码行数:7,代码来源:TplfileDownloadAction.class.php

示例7: smartsection_search

function smartsection_search($queryarray, $andor, $limit, $offset, $userid)
{
    include_once XOOPS_ROOT_PATH . '/modules/smartsection/include/functions.php';
    $ret = array();
    if (!isset($smartsection_item_handler)) {
        $smartsection_item_handler = xoops_getmodulehandler('item', 'smartsection');
    }
    if ($queryarray == '' || count($queryarray) == 0) {
        $keywords = '';
        $hightlight_key = '';
    } else {
        $keywords = implode('+', $queryarray);
        $hightlight_key = "&keywords=" . $keywords;
    }
    $itemsObj =& $smartsection_item_handler->getItemsFromSearch($queryarray, $andor, $limit, $offset, $userid);
    $withCategoryPath = smartsection_getConfig('catpath_search');
    foreach ($itemsObj as $result) {
        $item['image'] = "images/item_icon.gif";
        $item['link'] = "item.php?itemid=" . $result['id'] . $hightlight_key;
        if ($withCategoryPath) {
            $item['title'] = $result['categoryPath'] . $result['title'];
        } else {
            $item['title'] = "" . $result['title'];
        }
        $item['time'] = $result['datesub'];
        $item['uid'] = $result['uid'];
        $ret[] = $item;
        unset($item);
    }
    return $ret;
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:search.inc.php

示例8: executeViewIndex

 function executeViewIndex(&$controller, &$xoopsUser, &$render)
 {
     $render->setTemplateName("legacy_image_list.html");
     foreach (array_keys($this->mObjects) as $key) {
         $this->mObjects[$key]->loadImagecategory();
     }
     $render->setAttribute("objects", $this->mObjects);
     $render->setAttribute("pageNavi", $this->mFilter->mNavi);
     $render->setAttribute('imgcatId', $this->mImgcatId);
     $handler =& xoops_getmodulehandler('imagecategory', 'legacy');
     if (is_object($xoopsUser)) {
         $groups = $xoopsUser->getGroups();
     } else {
         $groups = array(XOOPS_GROUP_ANONYMOUS);
     }
     $categoryArr =& $handler->getObjectsWithReadPerm($groups, 1);
     $render->setAttribute('categoryArr', $categoryArr);
     //
     // If current category object exists, check the permission of uploading.
     //
     $hasUploadPerm = null;
     if ($this->mCategory != null) {
         $hasUploadPerm = $this->mCategory->hasUploadPerm($groups);
     }
     $render->setAttribute('hasUploadPerm', $hasUploadPerm);
     $render->setAttribute("category", $this->mCategory);
     //echo xoops_getrequest('target');die();
     $render->setAttribute('target', htmlspecialchars(xoops_getrequest('target'), ENT_QUOTES));
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:29,代码来源:ImageListAction.class.php

示例9: about_block_page_edit

function about_block_page_edit($options)
{
    @(include dirname(dirname(__FILE__)) . "/xoops_version.php");
    $page_handler =& xoops_getmodulehandler('page', 'about');
    $criteria = new CriteriaCompo();
    $criteria->add(new Criteria('page_status', 1), 'AND');
    $criteria->add(new Criteria('page_type', 1));
    $criteria->setSort('page_order');
    $criteria->setOrder('ASC');
    $fields = array("page_id", "page_title", "page_image");
    $pages = $page_handler->getAll($criteria, $fields, false);
    $page_title = '';
    foreach ($pages as $k => $v) {
        $page_title = '<a href="' . XOOPS_URL . '/modules/' . $modversion['dirname'] . '/index.php?page_id=' . $k . '" target="_blank">' . $v['page_title'] . '</a>';
        $options_page[$k] = empty($v['page_image']) ? $page_title : $page_title . '<img src="' . XOOPS_URL . '/modules/' . $modversion['dirname'] . '/images/picture.png' . '" />';
    }
    include_once dirname(dirname(__FILE__)) . '/include/xoopsformloader.php';
    $form = new XoopsBlockForm();
    $page_select = new XoopsFormRadio(_MI_ABOUT_BLOCKPAGE, 'options[0]', $options[0], '<br />');
    $page_select->addOptionArray($options_page);
    $form->addElement($page_select);
    $form->addElement(new XoopsFormText(_MI_ABOUT_TEXT_LENGTH, 'options[1]', 5, 5, $options[1]));
    $form->addElement(new XoopsFormText(_MI_ABOUT_VIEW_MORELINKTEXT, 'options[2]', 30, 50, $options[2]));
    $form->addElement(new XoopsFormRadioYN(_MI_ABOUT_DOTITLEIMAGE, 'options[3]', $options[3]));
    return $form->render();
}
开发者ID:yunsite,项目名称:xoopsdc,代码行数:26,代码来源:blocks.php

示例10: newbb_forumSelectBox

function newbb_forumSelectBox($value = null, $permission = "access", $delimitor_category = true)
{
    $category_handler =& xoops_getmodulehandler('category', 'newbb');
    $categories = $category_handler->getByPermission($permission, array("cat_id", "cat_order", "cat_title"), false);
    require_once XOOPS_ROOT_PATH . '/Frameworks/art/functions.cache.php';
    if ($permission == "all" || !($forums = mod_loadCacheFile_byGroup("forumselect"))) {
        $forum_handler =& xoops_getmodulehandler('forum', 'newbb');
        $forums = $forum_handler->getTree(array_keys($categories), 0, $permission);
        if (empty($permission) || $permission == "access") {
            mod_createCacheFile_byGroup($forums, "forumselect");
        }
    }
    $value = is_array($value) ? $value : array($value);
    $box = "";
    if (count($forums) > 0) {
        foreach (array_keys($categories) as $key) {
            if (empty($forums[$key])) {
                continue;
            }
            if ($delimitor_category) {
                $box .= "<option value=0>&nbsp;</option>";
            }
            $box .= "<option value='" . -1 * $key . "'>[" . $categories[$key]['cat_title'] . "]</option>";
            foreach ($forums[$key] as $f => $forum) {
                $box .= "<option value='{$f}' " . (in_array($f, $value, true) ? " selected='selected' " : "") . ">" . $forum['prefix'] . $forum['forum_name'] . "</option>";
            }
        }
    } else {
        $box .= "<option value=0>" . _MD_NOFORUMINDB . "</option>";
    }
    unset($forums, $categories);
    return $box;
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:33,代码来源:functions.forum.php

示例11: showcaseComponentsShow

function showcaseComponentsShow($options)
{
    include XOOPS_ROOT_PATH . "/modules/spotlight/components/showcase/config.php";
    $sp_handler =& xoops_getmodulehandler('spotlight', 'spotlight');
    $page_handler =& xoops_getmodulehandler('page', 'spotlight');
    // spotlight object
    $sp_obj = $sp_handler->get($options[0]);
    if (!is_object($sp_obj) || empty($options[0])) {
        trigger_error("spotlight is not object ", E_USER_WARNING);
    } else {
        //spotlight name
        $block['sp_name'] = $sp_obj->getVar('sp_name');
        // page list
        $criteria = new CriteriaCompo();
        $criteria->add(new Criteria('sp_id', $options[0]));
        $criteria->setLimit($config['limit']);
        $criteria->setSort($config['sort']);
        $criteria->setOrder('ASC');
        $pages = $page_handler->getAll($criteria, array('page_id', 'page_title', 'page_link', 'page_image', 'page_desc', 'published'), false);
        $myts = MyTextSanitizer::getInstance();
        foreach ($pages as $k => $v) {
            $block['news'][$k] = $v;
            $block['news'][$k]['images'] = XOOPS_UPLOAD_URL . '/spotlight/image_' . $v['page_image'];
            $block['news'][$k]['thumbs'] = XOOPS_UPLOAD_URL . '/spotlight/thumb_' . $v['page_image'];
            $page_desc = strip_tags($myts->undoHtmlSpecialChars(strip_tags($v['page_desc'])));
            $block['news'][$k]['page_desc'] = xoops_substr($page_desc, '', $config['page_desc_substr']);
            $block['news'][$k]['page_title'] = xoops_substr($v['page_title'], '', $config['page_title_substr']);
            $block['news'][$k]['published'] = formatTimestamp($v['published'], $config['timeformat']);
        }
        // component name
        $block['component'] = $sp_obj->getVar('component_name');
        return $block;
    }
}
开发者ID:yunsite,项目名称:xoopsdc,代码行数:34,代码来源:show.php

示例12: nw_tag_synchronization

function nw_tag_synchronization($mid)
{
	global $xoopsDB;
	$item_handler_keyName = 'storyid';
	$item_handler_table = $xoopsDB->prefix('nw_stories');
	$link_handler =& xoops_getmodulehandler("link", "tag");
	$where = "($item_handler_table.published > 0 AND $item_handler_table.published <= ".time().") AND ($item_handler_table.expired = 0 OR $item_handler_table.expired > ".time().')';

	/* clear tag-item links */
	if($link_handler->mysql_major_version() >= 4):
    $sql =	"	DELETE FROM {$link_handler->table}".
    		"	WHERE ".
    		"		tag_modid = {$mid}".
    		"		AND ".
    		"		( tag_itemid NOT IN ".
    		"			( SELECT DISTINCT {$item_handler_keyName} ".
    		"				FROM {$item_handler_table} ".
    		"				WHERE $where".
    		"			) ".
    		"		)";
    else:
    $sql = 	"	DELETE {$link_handler->table} FROM {$link_handler->table}".
    		"	LEFT JOIN {$item_handler_table} AS aa ON {$link_handler->table}.tag_itemid = aa.{$item_handler_keyName} ".
    		"	WHERE ".
    		"		tag_modid = {$mid}".
    		"		AND ".
    		"		( aa.{$item_handler_keyName} IS NULL".
    		"			OR $where".
    		"		)";
	endif;
    if (!$result = $link_handler->db->queryF($sql)) {
        //xoops_error($link_handler->db->error());
  	}
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:34,代码来源:nw_news.php

示例13: art_synchronization

 function art_synchronization($type = "")
 {
     switch ($type) {
         case "article":
         case "topic":
         case "category":
             $type = array($type);
             $clean = array($type);
             break;
         default:
             $type = null;
             $clean = array("category", "topic", "article", "text", "rate", "spotlight", "pingback", "trackback");
             break;
     }
     foreach ($clean as $item) {
         $handler =& xoops_getmodulehandler($item, $GLOBALS["artdirname"]);
         $handler->cleanOrphan();
         unset($handler);
     }
     /*
     if(empty($type) || in_array("category", $type)):
     $category_handler =& xoops_getmodulehandler("category", $GLOBALS["artdirname"]);
     $category_handler->setLastArticleIds();
     $category_handler->updateTrack();
     endif;
     */
     if (empty($type) || in_array("article", $type)) {
         $article_handler =& xoops_getmodulehandler("article", $GLOBALS["artdirname"]);
         $artConfig = art_load_config();
         $article_handler->cleanExpires($artConfig["article_expire"] * 24 * 3600);
     }
     return true;
 }
开发者ID:trabisdementia,项目名称:xuups,代码行数:33,代码来源:functions.recon.php

示例14: b_subscription_show

function b_subscription_show($options)
{
    global $xoopsUser;
    $smartmail_newsletter_handler = xoops_getmodulehandler('newsletter', 'smartmail');
    $smartmail_subscriber_handler = xoops_getmodulehandler('subscriber', 'smartmail');
    $groups = $xoopsUser ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
    $allowedNewsletters = $smartmail_newsletter_handler->getAllowedList($groups);
    if (is_object($xoopsUser)) {
        $subcribedNewsletters = $smartmail_subscriber_handler->getNewsletterListByUser($xoopsUser->getVar('uid'));
        $ret['subscribedNewsletters'] = $subcribedNewsletters;
        // remove the subcribed newsletters to the allowedNewletters array
        $newAllowedNewsletters = array();
        foreach ($allowedNewsletters as $key => $value) {
            if (!isset($subcribedNewsletters[$key])) {
                $newAllowedNewsletters[$key] = $value;
            }
        }
        $ret['newsletters'] = $newAllowedNewsletters;
    } else {
        $ret['newsletters'] = $allowedNewsletters;
    }
    if (!$ret['newsletters'] && !$ret['subscribedNewsletters']) {
        return false;
    }
    $ret['subscription_action'] = 'default';
    return $ret;
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:27,代码来源:subscription_block.php

示例15: execute

 public function execute()
 {
     $root = XCube_Root::getSingleton();
     $root->mLanguageManager->loadModinfoMessageCatalog(basename(dirname(dirname(__FILE__))));
     $root->mLanguageManager->loadModuleMessageCatalog(basename(dirname(dirname(__FILE__))));
     $render = $this->getRenderTarget();
     $render->setTemplateName($this->_mBlock->get('template'));
     $render->setAttribute('mid', $this->_mBlock->get('mid'));
     $render->setAttribute('bid', $this->_mBlock->get('bid'));
     $service = $root->mServiceManager->getService('privateMessage');
     $uid = $root->mContext->mXoopsUser->get('uid');
     if ($service != null) {
         $client = $root->mServiceManager->createClient($service);
         $render->setAttribute('block', $client->call('getCountUnreadPM', array('uid' => $uid)));
     }
     if ($root->mServiceManager->getService('UserSearch') != null) {
         $render->setAttribute('UserSearch', true);
     }
     $modHand = xoops_getmodulehandler('inbox', 'message');
     $render->setAttribute('incount', $modHand->getInboxCount($uid));
     $modHand = xoops_getmodulehandler('outbox', 'message');
     $render->setAttribute('outcount', $modHand->getOutboxCount($uid));
     $render->setAttribute('message_url', XOOPS_URL . '/modules/message/index.php');
     $renderSystem = $root->getRenderSystem($this->getRenderSystemName());
     $renderSystem->renderBlock($render);
 }
开发者ID:nouphet,项目名称:rata,代码行数:26,代码来源:message_block.class.php


注:本文中的xoops_getmodulehandler函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。