当前位置: 首页>>代码示例>>PHP>>正文


PHP Comments::config方法代码示例

本文整理汇总了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;
     }
 }
开发者ID:idfluid,项目名称:comments,代码行数:8,代码来源:Database.php

示例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}}">
开发者ID:idfluid,项目名称:comments,代码行数:31,代码来源:template.php

示例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;
    }
}
开发者ID:idfluid,项目名称:comments,代码行数:31,代码来源:ajax.php


注:本文中的Comments::config方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。