Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Comments, trackbacks & pings (http://forum.bytesforall.com/forumdisplay.php?f=19)
-   -   [SOLVED] Avatar to the side of Comment (http://forum.bytesforall.com/showthread.php?t=5320)

kalookalei Jan 15, 2010 03:33 AM

[SOLVED] Avatar to the side of Comment
 
Is it possible to format the comment list like can be found at http://ma.tt/2008/04/identicons-from-gravatar/ I like the neatness of having the avatar outside the comment container.

pakacil Jan 28, 2010 06:05 AM

http://img694.imageshack.us/img694/7449/komen.jpg

actually, I don't know how to make it without table :o so, I just try to make it with table :)
I do hope someone can make it better later

open the bfa_custom_comments.php file
replace the file's content with this:

Code:

<?php
function bfa_comments($comment, $args, $depth) {

global $bfa_ata;
  $GLOBALS['comment'] = $comment; ?>
                <li <?php comment_class($class='clearfix') ?> id="comment-<?php comment_ID(); ?>">
                <div id="div-comment-<?php comment_ID(); ?>" class="clearfix comment-container<?php
                $comment = get_comment($comment_id);
                if ( $post = get_post($post_id) ) {
                        if ( $comment->user_id === $post->post_author )
                                echo ' bypostauthor';
                } ?>">
                <table width="100%">
                        <tr>
                                <td rowspan="2" width="60" valign="top">
                                <div class="comment-author vcard">
                                <?php if ($args['avatar_size'] != 0) echo get_avatar( $comment, $args['avatar_size'] ); ?>
                                </div>
                                </td>
                                <td height="40" valign="center" bgcolor="#EEEEE5">
                                <span style="margin-left: 10px" class="authorname"><?php comment_author_link(); ?></span>
                                <?php if ($comment->comment_approved == '0') : ?>
                                <em><?php echo $bfa_ata['comment_moderation_text']; ?></em><br />
                                <?php endif; ?>
                                <div class="comment-meta commentmetadata" style="margin-left: 10px">
                                <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
                                <?php printf(__('%1$s at %2$s','atahualpa'), get_comment_date(__('F jS, Y','atahualpa')),  get_comment_time()) ?></a>
                                <?php echo comment_reply_link(array('before' => '<span class="comment-reply-link">', 'after' => '</span>', 'reply_text' => $bfa_ata['comment_reply_link_text'], 'depth' => $depth, 'max_depth' => $args['max_depth'] ));  ?>
                                <?php edit_comment_link($bfa_ata['comment_edit_link_text'],'<span class="comment-edit-link">','</span>') ?> <?php delete_comment_link(get_comment_ID()); ?>
                                </div>
                                </td>
                        </tr>
                        <tr>
                                <td bgcolor="#EBF5FE"><div style="margin-left: 10px; margin-right: 10px"><?php comment_text() ?></div></td>
                        </tr>
                </table>
</div>
<?php } ?>

to make it more nice, maybe you should make Regular Comment Background Color and Alternating Comment Background Color have the same color. to do this, go to Style and configure COMMENTS on Atahualpa Options. Of course, you can change the cells color of table

Tried with:
• WordPress 2.9.1
• Atahualpa 3.4.5.1

kalookalei Jan 28, 2010 03:57 PM

Thank you very much.

kalookalei Jan 29, 2010 08:58 AM

Hi. I can't figure out what I'm doing wrong. The cell colors do not pass through to the site. I have tried changing the colors in the code to no avail. At this time the code is loaded without alteration. http://acentsview.com

I have set both of the comment background colors to #EBF5FE to make the table show. I would be happy to have the background of the avatar cell and the message cell to be the same color as the page #ffffff, and the title bar cell to be #eeeeee.

Thanks.

pakacil Jan 29, 2010 09:10 PM

Quote:

Originally Posted by kalookalei (Post 24123)
I would be happy to have the background of the avatar cell and the message cell to be the same color as the page #ffffff, and the title bar cell to be #eeeeee.

You mean... you want the comments appear like this?
http://img109.imageshack.us/img109/4702/komen3.jpg

try to do this...

change the title bgcolor to #EEEEEE
HTML Code:

<td height="40" valign="center" bgcolor="#EEEEEE">
change the comment bgcolor to #FFFFFF
HTML Code:

<td bgcolor="#FFFFFF"><div style="margin-left: 10px; margin-right: 10px"><?php comment_text() ?></div></td>
and then, go to Atahualpa Options, on Comments section and Style & configure COMMENTS tab, try to setup these:
• Highlight Author comments? → NO
• Border color for 2nd or lower level Author comments → FFFFFF
• Regular Comment Background Color → FFFFFF
• Alternating Comment Background Color → FFFFFF
• Border between single comments → solid 1px #FFFFFF

hope it will be like you want... :)

___
tried with:
- WordPress 2.9.1
- Atahualpa 3.4.5.1

kalookalei Jan 29, 2010 11:47 PM

Thanks again for all your help. I also had to change the settings in:

**Various Content Items--Style Tables**

I had to remove the background color line in the *Table Body Cells* box for the colors specified in the script to pass through to the site.

I also had to set *Zebra Stripe All Tables* and *Hover Effect For All Tables* to No. It now looks fine.

Thanks ever so.


All times are GMT -6. The time now is 04:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.