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


PHP Board::LoadThreads方法代码示例

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


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

示例1: boardTopLevelCategories

 /**
 * This retrieve the list of categories
 * and the X last post under categories
 */
 private function boardTopLevelCategories()
 {
     if ($this->tags) {
         $this->boardTopLevelLastPosts();
         return;
     }
     $this->board = new Board($this->dao, 'Forums', '.');
     $query = "select id as IdTagCategory,IdName,IdDescription from forums_tags where Type='Category' order by tag_position asc ";
     $scat = $this->dao->query($query);
     if (!$scat) {
         throw new PException('boardTopLevelCategories::Could not retrieve the categories tags!');
     }
     $ListBoard = array();
     $CategoryList = "";
     // for all the tags which are categories
     while ($rowcat = $scat->fetch(PDB::FETCH_OBJ)) {
         if ($CategoryList != "") {
             $CategoryList .= ",";
         }
         $CategoryList .= $rowcat->IdTagCategory;
         // We are going to seek for the X last post which have this tag
         $tt = array();
         array_push($tt, $rowcat);
         $board = new Board($this->dao, 'Forums', '.', null, $tt);
         $rowcat->board = $board;
         $rowcat->threads = $board->LoadThreads($rowcat->IdTagCategory);
         array_push($ListBoard, $rowcat);
     }
     $rowcat->threads = $board->LoadThreads(0, $CategoryList);
     // Load some post without categories
     array_push($ListBoard, $rowcat);
     $this->ListBoards = $ListBoard;
 }
开发者ID:gpuenteallott,项目名称:rox,代码行数:37,代码来源:forums.model.php


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