Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 17,401 through 17,425 (of 69,106 total)
  • Author
    Search Results
  • #179468
    mcpeanut
    Participant

    found this section in the bp-groups-activity.php
    this seems to relate to the public groups, does anyone have any ideas on what to change here?

    // Set the default for hide_sitewide by checking the status of the group
    $hide_sitewide = false;
    if ( !empty( $args[‘item_id’] ) ) {
    if ( bp_get_current_group_id() == $args[‘item_id’] ) {
    $group = groups_get_current_group();
    } else {
    $group = groups_get_group( array( ‘group_id’ => $args[‘item_id’] ) );
    }

    if ( isset( $group->status ) && ‘public’ != $group->status ) {
    $hide_sitewide = true;
    }
    }

    $r = wp_parse_args( $args, array(
    ‘id’ => false,
    ‘user_id’ => bp_loggedin_user_id(),
    ‘action’ => ”,
    ‘content’ => ”,
    ‘primary_link’ => ”,
    ‘component’ => buddypress()->groups->id,
    ‘type’ => false,
    ‘item_id’ => false,
    ‘secondary_item_id’ => false,
    ‘recorded_time’ => bp_core_current_time(),
    ‘hide_sitewide’ => $hide_sitewide
    ) );

    return bp_activity_add( $r );
    }

    i have tried changing the $hide_sitewide = false; to $hide_sitewide = true;
    but this doesnt work properly.

    #179460
    Rita84
    Participant

    Hi, my buddypress notifications template is missing. Please tell me how to create a simple notifications template. thanks

    #179459
    Rita84
    Participant

    Hi, please tell me how to create buddypress notifications template as it is also missing in my theme ? thanks

    #179457
    modemlooper
    Moderator
    #179445
    boblebad
    Participant

    Hi shanebp

    I have not installed xProfile. i’m using BuddyPress out-of-the-box sort of, i’ve bought a theme called Sweet Date, through that i have installed BuddyPress.

    I have checked every table in the database, nothing says anything about profile in any way.

    All the best
    Carsten

    #179439
    shanebp
    Moderator

    Have you activated groups via the checkbox on this screen?
    /wp-admin/options-general.php?page=bp-components

    Have you assigned a page to Groups via this screen?
    /wp-admin/admin.php?page=bp-page-settings

    The same and more info:

    Configure BuddyPress

    #179437
    boblebad
    Participant

    Thanks for your reply Henry 🙂

    I can’t find anything that looks like that in the database, and when going through the table names, there isn’t anything that sounds like having something to do with xProfile ?

    I need to find the ID of the fields, so i can use them with BuddyPress Profile Progression “bppp_progression_block($user_id)”.

    All the best
    Carsten

    shanebp
    Moderator

    It is simple, if you use the correct parameter, anyway…

    Create a template overload of this file:
    \bp-templates\bp-legacy\buddypress\activity\activity-loop.php

    Then change this:
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>

    To this:

    <?php
    $friends = friends_get_friend_user_ids( bp_loggedin_user_id() );
    $friends[] = bp_loggedin_user_id();
    $friends_and_me = implode( ',', (array) $friends );
    $friends_and_me =  '&user_id=' . $friends_and_me;
    ?>
    
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . $friends_and_me) ) :  ?>

    Creating a template overload:

    Theme Compatibility & Template Files

    #179403
    BuddyBoss
    Participant

    Not sure why it’s not working.

    For alternative spam plugins/solutions, there’s another more active thread going on here:
    https://buddypress.org/support/topic/stop-buddypress-spam/

    #179402

    In reply to: Stop BuddyPress SPAM

    BuddyBoss
    Participant

    Two more methods that help. I recently had a crazy spam attack – probably 300 fake signups per day. I implemented these two methods and it dropped to near 0.

    1. Change the /register/ slug to something unique. An example would be /create-your-account/, or something of that nature. It just needs to be unique and also make sense in a URL for your user. Spammers targeting BuddyPress look for /register/ as the signup page. It’s all automated so you want to filter them out at the first step.

    2. Add this to your functions.php file in your theme or child theme.

    It presents a dummy field that humans don’t see. Spambots will fill it out, and if the field captures a value it will reject the signup.

    // BuddyPress Honeypot
    function add_honeypot() {
        echo '';
    }
    add_action('bp_after_signup_profile_fields','add_honeypot');
    function check_honeypot() {
        if (!empty($_POST['system55'])) {
            global $bp;
            wp_redirect(home_url());
            exit;
        }
    }
    add_filter('bp_core_validate_user_signup','check_honeypot');

    Credits for #2 go to:
    http://mattts.net/development-stuff/web-development-stuff/wordpress/buddypress/anti-spam-techniques/registration-honeypot/

    I edited it slightly to remove the required redirect. Add that back from his tutorial if you want to. It requires that you make an extra page to send the spammer to, and I personally think that’s not necessary. I actually want them to have no indication their signup failed.

    #179393
    Doremdou
    Participant

    Hello 🙂
    If you uncheck the User Groups in Buddypress settings (first tab) you disable all the Group system that is why all your groups disappeared.

    I guess you are talking about the checking box on the FIRST tab of the buddypress settings, did you see the other one on the THIRD tab (called settings, just after the “Pages” tab) ? (at the top of the page)
    You have a box to check to allow/disallow users to create groups.
    Hope you are talking about that 😉

    #179390
    danbp
    Participant

    Read here exclude_admins_mods

    #179381
    CryptoSteam
    Participant

    Wow. Just installed Buddypress and it complements nicely with BBpress.

    #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?

Viewing 25 results - 17,401 through 17,425 (of 69,106 total)
Skip to toolbar