Ejemplo n.º 1
0
         $comment_attachments = $Comment->preview_attachments;
         // checked_attachments contains all attachment file IDs which checkbox was checked in
         $checked_attachments = $Comment->checked_attachments;
         // for visitors:
         $comment_author = $Comment->author;
         $comment_author_email = $Comment->author_email;
         $comment_author_url = $Comment->author_url;
         // Display error messages again after preview of comment
         global $Messages;
         $Messages->display();
     }
     // delete any preview comment from session data:
     $Session->delete('core.preview_Comment');
 } else {
     // New comment:
     if (($Comment = get_comment_from_session()) == NULL) {
         // there is no saved Comment in Session
         $Comment = new Comment();
         if (!empty($PageCache) && $PageCache->is_collecting) {
             // This page is going into the cache, we don't want personal data cached!!!
             // fp> These fields should be filled out locally with Javascript tapping directly into the cookies. Anyone JS savvy enough to do that?
             $comment_author = '';
             $comment_author_email = '';
             $comment_author_url = '';
         } else {
             // Get params from $_COOKIE
             $comment_author = param_cookie($cookie_name, 'string', '');
             $comment_author_email = evo_strtolower(param_cookie($cookie_email, 'string', ''));
             $comment_author_url = param_cookie($cookie_url, 'string', '');
         }
         if (empty($comment_author_url)) {
Ejemplo n.º 2
0
 // Filter list:
 $CommentList->set_default_filters(array('types' => $type_list, 'statuses' => NULL, 'post_ID' => $Item->ID, 'order' => $Blog->get_setting('comments_orderdir'), 'threaded_comments' => $Blog->get_setting('threaded_comments')));
 $CommentList->load_from_Request();
 // Get ready for display (runs the query):
 $CommentList->display_init();
 // Set redir=no in order to open comment pages
 memorize_param('redir', 'string', '', 'no');
 if ($Blog->get_setting('paged_comments')) {
     // Prev/Next page navigation
     $CommentList->page_links(array('page_url' => url_add_tail($Item->get_permanent_url(), '#comments')));
 }
 if ($Blog->get_setting('threaded_comments')) {
     // Array to store the comment replies
     global $CommentReplies;
     $CommentReplies = array();
     if ($Comment = get_comment_from_session('preview')) {
         // Init PREVIEW comment
         if ($Comment->item_ID == $Item->ID) {
             $CommentReplies[$Comment->in_reply_to_cmt_ID] = array($Comment);
             // Change the styles for preview comment
             $params['before_section_title'] = '<h3 id="com-head" onclick="bnc_showhide_coms_toggle();" class="comhead-open"><img alt="arrow" src="' . $Skin->get_url() . 'img/com_arrow.png" id="com-arrow" class="com-arrow-down" />';
             $params['comment_list_start'] = '<ol id="commentlist" class="commentlist" style="display:block">';
             $params['preview_start'] = '<li id="comment_preview"><div class="comwrap">';
             $params['preview_end'] = '</div></li>';
         }
     }
 }
 echo $rating_summary;
 if ($params['disp_section_title']) {
     // Display title
     echo $params['before_section_title'];