Пример #1
0
 private function _autoFidData($fids, $offset, $pageSize, $params, $longitude, $latitude, $radius)
 {
     $lists = DzForumThread::getByFidData($fids, $offset, $pageSize, $params, $longitude, $latitude, $radius);
     // Mobcent::dumpSql();
     $rows = array();
     foreach ($lists as $list) {
         $topicSummary = ForumUtils::getTopicSummary($list['tid'], 'portal', true, array('imageList' => $_GET['isImageList'], 'imageListLen' => 9, 'imageListThumb' => 1));
         $rows[] = $this->_getListField($list, $topicSummary, 'topic', $list['tid'], $params);
     }
     return $rows;
 }
Пример #2
0
 /**
  * 测试是否此主帖仅作者可见
  */
 public static function isOnlyAuthorTopic($tid)
 {
     return DzForumThread::isOnlyAuthor($tid);
 }
Пример #3
0
 private function _getTopicInfos($fid, $page, $pageSize, $sort, $filterType = '', $filterId = '', $isImageList = '', $topOrder = '')
 {
     $infos = array('count' => 0, 'list' => array(), 'topTopicList' => array());
     // global $_G;
     // $forum = $_G['forum'];
     $count = $this->_getTopicCount($fid, $sort, $filterType, $filterId);
     $topicList = $this->_getTopicList($fid, $page, $pageSize, $sort, $filterType, $filterId);
     $topTopicList = $topTopicListTmp = $topList = array();
     if ($page == 1 && $topOrder != 0) {
         $status = $_GET['topOrder'];
         $fids = array();
         switch ($status) {
             case DzForumThread::DISPLAY_ORDER_GLOBAL:
                 $fids = ForumUtils::getForumShowFids();
                 break;
             case DzForumThread::DISPLAY_ORDER_GROUP:
                 $fids = DzForumForum::getFidsByGid(DzForumForum::getGidByFid($fid));
                 break;
             case DzForumThread::DISPLAY_ORDER_FORUM:
                 $fids = array($fid);
                 break;
             default:
                 break;
         }
         $topTopicListTmp = DzForumThread::getByFidData($fids, 0, 3, array('topic_stick' => array($status)));
         foreach ($topTopicListTmp as $top) {
             $topList['id'] = (int) $top['tid'];
             $topList['title'] = (string) $top['subject'];
             $topTopicList[] = $topList;
         }
     }
     // $topTopicList = $this->_getListField($topTopicList);
     $list = $this->_getListField($topicList);
     $infos['count'] = $count;
     $infos['list'] = $list;
     $infos['topTopicList'] = $topTopicList;
     return $infos;
 }