コード例 #1
0
ファイル: kunena17.php プロジェクト: kosmosby/medicine-prof
	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;
	}
コード例 #2
0
ファイル: kunena20.php プロジェクト: kosmosby/medicine-prof
	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;
	}