<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[BuddyPress] [2386] trunk/bp-themes: Fixes #1612</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2386</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-01-21 09:41:15 +0000 (Thu, 21 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fixes #1612</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpthemesbpdefaultmemberssingleprofilechangeavatarphp">trunk/bp-themes/bp-default/members/single/profile/change-avatar.php</a></li>
<li><a href="#trunkbpthemesbpsnparentprofilechangeavatarphp">trunk/bp-themes/bp-sn-parent/profile/change-avatar.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpthemesbpdefaultmemberssingleprofilechangeavatarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/profile/change-avatar.php (2385 => 2386)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/profile/change-avatar.php        2010-01-21 09:31:13 UTC (rev 2385)
+++ trunk/bp-themes/bp-default/members/single/profile/change-avatar.php        2010-01-21 09:41:15 UTC (rev 2386)
</span><span class="lines">@@ -2,51 +2,59 @@
</span><span class="cx">
</span><span class="cx"> <?php do_action( 'bp_before_profile_avatar_upload_content' ) ?>
</span><span class="cx">
</span><del>-<p><?php _e( 'Your avatar will be used on your profile and throughout the site. If there is a <a href="http://gravatar.com">Gravatar</a> associated with your account email we will use that, or you can upload an image from your computer.', 'buddypress') ?></p>
</del><ins>+<?php if ( !(int)get_site_option( 'bp-disable-avatar-uploads' ) ) : ?>
</ins><span class="cx">
</span><del>-<form action="" method="post" id="avatar-upload-form" enctype="multipart/form-data">
</del><ins>+        <p><?php _e( 'Your avatar will be used on your profile and throughout the site. If there is a <a href="http://gravatar.com">Gravatar</a> associated with your account email we will use that, or you can upload an image from your computer.', 'buddypress') ?></p>
</ins><span class="cx">
</span><del>-        <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
</del><ins>+        <form action="" method="post" id="avatar-upload-form" enctype="multipart/form-data">
</ins><span class="cx">
</span><del>-                <p><?php _e( 'Click below to select a JPG, GIF or PNG format photo from your computer and then click \'Upload Image\' to proceed.', 'buddypress' ) ?></p>
</del><ins>+                <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
</ins><span class="cx">
</span><del>-                <p id="avatar-upload">
-                        <input type="file" name="file" id="file" />
-                        <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" />
-                        <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
-                </p>
</del><ins>+                        <p><?php _e( 'Click below to select a JPG, GIF or PNG format photo from your computer and then click \'Upload Image\' to proceed.', 'buddypress' ) ?></p>
</ins><span class="cx">
</span><del>-                <?php if ( bp_get_user_has_avatar() ) : ?>
-                        <p><?php _e( "If you'd like to delete your current avatar but not upload a new one, please use the delete avatar button.", 'buddypress' ) ?></p>
-                        <p><a class="button edit" href="<?php bp_avatar_delete_link() ?>" title="<?php _e( 'Delete Avatar', 'buddypress' ) ?>"><?php _e( 'Delete My Avatar', 'buddypress' ) ?></a></p>
</del><ins>+                        <p id="avatar-upload">
+                                <input type="file" name="file" id="file" />
+                                <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" />
+                                <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
+                        </p>
+
+                        <?php if ( bp_get_user_has_avatar() ) : ?>
+                                <p><?php _e( "If you'd like to delete your current avatar but not upload a new one, please use the delete avatar button.", 'buddypress' ) ?></p>
+                                <p><a class="button edit" href="<?php bp_avatar_delete_link() ?>" title="<?php _e( 'Delete Avatar', 'buddypress' ) ?>"><?php _e( 'Delete My Avatar', 'buddypress' ) ?></a></p>
+                        <?php endif; ?>
+
+                        <?php wp_nonce_field( 'bp_avatar_upload' ) ?>
+
</ins><span class="cx">                 <?php endif; ?>
</span><span class="cx">
</span><del>-                <?php wp_nonce_field( 'bp_avatar_upload' ) ?>
</del><ins>+                <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
</ins><span class="cx">
</span><del>-        <?php endif; ?>
</del><ins>+                        <h3><?php _e( 'Crop Your New Avatar', 'buddypress' ) ?></h3>
</ins><span class="cx">
</span><del>-        <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
</del><ins>+                        <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" />
</ins><span class="cx">
</span><del>-                <h3><?php _e( 'Crop Your New Avatar', 'buddypress' ) ?></h3>
</del><ins>+                        <div id="avatar-crop-pane">
+                                <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" />
+                        </div>
</ins><span class="cx">
</span><del>-                <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" />
</del><ins>+                        <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />
</ins><span class="cx">
</span><del>-                <div id="avatar-crop-pane">
-                        <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" />
-                </div>
</del><ins>+                        <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" />
+                        <input type="hidden" id="x" name="x" />
+                        <input type="hidden" id="y" name="y" />
+                        <input type="hidden" id="w" name="w" />
+                        <input type="hidden" id="h" name="h" />
</ins><span class="cx">
</span><del>-                <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />
</del><ins>+                        <?php wp_nonce_field( 'bp_avatar_cropstore' ) ?>
</ins><span class="cx">
</span><del>-                <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" />
-                <input type="hidden" id="x" name="x" />
-                <input type="hidden" id="y" name="y" />
-                <input type="hidden" id="w" name="w" />
-                <input type="hidden" id="h" name="h" />
</del><ins>+                <?php endif; ?>
</ins><span class="cx">
</span><del>-                <?php wp_nonce_field( 'bp_avatar_cropstore' ) ?>
</del><ins>+        </form>
</ins><span class="cx">
</span><del>-        <?php endif; ?>
</del><ins>+<?php else : ?>
</ins><span class="cx">
</span><del>-</form>
</del><ins>+        <p><?php _e( 'Your avatar will be used on your profile and throughout the site. To change your avatar, please create an account with <a href="http://gravatar.com">Gravatar</a> using the same email address as you used to register with this site.', 'buddypress' ) ?></p>
</ins><span class="cx">
</span><ins>+<?php endif; ?>
+
</ins><span class="cx"> <?php do_action( 'bp_after_profile_avatar_upload_content' ) ?>
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentprofilechangeavatarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/profile/change-avatar.php (2385 => 2386)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/profile/change-avatar.php        2010-01-21 09:31:13 UTC (rev 2385)
+++ trunk/bp-themes/bp-sn-parent/profile/change-avatar.php        2010-01-21 09:41:15 UTC (rev 2386)
</span><span class="lines">@@ -12,63 +12,71 @@
</span><span class="cx">
</span><span class="cx">                 <?php do_action( 'bp_before_profile_avatar_upload_content' ) ?>
</span><span class="cx">
</span><del>-                <p><?php _e( 'Your avatar will be used on your profile and throughout the site. If there is a <a href="http://gravatar.com">Gravatar</a> associated with your account email we will use that, or you can upload an image from your computer.', 'buddypress') ?></p>
</del><ins>+                <?php if ( !(int)get_site_option( 'bp-disable-avatar-uploads' ) ) : ?>
</ins><span class="cx">
</span><del>-                <form action="" method="post" id="avatar-upload-form" enctype="multipart/form-data">
</del><ins>+                        <p><?php _e( 'Your avatar will be used on your profile and throughout the site. If there is a <a href="http://gravatar.com">Gravatar</a> associated with your account email we will use that, or you can upload an image from your computer.', 'buddypress') ?></p>
</ins><span class="cx">
</span><del>-                        <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
</del><ins>+                        <form action="" method="post" id="avatar-upload-form" enctype="multipart/form-data">
</ins><span class="cx">
</span><del>-                                <h3><?php _e( 'Your Current Avatar', 'buddypress' ) ?></h3>
</del><ins>+                                <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
</ins><span class="cx">
</span><del>-                                <p id="current-avatar">
-                                        <?php bp_displayed_user_avatar( 'type=full') ?>
-                                        <?php bp_displayed_user_avatar( 'type=thumb' ) ?>
-                                </p>
</del><ins>+                                        <h3><?php _e( 'Your Current Avatar', 'buddypress' ) ?></h3>
</ins><span class="cx">
</span><del>-                                <?php if ( bp_get_user_has_avatar() ) : ?>
-                                        <div class="generic-button" id="delete-avatar-button">
-                                                <a class="edit" href="<?php bp_avatar_delete_link() ?>" title="<?php _e( 'Delete Avatar', 'buddypress' ) ?>"><?php _e( 'Delete Avatar', 'buddypress' ) ?></a>
-                                        </div>
-                                <?php endif; ?>
</del><ins>+                                        <p id="current-avatar">
+                                                <?php bp_displayed_user_avatar( 'type=full') ?>
+                                                <?php bp_displayed_user_avatar( 'type=thumb' ) ?>
+                                        </p>
</ins><span class="cx">
</span><del>-                                <h3><?php _e( 'Upload a New Avatar', 'buddypress' ) ?></h3>
</del><ins>+                                        <?php if ( bp_get_user_has_avatar() ) : ?>
+                                                <div class="generic-button" id="delete-avatar-button">
+                                                        <a class="edit" href="<?php bp_avatar_delete_link() ?>" title="<?php _e( 'Delete Avatar', 'buddypress' ) ?>"><?php _e( 'Delete Avatar', 'buddypress' ) ?></a>
+                                                </div>
+                                        <?php endif; ?>
</ins><span class="cx">
</span><del>-                                <p><?php _e( 'Click below to select a JPG, GIF or PNG format photo from your computer and then click \'Upload Image\' to proceed.', 'buddypress' ) ?></p>
</del><ins>+                                        <h3><?php _e( 'Upload a New Avatar', 'buddypress' ) ?></h3>
</ins><span class="cx">
</span><del>-                                <p id="avatar-upload">
-                                        <input type="file" name="file" id="file" />
-                                        <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" />
-                                        <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
-                                </p>
</del><ins>+                                        <p><?php _e( 'Click below to select a JPG, GIF or PNG format photo from your computer and then click \'Upload Image\' to proceed.', 'buddypress' ) ?></p>
</ins><span class="cx">
</span><del>-                                <?php wp_nonce_field( 'bp_avatar_upload' ) ?>
</del><ins>+                                        <p id="avatar-upload">
+                                                <input type="file" name="file" id="file" />
+                                                <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" />
+                                                <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
+                                        </p>
</ins><span class="cx">
</span><del>-                        <?php endif; ?>
</del><ins>+                                        <?php wp_nonce_field( 'bp_avatar_upload' ) ?>
</ins><span class="cx">
</span><del>-                        <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
</del><ins>+                                <?php endif; ?>
</ins><span class="cx">
</span><del>-                                <h3><?php _e( 'Crop Your New Avatar', 'buddypress' ) ?></h3>
</del><ins>+                                <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
</ins><span class="cx">
</span><del>-                                <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" />
</del><ins>+                                        <h3><?php _e( 'Crop Your New Avatar', 'buddypress' ) ?></h3>
</ins><span class="cx">
</span><del>-                                <div id="avatar-crop-pane">
-                                        <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" />
-                                </div>
</del><ins>+                                        <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" />
</ins><span class="cx">
</span><del>-                                <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />
</del><ins>+                                        <div id="avatar-crop-pane">
+                                                <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" />
+                                        </div>
</ins><span class="cx">
</span><del>-                                <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" />
-                                <input type="hidden" id="x" name="x" />
-                                <input type="hidden" id="y" name="y" />
-                                <input type="hidden" id="w" name="w" />
-                                <input type="hidden" id="h" name="h" />
</del><ins>+                                        <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />
</ins><span class="cx">
</span><del>-                                <?php wp_nonce_field( 'bp_avatar_cropstore' ) ?>
</del><ins>+                                        <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" />
+                                        <input type="hidden" id="x" name="x" />
+                                        <input type="hidden" id="y" name="y" />
+                                        <input type="hidden" id="w" name="w" />
+                                        <input type="hidden" id="h" name="h" />
</ins><span class="cx">
</span><del>-                        <?php endif; ?>
</del><ins>+                                        <?php wp_nonce_field( 'bp_avatar_cropstore' ) ?>
</ins><span class="cx">
</span><del>-                </form>
</del><ins>+                                <?php endif; ?>
</ins><span class="cx">
</span><ins>+                        </form>
+
+                <?php else : ?>
+
+                        <p><?php _e( 'Your avatar will be used on your profile and throughout the site. To change your avatar, please create an account with <a href="http://gravatar.com">Gravatar</a> using the same email address as you used to register with this site.', 'buddypress' ) ?></p>
+
+                <?php endif; ?>
+
</ins><span class="cx">                 <?php do_action( 'bp_after_profile_avatar_upload_content' ) ?>
</span><span class="cx">
</span><span class="cx">         </div>
</span></span></pre>
</div>
</div>
</body>
</html>