Ticket #970: avatar-size-resize-aspect-ratio.patch
| File avatar-size-resize-aspect-ratio.patch, 19.3 KB (added by , 17 years ago) |
|---|
-
bp-core/bp-core-avatars.php
31 31 32 32 if ( !defined( 'BP_AVATAR_DEFAULT_THUMB' ) ) 33 33 define( 'BP_AVATAR_DEFAULT_THUMB', BP_PLUGIN_URL . '/bp-xprofile/images/none-thumbnail.gif' ); 34 34 35 // Allow filtering of full avatar sizes 36 function bp_core_avatar_full_height() { 37 echo bp_get_core_avatar_full_height(); 38 } 39 function bp_get_core_avatar_full_height() { 40 return apply_filters( 'bp_get_core_avatar_full_height', BP_AVATAR_FULL_HEIGHT ); 41 } 42 43 function bp_core_avatar_full_width() { 44 echo bp_get_core_avatar_full_width(); 45 } 46 function bp_get_core_avatar_full_width() { 47 return apply_filters( 'bp_get_core_avatar_full_width', BP_AVATAR_FULL_WIDTH ); 48 } 49 50 // Allow filtering of thumb avatar sizes 51 function bp_core_avatar_thumb_height() { 52 echo bp_get_core_avatar_thumb_height(); 53 } 54 function bp_get_core_avatar_thumb_height() { 55 return apply_filters( 'bp_get_core_avatar_thumb_height', BP_AVATAR_THUMB_HEIGHT ); 56 } 57 58 function bp_core_avatar_thumb_width() { 59 echo bp_get_core_avatar_thumb_width(); 60 } 61 function bp_get_core_avatar_thumb_width() { 62 return apply_filters( 'bp_get_core_avatar_thumb_width', BP_AVATAR_THUMB_WIDTH ); 63 } 64 35 65 function bp_core_fetch_avatar( $args = '' ) { 36 66 global $bp, $current_blog; 37 67 38 68 $defaults = array( 39 69 'item_id' => false, 40 70 'object' => 'user', // user OR group OR blog OR custom type (if you use filters) 41 71 'type' => 'thumb', 42 72 'avatar_dir' => false, 43 'width' => false, 73 'width' => false, 44 74 'height' => false, 45 75 'class' => 'avatar', 46 76 'css_id' => false, … … 49 79 ); 50 80 51 81 $params = wp_parse_args( $args, $defaults ); 52 extract( $params, EXTR_SKIP ); 53 82 extract( $params, EXTR_SKIP ); 83 54 84 if ( !$item_id ) { 55 85 if ( 'user' == $object ) 56 86 $item_id = $bp->displayed_user->id; … … 58 88 $item_id = $bp->groups->current_group->id; 59 89 else if ( 'blog' == $object ) 60 90 $item_id = $current_blog->id; 61 91 62 92 $item_id = apply_filters( 'bp_core_avatar_item_id', $item_id, $object ); 63 93 64 94 if ( !$item_id ) return false; 65 95 } 66 96 67 97 if ( !$avatar_dir ) { 68 98 if ( 'user' == $object ) 69 99 $avatar_dir = 'avatars'; … … 71 101 $avatar_dir = 'group-avatars'; 72 102 else if ( 'blog' == $object ) 73 103 $avatar_dir = 'blog-avatars'; 74 104 75 105 $avatar_dir = apply_filters( 'bp_core_avatar_dir', $avatar_dir, $object ); 76 77 if ( !$avatar_dir ) return false; 106 107 if ( !$avatar_dir ) return false; 78 108 } 79 109 80 110 if ( !$css_id ) 81 $css_id = $object . '-' . $item_id . '-avatar'; 82 111 $css_id = $object . '-' . $item_id . '-avatar'; 112 83 113 if ( $width ) 84 114 $html_width = " width='{$width}'"; 85 115 else 86 $html_width = ( 'thumb' == $type ) ? ' width="' . BP_AVATAR_THUMB_WIDTH . '"' : ' width="' . BP_AVATAR_FULL_WIDTH. '"';87 116 $html_width = ( 'thumb' == $type ) ? ' width="' . bp_get_core_avatar_thumb_width() . '"' : ' width="' . bp_get_core_avatar_full_width() . '"'; 117 88 118 if ( $height ) 89 119 $html_height = " height='{$height}'"; 90 120 else 91 $html_height = ( 'thumb' == $type ) ? ' height="' . BP_AVATAR_THUMB_HEIGHT . '"' : ' height="' . BP_AVATAR_FULL_HEIGHT. '"';92 93 $avatar_folder_url = apply_filters( 'bp_core_avatar_folder_url', $bp->root_domain . '/' . basename( WP_CONTENT_DIR ) . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir ); 94 $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', WP_CONTENT_DIR . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir ); 95 96 /* If no avatars have been uploaded for this item, display a gravatar */ 121 $html_height = ( 'thumb' == $type ) ? ' height="' . bp_get_core_avatar_thumb_height() . '"' : ' height="' . bp_get_core_avatar_full_height() . '"'; 122 123 $avatar_folder_url = apply_filters( 'bp_core_avatar_folder_url', $bp->root_domain . '/' . basename( WP_CONTENT_DIR ) . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir ); 124 $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', WP_CONTENT_DIR . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir ); 125 126 /* If no avatars have been uploaded for this item, display a gravatar */ 97 127 if ( !file_exists( $avatar_folder_dir ) && !$no_grav ) { 98 128 99 129 if ( empty( $bp->grav_default->{$object} ) ) 100 130 $default_grav = 'wavatar'; 101 131 else if ( 'mystery' == $bp->grav_default->{$object} ) … … 104 134 $default_grav = $bp->grav_default->{$object}; 105 135 106 136 if ( $width ) $grav_size = $width; 107 else if ( 'full' == $type ) $grav_size = BP_AVATAR_FULL_WIDTH;108 else if ( 'thumb' == $type ) $grav_size = BP_AVATAR_THUMB_WIDTH;109 137 else if ( 'full' == $type ) $grav_size = bp_get_core_avatar_full_width(); 138 else if ( 'thumb' == $type ) $grav_size = bp_get_core_avatar_thumb_width(); 139 110 140 if ( 'user' == $object ) { 111 141 $ud = get_userdata( $item_id ); 112 142 $grav_email = $ud->user_email; 113 143 } else if ( 'group' == $object || 'blog' == $object ) { 114 144 $grav_email = "{$item_id}-{$object}@{$bp->root_domain}"; 115 145 } 116 117 $grav_email = apply_filters( 'bp_core_gravatar_email', $grav_email, $item_id, $object ); 146 147 $grav_email = apply_filters( 'bp_core_gravatar_email', $grav_email, $item_id, $object ); 118 148 $gravatar = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' ) . md5( $grav_email ) . '?d=' . $default_grav . '&s=' . $grav_size; 119 149 120 150 return apply_filters( 'bp_core_fetch_avatar', "<img src='{$gravatar}' alt='{$alt}' id='{$css_id}' class='{$class}'{$html_width}{$html_height} />", $params ); 121 151 } else if ( !file_exists( $avatar_folder_dir ) && $no_grav ) 122 152 return false; 123 153 124 154 /* Set the file names to search for to select the full size or thumbnail image. */ 125 $avatar_name = ( 'full' == $type ) ? '-bpfull' : '-bpthumb'; 126 $legacy_user_avatar_name = ( 'full' == $type ) ? '-avatar2' : '-avatar1'; 127 $legacy_group_avatar_name = ( 'full' == $type ) ? '-groupavatar-full' : '-groupavatar-thumb'; 128 155 $avatar_name = ( 'full' == $type ) ? '-bpfull' : '-bpthumb'; 156 $legacy_user_avatar_name = ( 'full' == $type ) ? '-avatar2' : '-avatar1'; 157 $legacy_group_avatar_name = ( 'full' == $type ) ? '-groupavatar-full' : '-groupavatar-thumb'; 158 129 159 if ( $av_dir = opendir( $avatar_folder_dir ) ) { 130 160 while ( false !== ( $avatar_file = readdir($av_dir) ) ) { 131 161 if ( preg_match( "/{$avatar_name}/", $avatar_file ) || preg_match( "/{$legacy_user_avatar_name}/", $avatar_file ) || preg_match( "/{$legacy_group_avatar_name}/", $avatar_file ) ) … … 134 164 } 135 165 closedir($av_dir); 136 166 137 return apply_filters( 'bp_core_fetch_avatar', "<img src='{$avatar_url}' alt='{$alt}' id='{$css_id}' class='{$class}'{$html_width}{$html_height} />", $params ); 167 return apply_filters( 'bp_core_fetch_avatar', "<img src='{$avatar_url}' alt='{$alt}' id='{$css_id}' class='{$class}'{$html_width}{$html_height} />", $params ); 138 168 } 139 169 140 170 function bp_core_delete_existing_avatar( $args = '' ) { 141 171 global $bp; 142 172 143 173 $defaults = array( 144 174 'item_id' => false, 145 175 'object' => 'user', // user OR group OR blog OR custom type (if you use filters) … … 147 177 ); 148 178 149 179 $args = wp_parse_args( $args, $defaults ); 150 extract( $args, EXTR_SKIP ); 151 180 extract( $args, EXTR_SKIP ); 181 152 182 if ( !$item_id ) { 153 183 if ( 'user' == $object ) 154 184 $item_id = $bp->displayed_user->id; … … 156 186 $item_id = $bp->groups->current_group->id; 157 187 else if ( 'blog' == $object ) 158 188 $item_id = $current_blog->id; 159 189 160 190 $item_id = apply_filters( 'bp_core_avatar_item_id', $item_id, $object ); 161 191 162 192 if ( !$item_id ) return false; 163 193 } 164 194 165 195 if ( !$avatar_dir ) { 166 196 if ( 'user' == $object ) 167 197 $avatar_dir = 'avatars'; … … 169 199 $avatar_dir = 'group-avatars'; 170 200 else if ( 'blog' == $object ) 171 201 $avatar_dir = 'blog-avatars'; 172 202 173 203 $avatar_dir = apply_filters( 'bp_core_avatar_dir', $avatar_dir, $object ); 174 175 if ( !$avatar_dir ) return false; 204 205 if ( !$avatar_dir ) return false; 176 206 } 177 207 178 208 if ( 'user' == $object ) { … … 183 213 delete_usermeta( $item_id, 'bp_core_avatar_v2' ); 184 214 } 185 215 186 $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', WP_CONTENT_DIR . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir ); 216 $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', WP_CONTENT_DIR . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir ); 187 217 188 218 if ( !file_exists( $avatar_folder_dir ) ) 189 219 return false; … … 191 221 if ( $av_dir = opendir( $avatar_folder_dir ) ) { 192 222 while ( false !== ( $avatar_file = readdir($av_dir) ) ) { 193 223 if ( ( preg_match( "/-bpfull/", $avatar_file ) || preg_match( "/-bpthumb/", $avatar_file ) ) && '.' != $avatar_file && '..' != $avatar_file ) 194 @unlink( $avatar_folder_dir . '/' . $avatar_file ); 224 @unlink( $avatar_folder_dir . '/' . $avatar_file ); 195 225 } 196 226 } 197 227 closedir($av_dir); … … 205 235 206 236 function bp_core_avatar_handle_upload( $file, $upload_dir_filter ) { 207 237 global $bp; 208 238 209 239 require_once( ABSPATH . '/wp-admin/includes/image.php' ); 210 240 require_once( ABSPATH . '/wp-admin/includes/file.php' ); 211 241 212 242 $uploadErrors = array( 213 0 => __("There is no error, the file uploaded with success", 'buddypress'), 214 1 => __("Your image was bigger than the maximum allowed file size of: ", 'buddypress') . size_format(BP_AVATAR_ORIGINAL_MAX_FILESIZE), 243 0 => __("There is no error, the file uploaded with success", 'buddypress'), 244 1 => __("Your image was bigger than the maximum allowed file size of: ", 'buddypress') . size_format(BP_AVATAR_ORIGINAL_MAX_FILESIZE), 215 245 2 => __("Your image was bigger than the maximum allowed file size of: ", 'buddypress') . size_format(BP_AVATAR_ORIGINAL_MAX_FILESIZE), 216 246 3 => __("The uploaded file was only partially uploaded", 'buddypress'), 217 247 4 => __("No file was uploaded", 'buddypress'), … … 222 252 bp_core_add_message( sprintf( __( 'Your upload failed, please try again. Error was: %s', 'buddypress' ), $uploadErrors[$file['file']['error']] ), 'error' ); 223 253 return false; 224 254 } 225 255 226 256 if ( !bp_core_check_avatar_size( $file ) ) { 227 257 bp_core_add_message( sprintf( __( 'The file you uploaded is too big. Please upload a file under %s', 'buddypress'), size_format(BP_AVATAR_ORIGINAL_MAX_FILESIZE) ), 'error' ); 228 258 return false; 229 259 } 230 260 231 261 if ( !bp_core_check_avatar_type( $file ) ) { 232 262 bp_core_add_message( __( 'Please upload only JPG, GIF or PNG photos.', 'buddypress' ), 'error' ); 233 263 return false; 234 264 } 235 265 236 266 // Filter the upload location 237 267 add_filter( 'upload_dir', $upload_dir_filter, 10, 0 ); 238 268 239 269 $bp->avatar_admin->original = wp_handle_upload( $file['file'], array( 'action'=> 'bp_avatar_upload' ) ); 240 270 241 271 // Move the file to the correct upload location. … … 243 273 bp_core_add_message( sprintf( __( 'Upload Failed! Error was: %s', 'buddypress' ), $bp->avatar_admin->original['error'] ), 'error' ); 244 274 return false; 245 275 } 246 276 247 277 // Resize the image down to something manageable and then delete the original 248 278 if ( getimagesize( $bp->avatar_admin->original['file'] ) > BP_AVATAR_ORIGINAL_MAX_WIDTH ) { 249 279 $bp->avatar_admin->resized = wp_create_thumbnail( $bp->avatar_admin->original['file'], BP_AVATAR_ORIGINAL_MAX_WIDTH ); 250 280 } 251 281 252 282 $bp->avatar_admin->image = new stdClass; 253 254 // We only want to handle one image after resize. 283 284 // We only want to handle one image after resize. 255 285 if ( empty( $bp->avatar_admin->resized ) ) 256 286 $bp->avatar_admin->image->dir = $bp->avatar_admin->original['file']; 257 287 else { 258 288 $bp->avatar_admin->image->dir = $bp->avatar_admin->resized; 259 289 @unlink( $bp->avatar_admin->original['file'] ); 260 290 } 261 291 262 292 /* Set the url value for the image */ 263 293 $bp->avatar_admin->image->url = str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, $bp->avatar_admin->image->dir ); 264 294 … … 267 297 268 298 function bp_core_avatar_handle_crop( $args = '' ) { 269 299 global $bp; 270 300 271 301 $defaults = array( 272 302 'object' => 'user', 273 303 'avatar_dir' => 'avatars', 274 304 'item_id' => false, 275 305 'original_file' => false, 276 'crop_w' => BP_AVATAR_FULL_WIDTH,277 'crop_h' => BP_AVATAR_FULL_HEIGHT,306 'crop_w' => bp_get_core_avatar_full_width(), 307 'crop_h' => bp_get_core_avatar_full_height(), 278 308 'crop_x' => 0, 279 309 'crop_y' => 0 280 310 ); 281 311 282 312 $r = wp_parse_args( $args, $defaults ); 283 313 extract( $r, EXTR_SKIP ); 284 314 285 315 if ( !$original_file ) 286 316 return false; 287 317 288 318 if ( !file_exists( WP_CONTENT_DIR . '/' . $original_file ) ) 289 319 return false; 290 320 291 321 if ( !$item_id ) 292 $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', WP_CONTENT_DIR . dirname( $original_file ), $item_id, $object, $avatar_dir ); 322 $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', WP_CONTENT_DIR . dirname( $original_file ), $item_id, $object, $avatar_dir ); 293 323 else 294 324 $avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', WP_CONTENT_DIR . '/blogs.dir/' . BP_ROOT_BLOG . '/files/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir ); 295 325 296 326 if ( !file_exists( $avatar_folder_dir ) ) 297 327 return false; 298 328 299 329 require_once( ABSPATH . '/wp-admin/includes/image.php' ); 300 330 require_once( ABSPATH . '/wp-admin/includes/file.php' ); 301 331 302 332 /* Delete the existing avatar files for the object */ 303 333 bp_core_delete_existing_avatar( array( 'object' => $object, 'avatar_path' => $avatar_folder_dir ) ); 304 334 305 335 /* Make sure we at least have a width and height for cropping */ 306 336 if ( !(int)$crop_w ) 307 $crop_w = BP_AVATAR_FULL_WIDTH;308 337 $crop_w = bp_get_core_avatar_full_width(); 338 309 339 if ( !(int)$crop_h ) 310 $crop_h = BP_AVATAR_FULL_HEIGHT;340 $crop_h = bp_get_core_avatar_full_height(); 311 341 312 342 /* Set the full and thumb filenames */ 313 343 $full_filename = wp_hash( $original_file . time() ) . '-bpfull.jpg'; 314 344 $thumb_filename = wp_hash( $original_file . time() ) . '-bpthumb.jpg'; 315 345 316 346 /* Crop the image */ 317 $full_cropped = wp_crop_image( WP_CONTENT_DIR . $original_file, (int)$crop_x, (int)$crop_y, (int)$crop_w, (int)$crop_h, BP_AVATAR_FULL_WIDTH, BP_AVATAR_FULL_HEIGHT, false, $avatar_folder_dir . '/' . $full_filename );318 $thumb_cropped = wp_crop_image( WP_CONTENT_DIR . $original_file, (int)$crop_x, (int)$crop_y, (int)$crop_w, (int)$crop_h, BP_AVATAR_THUMB_WIDTH, BP_AVATAR_THUMB_HEIGHT, false, $avatar_folder_dir . '/' . $thumb_filename );319 347 $full_cropped = wp_crop_image( WP_CONTENT_DIR . $original_file, (int)$crop_x, (int)$crop_y, (int)$crop_w, (int)$crop_h, bp_get_core_avatar_full_width(), bp_get_core_avatar_full_height(), false, $avatar_folder_dir . '/' . $full_filename ); 348 $thumb_cropped = wp_crop_image( WP_CONTENT_DIR . $original_file, (int)$crop_x, (int)$crop_y, (int)$crop_w, (int)$crop_h, bp_get_core_avatar_thumb_width(), bp_get_core_avatar_thumb_height(), false, $avatar_folder_dir . '/' . $thumb_filename ); 349 320 350 /* Remove the original */ 321 351 @unlink( WP_CONTENT_DIR . $original_file ); 322 352 … … 327 357 function bp_core_fetch_avatar_filter( $avatar, $id_or_email, $size, $default, $alt ) { 328 358 if ( is_object ( $id_or_email ) ) 329 359 $id_or_email = $id_or_email->user_id; 330 360 331 361 $bp_avatar = bp_core_fetch_avatar( array( 'no_grav' => true, 'item_id' => $id_or_email, 'width' => $size, 'height' => $size, 'alt' => $alt ) ); 332 362 333 363 return ( !$bp_avatar ) ? $avatar : $bp_avatar; … … 337 367 function bp_core_check_avatar_upload($file) { 338 368 if ( $file['error'] ) 339 369 return false; 340 370 341 371 return true; 342 372 } 343 373 344 374 function bp_core_check_avatar_size($file) { 345 375 if ( $file['file']['size'] > BP_AVATAR_ORIGINAL_MAX_FILESIZE ) 346 376 return false; 347 377 348 378 return true; 349 379 } 350 380 351 381 function bp_core_check_avatar_type($file) { 352 382 if ( ( strlen($file['file']['type']) && !preg_match('/(jpe?g|gif|png)$/', $file['file']['type'] ) ) && !preg_match( '/(jpe?g|gif|png)$/', $file['file']['name'] ) ) 353 383 return false; 354 384 355 385 return true; 356 386 } 357 387 -
bp-core/bp-core-cssjs.php
94 94 global $bp; 95 95 96 96 $image = apply_filters( 'bp_inline_cropper_image', getimagesize( $bp->avatar_admin->image->dir ) ); 97 98 $width = (int)bp_get_core_avatar_full_width(); 99 $height = (int)bp_get_core_avatar_full_height(); 100 101 // Calculate Aspect Ratio 102 if ( $width == $height ) 103 $aspect_ratio = 1; 104 elseif ( $width != $height ) 105 $aspect_ratio = $width / $height; 106 97 107 ?> 98 108 <script type="text/javascript"> 99 109 jQuery(window).load( function(){ … … 101 111 onChange: showPreview, 102 112 onSelect: showPreview, 103 113 onSelect: updateCoords, 104 aspectRatio: 1,114 aspectRatio: <?php echo $aspect_ratio ?>, 105 115 setSelect: [ 50, 50, 200, 200 ] 106 116 }); 107 117 }); … … 115 125 116 126 function showPreview(coords) { 117 127 if ( parseInt(coords.w) > 0 ) { 118 var rx = 100/ coords.w;119 var ry = 100/ coords.h;128 var rx = <?php bp_core_avatar_full_width() ?> / coords.w; 129 var ry = <?php bp_core_avatar_full_height() ?> / coords.h; 120 130 121 131 jQuery('#avatar-crop-preview').css({ 122 132 width: Math.round(rx * <?php echo $image[0] ?>) + 'px', -
bp-themes/bp-sn-framework/groups/single/admin.php
152 152 153 153 <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" /> 154 154 155 <div id="avatar-crop-pane" >155 <div id="avatar-crop-pane" style="width:<?php bp_core_avatar_full_width() ?>px;height:<?php bp_core_avatar_full_height() ?>px;overflow:hidden;"> 156 156 <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" /> 157 157 </div> 158 158 -
bp-themes/bp-sn-framework/profile/change-avatar.php
51 51 52 52 <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" /> 53 53 54 <div id="avatar-crop-pane" style="width: 100px;height:100px;overflow:hidden;">54 <div id="avatar-crop-pane" style="width:<?php bp_core_avatar_full_width() ?>px;height:<?php bp_core_avatar_full_height() ?>px;overflow:hidden;"> 55 55 <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" /> 56 56 </div> 57 57 -
bp-themes/bp-sn-framework/registration/register.php
249 249 250 250 <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" /> 251 251 252 <div id="avatar-crop-pane" style="width: 100px;height:100px;overflow:hidden;">252 <div id="avatar-crop-pane" style="width:<?php bp_core_avatar_full_width() ?>px;height:<?php bp_core_avatar_full_height() ?>px;overflow:hidden;"> 253 253 <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" /> 254 254 </div> 255 255
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)