Esempio n. 1
0
 public static function template_create($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     if ($templateName == 'account_wrapper') {
         $template->preloadTemplate('bdapi_account_wrapper_sidebar');
     } elseif ($templateName == 'PAGE_CONTAINER') {
         $template->preloadTemplate('bdapi_navigation_visitor_tab');
     }
 }
Esempio n. 2
0
 public static function template_create($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'member_view':
             $template->preloadTemplate('autocraft_GameProfilesTab');
             $template->preloadTemplate('autocraft_GameProfiles');
             break;
     }
 }
Esempio n. 3
0
 public static function preloader($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     if (in_array($templateName, array('conversation_view', 'thread_view'))) {
         $template->preloadTemplate('sedo_agent');
     }
     if ($templateName == 'account_privacy') {
         $template->preloadTemplate('sedo_agent_account');
     }
 }
 public static function templateCreate($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'PAGE_CONTAINER':
             $template->preloadTemplate('steam_helper_criteria_privs');
             $template->preloadTemplate('steam_navtabs');
             $template->preloadTemplate('steam_public_index');
             break;
     }
 }
Esempio n. 5
0
 public static function Advtemplat($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'account_preferences':
             $template->preloadTemplate('adv_xenforo_account_options');
             break;
         default:
             $template->preloadTemplate('ads_xf_ar_xenforo');
             break;
     }
 }
Esempio n. 6
0
 public static function templateCreate($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     if ($templateName == 'thread_create') {
         $template->preloadTemplate('vtPhong_add_slide_show_template');
     }
     if ($templateName == 'post_edit') {
         $template->preloadTemplate('vtPhong_add_slide_show_template');
     }
     if ($templateName == 'forum_edit') {
         $template->preloadTemplate('vtPhong_forum_options_add_slide');
     }
 }
Esempio n. 7
0
 public static function preloader($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'help_bb_codes':
             $template->preloadTemplate('help_bbm_bbcodes');
             break;
         case 'editor':
             /***
             				Templates Preloader
             			***/
             if (XenForo_Application::get('options')->get('Bbm_Bm_ShowControllerInfo')) {
                 $template->preloadTemplate('bbm_editor_extra_info');
             }
             /***
             				ADD PARAMS TO THE EDITOR TEMPLATE
             			***/
             $options = XenForo_Application::get('options');
             if ($template instanceof XenForo_Template_Admin && !$options->Bbm_Bm_SetInAdmin) {
                 break;
             }
             $controllerName = self::getParam('controllerName', $params);
             $controllerAction = self::getParam('controllerAction', $params);
             $viewName = self::getParam('viewName', $params);
             $extraParams = BBM_Helper_Buttons::getConfig($controllerName, $controllerAction, $viewName);
             /***
             				Merge extra params to template params
             				> The first method is to use the array + operator -  params of first element overrides params of second element
             				> The second method is to use the array_merge function - params of second element should overrides params of the first
             				  unless if the key is a figure (if I understood the php documentation)
             				  
             				Selected method: first
             				Reason: it is said to be faster
             			**/
             $params = $extraParams + $params;
             // First method
             //$params = array_merge($params,$extraParams);	// Second method
             break;
         case 'forum_edit':
             if ($template instanceof XenForo_Template_Admin && XenForo_Application::get('options')->get('Bbm_Bm_Forum_Config')) {
                 $template->preloadTemplate('bbm_forum_edit_bbm_editor');
             }
             break;
         case 'home':
             if ($template instanceof XenForo_Template_Admin) {
                 $template->preloadTemplate('bbm_admin_icon');
             }
             break;
     }
 }
Esempio n. 8
0
 public static function rrssbExtFiles(&$templateName, array &$params, XenForo_Template_Abstract $template)
 {
     if ($templateName == 'thread_view') {
         $template->addRequiredExternal('css', 'SV_rrssbDefault');
         $template->preloadTemplate('SV_rrssbShares');
     }
 }
Esempio n. 9
0
 public static function template_create($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'thread_view':
             $template->preloadTemplate('MoreThread_main');
             break;
     }
 }
Esempio n. 10
0
 public static function template_create($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'account_contact_details':
             $template->preloadTemplate('bdtagme_account_contact_details_messaging');
             break;
     }
 }
