• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List

system/plugins/coreblocks/block.recent_comments.php

00001 <?php if ( !defined( 'HABARI_PATH' ) ) { die( 'No direct access' ); } ?>
00002 <ul id="recent_comments">
00003   <?php $comments = $content->recent_comments; foreach( $comments as $comment): ?>
00004     <li>
00005 <?php
00006     if ( $comment->url ) {
00007       $name_html = sprintf('<a class="username" href="%s">%s</a>',
00008         $comment->url, $comment->name);
00009     }
00010     else {
00011       $name_html = sprintf('<span class="username">%s</span>',
00012         $comment->name);
00013     }
00014     $post_html = sprintf('<a href="%s">%s</a>',
00015       $comment->post->permalink, $comment->post->title);
00016     // @locale An item in the "Comments" menu list showing that a user commented on a post ("user on post")
00017     _e('%1$s on %2$s', array( $name_html, $post_html ));
00018 ?>
00019     </li>
00020   <?php endforeach; ?>
00021 </ul>

Generated on Sun Aug 4 2013 12:51:44 for Habari by  doxygen 1.7.1