本文整理匯總了PHP中comments::serialize方法的典型用法代碼示例。如果您正苦於以下問題:PHP comments::serialize方法的具體用法?PHP comments::serialize怎麽用?PHP comments::serialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類comments
的用法示例。
在下文中一共展示了comments::serialize方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: define
$code = $nwObj->fetchNewswirePage(0, $currentPage);
break;
}
break;
case 'readStory':
define("INIT_SESSION", true);
include_once 'initialize.php';
switch ($cmd) {
case 'addComment':
if (isset($_GET['siteContentId']) and isset($_GET['comments'])) {
$comments = $_GET['comments'];
$siteContentId = $_GET['siteContentId'];
if ($comments != '') {
require_once PATH_CORE . 'classes/comments.class.php';
$comObj = new comments($db);
$comInfo = $comObj->serialize(0, 0, $siteContentId, 0, $comments, 0, $db->ui->userid, $db->ui->memberName, '', 0);
// $db->ui->uid
$siteCommentId = $comObj->add($comInfo);
require_once PATH_CORE . '/classes/log.class.php';
$logObj = new log($db);
$logItem = $logObj->serialize(0, $db->ui->userid, 'comment', $siteContentId);
$logItem->itemid2 = $siteCommentId;
// djm: hack for now so I have it
$inLog = $logObj->add($logItem);
$code = 'Your comment has been posted!';
} else {
$error = true;
$errorMsg = 'Please enter a valid comment.';
}
} else {
$error = true;