本文整理汇总了PHP中CProject::getForums方法的典型用法代码示例。如果您正苦于以下问题:PHP CProject::getForums方法的具体用法?PHP CProject::getForums怎么用?PHP CProject::getForums使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CProject
的用法示例。
在下文中一共展示了CProject::getForums方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetForums
/**
* Tests finding of forums of project
*/
public function testGetForums()
{
global $AppUI;
$forums = CProject::getForums($AppUI, 1);
$this->assertEquals(1, count($forums));
$this->assertEquals(1, $forums[1]['forum_id']);
$this->assertEquals(1, $forums[1]['forum_project']);
$this->assertEquals('This is a forum.', $forums[1]['forum_description']);
$this->assertEquals(1, $forums[1]['forum_owner']);
$this->assertEquals('Test Forum', $forums[1]['forum_name']);
$this->assertEquals(1, $forums[1]['forum_message_count']);
$this->assertEquals('04-Aug-2009 17:03', $forums[1]['forum_last_date']);
$this->assertEquals('Test Project', $forums[1]['project_name']);
$this->assertEquals('FFFFFF', $forums[1]['project_color_identifier']);
$this->assertEquals(1, $forums[1]['project_id']);
$this->assertEquals(1, $forums[1][0]);
$this->assertEquals(1, $forums[1][1]);
$this->assertEquals('This is a forum.', $forums[1][2]);
$this->assertEquals(1, $forums[1][3]);
$this->assertEquals('Test Forum', $forums[1][4]);
$this->assertEquals(1, $forums[1][5]);
$this->assertEquals('04-Aug-2009 17:03', $forums[1][6]);
$this->assertEquals('Test Project', $forums[1][7]);
$this->assertEquals('FFFFFF', $forums[1][8]);
$this->assertEquals(1, $forums[1][9]);
}
示例2: die
<?php
/* $Id: vw_forums.php 305 2009-02-22 19:47:10Z caseydk $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/tags/version2.4/modules/projects/vw_forums.php $ */
if (!defined('W2P_BASE_DIR')) {
die('You should not access this file directly.');
}
global $AppUI, $project_id;
// Forums mini-table in project view action
$forums = CProject::getForums($AppUI, $project_id);
?>
<table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl">
<tr>
<th nowrap="nowrap"> </th>
<th nowrap="nowrap" width="100%"><?php
echo $AppUI->_('Forum Name');
?>
</th>
<th nowrap="nowrap"><?php
echo $AppUI->_('Messages');
?>
</th>
<th nowrap="nowrap"><?php
echo $AppUI->_('Last Post');
?>
</th>
</tr>
<?php
foreach ($forums as $forumId => $forum_info) {
?>
<tr>