本文整理匯總了PHP中content::updateCommentCount方法的典型用法代碼示例。如果您正苦於以下問題:PHP content::updateCommentCount方法的具體用法?PHP content::updateCommentCount怎麽用?PHP content::updateCommentCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類content
的用法示例。
在下文中一共展示了content::updateCommentCount方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: unlink
$result = $cObj->postComment($comment, $app);
if (!preg_match('/^[0-9]+$/', $result)) {
$error = true;
$errorMsg = " comment save error: {$result}";
} else {
$siteCommentId = $result;
$filename = PATH_CACHE . '/read_' . $cid . '_com_m.cac';
if (file_exists($filename)) {
unlink($filename);
}
$filename = PATH_CACHE . '/read_' . $cid . '_com_n.cac';
if (file_exists($filename)) {
unlink($filename);
}
}
$cObj->updateCommentCount($cid);
}
if (!$error) {
require_once PATH_CORE . '/classes/log.class.php';
$logObj = new log($db);
$logItem = $logObj->serialize(0, $userid, 'comment', $siteCommentId, 0, $cid);
$inLog = $logObj->add($logItem);
$code = '<div id="dialogMessage"><h2>Your comment has been published successfully.</h2><p>What would you like to do next?</p>';
$code .= '<ul class="bullet_list">' . $storyOption . '<li><a href="#" onclick="hideDialog(); return shareStory(this,' . $cid . ');">Share story with friends</a></li><li><a href="?p=invite" onclick="hideDialog(); return switchPage(\'invite\');">Invite friends to ' . SITE_TITLE . '</a></li></ul></div>';
} else {
$code = '<div id="dialogMessage">Sorry, there was a problem publishing your comment. Error: ' . $errorMsg . '</div>';
}
break;
case 'requestVerify':
// send it
// to do - this code is duped in pagesignup, move to account.class.php