Set maximum number of letters limit on xprofile fields [closed]

Try this code, if it will helps: function filtered_profile_data( $args ) { $data = bp_get_member_profile_data( $args ); $defaults = array( ‘field’ => false, // Field name ‘user_id’ => $user_id ); $r = wp_parse_args( $args, $defaults ); extract( $r, EXTR_SKIP ); switch($field) { case ‘Field Name’: // for specific field character limit $max_len = 10; break; … Read more

Delete user account – If user has attachments uploaded then redirect (with a message) [closed]

I got it: function custom_get_count_before_delete() { global $bp, $wpdb; $user_id = $bp->loggedin_user->id; return $wpdb->get_var( $wpdb->prepare( ” SELECT COUNT(DISTINCT p.ID) FROM $wpdb->posts p WHERE p.post_author = %d AND p.post_status=”inherit” AND p.post_type=”attachment””, $user_id ) ); } function custom_check_delete_account() { global $bp; if ( $bp->current_component == ‘settings’ && $bp->current_action == ‘delete-account’ ) { if ( $count = custom_get_count_before_delete() … Read more

Weird google bot crawl problem

I have found the problem, there was a plugin activated for mobile browsers support – Smooci (WordPress on Mobiles). The plugin was enabled, and no theme chosen for it. So instead showing the default theme, the plugin, broke out my website – showing nothing/blank page on mobiles. Unfortunately the same plugin could not make the … Read more

BuddyPress Component Slug 404 [closed]

I think I’ve figured out the issue. Even though my screens.php file is listed in my includes method, for some reason the function “bp_announcements_screen_list” does not work (perhaps it isn’t being loaded?) If I change the value to a method in the component class (‘screen_function’ => aray(&$this,’ bp_announcements_screen_list’)), I can echo a string and have … Read more

buddypress edit profile [closed]

I managed to use $bp->template_message this was a bit tricky but then I had to go to bp-xprofile-screens.php just under line 77 I added unset($is_required[1]); to remove the username update, (as this does not need changing) 🙂 hope someone else, may find this useful.

Is it possible to allow BP Group Admins to Set which Menu Tab they would like to have as their Default landing page? [closed]

You can do it programmatically like this: What’s the easiest way to change the default landing page for BuddyPress groups? The answer there could be expanded into a plugin that would provide a UI for group admins (and a means of storing preferences on a group-by-group basis), though this would take a bit of engineering … Read more