Use the theme's avatar as the default if Gravatar doesn't have one.

This commit is contained in:
Bharat Mediratta
2009-01-10 06:18:35 +00:00
parent 5690e58c45
commit 9b90b4b0cd
7 changed files with 21 additions and 13 deletions

View File

@@ -2,10 +2,13 @@
<ul>
<? foreach ($comments as $comment): ?>
<li>
<img width="40" height="40"
src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>"
class="gAvatar" alt="<?= $comment->author_name() ?>" />
<?= date("Y-M-d H:i:s", $comment->created) ?>
<?= t("{{author_name}} said {{comment_text}}",
array("author_name" => "<a href=\"#\">$comment->author</a>",
"comment_text" => "<i>\"" . text::limit_words($comment->text, 50) . "\"</i>")); ?>
<?= t("<a href=#>{{author_name}}</a> said <i>{{comment_text}}</i>",
array("author_name" => $comment->author_name(),
"comment_text" => text::limit_words($comment->text, 50))); ?>
</li>
<? endforeach ?>
</ul>