Deprecated theme – group avatar fix
-
Just upgraded to latest BP, I’m going with the old /bp-themes/ format until I have more time to port over to the new parent/child theme setup.
For those of you still using the deprecated theme setup, you might run into an issue with the group avatar settings.
Here’s what I did to fix it:
1) Change the form action in /bp-themes/YOUR THEME/groups/admin/group-avatar.php to:
<form action="<?php bp_group_admin_form_action() ?>" name="group-settings-form" id="group-settings-form" class="standard-form" method="post" enctype="multipart/form-data">
2) Select everything between the <form> tag and copy and paste the following:
<?php /* Group Avatar Settings */ ?>
<?php if ( bp_is_group_admin_screen( 'group-avatar' ) ) : ?>
<h2><?php _e( 'Group Avatar', 'buddypress' ); ?></h2>
<div class="left-menu">
<?php bp_group_avatar( 'type=full' ) ?>
<?php if ( bp_get_group_has_avatar() ) : ?>
<div class="generic-button" id="delete-group-avatar-button">
<a class="edit" href="<?php bp_group_avatar_delete_link() ?>" title="<?php _e( 'Delete Avatar', 'buddypress' ) ?>"><?php _e( 'Delete Avatar', 'buddypress' ) ?></a>
</div>
<?php endif; ?>
</div>
<div class="main-column">
<?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
<p><?php _e("Upload an image to use as an avatar for this group. The image will be shown on the main group page, and in search results.", 'buddypress') ?></p>
<p>
<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 wp_nonce_field( 'bp_avatar_upload' ) ?>
<?php endif; ?>
<?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
<h3><?php _e( 'Crop Avatar', 'buddypress' ) ?></h3>
<img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" />
<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>
<input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />
<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" />
<?php wp_nonce_field( 'bp_avatar_cropstore' ) ?>
<?php endif; ?>
</div>
<?php endif; ?>Hope this helps the few who are going to be using the old theme format for a bit!
- The topic ‘Deprecated theme – group avatar fix’ is closed to new replies.