Esempio n. 11
0
 public static function template_create($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'addon_edit':
             $template->preloadTemplate('devhelper_' . $templateName);
             break;
     }
 }
Esempio n. 12
0
 public static function template_create($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'ad_message_below':
             $template->preloadTemplate('addthis_ajax_post');
             break;
     }
 }
Esempio n. 13
0
 public static function template_create($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'PAGE_CONTAINER':
             $template->preloadTemplate('xenCODE_Meta_Keywords');
             break;
     }
 }
Esempio n. 14
0
 /**
  * @param $templateName
  * @param array $params
  * @param XenForo_Template_Abstract $template
  */
 public static function template_create($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     if (!self::canViewGallery()) {
         return;
     }
     if (self::$_hasImportOwnThreadPerm === null) {
         self::$_hasImportOwnThreadPerm = XenForo_Visitor::getInstance()->hasPermission('sonnb_xengallery', 'importOwnThread');
     }
     if (self::$_hasImportAnyThreadPerm === null) {
         self::$_hasImportAnyThreadPerm = XenForo_Visitor::getInstance()->hasPermission('sonnb_xengallery', 'importAnyThread');
     }
     if ($template instanceof XenForo_Template_Admin) {
         return;
     }
     switch ($templateName) {
         case 'PAGE_CONTAINER':
             $template->preloadTemplate('sonnb_xengallery_nav_visitor');
             break;
         case 'account_wrapper':
             $template->preloadTemplate('sonnb_xengallery_account_nav');
             break;
         case 'member_card':
             $template->preloadTemplate('sonnb_xengallery_member_card');
             $template->preloadTemplate('sonnb_xengallery_member_card_links');
             break;
         case 'member_view':
             $template->preloadTemplate('sonnb_xengallery_member_view_info');
             $template->preloadTemplate('sonnb_xengallery_member_view_tabs_heading');
             $template->preloadTemplate('sonnb_xengallery_member_view_tabs_content');
         case 'thread_view':
             if (self::$_hasImportAnyThreadPerm || self::$_hasImportOwnThreadPerm) {
                 $template->preloadTemplate('sonnb_xengallery_thread_import');
             }
             break;
     }
     if (strpos($templateName, 'sonnb_xengallery') !== false) {
         $template->preloadTemplate('sonnb_xengallery_option_copyright');
         if (XenForo_Application::getConfig()->get('sonnbXengalleryCopyrightRemoved') !== true) {
             $template->preloadTemplate('sonnbXG_copyright');
         }
     }
 }
Esempio n. 15
0
 public static function templateCreate($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     if ($template instanceof XenForo_Template_Admin) {
     } else {
         switch ($templateName) {
             case 'thread_view':
                 $template->preloadTemplate('BRETI_message_below');
                 break;
         }
     }
 }
Esempio n. 16
0
 public static function template_create(&$templateName, array &$params, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'account_preferences':
             $template->preloadTemplate('bdsocialshare_account_preferences_options');
             break;
     }
     if (!empty($params['_bdSocialShare_renderSubView']) and isset($params['_subView'])) {
         $params['_subView'] = strval($params['_subView']);
     }
 }
Esempio n. 17
0
 public static function template_create(&$templateName, array &$params, XenForo_Template_Abstract $template)
 {
     if (self::$_hasPerm === null) {
         self::$_hasPerm = XenForo_Model::create('sonnbUpThread_Model_Log')->canUpThread();
     }
     if (!self::$_hasPerm) {
         return;
     }
     switch ($templateName) {
         case 'forum_view':
             $template->preloadTemplate('sonnb_up_thread_list');
             break;
         case 'thread_view':
             $template->preloadTemplate('sonnb_up_thread_view');
             $template->preloadTemplate('sonnb_up_thread_view_single');
             break;
         case 'thread_create':
             $template->preloadTemplate('sonnb_up_thread_schedule');
             break;
         case 'PAGE_CONTAINER':
             $template->preloadTemplate('sonnb_up_thread_nav_visitor');
             break;
         case 'account_wrapper':
             $template->preloadTemplate('sonnb_up_thread_account_information_nav');
             break;
     }
 }
