b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: evoskins ] [ index: evoskins ] [ all elements ]

Source for file _lastcomments.php

Documentation is available at _lastcomments.php

  1. <?php
  2.     /**
  3.      * This is the template that displays the links to the last 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.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-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  13.      *
  14.      * @package evoskins
  15.      */
  16.     if!defined('DB_USER') ) die'Please, do not access this page directly.' );
  17.  
  18.     if$disp != 'comments' )
  19.     {    // We have not asked for comments to be displayed...
  20.         return false;        // Nothing to do here!
  21.     }
  22.  
  23.     $CommentList new CommentList$blog"'comment','trackback','pingback'"$show_statuses'',    '',    'DESC',    '',    20 );
  24.  
  25.     $CommentList->display_if_empty'<div class="bComment"><p>'.T_('No comment yet...').'</p></div>' );
  26.  
  27.     while$Comment $CommentList->get_next() )
  28.     {    // Loop through comments:    ?>
  29.         <!-- ========== START of a COMMENT ========== -->
  30.         <a name="c<?php $Comment->ID(?>"></a>
  31.         <div class="bComment">
  32.             <h3 class="bTitle">
  33.                 <?php echo T_('In response to:'?>
  34.                 <a href="<?php $Comment->Item->permalink(?>"><?php $Comment->Item->title''''false ?></a>
  35.             </h3>
  36.             <div class="bCommentTitle">
  37.                 <?php $Comment->author(?>
  38.                 <?php $Comment->author_url''' &middot; ''' ?>
  39.             </div>
  40.             <div class="bCommentText">
  41.                 <?php $Comment->content(?>
  42.             </div>
  43.             <div class="bCommentSmallPrint">
  44.                 <a href="<?php $Comment->permalink(?>" title="<?php echo T_('Permanent link to this comment'?>" class="permalink_right"><img src="<?php imgbase(?>chain_link.gif" alt="<?php echo T_('Permalink'?>" width="14" height="14" border="0" class="middle" /></a>
  45.                 <?php $Comment->date(?> @ <?php $Comment->time'H:i' ?>
  46.                 <?php $Comment->edit_link' &middot; ' // Link to backoffice for editing ?>
  47.             </div>
  48.         </div>
  49.         <!-- ========== END of a COMMENT ========== -->
  50.         <?php
  51.     }    // End of comment loop.
  52. ?>

Documentation generated on Tue, 20 May 2008 01:55:21 +0200 by phpDocumentor 1.4.2