Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'notification user id'

Viewing 25 results - 526 through 550 (of 1,091 total)
  • Author
    Search Results
  • #187080

    In reply to: Forwarding Messages

    danbp
    Participant

    Hi @akovia,

    each logged in user has access to his profile settings. Eg. on the top right user menu (howdy…)
    or on the buddybar under the profile header.

    /membres/xxxx/settings/notifications/

    Settings > Email
    Once on this setting page, each user can decide for what he want to receive an alert.

    But it is an emailed notice he will receive, not the complete message.

    This messaging system is intended to work internally. This means the content of the message stays on the site. BP eventually sends only a reference to the content. Eg. xxx send you a private message (site url), not the full message.

    Screenshot:
    BuddyPress 2.x notification settings

    #186408
    elpix
    Participant

    Hi everyone.

    Since the last update of BP, I have two problems with group invitations :

    – In one of my plugin, to invite a member to a group, I was doing :

    groups_invite_user( array( 'user_id' => $user_id, 'group_id' => $group_id, 'inviter_id' => $creator_id, 'is_confirmed' => 0 ) );
    groups_send_invites( $creator_id, $group_id );

    But now, this code takes all the invitations already sent for this group, and it make a sql query for each of them… so it’s very slow

    So how can I just send 1 invitation easyli ?

    – Second problem : I have done a filter to customize group invitations :
    add_filter('groups_notification_group_invites_message' , array($this , 'my_groups_notification_group_invites_message') , 110 , 7);

    and the function :
    public function my_groups_notification_group_invites_message($message, $group, $inviter_name, $inviter_link, $invites_link, $group_link, $settings_link)

    But it doesn’t work now … it was working perfectly.

    Do you know where is the bug in the code ?

    Thanks a lot 🙂

    Findolfin
    Participant

    Hi

    Thanks, for your fast respond! Unfortunately it doesn’t work. But I could fix it by myself with trying.
    With poEdit the words were translatet but when I opened the file with CodeStyling Localization and searched for the “</span>” – tag I found message, notification, friends and groups twice:

    Once translatet to German and once not. I translatet all to German who were not translatet and it worked. I have no idea why this was that way but now I’m happy.
    I sent the file also to deckerweb and a topic in German WordPress so the other user with this issue can use the file.

    Maybe you have an idea what that could be?

    FlickChicks
    Participant

    Hi,

    I would like to remove the mini speech bubble icon/feature that appears to the left of the user’s account name and notification, it is seen at the top of the page when a user is logged in. I don’t want to get rid of the notifications or the user’s name, just the speech bubble.

    Thanks!

    fakename014
    Participant

    Hi,

    I have a custom theme for Buddypress. Currently the WP admin bar shows for admin users, but no others.
    I would like all users to be able to use the admin bar so they can access their activity, notifications, settings etc

    Is this normal for Buddypress to only show the admin bar to admins? or have I somehow done something to hide it from non-admins?

    It’s not a theme problem because I tried it with other themes and had the same problem.

    Can anyone help?

    Info:
    Wordpress 3.9.1
    Buddypress 2.0.1
    bp-custom.php –> 2 redirect functions for login and logout
    lots of plugins
    Local dev running on MAMP

    adamt19
    Participant

    When looking at the ‘single’ view of a BP message/thread, the line at the top that reports the recipeients, e.g. “Conversation between you and XXXXX” is reporting extra names, which is terrifying our users!

    I suspect it has to do with my deleting some spam messages created by a spam user earlier today, using SQL:

    DELETE FROM wp_bp_messages_messages WHERE sender_id=’xxxx’ (spam user’s id)

    I also deleted from bp_notifications so that the recipeients of spam would no longer have items to read in their inbox.

    DELETE FROM wp_bp_notifications WHERE secondary_item_id=’xxxx’ (spam user’s id)

    So there’s a big gap in conversation IDs in the database, where conversations were deleted. But subsequent conversations are being ID’d accordingly, i.e. they’re not falling into the gap, they’re auto-indexing higher than the highest conversation ID. This seems normal.

    bp_get_the_thread_recipients is always printing the proper sender (saying “You), the proper recipeient, but it’s also reporting “Deleted User” as well as some other user in the system which is always different.

    For example, if I “adamt19” send a message to “example user”, the line used to read:

    “Conversation between you and example user”

    wheras now it says:

    “Conversation between you, someotheruser, Deleted user, and example user”

    Naturally this is freaking out the true recipient. I’ve double checked that the extra names are NOT actually receiving mail. So that’s good, at least. But why would these other names be returned by bp_get_the_thread_recipients and how do I fix it?

    Also, if there’s a better way/missing step in my process for removing spam pls advise!

    mshafshak
    Participant

    i’m trying to get user info from facebook when a user tries to login through facebook on my website ,Wordpress website, I have been struggling to retrieve users’ birthday, email, first name, last name and interests and so on what is the code to get them. I’m newly to facebook apps so I don’t know what to do and what is the procedure

    All what i can retrieve is the email, name and create username according to the url user name

    some clear code would be useful Thank you

    This is my code location in my directory:
    wp-content/themes/themeName/framework/functions/facebook_login.php

    
    <?php
    
    function fb_head(){
      if( is_user_logged_in()) return;
      ?>
    
      <div id="fb-root"></div>
    	<script>
    		// Additional JS functions here
    		window.fbAsyncInit = function() {
    			FB.init({
    				appId      : '<?php echo sq_option('fb_app_id'); ?>', // App ID
    				version    : 'v2.0',
    				status     : true, // check login status
    				cookie     : true, // enable cookies to allow the server to access the session
    				xfbml      : true,  // parse XFBML
    				oauth      : true
    			});
    
    			// Additional init code here
    
    		};
    
    		// Load the SDK asynchronously
    		(function(d){
    			 var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
    			 if (d.getElementById(id)) {return;}
    			 js = d.createElement('script'); js.id = id; js.async = true;
    			 js.src = "//connect.facebook.net/en_US/sdk.js";
    			 ref.parentNode.insertBefore(js, ref);
    		 }(document));
    	</script>
        <?php
    }
    add_action( 'kleo_after_body', 'fb_head' );
    
    function fb_footer(){
    ?>
    	<script type="text/javascript">
    	var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
    	jQuery('.facebook_connect').click(function(){
    			var context = jQuery(this).closest("form");
    			if (jQuery(".tos_register", context).length > 0)
    			{
    				if (! jQuery(".tos_register", context).is(":checked"))
    				{
    					alert('<?php echo apply_filters('kleo_fb_tos_alert',__("You must agree with the terms and conditions.",'kleo_framework'));?>');
    					return false;
    				}
    			}		
    			
    		FB.login(function(FB_response){
    			if( FB_response.status === 'connected' ){
    				fb_intialize(FB_response);
    			}
    		},
    		{scope: 'public_profile,email'});
    	});
    
    	function fb_intialize(FB_response){
    		FB.api( '/me', 'GET', 
    						{'fields':'id,email,verified,name'},
    						function(FB_userdata){
    							jQuery.ajax({
    									type: 'POST',
    									url: ajaxurl,
    									data: {"action": "fb_intialize", "FB_userdata": FB_userdata, "FB_response": FB_response},
    									success: function(user){
    										if( user.error ){
    											alert( user.error );
    										}
    										else if( user.loggedin ){
    											if( user.type === 'login' )
    											{
    												window.location.reload();
    											}
    											else if( user.type === 'register' )
    											{
    												window.location = user.url;
    											}
    										}
    									}
    							});
    						}
    		);
    	};
    	</script>
    <?php
    }
    add_action( 'wp_footer', 'fb_footer' );
    
    if (!function_exists('fb_button')):
    function fb_button()
    {
    ?>
        <a href="#" class="facebook_connect radius button facebook"><i class="icon-facebook-sign"></i> &nbsp;<?php _e("LOG IN WITH Facebook", 'kleo_framework');?></a>
    <?php
    }
    endif;
    
    if (!function_exists('fb_register_button')):
    function fb_register_button()
    {
    ?>
        <a href="#" class="facebook_connect radius small button facebook"><i class="icon-facebook-sign"></i> &nbsp;<?php _e("Register using Facebook", 'kleo_framework');?></a>
    <?php
    }
    endif;
    
    if (!function_exists('fb_register_button_front')):
    function fb_register_button_front()
    {
    ?>
        <a href="#" class="facebook_connect radius button facebook"><i class="icon-facebook"></i></a>
    <?php
    }
    endif;
    
    add_action('fb_popup_button', 'fb_button' );
    
    if (sq_option('facebook_register', 0) == 1) {
        add_action('fb_popup_register_button', 'fb_register_button' );
        add_action('fb_popup_register_button_front', 'fb_register_button_front' );
    }
            
    function wp_ajax_fb_intialize(){
        @error_reporting( 0 ); // Don't break the JSON result
        header( 'Content-type: application/json' );
    
        if( !isset( $_REQUEST['FB_response'] ) || !isset( $_REQUEST['FB_userdata'] ))
        die( json_encode( array( 'error' => __('Authenication required.', 'kleo_framework') )));
    
        $FB_response = $_REQUEST['FB_response'];
        $FB_userdata = $_REQUEST['FB_userdata'];
        $FB_userid = $FB_userdata['id'];
    
        if( !$FB_userid )
        die( json_encode( array( 'error' => __('Please connect your facebook account.', 'kleo_framework') )));
    
        global $wpdb;
        //check if we already have matched our facebook account
        $user_ID = $wpdb->get_var( "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '_fbid' AND meta_value = '$FB_userid'" );
        
    	
        //if facebook is not connected
        if( !$user_ID ){
    			$user_email = $FB_userdata['email'];
    			$user_ID = $wpdb->get_var( "SELECT ID FROM $wpdb->users WHERE user_email = '".$wpdb->escape($user_email)."'" );
    
    			$redirect = '';
    
    			//if we have a registered user with this Facebook email
    			if(!$user_ID )
    			{
    				if ( !get_option( 'users_can_register' )) {
    					die( json_encode( array( 'error' => __('Registration is not open at this time. Please come back later.', 'kleo_framework') )));
    				}
    				if (sq_option('facebook_register', 0) == 0) {
    					die( json_encode( array( 'error' => __('Registration using Facebook is not currently allowed. Please use our Register page', 'kleo_framework') )));
    				}
    				
    				extract( $FB_userdata );
    
    				$display_name = $name;
    
    				if( empty( $verified ) || !$verified )
    				die( json_encode( array( 'error' => __('Your facebook account is not verified. You have to verify your account before proceed login or registering on this site.', 'kleo_framework') )));
    
    				$user_email = $email;
    				if ( empty( $user_email ))
    				die( json_encode( array( 'error' => __('Please re-connect your facebook account as we couldn\'t find your email address.', 'kleo_framework') )));
    
    				if( empty( $name ))
    				die( json_encode( array( 'error' => 'empty_name', __('We didn\'t find your name. Please complete your facebook account before proceeding.', 'kleo_framework') )));
    
    				$user_login = sanitize_title_with_dashes( sanitize_user( $display_name, true ));
    
    				if ( username_exists( $user_login )) {
    					$user_login = $user_login. time();
    				}
    
    				$user_pass = wp_generate_password( 12, false );
    				$userdata = compact( 'user_login', 'user_email', 'user_pass', 'display_name' );
    				$userdata =  apply_filters('kleo_fb_register_data', $userdata);
    
    				$user_ID = wp_insert_user( $userdata );
    				if ( is_wp_error( $user_ID ))
    				die( json_encode( array( 'error' => $user_ID->get_error_message())));
    
    				//send email with password
    				wp_new_user_notification( $user_ID, wp_unslash( $user_pass ) );
    
    				//add Facebook image
    				update_user_meta($user_ID, 'kleo_fb_picture', 'https://graph.facebook.com/' . $id . '/picture');
    						
    				do_action('fb_register_action',$user_ID);
                
    				update_user_meta( $user_ID, '_fbid', (int) $id );
    				$logintype = 'register';
    				$redirect = apply_filters('kleo_fb_register_redirect',bp_core_get_user_domain( $user_ID ).'profile/edit/group/1/?fb=registered');
    			}
    			else
    			{
    				update_user_meta( $user_ID, '_fbid', (int) $FB_userdata['id'] );
    				//add Facebook image
    				update_user_meta($user_ID, 'kleo_fb_picture', 'https://graph.facebook.com/' . (int) $FB_userdata['id'] . '/picture');
    				$logintype = 'login';
    			}
    		}
        else
        {
    			$logintype = 'login';
        }
    
        wp_set_auth_cookie( $user_ID, false, false );
        die( json_encode( array( 'loggedin' => true, 'type' => $logintype, 'url' => $redirect )));
    }
    add_action( 'wp_ajax_nopriv_fb_intialize', 'wp_ajax_fb_intialize' );  
            
    //If registered via Facebook -> show message
    add_action( 'template_notices', 'kleo_fb_register_message' );
    if (!function_exists('kleo_fb_register_message')):
        function kleo_fb_register_message()
        {
            if (isset($_GET['fb']) && $_GET['fb'] == 'registered')
            {
                echo '<div class="clearfix"></div><br><div class="alert-box success" id="message" data-alert>';
                echo __('Thank you for registering. Please make sure to complete your profile fields below.', 'kleo_framework');
                echo '</div>';
            }
        }
    endif;
    
    //display Facebook avatar
    if(sq_option('facebook_avatar', 1) == 1) {
    	//show Facebook avatar in WP
    	add_filter('get_avatar', 'kleo_fb_show_avatar', 5, 5);
    	//show Facebook avatar in Buddypress
    	add_filter('bp_core_fetch_avatar', 'kleo_fb_bp_show_avatar', 3, 5);
    	//show Facebook avatar in Buddypress - url version
    	add_filter('bp_core_fetch_avatar_url','kleo_fb_bp_show_avatar_url', 3, 2);
    }
    function kleo_fb_show_avatar($avatar = '', $id_or_email, $size = 96, $default = '', $alt = false) {
      $id = 0;
      if (is_numeric($id_or_email)) {
        $id = $id_or_email;
      } else if (is_string($id_or_email)) {
        $u = get_user_by('email', $id_or_email);
        $id = $u->id;
      } else if (is_object($id_or_email)) {
        $id = $id_or_email->user_id;
      }
      if ($id == 0) return $avatar;
    	
    	//if we have an avatar uploaded and is not Gravatar return it
    	if(strpos($avatar, home_url()) !== FALSE && strpos($avatar, 'gravatar') === FALSE) return $avatar;
    	
    	//if we don't have a Facebook photo
      $pic = get_user_meta($id, 'kleo_fb_picture', true);
      if (!$pic || $pic == '') return $avatar;
    	
      $avatar = preg_replace('/src=("|\').*?("|\')/i', 'src=\'' . $pic . apply_filters('fb_show_avatar_params', '?width=580&height=580') . '\'', $avatar);
      return $avatar;
    }
    
    function kleo_fb_bp_show_avatar($avatar = '', $params, $id) {
        if(!is_numeric($id) || strpos($avatar, 'gravatar') === false) return $avatar;
    		
    		//if we have an avatar uploaded and is not Gravatar return it
    		if(strpos($avatar, home_url()) !== FALSE && strpos($avatar, 'gravatar') === FALSE) return $avatar;
    		
        $pic = get_user_meta($id, 'kleo_fb_picture', true);
        if (!$pic || $pic == '') return $avatar;
        $avatar = preg_replace('/src=("|\').*?("|\')/i', 'src=\'' . $pic. apply_filters('fb_show_avatar_params', '?width=580&height=580') . '\'', $avatar);
        return $avatar;
    }
    
    function kleo_fb_bp_show_avatar_url($gravatar, $params) {
    	
    	//if we have an avatar uploaded and is not Gravatar return it
    	if(strpos($gravatar, home_url()) !== FALSE && strpos($gravatar, 'gravatar') === FALSE) return $gravatar;
    	
      $pic = get_user_meta($params['item_id'], 'kleo_fb_picture', true);
      if (!$pic || $pic == '') return $gravatar;
    	return $pic. apply_filters('fb_show_avatar_params', '?width=580&height=580');
    }
    
    ?>
    
    kiran4wp
    Participant

    Hi All,

    I want to know how to add extra tab after notification or messages tabs. I have done some what using below code

    function my_setup_nav() {
    global $bp;

    bp_core_new_nav_item( array(
    ‘name’ => __( ‘Endorsement’, ‘buddypress’ ),
    ‘slug’ => ‘endorsement’,
    ‘position’ => 100,
    ‘user_has_access’ => bp_is_my_profile(),
    ‘screen_function’ => ‘messages_screen_inbox’,
    ‘default_subnav_slug’ => ‘messages_screen_inbox’,
    ‘item_css_id’ => $bp->messages->id
    ) );
    }
    add_action( ‘bp_setup_nav’, ‘my_setup_nav’ );

    function my_endorsement() {
    bp_core_load_template( ‘my_endorsement’ );
    }

    I added this in functions.php. After that it is created a tab, but the thing is when i click on tab it is navigating to slug link endorsement page with highlighting Endorsement tab, but in that page after the tab it is showing empty content. How to add my functionality related to endorsement there.

    Thanks Inadvance….

    #184396
    GT Director
    Participant

    I know this might sound silly to everyone, but for the life of me, I can’t figure out how to view profiles on my site.

    Instinctively, my thought is to click onto the icon of a member and see their profile (as I did with my own). However, when I did none of the profile fields I just created through “Settings” are displaying.
    – Instead, I am seeing a photo that I never uploaded as a profile image, (it’s using the image that I uploaded as a profile image for “WordPress”);

    – It’s showing my full name rather than the “username” I wanted to display;

    – I’m getting: “Activity > Profile > Notifications > Friends > Groups > Settings > View > Edit > Change Avatar ” rather than the list of fields I just created for profiles.

    – When I click onto the word “View” all I get is the word “Base” and the a single default field “Name” which shows my full name.

    After adding the new profile fields, I looked for a place to save all my edits and there was none – leaving me to think all new edits where instantly saved. Yet when I try to look up my profile, nothing displays. I wish this were easier. I thought it might be the default setting for profiles and I needed to refresh the page, but no matter how many times I refresh my page, I still don’t get any of the profile fields I just created. Please help!!!!

    (I’m using WordPress v3.4.4 and BuddyPress v2.0.1)

    Uncle Jimmy
    Participant

    Wordpress Version 3.9.1
    gantry_wordpress_framework-4.1.2
    rt_gantry_wp-4.1.2
    BuddyPress Version 2.0.1
    bbPress Version 2.5.4

    In case there are any known issues, here is a list of my Plugins

    Activated Plugins;

    A5 Custom Login Page Version 2.1.1 | By Waldemar Stoffel
    Add New Default Avatar Version 1.3.1 | By Kailey Lampert
    Admin Menu Editor Version 1.3.2 | By Janis Elsts
    Advanced Blog Authors Widget Version 1.1.1 | By Pippin Williamson
    bbPress – Admin Notes Version 1.2.3 | By Pippin Williamson
    bbPress – Mark as Read Version 1.0 | By Pippin Williamson
    bbPress – Private Replies Version 1.2 | By Pippin Williamson and Remi Corson
    bbPress Custom Topic & Reply Notifications Version 1.3.1 | By Pippin Williamson
    bbPress Email Notifications Version 0.3 | By Jennifer M. Dodd
    bbPress Notices Version 1.0.1 | By Pippin Williamson
    bbPress String Swap Version 1.4.0 | By David Decker – DECKERWEB
    BuddyPics Version 0.3.2 | By modemlooper
    BuddyPress Group Email Subscription Version 3.4 | By Deryk Wenaus, boonebgorges, r-a-y
    BuddyPress reCAPTCHA Version 0.1 | By Martin Seysen
    BuddyPress Wall Version 0.9.3 | By Meg@Info
    Buddypress Xprofile Custom Fields Type Version 1.5.9.6 | By donmik
    Jetpack by WordPress.com Version 3.0.2 | By Automattic
    Love It Pro Version 1.2 | By Pippin Williamson
    rtMedia for WordPress, BuddyPress and bbPress Version 3.6.15 | By rtCamp
    User Image Gallery Version 1.0.1 | By Pippin Williamson
    W3 Total Cache Version 0.9.4 | By Frederick Townes
    wpcu3er Version 0.80 | By MADEBYPLAY

    …and others which are Deactivated.

    ///////////////////////////////////////////////////////////////////////////////////////////////

    This configuration is working nearly perfectly, out of the box! :o) ..Except, the Buddypress associated WP Register Page isn’t fetching the theme styles.

    http://christianitees.infinigrafix.com/members/register/

    I checked the theme (which is the Rocket Theme Basic Theme for WP), and I checked the Buddypress files and all I was able to find, up to this point, is the following.

    http://christianitees.infinigrafix.com/wp-content/uploads/2014/06/rt-gantry-wp-theme–error.jpg

    I haven’t been able to track the source of the rogue > yet, I’ll keep looking.

    Please advise and thank you very, very much. :o)

    #183977
    Chris Perryman
    Participant

    Just wanted to follow up…we did come up with a solution for this in case any one else is looking for it.

    Full details are now on my blog at Revelation Concept.

    function rc_buddypress_profile_update( $user_id ) { 
     
         $admin_email = "YOUR-EMAIL@DOMAIN.COM";
         $message = sprintf( __( 'Member: %1$s', 'buddypress' ), bp_core_get_user_displayname( $user_id ) ) . "\r\n\r\n"; 
         $message .= sprintf( __( 'Color: %s' ), bp_get_profile_field_data('field=Color') ). "\r\n\r\n";
         wp_mail( $admin_email, sprintf( __( '[YOUR SITE] Member Profile Update' ), get_option('blogname') ), $message );
     }
     
     add_action( 'xprofile_updated_profile', 'rc_buddypress_profile_update', 10, 5 );
    #183850
    godavid33
    Participant

    Ok, well I had to figure this one out. It’s a bit of a lengthy solution. I’m not going to explain everything, as I can’t for either lack of knowledge or fear of being incorrect. I’ll just give you the code, tell you what it does, and where it goes.

    First, lets add the favorite button to the comments template. Find comment.php (in /activity) and add the code:

    
    		<?php global $activities_template; ?>
    		<?php if ( bp_activity_can_favorite() ) : ?>
    			<?php
    				$my_fav_count = bp_activity_get_meta( bp_get_activity_comment_id(), 'favorite_count' );
    				
    				$my_fav_count = "<span>".$my_fav_count."</span>";
    				
    				$is_favorite = apply_filters( 'bp_get_activity_is_favorite', in_array( bp_get_activity_comment_id(), $activities_template->my_favs ) );
    			?>
    
    			<?php if ( !$is_favorite ) : ?>
    
    				<a href="<?php echo apply_filters( 'bp_get_activity_favorite_link', wp_nonce_url( home_url( bp_get_activity_root_slug() . '/favorite/' . bp_get_activity_comment_id() . '/' ), 'mark_favorite' ) ); ?>" class="tooltip-trigger fav bp-secondary-action bp-primary-action" title="<?php echo god_get_favorited_usernames(bp_get_activity_comment_id()); ?>" style="position:relative;"><?php _e( 'Like', 'buddypress' ); ?><?php echo $my_fav_count; ?></a>
    
    			<?php else : ?>
    
    				<a href="<?php echo apply_filters( 'bp_get_activity_favorite_link', wp_nonce_url( home_url( bp_get_activity_root_slug() . '/favorite/' . bp_get_activity_comment_id() . '/' ), 'mark_favorite' ) ); ?>" class="tooltip-trigger unfav bp-secondary-action bp-primary-action" title="<?php echo god_get_favorited_usernames(bp_get_activity_comment_id()); ?>" style="position:relative;"><?php _e( 'Unlike', 'buddypress' ); ?><?php echo $my_fav_count; ?></a>
    
    			<?php endif; ?>
    
    		<?php endif; ?>	
    

    This code simply adds the buttons, and gets all the necessary info and variables.

    Then, you’re going to need to modify the buddypress javascript. I personally modified both global.js and buddypress.js (through overriding in my template, which is a topic for a whole other thread), though I might be wrong in this. At any rate, look for the line (around 264 in buddypress.js):

    
    var parent = target.closest('.activity-item');
    

    and change it to

    
    var parent = target.closest('li');
    

    The reason we changed this line is so that our custom favorite button doesn’t default to grabbing the top level activity id. Now you can actually favorite comments!

    But wouldn’t it be nice if the user received a notification when someone favorited their activity? Add this bad boy to functions.php

    
    
    add_action("bp_activity_add_user_favorite","favorite_notification", 10, 2);
    
    function favorite_notification( $activity_id, $user_id = 0){
    	// By type and item_id
    	if($user_id != $activities["activities"][0]->user_id){
    		$activities = bp_activity_get_specific( array( 'activity_ids' => $activity_id, 'display_comments' => true) );
    		
    		bp_core_add_notification( $activity_id, $activities["activities"][0]->user_id, "notifier", bp_core_get_username(bp_loggedin_user_id())." liked: '".substr($activities["activities"][0]->content,0,20)."...'", $activity_id ) ;		
    	}
    }
    

    Hope this helped someone. It mostly works for me.

    rudik123
    Participant

    Hi,
    i see that members in my site have too much notification with information about new membership in group “User1 joined the group Group1”. It is possible to turn off this notification? 🙂
    Please help.
    Sorry for my english.

    whedlund
    Participant

    I am trying to write a function that will send me an email whenever a user makes a change to one of their profile fields. Thanks to Chris Perryman at Revelation Concept I was able to figure out how to do this when the user makes changes to a standard wordpress profile field like nickname or user_email.

    But she and I both got stuck trying to apply her awesome solution to buddypress xprofile fields. Here’s the thread from yesterday’s conversation between she and I.

    I would be super grateful if anyone has any ideas on what we’re missing. Thanks!

    #183655
    Capo1
    Participant

    Hi there. I have been using BP for a couple years now. Love it!

    However,
    Been using BP-Clear-Notifications by Brajesh till now. My users that didn’t come on for a while have an endless list that they need to go through one by one. But now this plugin ain’t doing it for me.

    There is built-in batch management in BP 2.0.1 it’s says in your documentation but,

    1 .Where is the bulk delete notification button? Not on notification tab, and there is no checkboxes.
    2. Where is the bulk delete messages button? Not on messages tab, and there is no checkboxes.

    3. On the WP dashboard there is no section for managing notifications.

    Note: Same issues testing in default WP theme and with no plugins other than buddypress.

    I Just spent another two hours today googling and checking for new stuff in the latest BP to solve my problems.

    I have:
    Latest WP.
    Latest BP.
    76 Plugins.
    Hueman Theme.
    Default WP adminbar.
    All runs perfectly fine for me other than the two points mentioned above.

    Thanks,
    Capo1.

    ========================
    Signature:
    Please answer my question without trolling me, without sending me to google in a smarmy manner and without telling me to contact my host. Please don’t send me to another thread, TRUST ME I have read them all. This post is not an opportunity for low level members/posters to gain forum post count rank. Such replies will be ignored by me.
    ========================

    #183649
    godavid33
    Participant

    I know this is a very old thread, but here’s some useful code for solving this problem (put it in functions.php) in case someone else stumbles upon it

    
    add_action("bp_activity_add_user_favorite","favorite_notification", 10, 2);
    
    function favorite_notification( $activity_id, $user_id = 0){
    
    	$activities = bp_activity_get_specific( array( 'activity_ids' => $activity_id) );
    
    	bp_core_add_notification( $activity_id, $activities["activities"][0]->user_id, "notifier", "<a href='".get_site_url()."/activity/p/$activity_id'>New Like!</a>" ) ;
    }
    
    #183312
    adamt19
    Participant

    I’m wondering if anyone has devised a way to scroll the viewport down to a profile section based on the URL or some other mechanism.

    For example, if the top section of my profile theme is a ‘highlight’ area and all of the notifications/messages/settings is rendered below this space, then clicking on ‘messages’ refreshes the page and shows (mostly) this top area, whereas the user is looking for their messages.

    Yes, not ideal usability.. but could be solved in the interim (until these profiles work with AJAX) by scrolling down to the relevant area any time the URL is something OTHER than simply /username/, e.g. /username/profile/edit/ or /username/settings/ etc.

    Im using BP 2.0 and a highly modified version of the sweetdate theme.

    DarkElement1987
    Participant

    I recently installed this ‘Buddypress Global Notifications’ (Sidewide notice?) widget and put up a message there that i was doing a backup, everything worked fine, there was a yellow bubble showing up within the sidebar so that was cool.

    After i was finished with the backup i removed the widget. But now for new users the notification still appears (while the widget isn’t even there!)

    I tried putting a new notification there but there isnt even a messagebox anymore, i can only fill in a title for the sidebar, i think something is messed up. (probably something in the cache?)

    I temporary “solved” (well, solving?) this by putting a sidebar widget at the bottom, and the old message (which i can’t even edit) is there.

    I’m using both the newest versions of Buddypress & WordPress and didn’t edit any php.

    Website: ps4actueel.nl

    #183144
    dugfunny
    Participant

    http://www.imagebam.com/image/d782b2327727553

    When i click on a post off of my activity wall, it looks like this. I’m sure it’s a css issue but i cant figure it out. below is my child style.css , can anyone help? Thanks!

    */
    /*
    * Please add your custom styles below
    */
    /*Hide Activity Page Filter Choice Drop Down Bar*/
    #activity-filter-select {
        display: none;
    }
    
    /*Make crop avatar square into a circle*/
    #avatar-crop-pane { 
    	border-radius: 50%; 
    }
    
    /*Raise Send Message and Go To Top Buttons To Make Room For ChatBar*/
    .kleo-quick-contact-link {
        background-color: rgba(0, 0, 0, 0.4);
        border-radius: 3px;
        display: block;
        margin-bottom: 4px;
        padding: 12px 14px;
        transition: all 0.2s ease-in-out 0s;
    }
    .kleo-go-top {
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
        bottom: 25px;
        opacity: 0;
        padding: 12px 14px;
        position: fixed;
        right: -60px;
        transition: all 0.2s ease-in-out 0s;
        z-index: 100;
    }
    
    /*ChatRoom*/
    #post-35 {
    	border: solid !important;
    } 	
    
    /*Remove Groups Option*/
    #groups-list-options {
    	display: none;
    }
    
    /*Remove Favorites*/
    .button.fav.bp-secondary-action {
        display: none;
    }
    #activity-favorites {
    	display: none;
    }
    
    /*Remove User and Photo Above Update Box*/
    .activity-greeting {
    	margin-left: 1px !important;
    }
    
    /*Capitalize Group Titles*/
    .item-title > a {
        text-transform: uppercase;
    }
    
    /*Remove Whats New Avatar */
    #whats-new-avatar {
    	display: none !important;
    }
    
    /*Remove Forum Author Footer */
    .bbp-footer {
    	display: none;
    }
    
    /* Align Group Widget Titles */
    .item-title {
    	margin-top: 31px;
    }
    
    /* Group Body Adjusting*/
    .template-page.col-sm-6.col-sm-push-3.tpl-3lr {
        padding-top: 0;
    }
    
    /* Remove Top Total Group Count*/
    #pag-top {
        display: none !important;
    }
    
    /* Remove Top Total Group Count Small*/
    #groups-all span {
        display: none !important;
    }
    
    /* Remove Top All Groups Text*/
    #groups-all {
        display: none;
    }
    
    /* Logo Adjusting*/
    .navbar-header:before, .navbar-header:after {
        padding-top: 15px;
    }
    .navbar-header .logo {
    	margin-left: -22px;
    }
    
    /* Search Knowledge Base Logo Alignment */
    .widget form#bbp-search-form .button {
        margin-top: 3px;
    }
    
    /* Sidebar Adjusting*/
    .inner-content {
        margin-top: -52px;
    }
    
    /* Remove Bottom Of Header Border*/
    .container-wrap.main-title.alternate-color.border-bottom {
        display: none;
    }
    
    /* Login Widget White Text*/
    #bp-login-widget-form {
        color: white;
    }
    bp-login-widget-user-login {
        color: white;
    }
    bp-login-widget-submit {
        color: white;
    }
    .input {
        color: white;
    }
    
    /* Answers Search Bar Resizing and Alignment*/
    .dwqa-search-input {
        margin-left: 856px !important;
        width: 35% !important;
    	height: 50px !important;
    }
    
    /* Answers Question Bar Resized*/
    #question-category {
        width: 75%;
    }
    
    /* Answers Gray Bar Made White*/
    .kleo-page {
        background: none repeat scroll 0 0 #FFFFFF;
    }
    
    /* Answers Body Resize and Align*/
    #dwqa-submit-question-form {
        margin-left: 20%;
        margin-top: 3% !important;
        width: 60% !important;
    }
    
    /* Remove P In Answers Footer*/
    #mce_55 {
        display: none;
    }
    
    /* Answers Search Bar Icon Alignment*/
    .dwqa-search-submit.fa.fa-search {
        margin-right: 15px;
    }
    
    /* Answers Search Bar Background Color*/
    .dwqa-search .dwqa-search-form {
        background: none repeat scroll 0 0 #FFFFFF;
    }
    
    /* Resize Question Category Box*/
    #question-category {
        height: 31px;
    }
    #question-tag {
        height: 31px;
    }
    
    /* Line Beneath Answers Search Bar Removal*/
    .filter-bar {
        border-top: 0 none !important;
    }
    
    /* Line Beneath Header Removal*/
    .kleo-main-header {
        border-bottom: 0 none !important;
    }
    
    /* Groups Subtext Alignment*/
    #groups-list-options {
        text-align: center;
    }
    
    /* Remove Bottom Total Group Count*/
    #group-dir-count-bottom {
    	display: none;
    }
    
    /* Remove All Members Count On Profile*/
    #activity-all span {
        display: none !important;
    }
    
    /* Remove Forum Meta Info*/
    .bbp-topic-started-by {
    	display: none;
    }
    .bbp-topic-freshness {
    	display: none;
    }
    .bbp-topic-voice-count {
    	display: none;
    }
    .bbp-topic-reply-count {
    	display: none;
    }
    .bbp-reply-author {
    	display: none;
    }
    .bbp-topic-author {
    	display: none;
    }
    
    #bbp-topic-revision-log-464-item-465 {
    	display: none;
    }
    
    /* Remove All Members Count On Profile*/
    #members-all span {
        display: none !important;
    }
    
    /* Center Widget Titles*/
    .widget-title {
        text-align: center;
    }
    
    /* Remove All Members Count On Members Page Top*/
    #member-dir-count-top {
        display: none;
    }
    
    /* Remove All Members Count On Members Page Bottom*/
    #member-dir-count-bottom {
        display: none;
    }
    
    /* Logo Resize*/
    .navbar-header .logo {
        float: left;
        height: 88px;
        overflow: visible;
        width: 286px;
    }
    
    /* Forum Header Removal */
    .bbp-header {
        display: none;
    }
    
    /* Forum Center Text and Photo */
    .bbp-reply-content {
        margin-left: 18px !important;
    }
    
    /* Time Last Logged In Removal */
    .item-meta {
        display: none;
    }
    
    /* Chatroom timestamp gone */
    .quick-chat-history-timestring {
        display: none;
    }
    
    /* Ask Question Body Dropped */
    #submit-question > form {
        margin-top: 45px;
    }
    
    /* Answers Title Removal */
    .dwqa-page-title {
        display: none;
    }
    
    /* Widget Avatar Size */
    .widget.buddypress div.item-avatar img.avatar {
        border-radius: 100%;
        float: left;
        height: 70px;
        margin: 0 8px 15px 0;
        width: 70px;
    }
    
    /* Testimonial Slider */
    kleo-testimonials {
        height: 30px;
    }
    
    /* WP Logo on admin bar */
    #wp-admin-bar-wp-logo {
          display:none;
    }
    
    /*Remove Smaller Numbers on Animated Counting Numbers on Homepage */
    .wpb_wrapper > p {
        display: none;
    }
    
    /*Dropdown Menu Alignment */
    .dropdown-menu.pull-left {
        margin-top: -3px !important;
        margin-left: 10px !important;
    }
    
    /*Username on profile Alignment */
    #item-header-content {
        margin-top: 5px;
    }
    
    /*Remove FORUM icon on profile */
    #user-forums {
        display: none !important;
    }
    
    /*Remove NOTIFICATIONS icon on profile */
    #user-notifications {
        display: none !important;
    }
    
    /*Remove last login on profile */
    #item-header-content .activity {
    	display:none !important;
    }
    #182975
    hkcharlie
    Participant

    I see that Buddypress now has this extended menu system that allows you to put profile menu’s on the menu eg: my emails, my groups etc

    Is it now (more easily) possible to create a button with the same characteristics.
    I was looking to see if I could copy a link from the menu and put it in my button, but there is no link to copy.

    Is there any other simple solution that I am overlooking?

    (on a side note, I have been using Buddypress Direct Links Plugin and although the new menu option are available, if nothing else the user menu option with integrated avatar is a lot more slick than the built in version, also emails,notifications and groups with “totals”!)

    sheriwells
    Participant

    Is there a way to edit home.php file that’s in the bp-legacy/buddypress/members/singles folder so that the navigation links Activty, Profile, Notifications, Messages, etc links only show for specific user roles. I have custom roles set up already, and for one of the roles I want to hide those links.

    Using wordpress 3.8.1 and BP 1.9.2

    Thanks, Sheri

    #182673
    adamt19
    Participant

    I’m trying to filter the content (and eventually the subject line) for “new message” e-mail notifications. Reading some other threads here got me this far:

    function mm_new_message_message($email_content, $sender_name, $subject, $content, $message_link, $settings_link, $sender_id, $ud) {
    	
      	
      $sender = new WP_User($sender_id);
      $sender_login = stripslashes($sender->user_login);
    
      $user_login = $ud->user_login;
    	
    	// Set up and send the message
      ob_start();
    
      // template stack, using vars above
      include( 'email_notif_header.php' );
      include( 'email_notif_bp_message_notification.php' );
      include( 'email_notif_footer.php' );
    
      $email_content = ob_get_contents();
      ob_end_clean(); 
    
      return $email_content;
     
    	
    }
    add_filter( 'messages_notification_new_message_message', 'mm_new_message_message', 1, 8);

    Issue(s):
    We’re not using sender_names anywhere. We’d like to use the sender’s username, and also include a link to that sender’s profile. But I can’t get the sender’s username right now with the code above.

    I’m also having trouble getting the username of the recipient. The link to their messages works fine since it’s passed in directly, but I can’t get the username itself.

    So the sender/sender_login/user_login stuff isn’t working, but the $content and $subject is working just fine, of course, since I’m just receiving it from the original function. Any suggestions on how to get the additional elements I need?

    Finally, is there a way to directly link to the message thread referenced in the notification? There’s another thread about this in the support forums but it ended with a request that the OP request this in trac.buddypress.

    #182314
    Doctor Psyringe
    Participant

    Hellow. I have a theme that’s 100% functional with Easy Digital Download, bPress, WordPress 3.9 — but is only compatible to Buddypress 1.6.1.

    I fixed a handful of issues, like “Notifications Breaking Theme” and “Settings / Profile Loading Blank Page” — then realized I’m trying to fit BuddyPress 2.0 into a 1.6.1 preset theme. I tried downgrading to 1.6.1, but it’s brutally obvious by the numerous errors from BuddyPress 1.6.1 and WordPress 3.9 that the two simply aren’t compatible. Here’s some of those error string gems;

    Warning: require(/home/bioniteo/public_html/wp-content/plugins/buddypress/bp-core/deprecated/1.5.php): failed to open stream: No such file or directory in /home/bioniteo/public_html/wp-content/plugins/buddypress/bp-loader.php on line 436

    Fatal error: require(): Failed opening required ‘/home/bioniteo/public_html/wp-content/plugins/buddypress/bp-core/deprecated/1.5.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/bioniteo/public_html/wp-content/plugins/buddypress/bp-loader.php on line 436

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/bioniteo/public_html/wp-content/plugins/buddypress/bp-core/bp-core-functions.php on line 176 and defined in /home/bioniteo/public_html/wp-includes/wp-db.php on line 1147

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/bioniteo/public_html/wp-content/plugins/buddypress/bp-core/bp-core-options.php on line 293 and defined in /home/bioniteo/public_html/wp-includes/wp-db.php on line 1147

    Warning: Creating default object from empty value in /home/bioniteo/public_html/wp-content/plugins/buddypress/bp-members/bp-members-loader.php on line 101

    Warning: Creating default object from empty value in /home/bioniteo/public_html/wp-content/plugins/buddypress/bp-core/bp-core-loader.php on line 20

    —–

    What is the easiest way of going about this? Should I remove all BuddyPress files in the theme template? In which case I assume just delete the folders and .css files (or did Buddypress encourage premium templates to add code elsewhere) and after dong so it will work? Is there a sure-fire way to get 1.6.1 working with WordPress 3.9? Is there a list of updates from version to version making it a “plug and play” scenario for me to simply go in and update/add the lines of code? I don’t mind that – as long as there’s a solid list of changes to make from version to version.

    I don’t mind what I need to do – all I know is many features are broken. Updating the status doesn’t work (ever-never-ever). User Profiles are virtually useless (every link causes the apocalypse). Right now the best functionality is “Notifications” which needed fixing, and how they incorporate into the “Activity Stream” — although you cannot favorite, comment, or delete from said Activity Stream (just reloads the page instead).

    Please help me make a call on this BuddyPress. I need a direction to put a few dozen hours into, and I need the functonality of BuddyPress with bbPress. Thank you.

    -Nick

    Henry Wright
    Moderator

    Hi @godavid33

    I’m 99% sure you can. I do believe it’s store in secondary_item_id.

    I think you can access it by doing something like this:

    $notifications = BP_Notifications_Notification::get( array(
        'id' => $notification_id,
        'user_id' => $user_id
    ) );
    
    // I assume there will only be one result but i'll do a loop anyway
    if ( $notifications ) {
        foreach( $notifications as $notification ) {
            // this should output the friendship ID
            echo $notification->secondary_item_id;
        }
    }
Viewing 25 results - 526 through 550 (of 1,091 total)
Skip to toolbar