b2evolution PHP Cross Reference Blogging Systems

Source: /skins/terrafirma/_item_comment.inc.php - 107 lines - 2803 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   * @package evoskins
   8   * @subpackage terrafirma
   9   */
  10  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  11  
  12  
  13  // Default params:
  14  $params = array_merge( array(
  15      'comment_start'  => '<div class="bComment">',
  16      'comment_end'    => '</div>',
  17      'Comment'        => NULL, // This object MUST be passed as a param!
  18      ), $params );
  19  
  20  /**
  21   * @var Comment
  22   */
  23  $Comment = & $params['Comment'];
  24  
  25  ?>
  26  <!-- ========== START of a COMMENT/TB/PB ========== -->
  27  <?php
  28      $Comment->anchor();
  29    echo $params['comment_start'];
  30  ?>
  31      <div class="bCommentTitle">
  32      <?php
  33          if( $Comment->status != 'published' )
  34          {
  35              $Comment->status( 'styled' );
  36          }
  37  
  38          if( !empty($Comment->author_user_ID) && $Comment->author_user_ID == $Item->Author->ID )
  39          {    // This comment was posted by the author
  40              // Di special color?
  41          }
  42  
  43  
  44          switch( $Comment->get( 'type' ) )
  45          {
  46              case 'comment': // Display a comment:
  47                  if( empty($Comment->ID) )
  48                  {    // PREVIEW comment
  49                      echo T_('PREVIEW Comment from:').' ';
  50                  }
  51                  else
  52                  {    // Normal comment
  53                      $Comment->permanent_link( array(
  54                              'before'    => '',
  55                              'after'     => ' ',
  56                              'text'         => '&#035;',
  57                              'nofollow'    => true,
  58                          ) );
  59                  }
  60                  $Comment->author( '', '', '', '#', 'htmlbody', true, 'preferredname' );
  61                  $Comment->msgform_link( $Blog->get('msgformurl') );
  62                  break;
  63  
  64              case 'trackback': // Display a trackback:
  65                  $Comment->permanent_link( array(
  66                          'before'    => '',
  67                          'after'     => ' ',
  68                          'text'         => T_('Trackback: '),
  69                          'nofollow'    => true,
  70                      ) );
  71                  $Comment->author( '', '#', '', '#', 'htmlbody', true, 'preferredname' );
  72                  break;
  73  
  74              case 'pingback': // Display a pingback:
  75                  $Comment->permanent_link( array(
  76                          'before'    => '',
  77                          'after'     => ' ',
  78                          'text'         => T_('Pingback: '),
  79                          'nofollow'    => true,
  80                      ) );
  81                  $Comment->author( '', '#', '', '#', 'htmlbody', true, 'preferredname' );
  82                  break;
  83          }
  84      ?>
  85      <em>on <?php $Comment->date() ?> at <?php $Comment->time( 'H:i' ) ?>
  86  
  87      <?php
  88          $comment_Item = & $Comment->get_Item();
  89          $Comment->edit_link( ' &nbsp; ', ' ', '#', '#', '', '&amp;', true, rawurlencode( $Comment->get_permanent_url() ) ); /* Link for editing */
  90          $Comment->delete_link( ' &nbsp; ', ' ', '#', '#', '', false, '&amp;', true, false, '#', rawurlencode( $comment_Item->get_permanent_url() ) ); /* Link for deleting */
  91      ?>
  92      </em>
  93  
  94      <?php
  95          $Comment->rating();
  96      ?>
  97      </div>
  98      <div class="bCommentText">
  99          <?php
 100              $Comment->content();
 101          ?>
 102          <?php $Comment->reply_link( '<br />' ); /* Link for replying to the Comment */ ?>
 103      </div>
 104  <?php
 105    echo $params['comment_end'];
 106  ?>
 107  <!-- ========== END of a COMMENT/TB/PB ========== -->

title

Description

title

Description

title

Description

title

title

Body