On a page I´m working on, users can submit comments on blog posts and their avatars are showed. Althought I can retrieve alle the information about the comment author, when I query for its avatar, the query allways return empty, even if all information is there. Is there anything I´m missing?
The example link is: http://www.natives.de/blogeintrag/items/59.html
and the template code is as follows:
PHP Code:
<?php
$this->import('Database');
$authoravatar = $this->Database->prepare("SELECT xt_avatar FROM tl_user WHERE email=?")
->execute($this->email);
//var_dump($authoravatar);
?>
<div class="comment_default<?php echo $this->class; ?>" id="<?php echo $this->id; ?>">
<h3 class="info"><strong><?php if ($this->website): ?><a href="<?php echo $this->website; ?>" rel="nofollow" target="_blank"><?php endif; ?><?php echo $this->name; ?><?php if ($this->website): ?></a><?php endif; ?></strong> <time datetime="<?php echo $this->datetime; ?>" class="date"><?php echo $this->date; ?></time></h3>
<div class="authoravatar">
{{image::<?php echo $authoravatar->xt_avatar =='' ? 'tl_files/theme/image/notauser.png' : $authoravatar->xt_avatar; ?>?width=102&height=87&alt=<?php echo $this->name; ?>}}
</div>
<div class="comment">
<?php echo $this->comment; ?>
</div>
<?php if ($this->addReply): ?>
<div class="reply">
<p class="info"><?php echo $this->rby; ?> <?php echo $this->authorName; ?></p>
<div class="comment">
<?php echo $this->reply; ?>
</div>
</div>
<?php endif; ?>
</div>
I tried everything but cant find how to return the avatars. Any Though? Any help is more than appreciated!
Bookmarks