Adding MyBlogLog Avatars Next to Comments and making it look good
Some may have noticed I added the plugin MyBlogLog Avatars, This plugin adds the commenter’s avatar from MyBlogLog to their comment. Problem is that you have to add a small piece of code to your comments area.
The code looks like this:
<?php if(function_exists('MyAvatars')) MyAvatars(); ?>
Not that hard, but to make it look good to your readers may take a little bit more than some bloggers know, so here’s some help.
Use tables around the code for the plugin and your comments. Listed below is the code with tables. I will bold the code area that you will see in your theme, take those bits of code and place within the table.. it’s easier to show it than explain it.
<table><tr><td><?php if(function_exists('MyAvatars')) MyAvatars(); ?></td><td width="10"></td><td><?php comment_text() ?></td></tr></table> <p class="comment-metadata">Posted on <?php comment_date('d-M-y') ?> at <?php comment_time('g:i a') ?>
Looks like this:
Notice that there is a table setup, the first php code is the Avatar plugin and the second php code is your comments. After the table is the date and time the comment was made. (not shown is the code with the commenter’s webpage name and linkback, those are above the table in this example)
<table><tr><td><?php if(function_exists('MyAvatars')) MyAvatars(); ?></td><td width="10"></td><td><strong><p class="comment-author"></strong><?php comment_author_link() ?><br><?php comment_date('d-M-y') ?> at <?php comment_time('g:i a') ?></td</tr></table><?php comment_text() ?>
Looks Like this:
In Example 2 we’ve added the date and time of the comment to the table. So again the first php code is the MyBlogLog Avatar code, the next php is the the author with a link to his webpage and then the next php code is the date and time of the comment. After the table is then the code for the comment since the table was just for formatting the avatar, commenter and the time/date.
(oops don’t worry about the pink in the above image, you will not get that, it’s a plugin on my PC showing nofollow links in pink, sorry)