public function __construct() { if (\Comments::config('db_prefix')) { $this->prefix = \Comments::config('db_prefix'); } else { $this->prefix = null; } }
?> , 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}}">
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; } }