function avatar_for($author)
{
    if ($author->getAvatar()) {
        return image_tag($author->getAvatar());
    } else {
        return gravatar_image_tag($author->getEmail());
    }
}
Exemple #2
0
 <td rowspan="2" class="infos">
   <a name="<?php echo $i ?>" class="ancre">#<?php echo $i ?></a>
   <?php if(!$obj->is_delete): ?>
     <?php echo link_to_function(
             image_tag('/vjCommentPlugin/images/comments.png', array( 'alt' => 'reply' )) ,
             "reply('".$obj->getId()."','".$obj->getAuthor()."')",
             array('title' => __('Reply to this comment', array(), 'vjComment'))) ?>
     <?php echo link_to_function(
           image_tag('/vjCommentPlugin/images/error.png', array( 'alt' => 'report' )) ,
           'window.open(
             \''.url_for('@comment_reporting?id='.$obj->getId().'&num='.$i).'\',
             \''.__('Add new comment', array(), 'vjComment').'\',
               "menubar=no, status=no, scrollbars=no, menubar=no, width=565, height=300")',
           array('target' => '_blank', 'title' => __('Report this comment - New window', array(), 'vjComment') )) ?><br />
   <?php endif; ?>
   <?php if(commentTools::isGravatarAvailable() && !$obj->is_delete): ?>
     <?php echo gravatar_image_tag($obj->getEmail()) ?>
   <?php endif ?>
 </td>
Exemple #3
0
    ?>
</span>
  <br style='clear:both' />
<?php 
}
?>

<?php 
if ($user['Author']) {
    ?>
  <?php 
    use_helper("Gravatar");
    ?>

  <?php 
    echo gravatar_image_tag($user['Author']['email']);
    ?>
  <?php 
    if ($user['Author']['first_name']) {
        ?>
    <p>
      <strong>Name:</strong>  
      <span class='author-name'>
        <?php 
        echo mail_to($user['Author']['email'], $user['Author']['first_name'] . ' ' . $user['Author']['last_name']);
        ?>
      </span>
    </p>  
  <?php 
    }
    ?>
Exemple #4
0
?>
" class="ancre">#<?php 
echo $i;
?>
</a>
        <?php 
if (!$obj->is_delete) {
    ?>
          <?php 
    echo link_to_function(image_tag('/vjCommentPlugin/images/comments.png', array('alt' => 'reply')), "reply('" . $obj->getId() . "','" . $obj->getAuthor() . "')", array('title' => __('Reply to this comment', array(), 'vjComment')));
    ?>
          <?php 
    echo link_to_function(image_tag('/vjCommentPlugin/images/error.png', array('alt' => 'report')), 'window.open(
                  \'' . url_for('@commentReport?id=' . $obj->getId() . '&num=' . $i) . '\',
                  \'' . __('Add new comment', array(), 'vjComment') . '\',
                    "menubar=no, status=no, scrollbars=no, menubar=no, width=565, height=300")', array('target' => '_blank', 'title' => __('Report this comment - New window', array(), 'vjComment')));
    ?>
<br />
        <?php 
}
?>
        <?php 
if (commentTools::isGravatarAvailable() && !$obj->is_delete) {
    ?>
          <?php 
    echo gravatar_image_tag($obj->getAuthorEmail());
    ?>
        <?php 
}
?>
      </td>
<?php $cls = 'recentcommentsavatar' ?>
<table class="<?php echo $cls ?>" cellspacing="0" cellpadding="0" border="0">
  <tbody>
    <?php $i = 1 ?>
    <?php foreach($comments as $comment): ?>
      <?php $commentableObject = $comment->getCommentableObject() ?>
      <?php $suffix = $i == 1 ? 'top' : 'end' ?>
      <tr>
        <?php if ($use_gravatar): ?>
        <td class="<?php echo $cls.$suffix ?>" style="height: 32px; width: 32px" title="<?php echo $comment->getAuthorName() ?>">
          <?php if ($comment->getAuthorUrl()): ?>
          <a rel="nofollow" href="<?php echo $comment->getAuthorUrl() ?>">
            <?php echo gravatar_image_tag($comment->getAuthorEmail(), null, 32) ?>
          </a>
          <?php else: ?>
            <?php echo gravatar_image_tag($comment->getAuthorEmail(), null, 32) ?>
          <?php endif; ?>
        </td>
        <?php endif; ?>
        <td class="recentcommentstext<?php echo $suffix?>">
          <?php if ($comment->getAuthorUrl()): ?>
            <a rel="nofollow" href="<?php echo $comment->getAuthorUrl() ?>"><?php echo $comment->getAuthorName() ?></a>
          <?php else: ?>
            <?php echo $comment->getAuthorName() ?>
          <?php endif; ?>
          <?php echo __('on') ?>&nbsp;
          <?php if (false !== $url = url_for_commentable_object($commentableObject)): ?>
            <a href="<?php echo $url.'#comment-'.$comment->getId() ?>"><?php echo sfNestedCommentTools::ellipsis($commentableObject->__toString()) ?></a>
          <?php else: ?>
            <?php echo sfNestedCommentTools::ellipsis($commentableObject->__toString()) ?>
          <?php endif; ?>