Upload buddy press profile picture from custom page template

By default a Buddypress user can update their profile picture at /members/$username/profile/change-avatar/ – if your theme isn’t exposing that option something might be broken in your profile template. Edit: this functionality is exposed in /members/single/profile/change-avatar.php, can you just include that in your custom template? If not, examining the functions used on there should get you … Read more

Return instead of echo

Look at bp_group_request_user_avatar_thumb() in this file /bp-groups/bp-groups-template.php. It has a filter hook. In your filter function, add the $html parameter and set it to false and it should return just an url to the avatar. Then you can wrap it in a href and img tag manually. Or you could write a call directly to … Read more

Limit the total space in every user

It’s a task that can be easily tackled using wp_handle_upload and wp_handle_upload_prefilter (e.g.: Give users a maximum upload capacity; limit the number of files a user can upload OR limit the number of files per upload). Luckily someone already did this, as a plugin: Upload Quota per User. It’s pretty old and seems unmaintained but … Read more

adding xprofile for this user

You seem to be assuming that the xprofile field id is the same as the user meta field id – if they are, it is just a coincidence. If you have not created xprofile fields, you need to do so. And then use the ids for those xprofile fields. Or you can use the name … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)