Esempio n. 18
0
 public static function template_create($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     if (empty(self::$_commonTemplatesPreloaded)) {
         $template->preloadTemplate('bdapi_consumer_providers');
         $template->preloadTemplate('bdapi_consumer_page_container_head');
         if (!bdApiConsumer_Option::get('_is120+')) {
             $template->preloadTemplate('bdapi_consumer_navigation_visitor_tab_links1');
         }
         self::$_commonTemplatesPreloaded = true;
     }
     if ($templateName === 'PAGE_CONTAINER' and !bdApiConsumer_Option::get('_is120+')) {
         if (bdApiConsumer_Option::get('_showButtons')) {
             // setting $eAuth in hook position login_bar_eauth_set doens't work
             // so we have to do it here. Risk: won't work if the container template changes
             // this is bad but it only runs in XenForo 1.1.x
             $params['eAuth'] = 1;
         }
     }
     if ($templateName == 'account_wrapper' and !bdApiConsumer_Option::get('_is120+')) {
         $template->preloadTemplate('bdapi_consumer_account_wrapper_sidebar_settings');
     }
 }
Esempio n. 19
0
 public static function template_create($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     $model = XenForo_Model::create('VietXfAdvStats_Model_GetUserGroup');
     if ($model->checkGroup()) {
         if ($templateName == 'PAGE_CONTAINER') {
             $options = XenForo_Application::get('options');
             $position = $options->VietXfAdvStats_position;
             $position_portal = $options->VietXfAdvStats_portal;
             if ($position == 'all' or !empty($params['contentTemplate']) and $params['contentTemplate'] == 'forum_list') {
                 // 2 cases:
                 // position set to 'all': we should work on all pages...
                 // position set to something else: forum_list ONLY
                 $template->preloadTemplate('VietXfAdvStats_wrapper');
                 define(self::TEMPLATE_READY_FLAG, true);
             } elseif ($position_portal) {
                 if (!empty($params['contentTemplate']) and $params['contentTemplate'] == 'EWRporta_Portal') {
                     $template->preloadTemplate('VietXfAdvStats_wrapper');
                     define(self::TEMPLATE_READY_FLAG, true);
                 }
             }
         }
     }
 }
Esempio n. 20
0
 public static function TemplateCreate($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'dark_taigachat':
             /** @var Dark_TaigaChat_Model_TaigaChat */
             $taigamodel = XenForo_Model::create("Dark_TaigaChat_Model_TaigaChat");
             $visitor = XenForo_Visitor::getInstance();
             $taigamodel->updateActivity($visitor['user_id'], false);
             // fallthrough
         // fallthrough
         case 'dark_taigachat_widget_online':
         case 'dark_taigachat_fake':
             $response = new stdClass();
             $response->viewName = "";
             $response->params = array();
             Dark_TaigaChat_Helper_Global::getTaigaChatStuff($response, "");
             $params = array_merge_recursive($params, $response->params);
             break;
         case 'PAGE_CONTAINER':
             $template->preloadTemplate('dark_taigachat');
             $template->preloadTemplate('dark_taigachat_list');
             break;
     }
 }
 public function prepare(array $widget, $positionCode, array $params, XenForo_Template_Abstract $template)
 {
     $template->preloadTemplate('wf_widget_wrapper');
     $renderTemplate = $this->_getRenderTemplate($widget, $positionCode, $params);
     if (!empty($renderTemplate)) {
         $template->preloadTemplate($renderTemplate);
     }
     if ($this->useCache($widget)) {
         // sondh@2013-04-02
         // please keep this block of code in-sync'd with its original
         // implemented in WidgetFramework_WidgetRenderer::render
         $cacheId = $this->_getCacheId($widget, $positionCode, $params);
         $useUserCache = $this->useUserCache($widget);
         $useLiveCache = $this->useLiveCache($widget);
         WidgetFramework_Core::preloadCachedWidget($cacheId, $useUserCache, $useLiveCache);
     }
     $this->_prepare($widget, $positionCode, $params);
 }
