本文整理汇总了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;
}