本文整理汇总了PHP中Comments::config方法的典型用法代码示例。如果您正苦于以下问题:PHP Comments::config方法的具体用法?PHP Comments::config怎么用?PHP Comments::config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Comments
的用法示例。
在下文中一共展示了Comments::config方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
if (\Comments::config('db_prefix')) {
$this->prefix = \Comments::config('db_prefix');
} else {
$this->prefix = null;
}
}
示例2: json_encode
?>
,
page : '<?php
echo Comments::config('comment_page') ? Comments::config('comment_page') : Comments::currentURL();
?>
',
page_title : '<?php
echo Comments::config('page_title');
?>
',
lang : <?php
echo json_encode(Comments::config('js_lang'));
?>
,
ajaxurl : '<?php
echo Comments::config('ajaxurl');
?>
'
};
</script>
<?php
echo HTML::script('public/packages/idfluid/comments/js/mustache.min.js');
echo HTML::script('public/packages/idfluid/comments/js/jquery-linkify.min.js');
echo HTML::script('public/packages/idfluid/comments/js/jquery.elastic.source.js');
echo HTML::script('public/packages/idfluid/comments/js/comments.js');
echo HTML::script('public/packages/idfluid/comments/js/jquery.validate.js');
?>
<!-- Comments Template -->
<script id="commentsTemplate" type="text/template">
<li id="comment-{{id}}" class="item {{hidden}}">
示例3: sprintf
if (!empty($notif_email) and !empty($comment)) {
if ($comment['status'] == 1) {
$subject = sprintf($templates['new_comment']['subject'], $_POST['page_title']);
$message = sprintf($templates['new_comment']['header'], $_POST['page_title']);
$message .= sprintf($templates['body'], $comment['author'], $comment['author_ip'], $comment['author_email'], $comment['author_url'], $comment['comment']);
$message .= sprintf($templates['new_comment']['footer'], $_POST['page_url'], $_POST['comment_url']);
} else {
$subject = sprintf($templates['moderate']['subject'], $_POST['page_title']);
$message = sprintf($templates['moderate']['header'], $_POST['page_title']);
$message .= sprintf($templates['body'], $comment['author'], $comment['author_ip'], $comment['author_email'], $comment['author_url'], $comment['comment']);
$url = Comments::config('base_url') . 'admin/?page=comments';
$message .= sprintf($templates['moderate']['footer'], $url . '&action=approve&comments%5B%5D=' . $comment['id'], $url . '&action=spam&comments%5B%5D=' . $comment['id'], $url . ($comment['status'] == 2 ? '&status=spam' : '') . '#edit-' . $comment['id']);
}
Comments::send_email($notif_email, $subject, $message);
}
if (!empty($_POST['reply']) and is_numeric($_POST['reply']) and Comments::config('reply_notification') and !empty($comment) and $comment['status'] == 1) {
$parent = Comments::get_comments(array('id' => $_POST['reply'], 'rows' => $rows));
if ($parent) {
$subject = sprintf($templates['reply']['subject'], $_POST['page_title']);
$message = sprintf($templates['reply']['body'], $comment['author'], $comment['comment'], $_POST['comment_url']);
Comments::send_email($parent['author_email'], $subject, $message);
}
}
}
unset($_SESSION['com_email_notif']);
break;
case 'refreshcaptcha':
Comments::captcha();
break;
}
}