b2evolution PHP Cross Reference Blogging Systems

Source: /skins/forums/_comments.disp.php - 70 lines - 2308 bytes - Text - Print

Description: This is the template that displays the links to the latest comments for a blog

   1  <?php
   2  /**

   3   * This is the template that displays the links to the latest comments for a blog

   4   *

   5   * This file is not meant to be called directly.

   6   * It is meant to be called by an include in the main.page.php template.

   7   * To display a feedback, you should call a stub AND pass the right parameters

   8   * For example: /blogs/index.php?disp=comments

   9   *

  10   * b2evolution - {@link http://b2evolution.net/}

  11   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}

  12   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}

  13   *

  14   * @package evoskins

  15   */
  16  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  17  
  18  $CommentList = new CommentList2( $Blog );
  19  
  20  // Filter list:

  21  $CommentList->set_filters( array(
  22          'types' => array( 'comment', 'trackback', 'pingback' ),
  23          'statuses' => get_inskin_statuses(),
  24          'order' => 'DESC',
  25          'comments' => 50,
  26          // fp> I don't think it's necessary to add a restriction here. (use case?)

  27          // 'timestamp_min' => $Blog->get_timestamp_min(),

  28          // 'timestamp_max' => $Blog->get_timestamp_max(),

  29      ) );
  30  
  31  // Get ready for display (runs the query):

  32  $CommentList->display_init();
  33  
  34  $CommentList->display_if_empty( array(
  35          'msg_empty' => T_('No replies yet...')
  36      ) );
  37  
  38  if( $CommentList->result_num_rows > 0 )
  39  {
  40  ?>
  41  <table id="styled_content_block" class="bForums fixed_layout" width="100%" cellspacing="1" cellpadding="2" border="0">
  42      <tr>
  43          <th class="col1"><?php echo T_('Author'); ?></th>
  44          <th><?php echo T_('Message'); ?></th>
  45      </tr>
  46  <?php
  47  while( $Comment = & $CommentList->get_next() )
  48  { // Loop through comments:
  49      // Load comment's Item object:

  50      $Item = $Comment->get_Item();
  51  
  52      // ------------------ COMMENT INCLUDED HERE ------------------

  53      skin_include( '_item_comment.inc.php', array(
  54              'Comment'              => & $Comment,
  55              'comment_start'        => '<div class="bText">',
  56              'comment_end'          => '</div>',
  57              'display_vote_helpful' => false,
  58          ) );
  59      // Note: You can customize the default item feedback by copying the generic

  60      // /skins/_item_comment.inc.php file into the current skin folder.

  61      // ---------------------- END OF COMMENT ---------------------

  62  
  63  }    // End of comment loop.

  64  ?>
  65  </table>
  66  <?php
  67  }
  68  
  69  echo_comment_moderate_js();
  70  ?>

title

Description

title

Description

title

Description

title

title

Body