Esempio n. 22
0
 public static function template_create(&$templateName, array &$params, XenForo_Template_Abstract $template)
 {
     if (self::$_canViewTeams === null) {
         self::$_canViewTeams = XenForo_Visitor::getInstance()->hasPermission('Teams', 'view');
     }
     if (!array_key_exists('canViewTeams', $params)) {
         $params['canViewTeams'] = self::$_canViewTeams;
     }
     switch ($templateName) {
         case 'member_view':
             if (self::$_canViewTeams) {
                 $template->preloadTemplate('Team_member_view_tabs_content');
                 $template->preloadTemplate('Team_member_view_tabs_heading');
             }
             $template->preloadTemplate('Team_user_view_info');
             break;
         case 'search_form':
             if (self::$_canViewTeams) {
                 $template->preloadTemplate('Team_search_form_tabs_team');
             }
             break;
         case 'thread_view':
             $template->preloadTemplate('Team_message_user_info_text');
             $template->preloadTemplate('Team_thread_view_tools_links');
             break;
         case 'Team_event_list':
             $template->preloadTemplate('Team_event_list_sidebar');
             break;
     }
 }
Esempio n. 23
0
 public static function initTemplateCreate(&$templateName, array &$params, XenForo_Template_Abstract $template)
 {
     if (!empty(self::$_templateList)) {
         $templateList = self::$_templateList;
         if ($template instanceof XenForo_Template_Admin) {
             if (!empty($templateList['admin'][$templateName]) && is_array($templateList['admin'][$templateName])) {
                 foreach ($templateList['admin'][$templateName] as $key => $templateTitle) {
                     $template->preloadTemplate($templateTitle);
                 }
                 unset($templateList['admin'][$templateName], $templateTitle);
             }
             if (!empty($templateList['admin']['_all']) && is_array($templateList['admin']['_all'])) {
                 foreach ($templateList['admin']['_all'] as $key => $templateTitle) {
                     $template->preloadTemplate($templateTitle);
                 }
                 unset($templateList['admin']['_all'], $templateTitle);
             }
         } else {
             if (!empty($templateList['public'][$templateName]) && is_array($templateList['public'][$templateName])) {
                 foreach ($templateList['public'][$templateName] as $key => $templateTitle) {
                     $template->preloadTemplate($templateTitle);
                 }
                 unset($templateList['public'][$templateName], $templateTitle);
             }
             if (!empty($templateList['public']['_all']) && is_array($templateList['public']['_all'])) {
                 foreach ($templateList['public']['_all'] as $key => $templateTitle) {
                     $template->preloadTemplate($templateTitle);
                 }
                 unset($templateList['public']['_all'], $templateTitle);
             }
         }
         self::$_templateList = $templateList;
     }
 }
Esempio n. 24
0
 public static function templateCreate($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     $template->preloadTemplate('BRMS_ModernStatistic');
 }
Esempio n. 25
0
 /**
  *
  * @param string $templateName
  */
 protected function _preloadTemplate($templateName)
 {
     $this->_template->preloadTemplate($templateName);
 }
Esempio n. 26
0
 public static function templateCreate($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     self::$_loadedTemplates[$templateName] = $templateName;
     $template->preloadTemplate('BRMS_ModernStatistic');
     $template->preloadTemplate('BRMS_modern_statistic_header');
 }
Esempio n. 27
0
 public static function template_create(&$templateName, array &$params, XenForo_Template_Abstract $template)
 {
     if ($templateName == 'PAGE_CONTAINER') {
         $template->preloadTemplate('HQCoder_ThreadRating_rate');
     }
 }
Esempio n. 28
0
 public static function templateCreate($templateName, array &$params, XenForo_Template_Abstract $template) {
     if($templateName == "PAGE_CONTAINER") {
         $template->preloadTemplate("RCBD_recent_status");
     }
 }}
