Info
- 7 posts
- 4 voices
- Started 3 years ago by citizenkeith
- Latest reply from Casemon
- This topic is not resolved
Change Gravatar Size?
-
- Posted 3 years ago #
I've installed 0.9.0.1 at my test site. Gravatars show in the user profile at their true size of 80x80. However, in the kakumei theme, they are displayed at 48x48. I can't find where this can be changed. I looked in the CSS and in the post.php file.
Am I blind?
-
- Posted 3 years ago #
Here is what a quick grep came up with:
bb-includes/template-functions.php:function post_author_avatar( $size = '48', $default = '', $post_id = 0 ) {
-
- Posted 3 years ago #
Thanks Wyvn. It would be nice if there was something in the Admin menu to change this, but for now I'll just change that file. :)
-
- Posted 3 years ago #
Well, if you like to hack you admin files, you can add the following code to the options-general.php file just after line 143, making this code start on line 144;
<label for="avatars_size"> <?php _e('Gravatar Size:'); ?> </label> <div> <select name="avatars_size" id="avatars_size"> <?php $selected = array(); $selected[bb_get_option('avatars_size')] = ' selected="selected"'; ?> <option value="16"<?php echo $selected[16]; ?>><?php _e('16 px'); ?></option> <option value="32"<?php echo $selected['32']; ?>><?php _e('32 px'); ?></option> <option value="36"<?php echo $selected['36']; ?>><?php _e('36 px'); ?></option> <option value="48"<?php echo $selected['48']; ?>><?php _e('48 px'); ?></option> <option value="80"<?php echo $selected['80']; ?>><?php _e('80 px'); ?></option> <?php unset($selected); ?> </select> </div>And in the bb-includes/template-functions.php file, after line 1198 you can add this;
$size = bb_get_option('avatars_size');Then you can change the size in the admin section, and the correct size will show with the posts.
Or you can download the edited files here
--
Rune -
- Posted 3 years ago #
Thanks Rune. I actually don't like to hack admin files... Wyvn's suggestion did the trick. I just made note of the change so I can do it again when I upgrade next.
Maybe you can submit that for a future version of bbPress. :-)
-
- Posted 2 years ago #
Any chance on updating this info for 1.0.2? Sounds like a nice work-around.
-
- Posted 2 years ago #
In the mean time you can just pass the size via the avatar call...
<?php post_author_avatar_link($size='100'); ?> -
You must log in to post.