b2evolution PHP Cross Reference Blogging Systems

Source: /skins/basic/_item_comment.inc.php - 68 lines - 2167 bytes - Text - Print

Description: This is the template that displays a single comment This file is not meant to be called directly.

   1  <?php
   2  /**

   3   * This is the template that displays a single comment

   4   *

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

   6   *

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

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

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

  10   *

  11   * @package evoskins

  12   * @subpackage basic

  13   */
  14  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  15  
  16  
  17  // Default params:

  18  $params = array_merge( array(
  19          'comment_start'        => '<div class="bComment">',
  20          'comment_end'          => '</div>',
  21          'Comment'              => NULL, // This object MUST be passed as a param!
  22      ), $params );
  23  
  24  /**

  25   * @var Comment

  26   */
  27  $Comment = & $params['Comment'];
  28  
  29  ?>
  30  <!-- ========== START of a COMMENT/TB/PB ========== -->
  31  <?php $Comment->anchor() ?>
  32  <?php echo $params['comment_start']; ?>
  33  <h5>
  34  <?php
  35      switch( $Comment->get( 'type' ) )
  36      {
  37          case 'comment': // Display a comment:
  38              echo T_('Comment from:') ?>
  39              <?php $Comment->author( '', '#', '', '#', 'htmlbody', false, 'preferredname' ) ?>
  40              <?php $Comment->author_url( '', ' &middot; ', '' ) ?>
  41              <?php break;
  42  
  43          case 'trackback': // Display a trackback:
  44              echo T_('Trackback from:') ?>
  45              <?php $Comment->author( '', '#', '', '#', 'htmlbody', true, 'preferredname' ) ?>
  46              <?php break;
  47  
  48          case 'pingback': // Display a pingback:
  49              echo T_('Pingback from:') ?>
  50              <?php $Comment->author( '', '#', '', '#', 'htmlbody', true, 'preferredname' ) ?>
  51              <?php break;
  52      }
  53  
  54      $Comment->edit_link( ' &middot; ', ' ', '#', '#', '', '&amp;', true, rawurlencode( $Comment->get_permanent_url() ) ); // Link to backoffice for editing

  55  
  56      if( $Comment->status != 'published' )
  57      {
  58          echo ' &middot; '.T_('Status').': '.$Comment->get_status();
  59      }
  60  ?>
  61  </h5>
  62  <blockquote>
  63      <small><?php $Comment->date() ?> @ <?php $Comment->time( 'H:i' ) ?></small>
  64      <div><?php $Comment->content() ?></div>
  65      <?php $Comment->reply_link(); /* Link for replying to the Comment */ ?>
  66  </blockquote>
  67  <?php echo $params['comment_end']; ?>
  68  <!-- ========== END of a COMMENT/TB/PB ========== -->

title

Description

title

Description

title

Description

title

title

Body