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


PHP XenForo_Template_Abstract::getParams方法代码示例

本文整理汇总了PHP中XenForo_Template_Abstract::getParams方法的典型用法代码示例。如果您正苦于以下问题:PHP XenForo_Template_Abstract::getParams方法的具体用法?PHP XenForo_Template_Abstract::getParams怎么用?PHP XenForo_Template_Abstract::getParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XenForo_Template_Abstract的用法示例。


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

示例1: hooks

 public static function hooks($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
 {
     if (self::$class_check === null) {
         self::$class_check = class_exists('KingK_BbCodeManager_BbCodeManager');
     }
     if (self::$class_check === false) {
         switch ($hookName) {
             case 'editor':
                 $options = XenForo_Application::get('options');
                 $visitor = XenForo_Visitor::getInstance();
                 if ($options->Bbm_Bm_ShowControllerInfo && $visitor['is_admin']) {
                     $contents .= $template->create('bbm_editor_extra_info', $template->getParams());
                 }
                 break;
             case 'help_bb_codes':
                 $contents .= $template->create('help_bbm_bbcodes', $template->getParams());
                 break;
             case 'page_container_head':
                 if ($template instanceof XenForo_Template_Admin && !$options->Bbm_Bm_SetInAdmin) {
                     break;
                 }
                 //Extra css
                 $contents .= $template->create('bbm_js', $template->getParams());
                 break;
         }
     }
 }
开发者ID:Sywooch,项目名称:forums,代码行数:27,代码来源:Public.php

示例2: template_hook

    public static function template_hook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
    {
        $listModel = XenForo_Model::create('EWRmedio_Model_Lists');
        switch ($hookName) {
            case 'account_alerts_extra':
                $contents .= $template->create('EWRmedio_AlertPreferences');
                break;
            case 'account_preferences_options':
                $params = $template->getParams();
                $hookParams['media'] = $params['media'];
                $contents = $template->create('EWRmedio_AccountPreferences', $hookParams) . $contents;
                break;
            case 'account_wrapper_sidebar_your_account':
                $contents .= $template->create('EWRmedio_Watch_Wrapper');
                break;
            case 'member_view_tabs_heading':
                if ($listModel->getMediaCount('user', $hookParams['user']['user_id'])) {
                    $contents .= $template->create('EWRmedio_Profile_Heading', $hookParams);
                }
                break;
            case 'member_view_tabs_content':
                if ($listModel->getMediaCount('user', $hookParams['user']['user_id'])) {
                    $contents .= $template->create('EWRmedio_Profile_Content', $hookParams);
                }
                break;
            case 'navigation_visitor_tab_links2':
                $contents = str_replace(new XenForo_Phrase('watched_threads') . '</a></li>', new XenForo_Phrase('watched_threads') . '</a></li>
						<li><a href="' . new XenForo_Link('watched/media') . '">' . new XenForo_Phrase('watched_media') . '</a></li>', $contents);
                break;
            case 'search_form_tabs':
                $contents .= $template->create('EWRmedio_Search_Tab', $template->getParams());
                break;
        }
    }
开发者ID:Sywooch,项目名称:forums,代码行数:34,代码来源:Template.php

示例3: template_hook

 public static function template_hook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
 {
     //Swiiitch!
     switch ($hookName) {
         //first template hook
         case 'member_view_tabs_heading':
             //Get our template!
             $ourTemplate = $template->create('autocraft_GameProfilesTab', $template->getParams());
             //Render
             $rendered = $ourTemplate->render();
             //Put the rendered template in the contents.
             $contents .= $rendered;
             break;
             //second template hook
         //second template hook
         case 'member_view_tabs_content':
             //Get our template!
             $ourTemplate = $template->create('autocraft_GameProfiles', $template->getParams());
             //Render
             $rendered = $ourTemplate->render();
             //Put the rendered template in the contents.
             $contents .= $rendered;
             break;
     }
 }
开发者ID:ravenboilinux,项目名称:xenforo,代码行数:25,代码来源:Listener.php

示例4: templatePostRender

 public static function templatePostRender($templateName, &$content, array &$containerData, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'template_list':
             $params = $template->getParams();
             $params['type'] = 'public';
             $replace = $template->create('template_list_addon_filter', $params);
             $content = preg_replace('/<div class="Popup">(.*?<\\/div>){3}/is', "\\0 {$replace}", $content);
             break;
         case 'template_search':
             $params = $template->getParams();
             $replace = $template->create('template_search_addon_filter', $params);
             $content = preg_replace('/<dl class="ctrlUnit">(.*?<\\/dl>){1}/is', "\\0 {$replace}", $content, 1);
             break;
         case 'template_search_results':
             $params = $template->getParams();
             if (!empty($params['addOn'])) {
                 $containerData['title'] .= '<br />' . new XenForo_Phrase('add_on') . ': ' . $params['addOn']['title'];
             }
             break;
         case 'admin_template_list':
             $params = $template->getParams();
             $params['type'] = 'admin';
             $replace = $template->create('template_list_addon_filter', $params);
             $content = preg_replace('/<form action="[^\\>]*>(.*?)<\\/form>/is', "{$replace} \\0", $content);
             break;
     }
 }
开发者ID:Sywooch,项目名称:forums,代码行数:28,代码来源:Listener.php

示例5: listenhooks

 public static function listenhooks($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
 {
     switch ($hookName) {
         case 'account_privacy_top':
             $options = XenForo_Application::get('options');
             if (!$options->sedo_at_preventracing) {
                 break;
             }
             $mergedParams = array_merge($template->getParams(), $hookParams);
             $contents = $template->create('sedo_agent_account', $mergedParams) . $contents;
             break;
         case 'message_content':
             $options = XenForo_Application::get('options');
             $src = $template->getTemplateName();
             //Check which kind of integration is activated
             if ($src == 'conversation_view' && (!$options->sedo_at_auto_conversation || $options->sedo_at_auto_conversation_style != 'graphic') or $src == 'thread_view' && (!$options->sedo_at_auto_thread || $options->sedo_at_auto_thread_style != 'graphic')) {
                 break;
             }
             if ($options->sedo_at_auto_thread_style == 'graphic' || $options->sedo_at_auto_thread_style == 'graphic') {
                 $mergedParams = array_merge($template->getParams(), $hookParams);
                 $contents .= $template->create('sedo_agent', $mergedParams);
             }
             break;
     }
 }
开发者ID:Sywooch,项目名称:forums,代码行数:25,代码来源:Templates.php

示例6: templateHook

 public static function templateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
 {
     switch ($hookName) {
         case 'user_criteria_extra':
             $s = new Steam_Helper_Steam();
             $contents .= $template->create('steam_helper_criteria_privs', array_merge($hookParams, $template->getParams(), array_merge($hookParams, $template->getParams(), array("steam_games" => $s->getAvailableGames()))));
             break;
     }
 }
开发者ID:WENKz,项目名称:Steam-Authentication-for-XenForo,代码行数:9,代码来源:Listener.php

示例7: templateHook

 public static function templateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
 {
     $modernStatisticModel = XenForo_Model::create('Brivium_ModernStatistic_Model_ModernStatistic');
     if (is_null(self::$_dismissed)) {
         self::$_dismissed = true;
         if (!$modernStatisticModel->checkExclude()) {
             self::$_dismissed = false;
         }
     }
     if (!self::$_dismissed) {
         $options = XenForo_Application::get('options');
         $position = $options->BRMS_position;
         if ($position != 'other') {
             if ($hookName == $position) {
                 $ourTemplate = $template->create('BRMS_ModernStatistic', $template->getParams());
                 $contents .= $ourTemplate->render();
             }
         }
         if ($options->BRMS_loadFirstTab) {
             switch ($hookName) {
                 case 'brms_modern_statistic_first_tabs':
                     if (!empty($options->BRMS_tabsSelector)) {
                         $tabId = -1;
                         $xenAddons = XenForo_Application::get('addOns');
                         $userId = XenForo_Visitor::getUserId();
                         foreach ($options->BRMS_tabsSelector as $key => $tab) {
                             if (!empty($tab['active']) && ($tab['kind'] != 'resource' || $modernStatisticModel->checkXenForoResourceAddon()) && ($tab['type'] != 'my_threads' || !empty($userId))) {
                                 $tabId = $key;
                                 break;
                             }
                         }
                         if ($tabId != -1) {
                             $limit = 0;
                             $limitOptions = $options->BRMS_itemLimit;
                             if (!empty($limitOptions['enabled'])) {
                                 $request = new Zend_Controller_Request_Http();
                                 $limit = $request->getCookie('brmsNumberEntry');
                             }
                             $viewParams = $modernStatisticModel->getStatistics($tabId, $limit ? $limit : 0);
                             $newTemplate = $template->create($viewParams['template'], $template->getParams());
                             $newTemplate->setParams($viewParams);
                             $contents = $newTemplate->render();
                         }
                     }
                     break;
             }
         }
     }
     // NO!
     self::_templateHook($hookName, $contents, $hookParams, $template);
 }
开发者ID:darkearl,项目名称:projectT122015,代码行数:51,代码来源:Listener.php

示例8: templateHookListener

 public static function templateHookListener($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
 {
     switch ($hookName) {
         case 'account_wrapper_sidebar_settings':
             $contents .= $template->create('discordauth_account_wrapper_sidebar', $template->getParams())->render();
             break;
         case 'member_view_tabs_content':
             $contents .= $template->create('discordauth_profile_tab_content', $template->getParams())->render();
             break;
         case 'navigation_visitor_tab_links1':
             $contents .= $template->create('discordauth_navigation_tab_link', $template->getParams())->render();
             break;
     }
 }
开发者ID:Hornwitser,项目名称:DiscordAuthorizer,代码行数:14,代码来源:Addon.php

示例9: template_hook

 public static function template_hook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
 {
     switch ($hookName) {
         case 'account_wrapper_sidebar_settings':
             $ourTemplate = $template->create('bdapi_account_wrapper_sidebar', $template->getParams());
             $ourHtml = $ourTemplate->render();
             $contents .= $ourHtml;
             break;
         case 'navigation_visitor_tab_links1':
             $ourTemplate = $template->create('bdapi_navigation_visitor_tab', $template->getParams());
             $ourHtml = $ourTemplate->render();
             $contents .= $ourHtml;
             break;
     }
 }
开发者ID:burtay,项目名称:bdApi,代码行数:15,代码来源:Listener.php

示例10: TemplateHook

 public static function TemplateHook($hookName, &$content, array $hookParams, XenForo_Template_Abstract $template)
 {
     switch ($hookName) {
         case 'dark_taigachat':
         case 'dark_taigachat_alt':
             $params = $template->getParams();
             if ($hookName == 'dark_taigachat_alt') {
                 $params['taigachat']['alt'] = true;
             }
             $params['taigachat']['room'] = 1;
             if (isset($hookParams['room'])) {
                 $params['taigachat']['room'] = $hookParams['room'];
             }
             $content .= $template->create('dark_taigachat', $params)->render();
             break;
         case 'dark_taigachat_online_users':
             $params = $template->getParams();
             $content .= $template->create('dark_taigachat_widget_online', $params)->render();
             break;
         case 'dark_taigachat_fake':
             $params = $template->getParams();
             $content .= $template->create('dark_taigachat_fake', $params)->render();
             break;
         case 'dark_taigachat_full':
             $params = $template->getParams();
             $params['taigachat']['room'] = 1;
             if (isset($hookParams['room'])) {
                 $params['taigachat']['room'] = $hookParams['room'];
             }
             $visitor = XenForo_Visitor::getInstance();
             $sessionModel = XenForo_Model::create('Dark_TaigaChat_Model_Session');
             $taigamodel = XenForo_Model::create("Dark_TaigaChat_Model_TaigaChat");
             $taigamodel->updateActivity($visitor['user_id'], false);
             $onlineUsers = $sessionModel->getSessionActivityQuickList($visitor->toArray(), array('cutOff' => array('>', $sessionModel->getOnlineStatusTimeout())), $visitor['user_id'] ? $visitor->toArray() : null);
             $onlineUsersTaiga = array();
             if ($options->dark_taigachat_sidebar) {
                 $onlineUsersTaiga = $taigamodel->getActivityUserList($visitor->toArray());
             }
             $params += array('taigachat' => array('onlineUsers' => $onlineUsers, 'sidebar_enabled' => true, 'online' => $onlineUsersTaiga));
             $response = new stdClass();
             $response->viewName = "Dark_TaigaChat_ViewPublic_TaigaChat_Index";
             $response->params = array();
             Dark_TaigaChat_Helper_Global::getTaigaChatStuff($response, "");
             $params = array_merge_recursive($params, $response->params);
             $content .= $template->create('dark_taigachat_full', $params)->render();
             break;
     }
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:48,代码来源:Listener.php

示例11: _renderOptions

 protected function _renderOptions(XenForo_Template_Abstract $template)
 {
     $params = $template->getParams();
     /** @var XenForo_Model_UserGroup $userGroupModel */
     $userGroupModel = WidgetFramework_Core::getInstance()->getModelFromCache('XenForo_Model_UserGroup');
     $userGroups = $userGroupModel->getAllUserGroupTitles();
     $whitelistUserGroups = array();
     $blacklistUserGroups = array();
     $optionWhitelist = array();
     if (!empty($params['options']['whitelist_user_groups'])) {
         $optionWhitelist = $params['options']['whitelist_user_groups'];
     }
     $optionBlacklist = array();
     if (!empty($params['options']['blacklist_user_groups'])) {
         $optionBlacklist = $params['options']['blacklist_user_groups'];
     }
     foreach ($userGroups as $userGroupId => $title) {
         $whitelistSelected = in_array($userGroupId, $optionWhitelist);
         $whitelistUserGroups[] = array('value' => $userGroupId, 'label' => $title, 'selected' => $whitelistSelected);
         $blacklistSelected = in_array($userGroupId, $optionBlacklist);
         $blacklistUserGroups[] = array('value' => $userGroupId, 'label' => $title, 'selected' => $blacklistSelected);
     }
     $template->setParam('whitelistUserGroups', $whitelistUserGroups);
     $template->setParam('blacklistUserGroups', $blacklistUserGroups);
     return parent::_renderOptions($template);
 }
开发者ID:maitandat1507,项目名称:bdWidgetFramework,代码行数:26,代码来源:Birthday.php

示例12: listen

 public static function listen($hookName, &$content, array $hookParams, XenForo_Template_Abstract $template)
 {
     if ($hookName == 'ad_below_content') {
         $params = $template->getParams();
         $content .= $template->create('dark_azucloud', $params);
     }
 }
开发者ID:Sywooch,项目名称:forums,代码行数:7,代码来源:TemplateHook.php

示例13: listen

 public static function listen($hookName, &$content, array $hookParams, XenForo_Template_Abstract $template)
 {
     if ($hookName == 'editor') {
         $params = $template->getParams();
         $options = XenForo_Application::get('options');
         if ($options->dark_minorin_enabled) {
             $smilies = array();
             $toolbar_bbcode = array();
             $toolbar_bbcode_temp = explode("\n", str_replace("\r", "", trim($options->dark_minorin_bbcode)));
             foreach ($toolbar_bbcode_temp as $bbcode) {
                 $bbcode = explode(":", trim($bbcode));
                 $toolbar_bbcode[$bbcode[0]] = $bbcode[1];
             }
             if (XenForo_Application::isRegistered('smilies')) {
                 $smilies = XenForo_Application::get('smilies');
             } else {
                 $smilies = XenForo_Model::create('XenForo_Model_Smilie')->getAllSmiliesForCache();
                 XenForo_Application::set('smilies', $smilies);
             }
             foreach ($smilies as &$smilie) {
                 $smilie['text'] = $smilie['smilieText'][0];
                 $smilie['sprite_mode'] = array_key_exists('sprite_params', $smilie);
             }
             $params += array('minorin' => array("toolbar_bbcode" => $toolbar_bbcode, "toolbar_smilies" => $smilies, "enabled" => $options->dark_minorin_enabled, "js_modification" => filemtime("js/dark/minorin.js")));
         }
         $content .= $template->create('dark_minorin_toolbar', $params);
     }
 }
开发者ID:Sywooch,项目名称:forums,代码行数:28,代码来源:TemplateHook.php

示例14: templatePostRender

 public static function templatePostRender($templateName, &$content, array &$containerData, XenForo_Template_Abstract $template)
 {
     $param = array();
     switch ($templateName) {
         case 'node_list.css':
             $cacheDataForum = XenForo_Application::isRegistered('brcnsCacheDataForum') ? XenForo_Application::get('brcnsCacheDataForum') : XenForo_Model::create('XenForo_Model_DataRegistry')->get('brcnsCacheDataForum');
             $cacheDataPage = XenForo_Application::isRegistered('brcnsCacheDataPage') ? XenForo_Application::get('brcnsCacheDataPage') : XenForo_Model::create('XenForo_Model_DataRegistry')->get('brcnsCacheDataPage');
             $cacheDataLink = XenForo_Application::isRegistered('brcnsCacheDataLink') ? XenForo_Application::get('brcnsCacheDataLink') : XenForo_Model::create('XenForo_Model_DataRegistry')->get('brcnsCacheDataLink');
             $cacheDataCategory = XenForo_Application::isRegistered('brcnsCacheDataCategory') ? XenForo_Application::get('brcnsCacheDataCategory') : XenForo_Model::create('XenForo_Model_DataRegistry')->get('brcnsCacheDataCategory');
             $cacheDataCategoryRoot = XenForo_Application::isRegistered('brcnsCacheDataCateRoot') ? XenForo_Application::get('brcnsCacheDataCateRoot') : XenForo_Model::create('XenForo_Model_DataRegistry')->get('brcnsCacheDataCateRoot');
             XenForo_Application::set('brcnsCustomNodeStylesForum', $cacheDataForum);
             XenForo_Application::set('brcnsCustomNodeStylesPage', $cacheDataPage);
             XenForo_Application::set('brcnsCustomNodeStylesLink', $cacheDataLink);
             XenForo_Application::set('brcnsCustomNodeStylesCategory', $cacheDataCategory);
             XenForo_Application::set('brcnsCustomNodeStylesCategoryRoot', $cacheDataCategoryRoot);
             $param['CustomNodeStylesForums'] = XenForo_Application::get('brcnsCustomNodeStylesForum');
             $param['CustomNodeStylesPages'] = XenForo_Application::get('brcnsCustomNodeStylesPage');
             $param['CustomNodeStylesLinks'] = XenForo_Application::get('brcnsCustomNodeStylesLink');
             $param['CustomNodeStylescategories'] = XenForo_Application::get('brcnsCustomNodeStylesCategory');
             $param['CustomNodeStylesCategoriesRoot'] = XenForo_Application::get('brcnsCustomNodeStylesCategoryRoot');
             $options = XenForo_Application::get('options');
             $param['size'] = $options->BRCNS_size_icon;
             $newTemplate = $template->create('BRCNS_custom_node_style.css', $template->getParams());
             $newTemplate->setParams($param);
             $content = $content . $newTemplate->render();
             break;
     }
 }
开发者ID:darkearl,项目名称:projectT122015,代码行数:28,代码来源:Listener.php

示例15: template_post_render

 public static function template_post_render($templateName, &$content, array &$containerData, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'bb_code_tag_attach':
             $xenOptions = XenForo_Application::getOptions();
             $cdnEnable = $xenOptions->Tinhte_AIO_CDNEnable;
             $cdnDomain = $xenOptions->Tinhte_AIO_CDNDomain;
             $params = $template->getParams();
             if (isset($params['attachment']['thumbnailUrl'])) {
                 if ($cdnEnable) {
                     $params['attachment_link'] = XenForo_Link::buildPublicLink('attachments', $params['attachment']);
                     $params['attachment_thumbnail'] = $params['attachment']['thumbnailUrl'];
                     if (substr($params['attachment_link'], 0, 7) != 'http://' && substr($params['attachment_link'], 0, 8) != 'https://') {
                         $params['attachment_link'] = self::_getValidUrl($cdnDomain) . $params['attachment_link'];
                     }
                     if (substr($params['attachment_thumbnail'], 0, 7) != 'http://' && substr($params['attachment_thumbnail'], 0, 8) != 'https://') {
                         $params['attachment_thumbnail'] = self::_getValidUrl($cdnDomain) . $params['attachment_thumbnail'];
                     }
                     $params['cdnDomain'] = self::_getValidUrl($cdnDomain);
                 } else {
                     $params['attachment_link'] = XenForo_Link::buildPublicLink('full:attachments', $params['attachment']);
                     $params['attachment_thumbnail'] = $params['attachment']['thumbnailUrl'];
                 }
                 $hookTemplate = $template->create('TinhTe_AIO_Attach', $params);
                 $content = $hookTemplate->render();
             }
             break;
     }
 }
开发者ID:Sywooch,项目名称:forums,代码行数:29,代码来源:Listener.php


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