Search Results for 'buddypress'
-
Search Results
-
Hello,
I want to restrict memberships to only one private group and multiple public groups. I was thinking of using the hook groups_member_before_save to do that validation. Is that the correct place?
This is how i researched..
in groups_join_group we have
$new_member = new BP_Groups_Member; $new_member->group_id = $group_id; $new_member->user_id = $user_id; $new_member->inviter_id = 0; $new_member->is_admin = 0; $new_member->user_title = ''; $new_member->date_modified = bp_core_current_time(); $new_member->is_confirmed = 1; if ( !$new_member->save() ) return false;and in BP_Groups_Member we have
public function save() { global $wpdb; $bp = buddypress(); $this->user_id = apply_filters( 'groups_member_user_id_before_save', $this->user_id, $this->id ); $this->group_id = apply_filters( 'groups_member_group_id_before_save', $this->group_id, $this->id ); $this->inviter_id = apply_filters( 'groups_member_inviter_id_before_save', $this->inviter_id, $this->id ); $this->is_admin = apply_filters( 'groups_member_is_admin_before_save', $this->is_admin, $this->id ); $this->is_mod = apply_filters( 'groups_member_is_mod_before_save', $this->is_mod, $this->id ); $this->is_banned = apply_filters( 'groups_member_is_banned_before_save', $this->is_banned, $this->id ); $this->user_title = apply_filters( 'groups_member_user_title_before_save', $this->user_title, $this->id ); $this->date_modified = apply_filters( 'groups_member_date_modified_before_save', $this->date_modified, $this->id ); $this->is_confirmed = apply_filters( 'groups_member_is_confirmed_before_save', $this->is_confirmed, $this->id ); $this->comments = apply_filters( 'groups_member_comments_before_save', $this->comments, $this->id ); $this->invite_sent = apply_filters( 'groups_member_invite_sent_before_save', $this->invite_sent, $this->id ); /** * Fires before the current group membership item gets saved. * * Please use this hook to filter the properties above. Each part will be passed in. * * @since 1.0.0 * * @param BP_Groups_Member $this Current instance of the group membership item being saved. Passed by reference. */ do_action_ref_array( 'groups_member_before_save', array( &$this ) ); // The following properties are required; bail if not met. if ( empty( $this->user_id ) || empty( $this->group_id ) ) { return false; }Hi guys!
I’m using Woffice theme in my wordpress website. The problem is when i activate the buddypress, i get a server error 500. When this happens, i can’t access neither my website, nor my wp-admin, so i have to delete the buddypress directly by the ftp tool.
I had read that this could be solved by increasing the memory limit on my php.ini, but it’s already at 128M. I have been trying to solve it for a long time, but i can’t make the buddypress work.
Help me please!
Thanks!
Hi,
I’m new to Buddypress (but not WordPress), so I may be missing something obvious here. Our client wants to have several user profile fields that allow users to type in what are essentially tags, e.g., which instruments they play from possibly hundreds of instruments. WordPress tags are perfect for this. They provide an input field with autocompletion, sorting and indexing, auto-generated pages for tags, and so on. WordPress tags also can be set up so that only admin/editor user types can add new tags (e.g., so a basic user doesn’t accidentally add a ‘paino’ tag instead of ‘piano’ as an instrument).I can get this working on the default WordPress user profile by creating a custom taxonomy. However, the default profile fields don’t show up when a normal user edits their buddypress profile.
So I guess there are two questions:
1.) Is there already a way to incorporate tags/taxonomies in a Buddypress profile? The only thing I’m seeing is a text box, but that probably wouldn’t have autocomplete, loses the searchability and sortability of tags, etc. The checkbox and multi-select options will be tough since they may need to pick 6 items out of a few thousand (one of these will be languages, and there are around 7,000 of them!).
2.) If not, is there any documentation or examples of how to get a standard user profile field to show up in Buddypress’ member profile? I’m definitely willing to try custom coding to get it working.
Thanks in advance for any input or suggestions!
Topic: Post On Buddypress Profile
I wish the developers/contributors would add a post on profile button to show user posts in the next update. It makes sense to have this function as it incorporates WordPress and Buddypress respectively. There is only one plugin that I found which accomplished this feet:
by Huseyin Berberoglu. The plugin is out of date and it takes tons of modifications to get it going with an up to date Buddypress install.
The second method is a block of code placed in functions.php
function importSomething(){ return include_once 'bp-custom.php'; } add_action( 'bp_setup_nav', 'buddyboss_child_bp_nav_adder' ); add_action( 'bp_template_content', 'profile_buddyboss_child_loop' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); function buddyboss_child_bp_nav_adder() { global $bp; $post_count = count_user_posts_by_type( $bp->displayed_user->id ); bp_core_new_nav_item( array( 'name' => sprintf( __( 'Posts <span>%d</span>', 'my-poems' ), $post_count ), 'slug' => 'Articles', 'position' => 250, 'show_for_displayed_user' => true, 'screen_function' => 'buddyboss_child_list', 'item_css_id' => 'articles', 'default_subnav_slug' => 'public' )); } function buddyboss_child_list() { add_action( 'bp_template_content', 'profile_buddyboss_child_loop' ); bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) ); } /*------- This is end of the code for above function ---------*/ function profile_buddyboss_child_loop() { $myposts = get_posts( array( 'posts_per_page' => -1, 'author' => bp_displayed_user_id(), 'post_type' => 'post' )); if( ! empty($myposts) ) { foreach($myposts as $post) { setup_postdata( $post ); if (has_post_thumbnail( $post->ID ) ): $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'sidebar-smallthumbnew' ); else : $image[0] = "http://....com/wp-content/uploads/2015/10/userpost.jpg"; endif; echo '<li class="sidebar mostpop post-' . $post->ID . '"><span id="postimage"><a>ID) . '"><img src="' . $image[0] . '" /></a></span><div id="postinfo"><a>ID) . '">' . get_the_title($post->ID) . '</a></div></li>'; } echo '</ul>'; wp_reset_postdata(); } else { ?> <div class="info" id="message"> <p><strong><?php bp_displayed_user_fullname(); ?></strong> has No posts.</p> </div> <?php } } /* This is end of the code for above function */ remove_filter('bp_setup_nav',''); function count_user_posts_by_type( $userid, $post_type = 'post' ) { global $wpdb; $where = get_posts_by_author_sql( $post_type, true, $userid, true); $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts $where" ); return apply_filters( 'get_usernumposts', $count, $userid ); }This works fine but it’s quite limited. It also messes with Buddypress updates rendering the two latest Buddypress updates useless (Star message, and Upload Background image).
Guys please get around to integrating this ability in Buddypress so one doesn’t have to spend hours searching and trouble shooting for a function which I believe and others should be an already main component.
Topic: Activate = Errors
I’ve migrated a website from another host, and am now trying to activate the relevant plugins including BuddyPress. However, when I do activate BuddyPress, I get the following errors showing when WP debug is on:
<b>Notice</b>: Constant BUDDYBLOG_ARCHIVE_SLUG already defined in <b>/home/makers/public_html/wp-content/plugins/bp-custom.php</b> on line <b>10</b><br /> <br /> <b>Strict Standards</b>: Declaration of BuddyBlogCoreComponent::setup_globals() should be compatible with BP_Component::setup_globals($args = Array) in <b>.../wp-content/plugins/buddyblog/buddyblog-loader.php</b> on line <b>0</b><br /> <br /> <b>Strict Standards</b>: Declaration of BuddyBlogCoreComponent::includes() should be compatible with BP_Component::includes($includes = Array) in <b>.../wp-content/plugins/buddyblog/buddyblog-loader.php</b> on line <b>0</b><br /> <br /> <b>Strict Standards</b>: Declaration of BuddyBlogCoreComponent::setup_nav() should be compatible with BP_Component::setup_nav($main_nav = Array, $sub_nav = Array) in <b>.../wp-content/plugins/buddyblog/buddyblog-loader.php</b> on line <b>0</b><br /> <br /> <b>Strict Standards</b>: Declaration of BuddyBlogCoreComponent::setup_admin_bar() should be compatible with BP_Component::setup_admin_bar($wp_admin_nav = Array) in <b>/.../wp-content/plugins/buddyblog/buddyblog-loader.php</b> on line <b>0</b><br />Any ideas why this is happening, & how the issues can be rectified?
Topic: Fatal Error HELP!
I am getting the following error:
Fatal error: Call-time pass-by-reference has been removed; If you would like to pass argument by reference, modify the declaration of apply_filters(). in .../wp-content/plugins/buddypress/bp-core.php on line 565Any help would be appreciated.