当前位置: 首页>>代码示例>>PHP>>正文


PHP CProject::getForums方法代码示例

本文整理汇总了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]);
 }
开发者ID:eureka2,项目名称:web2project,代码行数:29,代码来源:projects.test.php

示例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">&nbsp;</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>
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:vw_forums.php


注:本文中的CProject::getForums方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。