b2evolution PHP Cross Reference Blogging Systems

Source: /inc/comments/views/_comment_list.inc.php - 69 lines - 2108 bytes - Text - Print

Description: This file implements the comment list This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}. See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**
   3   * This file implements the comment list
   4   *
   5   * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.
   6   * See also {@link http://sourceforge.net/projects/evocms/}.
   7   *
   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}.
   9   * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.
  10   *
  11   * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
  12   *
  13   * @package admin
  14   *
  15   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  16   * @author fplanque: Francois PLANQUE.
  17   *
  18   * @version $Id: _comment_list.inc.php 6136 2014-03-08 07:59:48Z manuel $
  19   */
  20  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  21  
  22  /**
  23   * @var Comment
  24   */
  25  global $Comment;
  26  /**
  27   * @var Blog
  28   */
  29  global $Blog;
  30  /**
  31   * @var CommentList
  32   */
  33  global $CommentList;
  34  
  35  global $current_User;
  36  
  37  global $dispatcher;
  38  
  39  // If rediret_to was not set, create new redirect
  40  $redirect_to = param( 'redirect_to', 'url', regenerate_url( '', 'filter=restore', '', '&' ) );
  41  $redirect_to = rawurlencode( $redirect_to );
  42  $save_context = param( 'save_context', 'boolean', 'true' );
  43  $show_comments = param( 'show_comments', 'string', 'all' );
  44  
  45  $item_id = param( 'item_id', 'integer', 0 );
  46  $currentpage = param( 'currentpage', 'integer', 0 );
  47  $comments_number = param( 'comments_number', 'integer', 0 );
  48  if( ( $item_id != 0 ) && ( $comments_number > 0 ) )
  49  {
  50      echo_pages( $item_id, $currentpage, $comments_number );
  51  }
  52  
  53  while( $Comment = & $CommentList->get_next() )
  54  { // Loop through comments:
  55      if( ( $show_comments == 'draft' ) && ( $Comment->get( 'status' ) != 'draft' ) )
  56      { // if show only draft comments, and current comment status isn't draft, then continue with the next comment
  57          continue;
  58      }
  59      echo '<div id="comment_'.$Comment->ID.'">';
  60      echo_comment( $Comment->ID, $redirect_to, $save_context );
  61      echo '</div>';
  62  } //end of the loop, don't delete
  63  
  64  if( ( $item_id != 0 ) && ( $comments_number > 0 ) )
  65  {
  66      echo_pages( $item_id, $currentpage, $comments_number );
  67  }
  68  
  69  ?>

title

Description

title

Description

title

Description

title

title

Body