Skip to:
Content

BuddyPress.org

Changeset 1317


Ignore:
Timestamp:
04/05/2009 01:17:07 PM (17 years ago)
Author:
apeatling
Message:

Added a site admin option to disable avatar uploads.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-admin.php

    r1315 r1317  
    5757                                <?php endif; ?>
    5858                                <tr>
    59                                         <th scope="row"><?php _e( 'Show admin bar for logged out users', 'buddypress' ) ?>:</th>
     59                                        <th scope="row"><?php _e( 'Hide admin bar for logged out users?', 'buddypress' ) ?>:</th>
    6060                                        <td>
    6161                                                <input type="radio" name="bp-admin[show-loggedout-adminbar]"<?php if ( (int)get_site_option( 'show-loggedout-adminbar' ) ) : ?> checked="checked"<?php endif; ?> id="bp-admin-show-loggedout-adminbar-yes" value="1" /> <?php _e( 'Yes', 'buddypress' ) ?> &nbsp;
     
    6363                                        </td>                   
    6464                                </tr>
     65                                <tr>
     66                                        <th scope="row"><?php _e( 'Disable avatar uploads? (Gravatars will still work)', 'buddypress' ) ?>:</th>
     67                                        <td>
     68                                                <input type="radio" name="bp-admin[bp-disable-avatar-uploads]"<?php if ( (int)get_site_option( 'bp-disable-avatar-uploads' ) ) : ?> checked="checked"<?php endif; ?> id="bp-admin-disable-avatar-uploads-yes" value="1" /> <?php _e( 'Yes', 'buddypress' ) ?> &nbsp;
     69                                                <input type="radio" name="bp-admin[bp-disable-avatar-uploads]"<?php if ( !(int)get_site_option( 'bp-disable-avatar-uploads' ) ) : ?> checked="checked"<?php endif; ?> id="bp-admin-disable-avatar-uploads-no" value="0" /> <?php _e( 'No', 'buddypress' ) ?>
     70                                        </td>
     71                                </tr>
    6572                                <?php if ( function_exists('bp_wire_install') ) { ?>
    6673                                <tr>
    67                                         <th scope="row"><?php _e( 'Allow non-friends to post on profile wires', 'buddypress' ) ?>:</th>
     74                                        <th scope="row"><?php _e( 'Allow non-friends to post on profile wires?', 'buddypress' ) ?>:</th>
    6875                                        <td>
    6976                                                <input type="radio" name="bp-admin[non-friend-wire-posting]"<?php if ( (int)get_site_option( 'non-friend-wire-posting' ) ) : ?> checked="checked"<?php endif; ?> id="bp-admin-non-friend-wire-post" value="1" /> <?php _e( 'Yes', 'buddypress' ) ?> &nbsp;
  • trunk/bp-xprofile/bp-xprofile-signup.php

    r1315 r1317  
    4141        }
    4242       
    43         if ( '' == get_site_option( 'bp-enable-signup-avatar-uploads' ) || (int) get_site_option( 'bp-enable-signup-avatar-uploads' ) ) {
     43        if ( !(int) get_site_option( 'bp-disable-avatar-uploads' ) ) {
    4444        ?>
    4545                <div id="avatar-form-fields">
  • trunk/bp-xprofile/bp-xprofile-templatetags.php

    r1238 r1317  
    292292function bp_avatar_upload_form() {
    293293        global $bp;
    294          
    295         bp_core_avatar_admin( null, $bp->loggedin_user->domain . $bp->profile->slug . '/change-avatar/', $bp->loggedin_user->domain . $bp->profile->slug . '/delete-avatar/' );
     294       
     295        if ( !(int)get_site_option( 'bp-disable-avatar-uploads' ) )
     296                bp_core_avatar_admin( null, $bp->loggedin_user->domain . $bp->profile->slug . '/change-avatar/', $bp->loggedin_user->domain . $bp->profile->slug . '/delete-avatar/' );
     297        else
     298                _e( 'Avatar uploads are currently disabled. Why not use a <a href="http://gravatar.com">gravatar</a> instead?', 'buddypress' );
    296299}
    297300
Note: See TracChangeset for help on using the changeset viewer.