By Benoit Gonneville Damme on Tuesday, 15 April 2014
Posted in General Issues
Replies 6
Likes 0
Views 1K
Votes 0
Hey there guys,

Weird stuff, since a while now, on blog page that are "teamblog" articles, the teamblog avatar AND the blogger avatar appear either one over each other or one under each other...

Like you can see in the screenshot, I've modify a bit the blog post image to have a sweet overlay displaying the title and avatar. I'd like to code something where :

- If it's a blog post by a blogger, the blogger avatar and name are displayed.
- if it's a blog post by a teamblog, the teamblog avatar and name are displayed.

			<div class="blog-horizonline">
<div class="blog-horizonline-inner">
<!-- @template: Avatar -->
<?php if( $system->config->get( 'layout_avatar' ) && $system->config->get( 'layout_avatar_in_read_blog' ) && $this->getParam( 'show_avatar_entry' ) ){ ?>
<!-- @template: Avatar -->
<?php echo $this->fetch( 'blog.avatar.php' , array( 'row' => $blog , 'customClass' => 'blog-read-avatar' ) ); ?>
<?php } ?>

<?php if( $this->getParam( 'show_author') ){ ?>
<span class="blog-author">Crafted with love
<?php echo JText::_( 'COM_EASYBLOG_BY' );?> <a href="<?php echo $blog->blogger->getProfileLink(); ?>" itemprop="author"><?php echo $blog->blogger->getName(); ?></a>
</span>
<?php } ?>
</div>
</div>


Anyway you could help me with that ?

Much appreciated !

B.
Hello Benoit,

Try the attached file below
·
Tuesday, 15 April 2014 10:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Mmmh, I've tried to add it to my code, but the only thing it would do is crash the website ;-)

Attach is the file I'm using. Code for the avatar is starting at line 51

B.
·
Tuesday, 15 April 2014 11:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Basicaly I'm trying to achieve something like that inside the
<div class="blog-horizonline-inner">

<!-- IF POST CREATED BY USER -->
<?php echo $this->fetch( [AUTHOR_AVATAR] ); ?>
<span class="blog-author">Crafted with love by [NAME OF AUTHOR]</span>

<!-- IF POST CREATED BY TEAMBLOG -->
<?php echo $this->fetch( [TEAMBLOG_AVATAR] ); ?>
<span class="blog-author">Crafted with love by [NAME OF TEAMBLOG]</span>

</div>


I obviously have no coding skills tho...hahaha

B.
·
Tuesday, 15 April 2014 11:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Benoit,

If you use my file above, it already has the logics in place
·
Tuesday, 15 April 2014 16:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Ah ! I thought I had to insert your code somewhere, just had to copy the whole file.

Cool, works perfectly, thanks

B.
·
Tuesday, 15 April 2014 22:36
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome
·
Tuesday, 15 April 2014 23:01
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post