b2evolution PHP Cross Reference Blogging Systems

Source: /inc/comments/views/_browse_comments.view.php - 116 lines - 3956 bytes - Text - Print

Description: This file implements the comment browsing 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 browsing
   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: _browse_comments.view.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, $show_statuses;
  34  
  35  global $dispatcher;
  36  
  37  global $current_User, $admin_url;
  38  
  39  /*
  40   * Display comments:
  41   */
  42  
  43  $CommentList->query();
  44  
  45  // Dispay a form to mass delete the comments:
  46  display_comment_mass_delete( $CommentList );
  47  
  48  $block_item_Widget = new Widget( 'block_item' );
  49  
  50  if( check_comment_mass_delete( $CommentList ) )
  51  {    // A form for mass deleting is availabl, Display link
  52      $block_item_Widget->global_icon( T_('Delete all comments!'), 'delete', regenerate_url( 'action', 'action=mass_delete' ), T_('Mass delete...'), 3, 3 );
  53  }
  54  
  55  if( $CommentList->is_filtered() )
  56  {    // List is filtered, offer option to reset filters:
  57      $block_item_Widget->global_icon( T_('Reset all filters!'), 'reset_filters', '?ctrl=comments&amp;blog='.$Blog->ID.'&amp;filter=reset', T_('Reset filters'), 3, 3 );
  58  }
  59  $emptytrash_link = '';
  60  // Display recycle bin placeholder, because users may have rights to recycle particular comments
  61  $opentrash_link = '<span id="recycle_bin" class="floatright"></span>';
  62  if( $current_User->check_perm( 'blogs', 'editall' ) )
  63  {
  64      if( $CommentList->is_trashfilter() )
  65      {
  66          $emptytrash_link = '<span class="floatright">'.action_icon( T_('Empty recycle bin'), 'recycle_empty', $admin_url.'?ctrl=comments&amp;blog='.$CommentList->Blog->ID.'&amp;action=emptytrash', T_('Empty recycle bin...'), 5, 3 ).'</span> ';
  67      }
  68      else
  69      {
  70          $opentrash_link = get_opentrash_link( false );
  71      }
  72  }
  73  $block_item_Widget->title = $opentrash_link.$emptytrash_link.T_('Feedback (Comments, Trackbacks...)');
  74  $block_item_Widget->disp_template_replaced( 'block_start' );
  75  
  76  // Display filters title
  77  echo $CommentList->get_filter_title( '<h3>', '</h3>', '<br />', NULL, 'htmlbody' );
  78  
  79  $display_params = array(
  80                  'header_start' => '<div class="NavBar center">',
  81                      'header_text' => '<strong>'.T_('Pages').'</strong>: $prev$ $first$ $list_prev$ $list$ $list_next$ $last$ $next$',
  82                      'header_text_single' => T_('1 page'),
  83                  'header_end' => '</div>',
  84                  'footer_start' => '',
  85                      'footer_text' => '<div class="NavBar center"><strong>'.T_('Pages').'</strong>: $prev$ $first$ $list_prev$ $list$ $list_next$ $last$ $next$<br />$page_size$</div>',
  86                      'footer_text_single' => '<div class="NavBar center">$page_size$</div>',
  87                          'prev_text' => T_('Previous'),
  88                          'next_text' => T_('Next'),
  89                          'list_prev_text' => T_('...'),
  90                          'list_next_text' => T_('...'),
  91                          'list_span' => 11,
  92                          'scroll_list_range' => 5,
  93                  'footer_end' => ''
  94              );
  95  
  96  $CommentList->display_if_empty();
  97  
  98  $CommentList->display_init( $display_params );
  99  
 100  // Display navigation:
 101  $CommentList->display_nav( 'header' );
 102  
 103  load_funcs( 'comments/model/_comment_js.funcs.php' );
 104  
 105  // Display list of comments:
 106  // comments_container value is -1, because in this case we have to show all comments in current blog (Not just one item comments)
 107  echo '<div id="comments_container" value="-1">';
 108  require dirname(__FILE__).'/_comment_list.inc.php';
 109  echo '</div>';
 110  
 111  // Display navigation:
 112  $CommentList->display_nav( 'footer' );
 113  
 114  $block_item_Widget->disp_template_replaced( 'block_end' );
 115  
 116  ?>

title

Description

title

Description

title

Description

title

title

Body