예제 #1
0
 protected function _getCacheId(array $widget, $positionCode, array $params, array $suffix = array())
 {
     if (isset($params['thread']) and !empty($params['thread']['thread_id'])) {
         $suffix[] = 't' . $params['thread']['thread_id'];
     } elseif (isset($params['page']) and !empty($params['page']['node_id'])) {
         $suffix[] = 'p' . $params['page']['node_id'];
     } elseif (isset($params['forum']) and !empty($params['forum']['node_id'])) {
         $suffix[] = 'f' . $params['forum']['node_id'];
     } elseif (isset($params['resource']) and !empty($params['resource']['resource_id'])) {
         $suffix[] = 'r' . $params['resource']['resource_id'];
     }
     return parent::_getCacheId($widget, $positionCode, $params, $suffix);
 }
예제 #2
0
 protected function _getCacheId(array $widget, $positionCode, array $params, array $suffix = array())
 {
     if ($this->_helperDetectSpecialForums($widget['options']['forums'])) {
         // we have to use special cache id when special forum ids are used
         if (isset($params['forum'])) {
             $suffix[] = 'f' . $params['forum']['node_id'];
         }
     }
     return parent::_getCacheId($widget, $positionCode, $params, $suffix);
 }
예제 #3
0
 protected function _getCacheId(array $widget, $positionCode, array $params, array $suffix = array())
 {
     if (isset($widget['_ajaxLoadParams'])) {
         if (!empty($widget['_ajaxLoadParams']['forumIds'])) {
             $suffix[] = 'f' . implode('', $widget['_ajaxLoadParams']['forumIds']);
         }
     } elseif ($this->_helperDetectSpecialForums($widget['options']['forums'])) {
         if (isset($params['forum'])) {
             $forumIds = $this->_helperGetForumIdsFromOption($widget['options']['forums'], $params, empty($widget['options']['as_guest']) ? false : true);
             $suffix[] = 'f' . implode('', $forumIds);
         }
     }
     return parent::_getCacheId($widget, $positionCode, $params, $suffix);
 }
 protected function _getCacheId(array $widget, $positionCode, array $params, array $suffix = array())
 {
     if (!empty($widget['options']['forums'])) {
         $forumIds = $this->_helperGetForumIdsFromOption($widget['options']['forums'], $params, true);
         if (!empty($forumIds)) {
             $suffix[] = md5(serialize($forumIds));
         }
     }
     return parent::_getCacheId($widget, $positionCode, $params, $suffix);
 }
예제 #5
0
파일: Birthday.php 프로젝트: Sywooch/forums
 protected function _getCacheId(array $widget, $positionCode, array $params, array $suffix = array())
 {
     $suffix[] = XenForo_Locale::getTimeZoneOffset();
     return parent::_getCacheId($widget, $positionCode, $params, $suffix);
 }
예제 #6
0
 protected function _getCacheId(array $widget, $positionCode, array $params, array $suffix = array())
 {
     // Do special processing before getting cache id if needed.
     // See Recent Threads for example.
     return parent::_getCacheId($widget, $positionCode, $params, $suffix);
 }