phpDocumentor pond
[ class tree: pond ] [ index: pond ] [ all elements ]

Source for file _comment_list.inc.php

Documentation is available at _comment_list.inc.php

  1. <?php
  2. /**
  3.  * This file implements the comment list
  4.  *
  5.  * This file is part of the Quam Plures project - {@link http://quamplures.net/}.
  6.  * See also {@link https://launchpad.net/quam-plures}.
  7.  *
  8.  * @copyright (c) 2009 - 2011 by the Quam Plures developers - {@link http://quamplures.net/}
  9.  * @copyright (c)2003-2009 by Francois PLANQUE - {@link http://fplanque.net/}.
  10.  *  Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.
  11.  *
  12.  * @license http://quamplures.net/license.html GNU General Public License (GPL)
  13.  *
  14.  *  {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  15.  * @author fplanque: Francois PLANQUE.
  16.  *
  17.  * @package pond
  18.  */
  19. if!defined('QP_MAIN_INIT') ) die'Please, do not access this page directly.' );
  20.  
  21. /**
  22.  * @var Comment 
  23.  */
  24. global $Comment;
  25. /**
  26.  * @var Blog 
  27.  */
  28. global $Blog;
  29. /**
  30.  * @var CommentList 
  31.  */
  32. global $CommentList;
  33.  
  34. global $dispatcher;
  35.  
  36. while$Comment $CommentList->get_next() )
  37. // Loop through comments:
  38.     ?>
  39.     <div id="c<?php echo $Comment->ID ?>" class="bComment bComment<?php $Comment->status('raw'?>">
  40.         <div class="bSmallHead">
  41.             <div class="bSmallHeadRight">
  42.             <?php echo T_('Visibility').': '?>
  43.             <span class="bStatus">
  44.             <?php $Comment->status()?>
  45.             </span>
  46.             </div>
  47.             <?php
  48.             // display the comment's date
  49.             $Comment->datearray(
  50.                 'before' => '<span class="bDate">',
  51.                 'after' => '</span> @ ',
  52.             ) );
  53.  
  54.             // display the comment's time
  55.             $Comment->timearray(
  56.                 'before' => '<span class="bTime">',
  57.                 'after' => '</span>',
  58.                 'format' => 'H:i',
  59.             ) );
  60.  
  61.             // display a link to comment author's URL
  62.             if$Comment->author_urlarray(
  63.                 'before' => ' &middot; Url: <span class="bUrl">',
  64.                 'after' => '</span>',
  65.             ) )
  66.                     && $current_User->check_perm'spamblacklist''edit' ) )
  67.             // There is an URL and we have permission to ban...
  68.                 // TODO: really ban the base domain! - not by keyword
  69.                 echo ' <a href="'.$dispatcher.'?ctrl=antispam&amp;action=ban&amp;keyword='.rawurlencode(get_ban_domain($Comment->author_url))
  70.                     .'&amp;aspm_source=reported">'.get_icon'ban' ).'</a> ';
  71.             }
  72.             // display mailto link to comment author's email
  73.             $Comment->author_emailarray(
  74.                 'before' => ' &middot; Email: <span class="bEmail">',
  75.                 'after' => '</span>',
  76.             ) );
  77.             // display comment author's IP address
  78.             $Comment->author_iparray(
  79.                 'before' => ' &middot; IP: <span class="bIP">',
  80.                 'after' => '</span>',
  81.             ) );
  82.             echo ' &middot; <span class="bKarma">';
  83.             $Comment->spam_karmaT_('Spam Karma').': %s%'T_('No Spam Karma') );
  84.             echo '</span>';
  85.          ?>
  86.         </div>
  87.         <div class="bCommentContent">
  88.         <div class="bTitle">
  89.             <?php
  90.             $comment_Item $Comment->get_Item();
  91.             echo T_('In response to')
  92.                 .': <a href="?ctrl=items&amp;blog='.$Blog->ID.'&amp;p='.$comment_Item->ID.'">'.$comment_Item->dget('title').'</a>';
  93.             ?>
  94.         </div>
  95.         <div class="bCommentTitle">
  96.             <?php echo $Comment->get_title()?>
  97.         </div>
  98.         <div class="bCommentText">
  99.             <?php
  100.             // display a comment's rating
  101.             $Comment->ratingarray() );
  102.             $Comment->content()// display the comment's contents
  103.             ?>
  104.         </div>
  105.         </div>
  106.         <div class="CommentActionsArea">
  107.             <?php
  108.             // display a permalink link to the comment
  109.             $Comment->permanent_linkarray(
  110.                 'class' => 'permalink_right',
  111.             ) );
  112.             // display a link to edit a comment
  113.             $Comment->edit_linkarray(
  114.                 'class' => 'ActionButton',
  115.             ) );
  116.             // display a link to publish a comment
  117.             $Comment->publish_linkarray(
  118.                 'class' => 'PublishButton',
  119.             ) );
  120.             // display a link to deprecate a comment
  121.             $Comment->deprecate_linkarray(
  122.                 'class' => 'DeleteButton',
  123.             ) );
  124.             // display a link to delete a comment
  125.             $Comment->delete_linkarray(
  126.                 'class' => 'DeleteButton',
  127.             ) );
  128.             ?>
  129.             <div class="clear"></div>
  130.         </div>
  131.  
  132.     </div>
  133.     <?php //end of the loop, don't delete
  134. }
  135.  
  136. ?>