<?php
/**
 * This is the template that displays the links to the last comments for a blog
 *
 * This file is not meant to be called directly.
 * It is meant to be called by an include in the _main.php template.
 * To display a feedback, you should call a stub AND pass the right parameters
 * For example: /blogs/index.php?disp=comments
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
 * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}
 *
 * @package evoskins
 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );


if( $disp != 'comments' )
{	// We have not asked for comments to be displayed...
	return false;		// Nothing to do here!
}

$CommentList = & new CommentList( $blog, "'comment','trackback','pingback'", array('published'), '',	'',	'DESC',	'',	20 );

$CommentList->display_if_empty( '<div class="bComment"><p>'.T_('No comment yet...').'</p></div>' );

while( $Comment = & $CommentList->get_next() )
{ // Loop through comments:
	// Load comment's Item object:
	$Comment->get_Item();
	?>
	<!-- ========== START of a COMMENT ========== -->
	<?php $Comment->anchor() ?>
	<div class="bComment">
	  <div class="centerTitle">
			<?php echo T_('In response to:') ?>
			<?php $Comment->Item->permanent_link( '#title#' ) ?>
		</div>
		<div class="centerContent">

		<div class="bCommentText">
			<?php $Comment->content() ?>
		</div>
		<div class="bCommentSmallPrint">
		  <?php echo T_('posted by') ?>: 
		  <?php $Comment->author() ?>
  		<?php $Comment->author_url( '', ' &middot; ', '' ) ?>
			<?php	$Comment->permanent_link( '#', '#', 'permalink_right' ); ?>
			on <?php $Comment->date() ?> @ <?php $Comment->time( 'H:i' ) ?>
			<?php $Comment->edit_link( ' &middot; ' ) // Link to backoffice for editing ?>
			<?php $Comment->delete_link( ' &middot; ' ); // Link to backoffice for deleting ?>
		</div>
		</div>
	</div>
	<!-- ========== END of a COMMENT ========== -->
	<?php
}	// End of comment loop.


/*
 nolog */
?>
