Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 24 replies - 1 through 24 (of 24 total)

  • John
    Participant

    @jhob

    Ah yes, messaging is not active on the site. That fixed it anyway – looks to work perfectly at the back end. Pretty much all of the front-end BP functionality is disabled so I can’t test that. Thank you!


    John
    Participant

    @jhob

    Still get the same error I’m afraid. Can see that it points to /wp-admin/options-general.php?page=bp-devolved-authority-settings now. I couldn’t see any link directly from the settings menu.


    John
    Participant

    @jhob

    Single site, although it is a heavily customised BP install with some legacy code that I’m yet to fully un-pick. That said there’s nothing that I’ve seen that should affect permissions.

    I just checked the administrator role, which does have every cap granted.

    Settings pages for all other plugins on the site work fine.

    I could only find the settings link on the plugins page, it doesn’t appear elsewhere does it?


    John
    Participant

    @jhob

    @venutius, wow – you really have been busy!

    I get a ‘not allowed to access this page’ error when I try to visit the plugin settings at

    /wp-admin/admin.php?page=bp-devolved-authority-settings

    Logged in as administrator.


    John
    Participant

    @jhob

    Thanks, that’s super helpful – some very useful stuff in that article.


    John
    Participant

    @jhob

    Thanks for your help anyway. Sounds like the ‘edit_users’ fix is straight-forward enough so hopefully that will mean it appears a not-too-distant release.


    John
    Participant

    @jhob

    Any finer-grained control over capabilities that avoids having to grant manage_options is a plus in my book. Helps a lot in locking down site security.


    John
    Participant

    @jhob

    Thanks, will keep an eye on the tickets and hope the changes come in a future release.

    Just trying to lock the site down a bit more so that we have fewer users with the more powerful priviledges.


    John
    Participant

    @jhob

    Great, many thanks!


    John
    Participant

    @jhob

    Thanks for you help with this @venutius, appreciated 🙂

    I’m guessing there’s not much more that can be done for now.


    John
    Participant

    @jhob

    I tried both of those (editing the typo in core file & add_cap) but neither worked unfortunately.

    On checking through Members I can see that the Editor role has been granted bp_moderate, which leads me to think that this role alone is not sufficient to grant access to the extended profile page.

    Do you think I should raise this as a ticket? I’m not sure if it would be considered a bug or ‘feature’.


    John
    Participant

    @jhob

    That didn’t work either I’m afraid. Opening the extended profile returns “You cannot edit the requested user.”


    John
    Participant

    @jhob

    Is there a way of granting just bp_moderate, without manage_options? I couldn’t see that listed as a cap (as viewed through the ‘Members’ plugin).


    John
    Participant

    @jhob

    Yeah, that doesn’t give access to the extended profile unfortunately, only the ‘standard’ profile, or whatever you call it.


    John
    Participant

    @jhob

    Hi Prashant,

    That didn’t quite work but it did get me thinking along the right lines and I’ve come up with a solution:

    
    add_action( 'wp_before_admin_bar_render', 'add_edit_member_menu' );
    
    function add_edit_member_menu() {
    	global $wp_admin_bar;
    	$user_id = bp_displayed_user_id();
    	if ( ! empty( $user_id ) ) {
    		$wp_admin_bar->remove_menu( 'user-admin' );
    		$wp_admin_bar->add_menu( array(
    			'id'    => 'edit-member',
    			'title' => 'Edit Member',
    			'href'  => admin_url( 'user-edit.php?user_id=' . $user_id ),
    			'meta'  => array(
    				'title' => __( 'Edit Member' ),
    			),
    		) );
    	}
    }

    John
    Participant

    @jhob

    Ah, I had it in functions.php just moved it into bp-custom.php and it worked!

    Still getting used to remembering to put buddypress stuff in bp-custom.php rather than functions.php.

    Thanks 🙂

    John


    John
    Participant

    @jhob

    Thanks for the reply Brajesh.

    Unfortunately that didn’t work. It’s pretty much what I had already tried, except with a differing priority.

    Seems that CSS does not want to dequeue!


    John
    Participant

    @jhob

    ok, will do. Just thought it might be a common issue experienced in the wider BP community.


    John
    Participant

    @jhob

    Yes, the site I’m working on has loads of legacy code and is on 2.9.4. I have the fear over upgrading to 3.2.0!

    Thanks for the answer, worked perfectly. Starting to get to grips with the BP template structure now. 🙂

    cheers
    John


    John
    Participant

    @jhob

    It is possible that a 3rd party plugin is doing that – there’s certainly a lot on the site!

    Now if only I could work out which one and make proper use of it that would be great…


    John
    Participant

    @jhob

    Also it seems that something has created an additional size (600 x 200 in our case, no idea why it has been created), see screenshot of an avatar image directory:

    Any explanation for that?


    John
    Participant

    @jhob

    With the sizes set as they are on the site that’s rather limiting.

    Is there any way around this?


    John
    Participant

    @jhob

    Those sizes are already set there:

    
    <?php
    
    // Resizes avatars
    define ( 'BP_AVATAR_THUMB_WIDTH', 86 );
    define ( 'BP_AVATAR_THUMB_HEIGHT', 50 );
    define ( 'BP_AVATAR_FULL_WIDTH', 1920 );
    define ( 'BP_AVATAR_FULL_HEIGHT', 1111 );
    define ( 'BP_AVATAR_ORIGINAL_MAX_WIDTH', 2000 );
    define ( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE', 5120000 );
    
    // Changes default avatar
    define ( 'BP_AVATAR_DEFAULT', esc_url( home_url( '/' ) ).'wp-content/themes/ihg2014/images/avatar.jpg' );
    define ( 'BP_AVATAR_DEFAULT_THUMB', esc_url( home_url( '/' ) ).'wp-content/themes/ihg2014/images/avatar_thumb.jpg' );
    
    //Removes automatic links in user profiles
    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data',  9, 2 );
    

    I am wanting to create image sizes additional to these.

    Is there a way of doing that in bp-custom.php?


    John
    Participant

    @jhob

    It was v2.9.3.

    I have just found that the previous developer had modified a core file:

    Line 603 in /bp-core/js/avatar.js (& avatar.min.js):

    
    // Add the cropping interface
    			tocrop.Jcrop( {
    				onChange: _.bind( self.showPreview, self ),
    				onSelect: _.bind( self.showPreview, self ),
    				// CUSTOM CODE START
    				// THIS ALSO NEEDS UPDATING ON 'avatar.min.js' !!! //
    				aspectRatio: 1.72817,
    				// CUSTOM CODE END
    				/* CUT SECTION
    				aspectRatio: self.options.aspectRatio,
    				*/
    				setSelect: [ crop_left, crop_top, crop_right, crop_bottom ]
    			}, function() {
    				// Get the Jcrop API
    				bp.Avatar.jcropapi = this;
    			} );
    

    I re-applied this modification to avatar.js and avatar.min.js but it did not resolve the issue.

    Any ideas?

Viewing 24 replies - 1 through 24 (of 24 total)
Skip to toolbar