Esempio n. 29
0
 public static function TemplateCreate($templateName, array &$params, XenForo_Template_Abstract $template)
 {
     switch ($templateName) {
         case 'dark_postrating_output':
         case 'dark_postrating':
             if (!empty($params['options'])) {
                 $options = $params['options'];
             } else {
                 $options = XenForo_Application::get('options');
             }
             /** @var $ratingModel Dark_PostRating_Model */
             $ratingModel = XenForo_Model::create('Dark_PostRating_Model');
             /*if(!empty($params['postrating_ratings']))
             			$ratings = $params['postrating_ratings'];
             		else {*/
             $ratings = $ratingModel->getRatings();
             $ratings = $ratingModel->applyRatingWhitelist($ratings, $params['forum']['node_id'], $params['post'], true);
             //}
             $ratingsOut2 = array();
             if ($options->dark_postrating_like_id > 0 && !empty($ratings[$options->dark_postrating_like_id])) {
                 if ($params['post']['postrating_likes'] > 0) {
                     $ratingsOut2[$options->dark_postrating_like_id] = $ratings[$options->dark_postrating_like_id];
                     $ratingsOut2[$options->dark_postrating_like_id] += array('count' => $params['post']['postrating_likes']);
                 }
             }
             $count_negative = 0;
             $count_all = $params['post']['postrating_likes'];
             foreach ($ratings as $id => $rating) {
                 if (!empty($params['post']['dark_postrating_' . $id . '_count']) && $id != $options->dark_postrating_like_id) {
                     $ratingsOut2[$id] = $rating;
                     $ratingsOut2[$id] += array('count' => $params['post']['dark_postrating_' . $id . '_count']);
                     $count_all += $params['post']['dark_postrating_' . $id . '_count'];
                     if ($rating['type'] == -1) {
                         $count_negative += $params['post']['dark_postrating_' . $id . '_count'];
                     }
                 }
             }
             $ratingModel->sortPreparedRatings($ratingsOut2);
             $params += array('postrating_ratings_out' => $ratingsOut2, 'message' => $params['post'], 'postrating_has_ratings' => count($ratingsOut2) > 0, 'postrating_ratings_lots' => count($ratingsOut2) > 4, 'postrating_hide_post' => $count_all > 0 && $options->dark_postrating_hide_post > 0 && $count_negative >= $options->dark_postrating_hide_post && ($options->dark_postrating_hide_post_percentage == 0 || $count_negative / $count_all * 100 >= $options->dark_postrating_hide_post_percentage));
             break;
         case 'dark_postrating_member_card':
         case 'dark_postrating_member_info':
         case 'dark_postrating_visitor_panel':
         case 'dark_postrating_message_user_info':
             // Totals only, using already available data
             $options = XenForo_Application::get('options');
             $ratingModel = XenForo_Model::create('Dark_PostRating_Model');
             $enabledRatings = $ratingModel->getEnabledRatingTypes($options);
             $total = array('neutral' => 0, 'positive' => 0, 'negative' => 0, 'all' => 0);
             if ($options->dark_postrating_like_id > 0 && $options->dark_postrating_like_show) {
                 $total['positive'] += $params['user']['like_count'];
             }
             if (!empty($params['user']['positive_rating_count'])) {
                 $total['positive'] += $params['user']['positive_rating_count'];
             }
             if (!empty($params['user']['neutral_rating_count'])) {
                 $total['neutral'] += $params['user']['neutral_rating_count'];
             }
             if (!empty($params['user']['negative_rating_count'])) {
                 $total['negative'] += $params['user']['negative_rating_count'];
             }
             if ($enabledRatings['positive']) {
                 $total['all'] += $total['positive'];
             }
             if ($enabledRatings['neutral']) {
                 $total['all'] += $total['neutral'];
             }
             if ($enabledRatings['negative']) {
                 $total['all'] += $total['negative'];
             }
             if ($total['all'] == 0) {
                 $total['all'] = 1;
             }
             $params += array('postrating_ratings_total' => $total, 'postrating_enabled_ratings' => $enabledRatings);
             break;
         case 'dark_postrating_member':
         case 'dark_postrating_member_totals':
             // Fine grained totals, one query per user
             $options = XenForo_Application::get('options');
             /* @var $likeModel XenForo_Model_Like */
             $likeModel = XenForo_Model::create('XenForo_Model_Like');
             /* @var $ratingModel Dark_PostRating_Model */
             $ratingModel = XenForo_Model::create('Dark_PostRating_Model');
             $ratings = $ratingModel->getRatings();
             $enabledRatings = $ratingModel->getEnabledRatingTypes($options);
             $ratingsOut = $ratingModel->getPostRatingsUser($params['user']['user_id']);
             $ratingsOut2 = $ratings;
             foreach ($ratingsOut as $ratingOut) {
                 if (!array_key_exists($ratingOut['rating'], $ratings)) {
                     continue;
                 }
                 if ($ratingOut['given']) {
                     $ratingsOut2[$ratingOut['rating']] += array('given' => $ratingOut['rating_count']);
                 }
                 if (!$ratingOut['given']) {
                     $ratingsOut2[$ratingOut['rating']] += array('received' => $ratingOut['rating_count']);
                 }
             }
             foreach ($ratingsOut2 as &$ratingOut) {
                 if (empty($ratingOut['given'])) {
                     $ratingOut['given'] = 0;
                 }
                 if (empty($ratingOut['received'])) {
                     $ratingOut['received'] = 0;
                 }
             }
             if ($options->dark_postrating_like_id > 0 && $options->dark_postrating_like_show) {
                 $ratingsOut2[$options->dark_postrating_like_id]['received'] += $params['user']['like_count'];
                 $ratingsOut2[$options->dark_postrating_like_id]['given'] += $ratingModel->countLikesGivenByUser($params['user']['user_id']);
             }
             $total = array('neutral' => 0, 'positive' => 0, 'negative' => 0, 'all' => 0);
             foreach ($ratingsOut2 as &$ratingOut) {
                 if ($ratingOut['type'] == 0) {
                     $total['neutral'] += $ratingOut['received'];
                 }
                 if ($ratingOut['type'] == -1) {
                     $total['negative'] += $ratingOut['received'];
                 }
                 if ($ratingOut['type'] == 1) {
                     $total['positive'] += $ratingOut['received'];
                 }
             }
             if ($enabledRatings['positive']) {
                 $total['all'] += $total['positive'];
             }
             if ($enabledRatings['neutral']) {
                 $total['all'] += $total['neutral'];
             }
             if ($enabledRatings['negative']) {
                 $total['all'] += $total['negative'];
             }
             if ($total['all'] == 0) {
                 $total['all'] = 1;
             }
             if ($options->dark_postrating_like_id > 0 && !$options->dark_postrating_like_show) {
                 unset($ratingsOut2[$options->dark_postrating_like_id]);
             }
             $params += array('postrating_ratings_out' => $ratingsOut2, 'postrating_ratings_total' => $total, 'postrating_enabled_ratings' => $enabledRatings, 'postrating_total_numeric' => $options->dark_postrating_member_numeric, 'postrating_total_bar' => $options->dark_postrating_member_bar);
             break;
         case 'dark_postrating_member_notable_tabs':
             $options = XenForo_Application::get('options');
             /* @var $ratingModel Dark_PostRating_Model */
             $ratingModel = XenForo_Model::create('Dark_PostRating_Model');
             if (!$options->dark_postrating_member_card) {
                 $enabledRatings = array();
                 $enabledRatings['positive'] = false;
                 $enabledRatings['neutral'] = false;
                 $enabledRatings['negative'] = false;
             } else {
                 $enabledRatings = $ratingModel->getEnabledRatingTypes($options);
             }
             $params += array('postrating_enabled_ratings' => $enabledRatings);
             break;
         case 'dark_postrating_thread_icon':
             if ($params['thread']['dark_postrating_max'] > 0) {
                 /* @var $ratingModel Dark_PostRating_Model */
                 $ratingModel = XenForo_Model::create('Dark_PostRating_Model');
                 $ratings = $ratingModel->getRatings();
                 $params += array('rating' => $ratings[$params['thread']['dark_postrating_max_id']] + array('count' => $params['thread']['dark_postrating_max']));
             }
             break;
         case 'PAGE_CONTAINER':
             $template->preloadTemplate('dark_postrating');
             $template->preloadTemplate('dark_postrating_member');
             $template->preloadTemplate('dark_postrating_member_totals');
             $template->preloadTemplate('message_user_info_extra');
             $template->preloadTemplate('user_criteria_content');
             $template->preloadTemplate('thread_list_item_icon_key');
             $template->preloadTemplate('dark_postrating_member_notable_tabs');
             $template->preloadTemplate('dark_postrating_account_wrapper');
             $template->preloadTemplate('dark_postrating_navigation_visitor_tab');
             $template->preloadTemplate('dark_postrating_visitor_panel');
             $template->preloadTemplate('dark_postrating_member_card');
             $template->preloadTemplate('dark_postrating_member_info');
             $template->preloadTemplate('dark_postrating_message_user_info');
             break;
     }
 }
Esempio n. 30
0
 public static function templateCreateHelperCriteriaPage(&$templateName, array &$params, XenForo_Template_Abstract $template)
 {
     if ($template instanceof XenForo_Template_Admin) {
         $template->preloadTemplate('xengallery_helper_criteria_page');
     }
 }