Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 17,226 through 17,250 (of 68,918 total)
  • Author
    Search Results
  • #179379
    CryptoSteam
    Participant

    oooops… I got confused. It is BBpress not Buddypress plugin that I have installed.

    #179378
    Doremdou
    Participant

    Hi ๐Ÿ™‚
    Did you enable the messaging system in the first place?
    If not you can activate it in : Settings/Buddypress/ and on the first page, check the messaging box

    If you enabled this option already you should have a tab in your profil to send private message

    [Edit] Wait what do you mean by “forums”? there are no forums on buddypress, are you talking about bbpress?

    #179370
    danbp
    Participant
    #179369
    danbp
    Participant

    Hi @transmission,

    this is not the solution, but an example for your inspiration.
    The below shows how the notification counter can be moved/implemented on the toolbar.

    /* moving the notification counter from right to left */
    remove_action( 'admin_bar_menu', 'bp_members_admin_bar_notifications_menu', 90 );
    function bpfr_notification_ontheleft() {
    	global $wp_admin_bar;
    	
    	if ( !is_user_logged_in() )
    	return false;
    	
    	$notifications = bp_core_get_notifications_for_user( bp_loggedin_user_id(), 'object' );
    	$count         = !empty( $notifications ) ? count( $notifications ) : 0;
    	$alert_class   = (int) $count > 0 ? 'pending-count alert' : 'count no-alert';
    	$menu_title    = '<span id="ab-pending-notifications" class="' . $alert_class . '">' . $count . '</span>';
    	
    	// Add the top-level Notifications button
    	$wp_admin_bar->add_menu( array(
     /*'parent'    => 'top-secondary',*/  // this is the original position
    	'id'        => 'bp-notifications',
    	'title'     => $menu_title,
    	'href'      => bp_loggedin_user_domain(),
    	) );
    	
    	if ( !empty( $notifications ) ) {
    		foreach ( (array) $notifications as $notification ) {
    			$wp_admin_bar->add_menu( array(
    			'parent' => 'bp-notifications',
    			'id'     => 'notification-' . $notification->id,
    			'title'  => $notification->content,
    			'href'   => $notification->href
    			) );
    		}
    	} else {
    		$wp_admin_bar->add_menu( array(
    		'parent' => 'bp-notifications',
    		'id'     => 'no-notifications',
    		'title'  => __( 'No new notifications', 'buddypress' ),
    		'href'   => bp_loggedin_user_domain()
    		) );
    	}
    	
    	return;
    }
    add_action( 'admin_bar_menu', 'bpfr_notification_ontheleft',30);
    /* other position # are 10, 20, 40, 50, 60, 70, 80, 90 */

    In your case, you also have to check this Codex page. And possibly do some research here.

    #179361
    @mercime
    Participant

    @blinkybill01 add height to the item-list li around 25px or more, up to you

    #buddypress div.item-list-tabs ul li { 
    height: 25px; 
    }

    Hey guys,
    I just wanted to post an update to this.

    @juanlopez4691 You’re a genius, the code still works! I’m running BuddyPress 1.9.1 now and it’s working smoothly. I think that you had some minor errors in your syntax though. Here’s the updated version:

    bp-custom

    // Add meta fields upon group creation
    function bp_group_meta_save ( $group_id ) {
    	$blog = get_blog_details( get_current_blog_id(), true );
    	
    	$fields = array(
    	'blog_id' => $blog->blog_id,
    	'blog_path' => $blog->path,
    	'blog_name' => $blog->blogname
    	);
    	
    	foreach ( $fields as $field => $value ) {
    	groups_update_groupmeta( $group_id, $field, $value );
    	}
    }
    add_action( 'groups_created_group', 'bp_group_meta_save' );
    
    function get_groups_by_meta ( $field, $meta_key, $meta_value ) {
    	global $wpdb;
    	
    	if ( is_string( $meta_value) ) $meta_value = "'" . $meta_value . "'";
    	
    	$sql = $wpdb->prepare( "SELECT $field from {$wpdb->base_prefix}bp_groups_groupmeta WHERE meta_key='$meta_key' AND meta_value=$meta_value", OBJECT );
    	$res = $wpdb->get_results( $sql );
    	
    	return $res;
    }
    
    // Build a list of groups with the matching blog_id value
    function get_groups_by_blogid ( $blog_id = 1 ) {
    	$list = get_groups_by_meta( 'group_id', 'blog_id', $blog_id );
    	
    	if ( count( $list ) ) {
    	$res = "";
    	foreach ( $list as $item ) {
    	$res .= $item->group_id . ',';
    	}
    	return substr( $res, 0, -1);
    	} else {
    	return FALSE;
    	}
    }

    groups-loop

    <?php 
    $current_blogid = get_current_blog_id();
    
    if ( $current_blogid > 1) {
    $groups_set = get_groups_by_blogid( $current_blogid );
    ( $groups_set !== FALSE ) ? $extra_args = '&include=' . $groups_set : $extra_args = '&include=-1';
    }
    
    if ( bp_has_groups( bp_ajax_querystring( 'groups' ) . $extra_args ) ) : ?>
    Doremdou
    Participant

    I tried to create a shortcode to show the join/leave button using the buddypress-functions but can’t make it to work… ๐Ÿ™
    What am I doing wrong?

    I would like a shortcode like this :

    [groupbutton name=”party1″]

    I tried with this code for a join button only at first:

    add_shortcode( 'groupbutton', 'groupbutton_check_shortcode' );
    
    function groupbutton_check_shortcode( $attr ) {
    
    	extract( shortcode_atts( array( 'name' => 'read' ), $attr ) );
    
    	$current_group_id = BP_Groups_Group::get_id_from_slug($name);
    	$group = groups_get_group( array( 'group_id' => $current_group_id ) );     
    		if(bp_loggedin_user_id()) {
    			if( 'public' == $group->status ) {
    				echo '<a id="group-' . esc_attr( $current_group_id ) . '" class="join-group" rel="join" title="' . __( 'Join Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ) . '">' . __( 'Join Group', 'buddypress' ) . '</a>';
    			}
    		}
    }

    I am not a developer at all so I dont understand everything but I am trying… :/
    Cant figure what I am doing wrong… and why it does not display anything at all.

    Thank you for your help and sorry for my bad english ๐Ÿ™‚

    PS: I would like to use all cases of buttons like here on the buddypress-functions.php:

    function bp_legacy_theme_ajax_joinleave_group() {
    	// Bail if not a POST action
    	if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
    		return;
    
    	// Cast gid as integer
    	$group_id = (int) $_POST['gid'];
    
    	if ( groups_is_user_banned( bp_loggedin_user_id(), $group_id ) )
    		return;
    
    	if ( ! $group = groups_get_group( array( 'group_id' => $group_id ) ) )
    		return;
    
    	if ( ! groups_is_user_member( bp_loggedin_user_id(), $group->id ) ) {
    		if ( 'public' == $group->status ) {
    			check_ajax_referer( 'groups_join_group' );
    
    			if ( ! groups_join_group( $group->id ) ) {
    				_e( 'Error joining group', 'buddypress' );
    			} else {
    				echo '<a id="group-' . esc_attr( $group->id ) . '" class="leave-group" rel="leave" title="' . __( 'Leave Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>';
    			}
    
    		} elseif ( 'private' == $group->status ) {
    
    			// If the user has already been invited, then this is
    			// an Accept Invitation button
    			if ( groups_check_user_has_invite( bp_loggedin_user_id(), $group->id ) ) {
    				check_ajax_referer( 'groups_accept_invite' );
    
    				if ( ! groups_accept_invite( bp_loggedin_user_id(), $group->id ) ) {
    					_e( 'Error requesting membership', 'buddypress' );
    				} else {
    					echo '<a id="group-' . esc_attr( $group->id ) . '" class="leave-group" rel="leave" title="' . __( 'Leave Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>';
    				}
    
    			// Otherwise, it's a Request Membership button
    			} else {
    				check_ajax_referer( 'groups_request_membership' );
    
    				if ( ! groups_send_membership_request( bp_loggedin_user_id(), $group->id ) ) {
    					_e( 'Error requesting membership', 'buddypress' );
    				} else {
    					echo '<a id="group-' . esc_attr( $group->id ) . '" class="membership-requested" rel="membership-requested" title="' . __( 'Membership Requested', 'buddypress' ) . '" href="' . bp_get_group_permalink( $group ) . '">' . __( 'Membership Requested', 'buddypress' ) . '</a>';
    				}
    			}
    		}
    
    	} else {
    		check_ajax_referer( 'groups_leave_group' );
    
    		if ( ! groups_leave_group( $group->id ) ) {
    			_e( 'Error leaving group', 'buddypress' );
    		} elseif ( 'public' == $group->status ) {
    			echo '<a id="group-' . esc_attr( $group->id ) . '" class="join-group" rel="join" title="' . __( 'Join Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ) . '">' . __( 'Join Group', 'buddypress' ) . '</a>';
    		} elseif ( 'private' == $group->status ) {
    			echo '<a id="group-' . esc_attr( $group->id ) . '" class="request-membership" rel="join" title="' . __( 'Request Membership', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'request-membership', 'groups_send_membership_request' ) . '">' . __( 'Request Membership', 'buddypress' ) . '</a>';
    		}
    	}
    
    	exit;
    }
    
    /**
     * Close and keep closed site wide notices from an admin in the sidebar, via a POST request.
     *
     * @return mixed String on error, void on success
     * @since BuddyPress (1.2)
     */
    function bp_legacy_theme_ajax_close_notice() {
    	// Bail if not a POST action
    	if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
    		return;
    
    	if ( ! isset( $_POST['notice_id'] ) ) {
    		echo "-1<div id='message' class='error'><p>" . __( 'There was a problem closing the notice.', 'buddypress' ) . '</p></div>';
    
    	} else {
    		$user_id      = get_current_user_id();
    		$notice_ids   = bp_get_user_meta( $user_id, 'closed_notices', true );
    		$notice_ids[] = (int) $_POST['notice_id'];
    
    		bp_update_user_meta( $user_id, 'closed_notices', $notice_ids );
    	}
    
    	exit;
    }
    #179347
    cyndimarie
    Participant

    After snooping around I can see that the tables for the profile fields are created in profile-loop.php and bp_the_profile_field_value is defined in bp-xprofile-template.php I’m not sure about editing these files though…

    I can’t seem to find the file that directs the items in a profile field to be separated by a comma, however I did find this topic: bp_the_profile_field_value and separating values

    Instead of separating the items in the <td class="data"><?php bp_the_profile_field_value(); ?></td> by commas, I want to make them into an un-ordered list.

    Any thoughts on how?

    #179339
    BlinkyBill01
    Participant

    @mercime

    Ok, set up a throw-away account.

    URL: http://slamfans.com/wp/members/demouser01/
    Login: demouser01
    Pass: demo123

    On that demouser01 profile page, you should see where the Achievements link is forced to a second line but it’s still following the CSS positioning. If you visit another member page, you don’t see that error. I’m assuming that’s because you don’t see the Notifications link on other members profiles.

    I’m trying to remember how I did it on another Buddypress site where I was able to force all of the plugin links, like Achievements, into a second line so that the first line remains with all of the default links. I did that about 2-3 years ago and that since has since floated away into the aether. So dunno if it’s even possible anymore with recent changes to Buddypress.

    Hope there’s a solution to be had. (But thinking about it, it would be awesome if there was a plugin that could me made for custom WP themes that would allow you to position links in the order and places you’d like.)

    Thanks!

    #179338
    Boone Gorges
    Keymaster

    Hi @zippykid – Thanks for the post and for the gist of the EXPLAIN.

    We’ve made some massive improvements for 2.0 in the activity query, but we haven’t really changed the way that this COUNT query works. In any case, forcing an index on a COUNT that doesn’t need sorting doesn’t really make much sense anyway, so we should probably remove it. If you get a chance, please open an enhancement ticket at https://buddypress.trac.wordpress.org with the suggestion. If not, I’ll try to get to it later.

    #179336
    shanebp
    Moderator

    The link to your gist:
    https://gist.github.com/vidluther/9370018

    You’ll probably get a better response by opening a ticket at:
    https://buddypress.trac.wordpress.org/

    #179327
    astarina
    Participant

    @mercime Thanks, I’ve seen that plugin (I did extensive searching online before I posted my question). It doesn’t seem to do what I want it to do – ie for buddypress users to set up multiple stores.

    It seems like there is only one store and it shows feeds of what the users are buying, product groups, etc?

    #179324
    @mercime
    Participant
    #179320
    craftersuniversity
    Participant

    Sorry, but it doesn’t work. I can only find two activity-loop.php in the BuddyPress plugin folder, one in \buddypress\bp-themes\bp-default\activity which doesnt change anything when altered and one in \buddypress\bp-templates\bp-legacy\buddypress\activity which breaks the site, stops some plugins and refuses to show any activities at all when altered according to your instructions. I’ve also tried placing them in my child theme, but it doesn’t do anything…

    What could be the problem?

    By the way, i’m using a child theme of Twenty Eleven.

    #179317
    Nishant Kumar
    Participant

    @backpackersunion, you are welcome.

    As per the ticket status. It was already fixed in trunk.

    https://buddypress.trac.wordpress.org/changeset/7740

    Thanks community.

    #179315
    @mercime
    Participant

    @bhself When did this issue start? If you deactivate BuddyPress, is the issue resolved? If not, have you tried deactivating other plugins to check which is causing the issue?

    #179301

    In reply to: Group Adm Avatars

    shanebp
    Moderator

    As you can see, the avatars are added by function bp_group_list_admins
    in this file:
    buddypress\bp-templates\bp-legacy\buddypress\groups\single\group-header.php

    Unfortunately, that function has no filters.
    So you’ll need to create a template over-ride of group_header.php in your theme.
    Then replace bp_group_list_admins() with a custom function that you create in plugins/bp-custom.php

    function bp_group_list_admins lives in
    \buddypress\bp-groups\bp-groups-template.php

    You can copy it and change the function name and the html output of the foreach loop.

    You’ll probably need to do the same thing for bp_group_list_mods()

    #179286
    Renato Alves
    Moderator

    I think you are looking for a answer not related to BuddyPress.

    #179278
    @mercime
    Participant

    @markbasisreclamenl if that page.php is really from the Twenty Eleven theme and not a theme which just copied Twenty Eleven’s theme files, then follow the instructions addressing different layouts at https://codex.buddypress.org/themes/bp-theme-compatibility-and-the-wordpress-default-themes/twenty-eleven-theme/

    #179277
    johnsag
    Participant

    I have tried to deavtivate all the plugins except Buddypress, but the problem still persists. I could really need some help with this, as I have put a lot of work into this site, and this issue is preventing from doing anything furher, and a deadline is looming.

    1. Which version of WordPress are you running?

    WordPress 3.8.1 running twentyelevenchild

    2. Did you install WordPress as a directory or subdomain install?

    directory

    3. If a directory install, is it in root or in a subdirectory?

    root

    4. Did you upgrade from a previous version of WordPress? If so, from which version?

    No, I think I grabbed the latest files.

    5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting.

    yes

    6. Which version of BP are you running?

    Version 1.9.2

    7. Did you upgraded from a previous version of BP? If so, from which version?

    I think it was a fresh install.

    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?

    Right now, only Buddypress.

    9. Are you using the standard BuddyPress themes or customized themes?

    A customized twentyeleven.

    10. Have you modified the core files in any way?

    I have modified members-loop.php (to display slected fields) and functions.php (to exclude admin from being listed)

    11. Do you have any custom functions in bp-custom.php?
    Not any others

    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in?

    I disabled bbPress, the problem persists.

    13. Please provide a list of any errors in your serverโ€™s log files.

    Not available, as far as I know.

    14. Which company provides your hosting?

    one.com

    15. Is your server running Windows, or if Linux; Apache, nginx or something else?

    Linux, Apache

    Hugo Ashmore
    Participant

    That’s a recent glitch, we’ll get it rectified.

    BuddyPress Codex

    #179263

    In reply to: Performance issue.

    wolfang8
    Participant

    Hi, Henry. I have done what you said. The plugins are necessary on my web site. Removed plugins and theme which I do not use. Am using Twitter Bootstrap already. As you can see, BuddyPress and s2members take most of time for loading. The others are less than 30%.
    I deactivated BuddyPress and s2members, and my web site turned fast. That means these two plugins make my site slow. Hope the new version would provide better performance.

    #179251
    Squirrel
    Participant

    The plugin author is this guy by the way: he wrote some plugins on wordpress.org including BuddyPress Groups Extras which is how I found him. Slava UA.

    #179245
    BackpackersUnion
    Participant

    @nishant_official I can confirm your fixed worked great!

    I cringed when modifying the core file outside of a child theme but needed the fix. Previously the delete link was redirecting me to the top of the page by adding “#” to the end of the page URL. Added the change you outlined in your ticket and it work flawlessly. Thanks for taking the time to look into and create a ticket!

    BuddyPress 1.9.2, WordPress with Multisite 3.8.1.

    #179241
    franzvz
    Participant

    The link however has a bbp_ tag in the URL. So I don’t know who the culprit is.

    Just in case anyone else needs it

    bbpress Version 2.5.3
    BuddyPress Version 1.9.2

Viewing 25 results - 17,226 through 17,250 (of 68,918 total)
Skip to toolbar