b2evolution PHP Cross Reference Blogging Systems

Source: /skins/glossyblue/_item_comment.inc.php - 94 lines - 2944 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 glossyblue

  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  /* This variable is for alternating comment background */

  25  global $glossyblue_oddcomment;
  26  
  27  /**

  28   * @var Comment

  29   */
  30  $Comment = & $params['Comment'];
  31  
  32  ?>
  33  <!-- ========== START of a COMMENT/TB/PB ========== -->
  34  <?php
  35      echo str_replace( 'class=""', 'class="'.$glossyblue_oddcomment.'"', $params['comment_start'] );
  36      if( $Comment->status != 'published' )
  37      {
  38          $Comment->status( 'styled' );
  39      }
  40      $Comment->anchor();
  41  ?>
  42  
  43      <?php
  44          switch( $Comment->get( 'type' ) )
  45          {
  46              case 'comment': // Display a comment:
  47                  $Comment->permanent_link( array(
  48                      'before'    => '',
  49                      'after'     => ' ',
  50                      'text' => '&#167; ',
  51                      'nofollow' => true,
  52                  ) );
  53                  $Comment->author( '', '', '', '&#174;', 'htmlbody', true, 'preferredname' );
  54                  $Comment->msgform_link( $Blog->get('msgformurl') );
  55  
  56                  $commented_Item = & $Comment->get_Item();
  57                  echo ' '.T_('said on :').' <small class="commentmetadata">';
  58                  $Comment->date() ?> @ <?php $Comment->time( 'H:i' );
  59                  $Comment->edit_link( '', '', get_icon( 'edit' ), '#', '', '&amp;', true, rawurlencode( $Comment->get_permanent_url() ) );
  60                  $Comment->delete_link( '', '', get_icon( 'delete' ), '#', '', false, '&amp;', true, false, '#', rawurlencode( $commented_Item->get_permanent_url() ) );
  61                  echo '</small>';
  62                  break;
  63  
  64              case 'trackback': // Display a trackback:
  65                  $Comment->permanent_link( T_('Trackback') );
  66                  echo ' '.T_('from:').' ';
  67                  $Comment->author( '', '#', '', '#', 'htmlbody', true, 'preferredname' );
  68                  break;
  69  
  70              case 'pingback': // Display a pingback:
  71                  $Comment->permanent_link( T_('Pingback') );
  72                  echo ' '.T_('from:').' ';
  73                  $Comment->author( '', '#', '', '#', 'htmlbody', true, 'preferredname' );
  74                  break;
  75          }
  76      ?>
  77  
  78      <?php $Comment->rating(); ?>
  79      <div class="bCommentText">
  80          <?php $Comment->content() ?>
  81          <?php $Comment->reply_link( '<br />' ); /* Link for replying to the Comment */ ?>
  82      </div>
  83      <div class="bCommentSmallPrint">
  84  
  85  
  86  
  87      </div>
  88  <?php
  89      echo $params['comment_end'];
  90  
  91      /* Changes every other comment to a different class */

  92      $glossyblue_oddcomment = 'alt' == $glossyblue_oddcomment ? '' : 'alt';
  93  ?>
  94  <!-- ========== END of a COMMENT/TB/PB ========== -->

title

Description

title

Description

title

Description

title

title

Body