Source for file list_boards_inc.php
Documentation is available at list_boards_inc.php
* Copyright (c) 2004 bitweaver Messageboards
* All Rights Reserved. See below for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
require_once("../kernel/setup_inc.php");
require_once( BOARDS_PKG_PATH. 'BitBoardTopic.php' );
require_once( BOARDS_PKG_PATH. 'BitBoardPost.php' );
require_once( BOARDS_PKG_PATH. 'BitBoard.php' );
// Is package installed and enabled
$gBitSystem->verifyPackage( 'boards' );
// Now check permissions to access this page
$board_all_cids = array();
// @TODO move pigeonholes to its own file library or something
if($gBitSystem->isPackageActive('pigeonholes')) {
require_once(PIGEONHOLES_PKG_PATH. 'Pigeonholes.php');
$listHash = array('load_only_root'=> TRUE);
$l = $p->getList($listHash);
$d = $s->getSubTree( $e['structure_id'] );
foreach ($pos as $pos_v) {
if (!isset ($pos_var['children'])) {
$pos_var['children']= array();
if (!isset ($pos_var['children'][$pos_v- 1])) {
$pos_var['children'][$pos_v- 1]= array();
$pos_var = &$pos_var['children'][$pos_v- 1];
if (empty($pos_var['data'])) {
$pos_var['children']= array();
$mlHash['content_id']= $c['content_id'];
$pos_var['members']= $p->getMemberList($mlHash);
foreach ($pos_var['members'] as $boardKey) {
$board_cids[] = $boardKey['content_id'];
if (count($board_cids)> 0) {
$listHash = array('boards'=> $board_cids,'paginationOff'=> 'y');
$pos_var['members'] = $board->getList($listHash);
$pos_var['pagination']= $listHash['listInfo'];
$board_all_cids = array_merge($board_all_cids,$board_cids);
if($gBitSystem->isPackageActive('pigeonholes')) {
// $ret['data']['title']="Uncategorised Boards";
// $ret['data']['title']="Board List";
$ret['children']= array();
$listHash = array('nboards'=> $board_all_cids,'paginationOff'=> 'y');
$ret['members'] = $board->getList($listHash);
if (count($ret['members']) == 1) {
$_REQUEST['b'] = $ret['members'][0]['board_id'];
require ( BOARDS_PKG_PATH. 'view_board_inc.php' );
} elseif (count($ret['members']) > 0) {
$gBitSmarty->assign_by_ref('ns',$ns);
// this might be for getting a count of nested boards - not entirely sure, if you figure it out please clarify this comment.
$s = count($a['members']);
foreach ($a['children'] as $k=> $c) {
unset ($a['children'][$k]);
$a['children'][$k]['sub_count'] = $n;
foreach ($ns as $k=> $a) {
$ns[$k]['sub_count'] = $n;
//$gBitSmarty->display( 'bitpackage:boards/cat_display.tpl');
$gBitSystem->display( 'bitpackage:boards/list_boards.tpl', tra( 'Boards' ) , array( 'display_mode' => 'display' ));
|