Jump to content
Sign in to follow this  
dagger

Avatar size in comment

Recommended Posts

dagger

How can to cuztomize size of avatar or gravatar show in comment.need to get big.I think it to small. Thank

Share this post


Link to post
Share on other sites
dagger

Thank kate ,but i'm not really understand that. I use iblog4,i have to use plugin for add gravatar or avatar upload in profile.My avatar as showed up on comment. But it too small.How can i get it bigger than ,for use code or plugin. I can't find code for change in editor theme. Thankyou Ps. sorry i just newbie.

Share this post


Link to post
Share on other sites
cmunns

You want to look for something like this in your _authorinfo.php file in the Library folder `

<?php echo get_avatar(get_the_author_meta('email'), $size = '80', $default = CORE_IMAGES. '/avatar_default.gif') ;?>
` change the 80 to whatever pixel size you want.

Share this post


Link to post
Share on other sites
dagger

thank adam but chage size in this code just change author size avatar.But In comment picture avatar still small. What can i do for that. anyone know? Thank you so much.

Share this post


Link to post
Share on other sites
Kate

Hi Vidal, You would also want to look for that line to change. Were you able to locate it?

Share this post


Link to post
Share on other sites
psydrug

I change this file wp-content/themes/iblogpro/library/_authorinfo.php <div class="pic alignleft"><?php echo get_avatar(get_the_author_meta('email'), $size = '80', $default = CORE_IMAGES. '/avatar_default.gif') ;?></div> to <div class="pic alignleft"><?php echo get_avatar(get_the_author_meta('email'), $size = '120', $default = CORE_IMAGES. '/avatar_default.gif') ;?></div> and still small :(

Share this post


Link to post
Share on other sites
Kate

Ah, I see. I believe the line that you're seeing needs to be changed as well. Try the _posts.php file.

Share this post


Link to post
Share on other sites
psydrug

I went to a _posts.php and I see no mention of an Avatar or size "80" What should I change in the _posts.php ? Thanks in advance

Share this post


Link to post
Share on other sites
cmunns

The default icon is still small or they are all too small?

Share this post


Link to post
Share on other sites
catrina

If you want to change the look of line, you can use CSS like this:

div.pic {border: STYLINGHERE;}


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
psydrug

What is this code? I do not want to change the look of the line I want to resize the responses Avatar Where I put the size of the Avatar?

Share this post


Link to post
Share on other sites
cmunns

You should be editing the comments.php file not the authorinfo file.

Share this post


Link to post
Share on other sites
psydrug

tihs my comments.php code

<?php
	/**
	 * The template for displaying Comments.
	 *
	 *
	 * @package PageLines
	 */
	?>
	
	<div id="comments">
		<?php if ( post_password_required() ) : ?>
						<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', TDOMAIN ); ?></p>
					</div><!-- #comments -->
		<?php
				/* Stop the rest of comments.php from being processed,
				 * but don't kill the script entirely -- we still have
				 * to fully load the template.
				 */
				return;
			endif;
		?>
	
		<?php if ( have_comments() ) : ?>
				<h3 id="comments-title"><?php
				printf( _n( '???’?•?‘?” ???—?? ??%2$s', '%1$s ???’?•?‘?•?? ??%2$s', get_comments_number(), TDOMAIN ),
				number_format_i18n( get_comments_number() ), '' . get_the_title() . '' );
				?></h3>
	
				<ol class="commentlist">
					<?php wp_list_comments(); ?>
	
				<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
							<div class="navigation">
								<div class="alignleft"><?php previous_comments_link( __( '<span class="meta-nav">?†?</span> Older Comments', TDOMAIN ) ); ?></div>
								<div class="alignright"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">?†’</span>', TDOMAIN ) ); ?></div>
							</div> <!-- .navigation -->
				<?php endif; // check for comment navigation ?>
	
		<?php else : // or, if we don't have comments:
	
				/* If there are no comments and comments are closed,
				 * let's leave a little note, shall we?
				 */
				if ( ! comments_open() ) :
			?>
				<!-- If comments are closed. -->
				<p class="nocomments"><?php _e('Comments are closed.', TDOMAIN);?></p>
			<?php endif; // end ! comments_open() ?>
	
		<?php endif; // end have_comments() ?>
	
		<?php comment_form(); ?>
	</div>
	[/code]

What should I change?

Share this post


Link to post
Share on other sites
catrina

Try adding this CSS to your custom code area:

div.comment-author img.avatar {width: WIDTHpx;}

Change WIDTH to the value you want for the thumbnail size.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
psydrug

Wow your is answer best ! But I have a small problem When I put this code

div.comment-author img.avatar {width: 75px; Height:75px}

Avatar is not clear, is blurred avatar image :S I use this plugin - Simple Local avatars There may be a solution for this?

Share this post


Link to post
Share on other sites
Kate

Actually, in this case CSS isn't the best method, because you're trying to enlarge the image, not lessen it. I'm going to mark this for the devs again, because they can probably help you pinpoint the line you need to change.

Share this post


Link to post
Share on other sites
cmunns

Your original image is 32px...it's impossible to make it bigger without getting blurry.

Share this post


Link to post
Share on other sites
psydrug

But the original avatar of WordPress is 100px x 100px Template iblogpro 4 reduces the source of WordPress Avatar

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×