Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'notification user id'

Viewing 25 results - 151 through 175 (of 1,091 total)
  • Author
    Search Results
  • shanebp
    Moderator

    Suggestion…

    //notification alerts
    function my_nav_menu_notif_counter( $menu, $args ) {      
    	if (!is_user_logged_in()) {
    		return $menu;
    	} else {
    		 if( $args->theme_location == 'primary' ) {	
    			$unread = bp_notifications_get_unread_notification_count( bp_loggedin_user_id() );
    			if ( 0 != $unread ) {	
    				$link = '<a href="' . bp_get_notifications_unread_permalink() . '">Notifications '. $unread . '</a>';
    				$notif = '<span class="noticecount">' . $link . '</span>';
    				$menu .= $notif;
    			}
    		}
    	}
    	return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_notif_counter', 10, 2 ); 
    kaneesha
    Participant

    Hi,

    first of all i did a search and my coding knowledge is at best “casual” so there were probably solutions to my question inside the search results but since i’m as i said a casual coder at best there is more than just a slight change that haven’t recognized them as solutions … and well now i’m here.

    So please bear with me if possible 🙂

    So i implemented two snippets in my WP theme functions.php, the one shows unread messages and the other one all unread notifications, so far so good! But i’d like to assign both with proper links (clickable urls) to their logical destinations so in this case either to the BP unread messages or BP unread notifications pages.

    Here is my code so far:

    //notification alerts
    function my_nav_menu_notif_counter($menu) {      
            if (!is_user_logged_in())
                    return $menu;
            else
                    $notif = '<span class="noticecount">'. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .'</span>';
                    $menu = $menu . $notif;
                    return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_notif_counter' ); 
    
    //msg notification alerts
    function my_nav_menu_msg_counter($menu) {      
            if (!is_user_logged_in())
                    return $menu;
            else
                    $notif = '<span class="noticecount2">'. bp_get_total_unread_messages_count( bp_loggedin_user_id() ) .'</span>';
                    $menu = $menu . $notif;
                    return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_msg_counter' ); 

    So what magic is it actually to set the links properly?

    Thank you in advance :))

    #282090

    In reply to: Problem with hotmail

    josuesantana
    Participant

    Hola, tengo el mismo el problema que @doshermanastuciudadhoy no llega el email de confirmación a los dominios hotmail…
    Al eliminar el código del archivo bp-core.filters.php la web peta, tambien es cierto que yo tengo la versión 3.2.0… este es el código:

    	// Add 'List-Unsubscribe' header if applicable.
    	if ( ! empty( $tokens['unsubscribe'] ) && $tokens['unsubscribe'] !== wp_login_url() ) {
    		$user = get_user_by( 'email', $tokens['recipient.email'] );
    
    		$link = bp_email_get_unsubscribe_link( array(
    			'user_id'           => $user->ID,
    			'notification_type' => $email->get( 'type' ),
    		) );
    
    		if ( ! empty( $link ) ) {
    			$headers['List-Unsubscribe'] = sprintf( '<%s>', esc_url_raw( $link ) );
    		}
    	}
    
    	return $headers;
    }
    add_filter( 'bp_email_get_headers', 'bp_email_set_default_headers', 6, 4 );

    Podrías ayudarme?

    #281822
    Anonymous User 16484011
    Inactive

    Hi !

    Prashant,

    Thanks again.

    Sorry for delay in reply because I want experiments on your above article.

    I read the whole third part of your above link. But it’s for making a plugin. I tried direct the changes to a demo wordpress installation php files but it’s not works for me. I mashed up because I haven’t core developer.

    Can any other things or plugin solve my problem ?

    I found on net about the same problem’s solution. I got the plugin pie for the same.

    In this plugin I am able to add forgot password page template. Just go to pie register-> Notification -> Select tab User notification-> select template from dropdown “Password reset request”.

    But after user fill password reset form when they click …
    1) User got a link with token. I don’t want this ? I send just only token without link like otp.
    2) After clicking user must redirect to page where they can paste the key which they received.
    3) After pasting the key I have two options…
    A) Either user redirect to create a new password and confirm password page.
    B) OR user got a new password via mail which auto generated by site to their registered mail id.

    Thanks and Regards

    knowitallninja
    Participant

    Hi,

    I have created a custom page with a single subnav item using the code below:

    function profile_tab_achievements() {
          global $bp;
     
          bp_core_new_nav_item( array( 
            'name' => 'Achievements', 
            'slug' => 'achievements', 
            'screen_function' => 'achievements_screen', 
            'position' => 100,
            'parent_url'      => bp_loggedin_user_domain() . '/achievements/',
            'parent_slug'     => $bp->profile->slug,
            'default_subnav_slug' => 'awards'
          ) );
      
    }
    add_action( 'bp_setup_nav', 'profile_tab_achievements' );
    
    function profile_subnav_awards() {
      bp_core_new_subnav_item( array( 
            'name' => 'Awards',
            'slug' => 'awards',
            'parent_url' => bp_loggedin_user_domain() . '/achievements/',
            'parent_slug' => 'achievements',
            'screen_function' => 'achievements_screen'
      ) );
    }
    add_action( 'bp_setup_nav', 'profile_subnav_awards' );

    I would like the subnav of this page to have a Order By Dropdown, much like exists in the groups & notification pages. I cannot find any guide on how to add this to the subnav menu though. Can anyone help? I mean just to add the drop down. I think I can probably figure out the sorting myself once I have the dropdown added.

    #279275
    tsortore
    Participant

    Here is my theme and a list of plugins, most of which came with the premium theme. There have been no complaints I’ve found of the groups not working “out-of-the-box” with this theme.

    *** These were the only plugins that did NOT come with the theme.

    Theme: WOffice
    Active Plugins:

    • Akismet Anti-spam
    • All in one WP Migration
    • BP xProfile Location ***
    • BuddyPress
    • Buddypress Xprofile Fields Custom Css Classes ***
    • DP Pro Event Calendar
    • Eonet Live Notifications
    • File Away
    • GamiPress
    • LocateAnything ***
    • Slider Revolution
    • Unyson
    • User Role Editor ***(suggested and tested compatible plugin)
    • Wise Chat
    • WP ERP
    • WP ERP – PDF Invoice
    • WP Bakery Page Builder

    Still no luck getting group creation working.

    Thanks for your response! Any ideas?

    #279231
    Prashant Singh
    Participant

    Please try this code:

    add_action('wp_footer','ps_remove_delete_button');
    function ps_remove_delete_button(){
    	if(!current_user_can('manage_options')){
    		?>
    		<script type="text/javascript">
    		jQuery(document).ready(function(){
    			jQuery('.notifications .delete').hide();
    			jQuery('.notifications .confirm').each(function() {
    			    if (jQuery(this).text() == 'Delete')
    			        jQuery(this).hide();
    			});
    		});
    		</script>
    		<?php
    	}
    }

    Please check if body tag has class ‘notifications’.

    Thanks

    #276875
    sitesfromash
    Participant

    Hi. I would love if someone could help me with a few concerns I have regarding emails in relation to BuddyPress Version 3.2.0.

    First, I want to disable email notifications and am wondering if there is code I should put into the functions.php of a child theme or if unchecking the situation in an email template on BuddyPress will be sufficient in not having notifications sent due to such sitauations as mentions and replies.

    Also, I want to disable activation emails and allow my users to be auto-approved. Can anyone tell me the best way to accomplish this?

    I appreciate any assistance that you may be able to provide me.

    mutoha
    Participant

    Umm…It’s difficult.

    This time I solved it as follows.

    (function($){
    
      var url = location.href	
      var urlSplit_notifications = url.split('/')[5];	
    	
      if( urlSplit_notifications == 'notifications' ){
    
        const target = document.getElementById("notifications-user-list");
    
        const observer = new MutationObserver(records => {
          alert('completed!');
        });
    
        const options = {
          childList: true
        };
    
        observer.observe(target, options);
    
        let shouldStopObserving = false;
        if(shouldStopObserving){
          observer.disconnect();
        }	
    		
      }
    	
    })(jQuery);	

    I really appreciate your help in resolving the problem.
    See you whenever.

    #276697
    perteus
    Participant

    Hi, i have problem with this issue

    I have WPForo and BuddyPress (but issue was same with bbpress) And if somebody reply on topic when i have subcribion, i have in notification menu blank title. Only Date and time send and action menu. In my Database in wp_bp_notitications is

    id	13677
    user_id	3
    item_id	394
    secondary_item_id	49
    component_name   community
    component_action wpforo_new_reply
    date_notified	2018-09-24 13:48:17
    is_new		1
    #276549
    jillellarajakumar
    Participant

    Hi,

    Thanks for the reply.
    I have installed poll plugin. Once admin will create a poll, it should be display notification alert for the users.

    Not only about the poll. If i create events, breaking news and upcoming events etc.

    You can register and login here,

    Login Page


    Once login, you can see the right sidebar. Whatever i have update or create from right sidebar.
    The notification alert should be display in top right with “bell” icon.

    #276371
    rockforduk
    Participant

    Hi Everyone,
    I have upgraded to BuddyPress: 3.1.0 and now i can’t seem to access messages and i am using Thrive Nouveau Child theme.

    Browser Developer Browser error

    JQMIGRATE: Migrate is installed, version 1.4.1
    http://www.google-analytics.com/analytics.js:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
    underscore.min.js?ver=1.8.3:5 Uncaught SyntaxError: Unexpected token ;
    at new Function (<anonymous>)

    System Info

    // Generated by the Send System Info Plugin //

    Multisite: No

    WordPress Version: 4.9.8
    Permalink Structure: /%postname%/
    Active Theme: Thrive Nouveau Child

    PHP Version: 7.2.9
    MySQL Version: 5.6.40
    Web Server Info: Apache

    WordPress Memory Limit: 64MB
    PHP Safe Mode: No
    PHP Memory Limit: 256M
    PHP Upload Max Size: 1000M
    PHP Post Max Size: 1000M
    PHP Upload Max Filesize: 1000M
    PHP Time Limit: 600
    PHP Max Input Vars: 10000
    PHP Arg Separator: &
    PHP Allow URL File Open: No

    WP_DEBUG: Disabled

    WP Remote Post: wp_remote_post() works

    Session: Enabled
    Session Name: PHPSESSID
    Cookie Path: /
    Save Path: /var/cpanel/php/sessions/ea-php72
    Use Cookies: On
    Use Only Cookies: On

    DISPLAY ERRORS: N/A
    FSOCKOPEN: Your server supports fsockopen.
    cURL: Your server supports cURL.
    SOAP Client: Your server has the SOAP Client enabled.
    SUHOSIN: Your server does not have SUHOSIN installed.

    ACTIVE PLUGINS:

    404 to 301: 3.0.1
    Absolutely Glamorous Custom Admin: 6.4.1
    bbP private groups: 3.6.7
    bbPress: 2.5.14
    BP Block Users: 1.0.2
    BP Local Avatars: 2.2
    BP Simple Front End Post: 1.3.4
    BuddyBlog: 1.3.2
    BuddyKit: 0.0.3
    BuddyPress: 3.1.0
    BuddyPress Clear Notifications: 1.0.4
    BuddyPress Docs: 2.1.0
    BuddyPress Global Search: 1.1.9
    BuddyPress Security Check: 3.2.2
    BuddyPress User To-Do List: 1.0.4
    GA Google Analytics: 20180828
    GD bbPress Toolbox Pro: 5.2.1
    GDPR: 2.1.0
    Gears: 4.1.9
    Gravity Forms: 2.3.2
    Hide Admin Bar From Front End: 1.0.0
    Image Upload for BBPress: 1.1.15
    Insert Headers and Footers: 1.4.3
    Invite Anyone: 1.3.20
    iThemes Security Pro: 5.4.8
    Kirki Toolkit: 3.0.33
    MediaPress: 1.4.2
    MediaPress – Downloadable Media: 1.0.3
    Menu Icons: 0.11.2
    Nifty Menu Options: 1.0.1
    Really Simple SSL: 3.0.5
    reSmush.it Image Optimizer: 0.1.16
    Restricted Site Access: 7.0.1
    s2Member Framework: 170722
    SeedProd Coming Soon Page Pro: 5.10.8
    Send System Info: 1.3
    Slider Revolution: 5.4.7.3
    SSL Insecure Content Fixer: 2.7.0
    TaskBreaker – Group Project Management: 1.5.1
    The Events Calendar: 4.6.23
    The Events Calendar PRO: 4.4.30.1
    Users Insights: 3.6.5
    WP-Polls: 2.73.8
    WPBakery Page Builder: 5.5.4
    WP Mail SMTP: 1.3.3
    WP Nag Hide: 1.0
    WPS Hide Login: 1.4.3
    Yoast SEO: 8.2
    YouTube Live: 1.7.10

    Thanks

    Rockforduk

    #275960
    raneeshct
    Participant

    Thanks. Unfortunately this is not what I am looking for. This notifies only the author of the blog. I need to notify all the users who commented on the particular blog.

    ow let’s assume I have two users A and B registered in the website and consider a post with Title “Hello All”

    1. User A made a comment on the post “Hello All”
    2. User B made a reply comment to the User A’s comment

    it is expected to show a notification on User A profile under notification tab on site such us User B replied to your comment.

    Please advice

    #275935
    raneeshct
    Participant

    This is not the solution I am looking for. Let me explain what I clearly needs.

    I have an existing WordPress website with a few posts. I have installed BuddyPress plugin. Now let’s assume I have two users A and B registered in the website and consider a post with Title “Hello All”

    1. User A made a comment on the post “Hello All”
    2. User B made a reply comment to the User A’s comment

    it is expected to show a notification on User A profile under notification tab on site such us User B replied to your comment. Unfortunately this is not happening on the website. To cross check whether it is a theme issue, I have changed the theme to default themes of WordPress and notification is not yet showing. Please help. Looking forward to an immediate response.

    Here is the website URL https://beanstalkminds.com/

    #275926
    Prashant Singh
    Participant

    I am not sure if you are creating blog posts or activity. BuddyPress sends notification for these updates https://codex.buddypress.org/administrator-guide/notifications/

    If it is a blog post then you have to go with this code to get notification https://wordpress.stackexchange.com/questions/263950/new-post-notifications-for-users-buddypress

    #275839
    wallacelin
    Participant

    Hello, I’m using Buddypress 3.1.0, bbPress 2.5.14, and the Boss theme 2.4.6 to create an online network/forums website. The website is 7ctest2.site and the wordpress version is 4.9.8.

    Is it possible to merge the Read and Unread notifications into one page on /members/user/notifications/ ?

    How would I go about implementing this?

    I’m new to both Buddypress and bbPress and was handed down this website to complete. Any help or idea would be helpful. Thank you!

    #275834
    asokaaso2
    Participant

    I’m trying to do an ajax function where after certain conditions are met, 2 users will become friends. I am using friends_add_friend function to achieve it but when I execute that function, my ajax function doesn’t return the success data. The friends_add_friend will execute but it will stop there preventing my ajax to display the notification. Any idea how to fix this?

    this is my code


    if($create_subscription!='fail'){
    friends_add_friend(bp_loggedin_user_id(),bp_displayed_user_id(),true); //the code stops here

    echo json_encode(array('sent'=>true, 'message'=>__('The payment was processed successfully!')));

    }

    website001
    Participant

    Hello friends

    Got this code from buddydev website

    for theme functions php

    works, but newer versions of buddypress have
    5 group options. This code covers 4.

    ——————————————————————————————————
    add_action( ‘bp_core_activated_user’,

    ‘bpdev_set_email_notifications_preference’);

    function bpdev_set_email_notifications_preference( $user_id ) {

    //I am putting all the notifications to no by default
    //you can set the value to ‘yes’ if you want that notification to be enabled.
    $settings_keys = array(
    ‘notification_activity_new_mention’ => ‘no’,
    ‘notification_activity_new_reply’ => ‘no’,
    ‘notification_friends_friendship_request’ => ‘no’,
    ‘notification_friends_friendship_accepted’ => ‘no’,
    ‘notification_groups_invite’ => ‘no’,
    ‘notification_groups_group_updated’ => ‘no’,
    ‘notification_groups_admin_promotion’ => ‘no’,
    ‘notification_groups_membership_request’ => ‘no’,
    ‘notification_messages_new_message’ => ‘no’,
    );

    foreach( $settings_keys as $setting => $preference ) {

    bp_update_user_meta( $user_id, $setting, $preference );
    }

    //that’s it. have fun!

    }

    ———————————————————————————————————

    This is the option it doesn’t cover—–

    #5
    “Your request to join a group has been approved or denied”

    Can anyone update this ? That would be awsome.

    Thanks alot

    buddypress 2.8.2
    WordPress 4.7.5

    Jean Bon
    Participant

    Hi,

    I would like that user can follow any other user and get email notification when the that user publish a new post on the website. I am good looking for a plugin or script even paid and buddypress compatible than allow me to do that.

    i have not found a solution for that.

    thanks for your help

    kenmcall
    Participant

    Greetings,

    We are using LDAP to populate and maintain our Buddypress members list, and because of this we don’t want people to be able to change their password or email address via the Settings > General tab. We would like to therefore hide the General tab and have Settings redirect to a different tab instead (preferably Settings > Profile)

    I have gone through the forums and have viewed other posts by people dealing with the same issue, specifically this one:

    How to hide / remove the General tab under Settings

    Here’s the code:

    function bpex_change_profile_settings_default_tab() {
    
    	if( bp_is_active( 'xprofile' ) ) :
    
    	$access        = bp_core_can_edit_settings();
    	$slug          = bp_get_settings_slug();
    
    	$args = array(
    		'parent_slug'     => $slug,
    		'subnav_slug'	  => 'notifications',
    		'screen_function' => 'bp_settings_screen_notification',
    		'user_has_access' => $access
    		);
     
    	bp_core_new_nav_default( $args );
    
    	endif;
    
    }
    add_action( 'bp_actions', 'bpex_change_profile_settings_default_tab' );
    
    function bpex_remove_general_item_on_usermenu() {
    global $wp_admin_bar;
    
    	if ( bp_use_wp_admin_bar() ) {
    		$wp_admin_bar->remove_node( 'my-account-settings-general' );
    	}
    
    }
    add_action( 'wp_before_admin_bar_render', 'bpex_remove_general_item_on_usermenu' );
    
    function bpex_remove_profile_settings_general_tab() {
    
    	if( bp_is_active( 'xprofile' ) ) :	
    
    		bp_core_remove_subnav_item( 'settings', 'general' );
    
    	endif;
    
    }
    add_action( 'bp_actions', 'bpex_remove_profile_settings_general_tab' );

    This seems to be the solution I need, but when I add the code to bp-custom.php it does remove the General tab, but now clicking on Settings generates a 404 error. As this post is over a year old, I’m wondering if there have been changes to Buddypress that stops this from working.

    I should mention that I’ve done some (but not a lot) of PHP programming. I did have a co-oworker who is quite proficient at PHP look over this with me, but everything we tried failed to work.

    Thanks for any help anyone can give.

    Raval
    Participant

    WordPress 4.9.7
    BuddyPress 3.1.0
    weblooker.pl

    Hello. I am a very beginner user of WordPress and BuddyPress and I am asking for help. the topic has been discussed several times, but I still do not know how to do it. I want to change the names in the profile menu ( e.g “notifications” ) to a different name. There are many codes here but I do not know how to use them and where to add them. I also used “Loco Translate” but it did not work. Please help.

    MorgunovVit
    Participant

    WordPress 4.9.7
    BuddyPress 3.1.0
    Theme: OceanWP (but the same problems with Twenty Seventeen v1.6.)

    Hi!

    It seems that I am faced with a problem.
    The new BuddyPress template called Nouveau, fails and stops displaying the navigation menu in the user profile and group profile. The block with the main navigation simply disappears (I mean navigation in which items such as Activity, Friends, Groups, etc. are displayed), only the sub navigation of the section remains.
    I tried to disable all plugins, but navigation did not appear. Also, I changed the theme from the ocean to the WP on Twenty Seventeen – no results. And only after switching from Nouveau to the old BuddyPress template was the navigation displayed.
    Could You help me, please?
    Thanks!

    —————–
    The List of using plugins:
    BadgeOS Version: 1.4.11
    BadgeOS BadgeStack Add-On Version: 1.0.1
    BadgeOS Community Add-On Version: 1.2.4
    BadgeOS LearnDash Add-On Version: 1.0.2
    BadgeOS Suggested Achievements Add-On Version: 1.0.1
    bbPress Version: 2.5.14
    BuddyPress Version: 3.1.0
    BuddyPress for LearnDash Version: 1.2.5
    Elementor Version: 2.1.2
    H5P Version: 1.10.3
    LearnDash & bbPress Integration Version: 2.0.2.1
    LearnDash Course Grid Version: 1.4.1
    LearnDash LMS Version: 2.5.8.2
    LearnDash LMS – Notifications Version: 1.2.0
    LearnDash ProPanel Version: 2.1.3
    Ocean Demo Import Version: 1.0.9
    Ocean Extra Version: 1.4.17
    SVG Support Version: 2.3.15
    Tin Canny LearnDash Reporting Version: 2.9.3
    Uncanny LearnDash Toolkit Version: 2.4.2
    WP Translitera Version: p1.2.5

    #274684
    knowitallninja
    Participant

    Hi @r-a-y

    My apologies for responding so slowly. I didn’t get a response notification to my email for some reason.

    As for Twitter. I’m not sure what they’re doing. I just know that Google Analytics are very clear that under GDPR no personally identifiable information should be passed in the URLs to Analytics and that usernames count as PII.

    I had a look at that ticket. Unfortunately the code in there causes my member areas to not work. It does replace their usernames with their id numbers in the url, but the url isn’t functional.

    So I guess my only option is to try that plugin to change all my users nicenames? That’s unfortunate. I really would hope the Buddypress developers would look into this as it is definitely an issue with Google Analytics conditions which I imagine many BP users do use.

    I’ll give the nicenames plugin a go soon.

    Thanks

    scottliveout
    Participant

    WordPress version 4.9.6
    Latest Version of BuddyPress (recently updated)
    Link to the site: https://highaltitudecrypto.io/

    Here is the error that is showing: https://prnt.sc/jxthxo

    Background info:
    The previous developer coded this theme in his own way. When he finished the site, the client/site owner deleted the developer’s (admin) user profile. When he did, all sorts of issues like this arose. We have fixed most, but I am not sure how to fix this particular issue. The error is displayed in that screenshot, so I was hoping you could help!

    pauapau
    Participant

    hey guys,
    when the user have read/clicked on a notification then the notifitcation should automatically delete. i want to do that with a ajax call.

    so my idea is to add a filter on the function bp_notifications_get_notifications_for_user() to manipulate the output.
    but i need for the ajax call a notification_id. so that he knows which notofiation he has to delete.

    add_filter( 'bp_notifications_get_notifications_for_user', 'bp_follow_notify_format_notifications', 9, 5  );
    function bp_follow_notify_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
    		
    	if ( 'follow_new_post' === $action ) {
    		
    		if ( (int) $total_items > 1 ) {
    			$title = sprintf( __( '%d new posts have been published', 'bp-follow-notify' ), (int) $total_items );
    			$link  = bp_get_notifications_permalink();
    		} else {
    			$title = sprintf( __( '%s is kiteboarding.', 'bp-follow-notify' ), bp_core_get_user_displayname( $secondary_item_id ) );
    			$link = get_permalink( $item_id );			
    		}
    		
    		// WordPress Toolbar
    		if ( 'string' === $format ) {
    			$return = apply_filters('bp_follow_notify_notification', '<div onClick="clickedOnNotification('.$notificationID.')" title="' . esc_attr( $title ) . '">' . esc_html( $title ) . '"</div>', $title, site_url().$link );
    		
    		// Deprecated BuddyBar
    		} else {
    			$return = apply_filters( 'bp_follow_notify_notification', array(
    				'text' => $title,
    				'link' => $link
    			), $link, (int) $total_items, $title, $title );
    		}
    		
    		return $return;
    	}
    	return $action;
    }
    

    here is the important line.
    $return = apply_filters('bp_follow_notify_notification', '<div onClick=”clickedOnNotification(‘.$notificationID.’)”title="' . esc_attr( $title ) . '">' . esc_html( $title ) . '"</div>', $title, site_url().$link );

    cheers Pau

Viewing 25 results - 151 through 175 (of 1,091 total)
Skip to toolbar