Comments/pingbacks styling and adjustments...

This commit is contained in:
mindfaucet 2009-12-01 16:12:59 -07:00
parent 3be56dac2c
commit 07c3a9e9f2
2 changed files with 25 additions and 23 deletions

View File

@ -27,23 +27,22 @@ function comicpress_avatar() {
endif; endif;
// $avatar = apply_filters('comicpress_avatar', $avatar); // $avatar = apply_filters('comicpress_avatar', $avatar);
if($url == true && $url != 'http://') if ($comment_type != 'pingback' && $comment_type != 'trackback') {
echo '<a href="' . $url . '" rel="external nofollow" title="' . wp_specialchars(get_comment_author(), 1) . '">'; echo '<div class="comment-avatar">';
$id_or_email = get_comment_author_email(); if($url == true && $url != 'http://')
if (empty($id_or_email)) $id_or_email = get_comment_author(); echo '<a href="' . $url . '" rel="external nofollow" title="' . wp_specialchars(get_comment_author(), 1) . '">';
if(function_exists('comicpress_get_avatar') && $comment_type != 'pingback' && $comment_type != 'trackback' ) { $id_or_email = get_comment_author_email();
echo str_replace("alt='", "alt='".wp_specialchars(get_comment_author(), 1)."' title='".wp_specialchars(get_comment_author(), 1), comicpress_get_avatar($id_or_email, 64)); if (empty($id_or_email)) $id_or_email = get_comment_author();
} else { if(function_exists('comicpress_get_avatar') && $comment_type != 'pingback' && $comment_type != 'trackback' ) {
if ($comment_type == 'pingback' || $comment_type == 'trackback') { echo str_replace("alt='", "alt='".wp_specialchars(get_comment_author(), 1)."' title='".wp_specialchars(get_comment_author(), 1), comicpress_get_avatar($id_or_email, 64));
if ($comment_type == 'pingback') echo '<div class="pingback"></div>';
if ($comment_type == 'trackback') echo '<div class="trackback"></div>';
} else { } else {
echo '<img src="'.get_template_directory_uri().'/'.$avatar.'" class="avatar photo" />'; echo '<img src="'.get_template_directory_uri().'/'.$avatar.'" class="avatar photo" />';
} }
if($url == true && $url != 'http://')
echo '</a>';
echo '</div>';
} }
if($url == true && $url != 'http://')
echo '</a>';
} }
/** /**
@ -118,9 +117,7 @@ function comicpress_comments_callback($comment, $args, $depth) {
<li id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>> <li id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>
<div class="comment-avatar"> <?php comicpress_avatar(); // Avatar filter ?>
<?php comicpress_avatar(); // Avatar filter ?>
</div>
<div class="comment-content"> <div class="comment-content">
@ -131,7 +128,7 @@ function comicpress_comments_callback($comment, $args, $depth) {
<div class="comment-meta-data"> <div class="comment-meta-data">
<span class="comment-time" title="<?php comment_date(__('l, F jS, Y, g:i a','comicpress')); ?>"> <span class="comment-time" title="<?php comment_date(__('l, F jS, Y, g:i a','comicpress')); ?>">
<?php printf(__('%1$s | %2$s','comicpress'), get_comment_date(), get_comment_time()); ?> <?php printf(__('%1$s at %2$s','comicpress'), get_comment_date(), get_comment_time()); ?>
</span> </span>
<span class="comment-permalink"> <span class="comment-permalink">

View File

@ -614,13 +614,13 @@ h3, h3 a {
} }
.comment .comment .comment-avatar { .comment .comment .comment-avatar {
width: 48px; width: 40px;
height: 48px; height: 40px;
} }
.comment .comment .avatar { .comment .comment .avatar {
width: 48px; width: 40px;
height: 48px; height: 40px;
} }
.comment-content { .comment-content {
@ -628,7 +628,7 @@ h3, h3 a {
} }
.comment .comment .comment-content { .comment .comment .comment-content {
margin-left: 52px; margin-left: 45px;
} }
.pingback .comment-content { .pingback .comment-content {
@ -662,11 +662,16 @@ h3, h3 a {
font-size: 15px; font-size: 15px;
} }
.comment-text p { .comment-text {
margin: 5px 0 0 0; padding: 5px;
font-size: 12px; font-size: 12px;
} }
.comment-text p {
padding: 5px 5px;
margin: 0;
}
.comment-note { .comment-note {
width: 400px; width: 400px;
display: block; display: block;