static public function getBoardTree( $children, $id = 0, $indent = '', $list = array() ) { $rows = ( isset( $children[$id] ) ? $children[$id] : null ); if ( $rows ) foreach ( $rows as $row ) { $id = $row->value; $rows = ( isset( $children[$id] ) ? $children[$id] : null ); $list[$id]->value = $id; $list[$id]->text = $indent . ( $row->parent ? '. ' : null ) . '- ' . htmlspecialchars( $row->text ); $list = cbgjForumsModel::getBoardTree( $children, $id, $indent . ' ', $list ); } return $list; }
static public function getForumURL( $forum = null, $post = null ) { if ( ! class_exists( 'KunenaForumMessage' ) ) { return; } if ( $post ) { $url = KunenaForumMessage::getInstance( (int) $post )->getUrl(); } else { $url = cbgjForumsModel::getCategory( (int) $forum )->getUrl(); } return $url; }