當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。