本文整理汇总了PHP中CForumMessage::load方法的典型用法代码示例。如果您正苦于以下问题:PHP CForumMessage::load方法的具体用法?PHP CForumMessage::load怎么用?PHP CForumMessage::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CForumMessage
的用法示例。
在下文中一共展示了CForumMessage::load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
$AppUI->redirect('m=forums');
} else {
$AppUI->savePlace();
}
// Build a back-url for when the back button is pressed
$back_url_params = array();
foreach ($_GET as $k => $v) {
if ($k != 'post_message') {
$back_url_params[] = "{$k}={$v}";
}
}
$back_url = implode('&', $back_url_params);
//pull message information
$message = new CForumMessage();
$message->load($message_id);
//pull message information from last response
if ($message_parent != -1) {
$last_message = new CForumMessage();
$last_message->load($message_parent);
if (!$last_message->message_id) {
// if it's first response, use original message
$last_message = clone $message;
$last_message->message_body = wordwrap($last_message->message_body, 50, "\n> ");
} else {
$last_message->message_body = mb_str_replace("\n", "\n> ", $last_message->message_body);
}
}
$crumbs = array();
$crumbs['?m=forums'] = 'forums list';
$crumbs['?m=forums&a=viewer&forum_id=' . $forum_id] = 'topics for this forum';
示例2: CForumMessage
/**
* $Id: vw_forummessage.php 19621 2013-06-20 20:40:45Z phenxdesign $
*
* @package Mediboard
* @subpackage Portail
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 19621 $
*/
CCanDo::checkRead();
$user = CUser::get();
/** Chargement du message demandé **/
// s'il est indiqué dans le GET ou la session on charge l'objet
$forum_message = new CForumMessage();
$forum_message->load(CValue::getOrSession('forum_message_id'));
if ($forum_message->_id) {
$forum_message->loadRefs();
} else {
// sinon on en crée un nouveau
$forum_message->user_id = $user->_id;
$forum_message->date = CMbDT::dateTime();
}
/** Chargement du thread demandé **/
// on récupère le thread auquel appartient le message
if ($forum_message->forum_thread_id) {
$forum_thread = $forum_message->_ref_forum_thread;
} else {
$forum_thread = new CForumThread();
$forum_thread->load(CValue::getOrSession('forum_thread_id'));
if ($forum_thread->_id) {