[ Index ]
 

Code source de b2evolution 2.1.0-beta

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/blogs/inc/comments/views/ -> _comment_list.inc.php (source)

   1  <?php
   2  /**

   3   * This file implements the comment list

   4   *

   5   * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.

   6   * See also {@link http://sourceforge.net/projects/evocms/}.

   7   *

   8   * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}.

   9   * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.

  10   *

  11   * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)

  12   *

  13   * @package admin

  14   *

  15   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}

  16   * @author fplanque: Francois PLANQUE.

  17   *

  18   * @version $Id: _comment_list.inc.php,v 1.4 2007/09/07 21:11:10 fplanque Exp $

  19   */
  20  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  21  
  22  /**

  23   * @var Comment

  24   */
  25  global $Comment;
  26  /**

  27   * @var Blog

  28   */
  29  global $Blog;
  30  /**

  31   * @var CommentList

  32   */
  33  global $CommentList;
  34  
  35  global $dispatcher;
  36  
  37  while( $Comment = & $CommentList->get_next() )
  38  { // Loop through comments:
  39      ?>
  40      <!-- ========== START of a COMMENT/TB/PB ========== -->
  41      <div id="c<?php echo $Comment->ID ?>" class="bComment bComment<?php $Comment->status('raw') ?>">
  42          <div class="bSmallHead">
  43              <?php
  44                  echo '<div class="bSmallHeadRight">';
  45                  echo T_('Visibility').': ';
  46                  echo '<span class="bStatus">';
  47                  $Comment->status();
  48                  echo '</span>';
  49                  echo '</div>';
  50              ?>
  51              <span class="bDate"><?php $Comment->date(); ?></span>
  52              @
  53              <span class="bTime"><?php $Comment->time( 'H:i' ); ?></span>
  54              <?php
  55              if( $Comment->author_url( '', ' &middot; Url: <span class="bUrl">', '</span>' )
  56                      && $current_User->check_perm( 'spamblacklist', 'edit' ) )
  57              { // There is an URL and we have permission to ban...
  58                  // TODO: really ban the base domain! - not by keyword

  59                  echo ' <a href="'.$dispatcher.'?ctrl=antispam&amp;action=ban&amp;keyword='.rawurlencode(get_ban_domain($Comment->author_url))
  60                      .'">'.get_icon( 'ban' ).'</a> ';
  61              }
  62              $Comment->author_email( '', ' &middot; Email: <span class="bEmail">', '</span>' );
  63              $Comment->author_ip( ' &middot; IP: <span class="bIP">', '</span>' );
  64              echo ' &middot; <span class="bKarma">';
  65              $Comment->spam_karma( T_('Spam Karma').': %s%', T_('No Spam Karma') );
  66              echo '</span>';
  67           ?>
  68          </div>
  69          <div class="bCommentContent">
  70          <div class="bTitle">
  71              <?php
  72              $comment_Item = & $Comment->get_Item();
  73              echo T_('In response to:')
  74                  .' <a href="?ctrl=items&amp;blog='.$Blog->ID.'&amp;p='.$comment_Item->ID.'">'.$comment_Item->dget('title').'</a>';
  75              ?>
  76          </div>
  77          <div class="bCommentTitle">
  78          <?php
  79              switch( $Comment->get( 'type' ) )
  80              {
  81                  case 'comment': // Display a comment:
  82                      echo T_('Comment from') ?>
  83                      <?php break;
  84  
  85                  case 'trackback': // Display a trackback:
  86                      echo T_('Trackback from') ?>
  87                      <?php break;
  88  
  89                  case 'pingback': // Display a pingback:
  90                      echo T_('Pingback from') ?>
  91                      <?php break;
  92              }
  93          echo ': ';
  94          ?>
  95          <?php $Comment->author() ?>
  96          </div>
  97          <div class="bCommentText">
  98              <?php $Comment->content() ?>
  99          </div>
 100          </div>
 101          <div class="CommentActionsArea">
 102              <?php
 103                  $Comment->permanent_link( '#', '#', 'permalink_right' );
 104  
 105                  // Display edit button if current user has the rights:

 106                  $Comment->edit_link( ' ', ' ', '#', '#', 'ActionButton');
 107  
 108                  // Display publish NOW button if current user has the rights:

 109                  $Comment->publish_link( ' ', ' ', '#', '#', 'PublishButton', '&amp;', true );
 110  
 111                  // Display deprecate button if current user has the rights:

 112                  $Comment->deprecate_link( ' ', ' ', '#', '#', 'DeleteButton', '&amp;', true );
 113  
 114                  // Display delete button if current user has the rights:

 115                  $Comment->delete_link( ' ', ' ', '#', '#', 'DeleteButton');
 116              ?>
 117             <div class="clear"></div>
 118          </div>
 119  
 120      </div>
 121      <!-- ========== END of a COMMENT/TB/PB ========== -->
 122      <?php //end of the loop, don't delete
 123  }
 124  
 125  /*

 126   * $Log: _comment_list.inc.php,v $

 127   * Revision 1.4  2007/09/07 21:11:10  fplanque

 128   * superstylin' (not even close)

 129   *

 130   * Revision 1.3  2007/09/04 19:51:28  fplanque

 131   * in-context comment editing

 132   *

 133   * Revision 1.2  2007/09/03 18:32:50  fplanque

 134   * enhanced dashboard / comment moderation

 135   *

 136   * Revision 1.1  2007/06/25 10:59:43  fplanque

 137   * MODULES (refactored MVC)

 138   *

 139   * Revision 1.12  2007/05/20 20:54:49  fplanque

 140   * better comment moderation links

 141   *

 142   * Revision 1.11  2007/04/26 00:11:08  fplanque

 143   * (c) 2007

 144   *

 145   * Revision 1.10  2006/12/12 02:53:57  fplanque

 146   * Activated new item/comments controllers + new editing navigation

 147   * Some things are unfinished yet. Other things may need more testing.

 148   */
 149  ?>


Généré le : Thu Nov 29 23:58:50 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics