Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'notification user id'

Viewing 25 results - 126 through 150 (of 1,091 total)
  • Author
    Search Results
  • #303695
    cdtrue
    Participant

    Thank you! That gets me half way 🙂

    I still get the notification after registration about the activation link – and I do not think that the little old ladies using my site will get that they have to activate and then wait for approval (to much for them to take in).

    So I now are able to stop users with the extra My Private Site-plugin and the messages sent out from BP egistration works as a charm. There is only one (Account Approved Email) that actually is sent though – I can not figure out how to get the other ones to override the BuddyPress – activation-email. And if I de-activate that e-mail no e-mail is sent at all.

    Also when I click on the register-button in the registration form I get redirected to a page that says that my account needs to be activated and I have to check my e-mail to do so. I want to loose it or change the text.

    If they try to log in anyway they get the wordpress opt of re-sending the activation-link. Same thing here – preferably change the text.

    But where do I find the texts? I guess the re-direct page is automated from BP, the other one is from WP.

    Any tips?

    sitesfromash
    Participant

    Hi. I have chosen to disable the Notifications component in hopes that users would not receive notification emails. This means, however, that there is no page where users can change their notification settings. When editing the activation and reset password emails, as well as the email sent when group details have been changed, I noticed that there is an Unsubscribe link still showing. Can you please let me know how I am able to prevent the link from showing or customize it to saying Home Page and redirecting those who click it to my home page? I appreciate any feedback which you can provide me. Have a great day.

    #303170
    FTLRalph
    Participant

    And like most cases I figured it out after posting the question

    public function should_send_mention_notificaton($value, $usernames, $user_id, $activity)
    {
    	// Return false if activity author is blocked by user_id
    	global $wpdb;
    	
    	$id_maybe_blocked = $activity->user_id;
    	$blocked_ids = $wpdb->get_col( "SELECT target_id FROM {$wpdb->base_prefix}bp_block_member WHERE user_id = '$user_id' ");
    	if (in_array($id_maybe_blocked, $blocked_ids) == true)
    		return false;
    	return true;
    }
    add_filter( 'bp_activity_at_name_do_notifications', 'should_send_mention_notificaton', 1, 4);
    FTLRalph
    Participant

    Trying to modify a block plugin for my website.

    All is going well, but the “block” can be bypassed if the blocked user simply @-mentions the blocker-user. The blocker-user will then receive a notification/email from the “blocked” user.

    So I’m trying to catch the notification/email prior to anything being sent. Then I’d compare user IDs and cancel it.

    What function(s) should I be looking at?

    I found this in bp-activity-notifcations.php but unsure if this is what I’m looking for, unless it is? Is this early enough to prevent the email too?

    /**
     * Notify a member when their nicename is mentioned in an activity stream item.
     *
     * Hooked to the 'bp_activity_sent_mention_email' action, we piggy back off the
     * existing email code for now, since it does the heavy lifting for us. In the
     * future when we separate emails from Notifications, this will need its own
     * 'bp_activity_at_name_send_emails' equivalent helper function.
     *
     * @since 1.9.0
     *
     * @param object $activity           Activity object.
     * @param string $subject (not used) Notification subject.
     * @param string $message (not used) Notification message.
     * @param string $content (not used) Notification content.
     * @param int    $receiver_user_id   ID of user receiving notification.
     */
    function bp_activity_at_mention_add_notification( $activity, $subject, $message, $content, $receiver_user_id ) {
    	bp_notifications_add_notification( array(
    			'user_id'           => $receiver_user_id,
    			'item_id'           => $activity->id,
    			'secondary_item_id' => $activity->user_id,
    			'component_name'    => buddypress()->activity->id,
    			'component_action'  => 'new_at_mention',
    			'date_notified'     => bp_core_current_time(),
    			'is_new'            => 1,
    	) );
    }
    add_action( 'bp_activity_sent_mention_email', 'bp_activity_at_mention_add_notification', 10, 5 );
    lenasterg
    Participant

    Hi, community I need your help.
    I’m using BuddyPress + WordPress multisite.
    The current situation is this:
    When a user is invited to join a blog he gets an email via wp_mail. He/she don’t get any notification via BuddyPress about that.

    I want to also add the mail which WP send to user to the BuddyPress as BP_message so the user can accept the blog invite from his/her BP inbox.

    Do you have any ideas?
    Thanks in advance
    Lena

    #302956
    Artyom
    Participant

    Hello! How I can add a notifications like in admin bar to my site menu. (I don’t use buddypress user widget and users don’t have access to the admin panel. My site menu use like user admin panel).

    #302937
    shanebp
    Moderator

    Untested, but try:

    function custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
    
        // New custom notifications
        if ( 'custom_action' === $action ) {
            
            $custom_title = "You have new custom notification";
            $custom_link  = get_permalink( $item_id );
            $custom_text  = "You have a new custom notification";
    
            // WordPress Toolbar
            if ( 'string' === $format ) {
                $return = apply_filters( 'custom_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link );
    
            // Deprecated BuddyBar
            } else {
                $return = apply_filters( 'custom_filter', array(
                    'text' => $custom_text,
                    'link' => $custom_link
                ), $custom_link, (int) $total_items, $item_id, $secondary_item_id );
            }
    
            return $return;
    
        }
    
    }
    add_filter( 'bp_notifications_get_notifications_for_user', 'custom_format_buddypress_notifications', 20, 5 );
    pavelmititel
    Participant

    I need some custom notifications in my website. I have my code bellow, all work correctly, notification is added into database and displayed at the recipient, but without notification text
    Bug view on frontpage

    How i can fix this?
    Thank you

    
    function custom_filter_notifications_get_registered_components( $component_names = array() ) {
    
        // Force $component_names to be an array
        if ( ! is_array( $component_names ) ) {
            $component_names = array();
        }
    
        // Add 'custom' component to registered components array
        array_push( $component_names, 'custom' );
    
        // Return component's with 'custom' appended
        return $component_names;
    }
    add_filter( 'bp_notifications_get_registered_components', 'custom_filter_notifications_get_registered_components' );
    
    function custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
    
        // New custom notifications
        if ( 'custom_action' === $action ) {
            
            $custom_title = "You have new notification";
            $custom_link = "domain.com";
            $custom_text = "You have new notification";
    
            // WordPress Toolbar
            if ( 'string' === $format ) {
                $return = apply_filters( 'custom_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link );
    
            // Deprecated BuddyBar
            } else {
                $return = apply_filters( 'custom_filter', array(
                    'text' => $custom_text,
                    'link' => $custom_link
                ), $custom_link, (int) $total_items, $custom_text, $custom_title );
            }
    
            return $return;
    
        }
    
    }
    add_filter( 'bp_notifications_get_notifications_for_user', 'custom_format_buddypress_notifications', 10, 5 );
    
    function bp_custom_add_notification( $receiver_user_id, $initiator ) {
    
        //$post = get_post( $comment_object->comment_post_ID );
        //$author_id = $post->post_author;
    
        bp_notifications_add_notification( array(
            'user_id'           => $receiver_user_id,
            'item_id'           => $initiator,
            'secondary_item_id' => $initiator,
            'component_name'    => 'custom',
            'component_action'  => 'custom_action',
            'date_notified'     => bp_core_current_time(),
            'is_new'            => 1,
        ) );
    
    }
    add_action( 'wp_insert_custom_notification', 'bp_custom_add_notification', 99, 2 );
    
    #302790
    hthornhillhww
    Participant

    Hi,

    I have created a custom notification for my site when a post is published, the code used to do this is :-

    // this is to add a fake component to BuddyPress. A registered component is needed to add notifications
    function custom_filter_notifications_get_registered_components( $component_names = array() ) {
        // Force $component_names to be an array
        if ( ! is_array( $component_names ) ) {
            $component_names = array();
        }
        // Add 'custom' component to registered components array
        array_push( $component_names, 'publishpost' );
        // Return component's with 'custom' appended
        return $component_names;
    }
    add_filter( 'bp_notifications_get_registered_components', 'custom_filter_notifications_get_registered_components' );
    
    // this hooks to post creation and saves the post id
    function bp_custom_add_notification( $post_id, $post ) {
            $post = get_post( $post_id );
            $author_id = $post->post_author;
    		
    		$blogusers = get_users( array( 'role' => 'staff' ) );
    		// Array of WP_User objects.
    		foreach ( $blogusers as $user ) {
    			bp_notifications_add_notification( array(
                'user_id'           => $user->id,
                'item_id'           => $post_id,
                'component_name'    => 'publishpost',
                'component_action'  => 'publishpost_action',
                'date_notified'     => bp_core_current_time(),
                'is_new'            => 1,
            ) );   
    		}        
    }
    add_action( 'publish_post', 'bp_custom_add_notification', 99, 2 );
    
    /**
     * Format the BuddyBar/Toolbar notifications
     *
     * @since bbPress (r5155)
     *
     * @package bbPress
     *
     * @param string $action The kind of notification being rendered
     * @param int $item_id The primary item id
     * @param int $secondary_item_id The secondary item id
     * @param int $total_items The total number of messaging-related notifications waiting for the user
     * @param string $format 'string' for BuddyBar-compatible notifications; 'array' for WP Toolbar
     */
    function custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) 
    {
    // New custom notifications
        if ( 'publishpost_action' === $action ) {
    
            $post = get_post( $item_id );
    		$author_name = get_the_author_meta('display_name', $post->post_author);
            $custom_title = bp_core_get_user_displayname( $post->post_author ) . ' published a new post "' . get_the_title( $item_id ) . '"';
            $custom_link  = get_permalink( $post );
            $custom_text = bp_core_get_user_displayname( $post->post_author ) . ' published a new post "' . get_the_title( $item_id ) . '"';
            // WordPress Toolbar
            if ( 'string' === $format ) {
                $return = apply_filters( 'publishpost_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link );
            // Deprecated BuddyBar
            } else {
                $return = apply_filters( 'publishpost_filter', array(
                    'text' => $custom_text,
                    'link' => $custom_link
                ), $custom_link, (int) $total_items, $custom_text, $custom_title );
            }
    
            return $return;
    
        } 
    	
    	if ( 'bbp_new_reply' === $action ) {
    		$topic_id    = bbp_get_reply_topic_id( $item_id );
    		$topic_title = bbp_get_topic_title( $topic_id );
    		$topic_link  = wp_nonce_url( add_query_arg( array( 'action' => 'bbp_mark_read', 'topic_id' => $topic_id ), bbp_get_reply_url( $item_id ) ), 'bbp_mark_topic_' . $topic_id );
    		$title_attr  = __( 'Topic Replies', 'bbpress' );
    
    		if ( (int) $total_items > 1 ) {
    			$text   = sprintf( __( 'You have %d new replies', 'bbpress' ), (int) $total_items );
    			$filter = 'bbp_multiple_new_subscription_notification';
    		} else {
    			if ( !empty( $secondary_item_id ) ) {
    				$text = sprintf( __( 'You have %d new reply to %2$s from %3$s', 'bbpress' ), (int) $total_items, $topic_title, bp_core_get_user_displayname( $secondary_item_id ) );
    			} else {
    				$text = sprintf( __( 'You have %d new reply to %s',             'bbpress' ), (int) $total_items, $topic_title );
    			}
    			$filter = 'bbp_single_new_subscription_notification';
    		}
    
    		// WordPress Toolbar
    		if ( 'string' === $format ) {
    			$return = apply_filters( $filter, '<a href="' . esc_url( $topic_link ) . '" title="' . esc_attr( $title_attr ) . '">' . esc_html( $text ) . '</a>', (int) $total_items, $text, $topic_link );
    
    		// Deprecated BuddyBar
    		} else {
    			$return = apply_filters( $filter, array(
    				'text' => $text,
    				'link' => $topic_link
    			), $topic_link, (int) $total_items, $text, $topic_title );
    		}
    
    		do_action( 'bbp_format_buddypress_notifications', $action, $item_id, $secondary_item_id, $total_items );
    
    		return $return;
    	}
    }
    add_filter( 'bp_notifications_get_notifications_for_user', 'custom_format_buddypress_notifications', 1, 5 );

    How can i create the same for a new bbpress topic? i’m thinking i need to change this code section but not sure how

    
    // this hooks to post creation and saves the post id
    function bp_custom_add_notification( $post_id, $post ) {
            $post = get_post( $post_id );
            $author_id = $post->post_author;
    		
    		$blogusers = get_users( array( 'role' => 'staff' ) );
    		// Array of WP_User objects.
    		foreach ( $blogusers as $user ) {
    			bp_notifications_add_notification( array(
                'user_id'           => $user->id,
                'item_id'           => $post_id,
                'component_name'    => 'publishpost',
                'component_action'  => 'publishpost_action',
                'date_notified'     => bp_core_current_time(),
                'is_new'            => 1,
            ) );   
    		}        
    }
    add_action( 'publish_post', 'bp_custom_add_notification', 99, 2 );

    I am using woffice as the theme, bbpress version 2.5.14, buddypress version 4.1.0 and the latest version of wordpress

    Thanks

    amilapriyankara16
    Participant

    Hi there,

    I was trouble shooting already hosted live website which is already setup buddy press wall.

    BuddyPress – Version 4.1.0
    BuddyBoss Wall – Version 1.3.2
    BuddyBoss Media – Version 3.2.2
    BuddyPress Activity Filter – Version 2.0.0
    Wordpress – Version 4.9.6

    And user can post on there friend profile and see the posted on user wall. But when mentioned user wall doesn’t display it. Any idea what will causing this issue.

    But the wall post will notify and notification will be redirect site-wide-activity page display posts on that page, not on their wall.

    #302663
    Venutius
    Moderator

    Ah yes, slight correction required:

    <?php $args = array(
        'links'  => array(
    	bp_get_the_notification_mark_link( bp_displayed_user_id() )
    	)
    );?>
    #302662
    hthornhillhww
    Participant

    thanks for your help, I have got the page to only show the unread link but now when you hover over the link, it wont work as the format of the link is wrong, do you know why?

    This is the link before (top) and after (bottom)

    https://www.dropbox.com/s/zoiencz9qbweanr/links%20before%20and%20after%20change.jpg?dl=0

    and this is my code

    <?php $args = array(
    						'links'  => array(
    						bp_get_the_notification_mark_link( $user_id )
    						)
    						);?>
    						
    						<td class="notification-actions"><?php bp_the_notification_action_links( $args ); ?></td>
    #302661
    Venutius
    Moderator

    You are welcome.

    When you get to edit the file you will see something like this:

    <?php bp_the_notification_action_links(); ?>

    The extra code will need to go within a set of PHP tags just like the function call is.

    So your code should end up looking something like this:

    <?php $args = array(
        'links'  => array(
    	bp_get_the_notification_mark_link( $user_id )
    	)
    );?>

    place this in a new line before the modified function call:

    <?php bp_the_notification_action_links( $args ); ?>

    #302654
    Venutius
    Moderator

    It looks like the function bp_the_notification_action_links() accepts $args that would allow you to remove the delete link. So you could overload your `members/single/notifications/notifications-loop.php file to include something like the following:

    $args = array(
        'links'  => array(
    	bp_get_the_notification_mark_link( $user_id )
    	)
    );

    and add this to the function call: bp_the_notification_links( $args )

    Something like that looks like it would work, not tested it though.

    #302614
    mikeavena
    Participant

    I’m trying to create a theme with a messages notification/box in the header. So far, everything works fine for regular users. However, if logged in as an administrator, bp_has_message_threads() will return nothing, even if the user has messages. This only happens on non-profile pages – if you navigate to a user profile (buddypress page), the message appear as expected. My best guess is the profile pages are executing some function that I’m not? Here’s the loop I created:

    if(bp_has_message_threads(array('max' => 5)))
    							{
    								// TODO: put buttons 'mark all as read' and 'go to inbox'
    								
    								while(bp_message_threads())
    								{
    									bp_message_thread();
    									printf('<div class="dropdown-divider"></div>');
    									printf('<a href="%1$s" class="dropdown-item">%2$s...<br>From: %3$s</a>',
    											bp_get_message_thread_view_link(),
    											bp_get_message_thread_excerpt(),
    											wp_strip_all_tags(bp_get_message_thread_from()));
    								}
    								
    								printf('<div class="dropdown-divider"></div>');
    								printf('<a href="%1$smessages" class="dropdown-item">See all messages...</a>', bp_loggedin_user_domain());
    							}
    							else
    							{
    								// If users has no unread messages, tell them and give a link to their full inbox
    								printf('<a href="%1$smessages" class="dropdown-item">You have no messages</a>', bp_loggedin_user_domain());
    							}
    #302593
    drstrats
    Participant

    Hi
    I’m using BuddyPress and upon registration of users, the email notifications are sent using the hosting server which lands 100% of the times at spam folder.
    to solve this I’ve installed the WP Mail SMTP plugin but this it didn’t affect BuddyPress Smtp settings.
    Please someone with a solution to solve this.
    Thanks

    mackymickman
    Participant

    I am branching pages in this code:

    // BuddyPress
    $arr = explode( '/', $_SERVER['REQUEST_URI'] );
    if ( isset($arr[1]) && $arr[1] === 'members' ) :
    
    	// Pages that only the himself can access
    	if( $arr[3] === 'messages' || $arr[3] === 'settings' || $arr[3] === 'notifications' ) :
    		get_template_part( 'template-parts/page', 'bp-only' );
    	
    	// Pages that other users can access
    	else :
    		get_template_part( 'template-parts/page', 'bp-public' );
    	
    	endif;
    
    endif;	

    However, on the above code, $wp_query does not work in “page-bp-public.php”.
    For example, I use $wp_query as below to output topic list, but topic title is not output.

    function my_pre_get_posts( $query ) {
    	$query->set('post_type', 'topic');
    }
    add_action('pre_get_posts','my_pre_get_posts');
    <?php global $wp_query; ?>
    <?php if ($wp_query->have_posts()): ?>
    <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
    	<?php echo get_the_title(); ?>
    <?php endwhile; ?>
    <?php else: ?>
    	<p>nothing</p>
    <?php endif; ?>

    How can I use $wp_query on “page-bp-public.php”?

    ・・・

    By the way, I var_dump to $wp_query and it will be as follows:

    <pre><?php var_dump($wp_query->query_vars);?></pre>

    <pre>array(65) {
      ["page"]=>
      int(0)
      ["pagename"]=>
      string(6) "forums"
      ["error"]=>
      string(0) ""
      ["m"]=>
      string(0) ""
      ["p"]=>
      int(0)
      ["post_parent"]=>
      string(0) ""
      ["subpost"]=>
      string(0) ""
      ["subpost_id"]=>
      string(0) ""
      ["attachment"]=>
      string(0) ""
      ["attachment_id"]=>
      int(0)
      ["name"]=>
      string(6) "forums"
      ["static"]=>
      string(0) ""
      ["page_id"]=>
      int(0)
      ["second"]=>
      string(0) ""
      ["minute"]=>
      string(0) ""
      ["hour"]=>
      string(0) ""
      ["day"]=>
      int(0)
      ["monthnum"]=>
      int(0)
      ["year"]=>
      int(0)
      ["w"]=>
      int(0)
      ["category_name"]=>
      string(0) ""
      ["tag"]=>
      string(0) ""
      ["cat"]=>
      string(0) ""
      ["tag_id"]=>
      string(0) ""
      ["author"]=>
      string(0) ""
      ["author_name"]=>
      string(0) ""
      ["feed"]=>
      string(0) ""
      ["tb"]=>
      string(0) ""
      ["paged"]=>
      int(0)
      ["meta_key"]=>
      string(0) ""
      ["meta_value"]=>
      string(0) ""
      ["preview"]=>
      string(0) ""
      ["s"]=>
      string(0) ""
      ["sentence"]=>
      string(0) ""
      ["title"]=>
      string(0) ""
      ["fields"]=>
      string(0) ""
      ["menu_order"]=>
      string(0) ""
      ["embed"]=>
      string(0) ""
      ["category__in"]=>
      array(0) {
      }
      ["category__not_in"]=>
      array(0) {
      }
      ["category__and"]=>
      array(0) {
      }
      ["post__in"]=>
      array(0) {
      }
      ["post__not_in"]=>
      array(0) {
      }
      ["post_name__in"]=>
      array(0) {
      }
      ["tag__in"]=>
      array(0) {
      }
      ["tag__not_in"]=>
      array(0) {
      }
      ["tag__and"]=>
      array(0) {
      }
      ["tag_slug__in"]=>
      array(0) {
      }
      ["tag_slug__and"]=>
      array(0) {
      }
      ["post_parent__in"]=>
      array(0) {
      }
      ["post_parent__not_in"]=>
      array(0) {
      }
      ["author__in"]=>
      array(0) {
      }
      ["author__not_in"]=>
      array(0) {
      }
      ["ignore_sticky_posts"]=>
      bool(false)
      ["suppress_filters"]=>
      bool(false)
      ["cache_results"]=>
      bool(true)
      ["update_post_term_cache"]=>
      bool(true)
      ["lazy_load_term_meta"]=>
      bool(true)
      ["update_post_meta_cache"]=>
      bool(true)
      ["post_type"]=>
      string(0) ""
      ["posts_per_page"]=>
      int(1)
      ["nopaging"]=>
      bool(false)
      ["comments_per_page"]=>
      string(2) "50"
      ["no_found_rows"]=>
      bool(false)
      ["order"]=>
      string(4) "DESC"
    }
    </pre>
    #302279
    dietcheese
    Participant

    I am attempting to integrate BuddyPress into a custom plugin.

    I would like to take certain BuddyPress sections (like Messages and Notifications) and give access to those forms so that a logged in user can compose messages, read/delete notifications, on my custom pages – not using the default BuddyPress pages (/messages/, /notifications/, etc), but using my custom pages.

    What’s the best way of approaching this? I’ve looked at endpoints, shortcodes, and Buddyforms but I’m not having much luck yet.

    #302271
    kandersson78
    Participant

    Users names do not appear when letters are typed after @

    The mention “works” notification wise but the autosuggest (I guess this is what it’s called) doesn’t.

    Looking in Chrome Console I have an error:

    Uncaught SyntaxError: Invalid or unexpected token mentions.min.js?ver=4.1.0:13

    /wp-content/plugins/buddypress/bp-activity/js/mentions.min.js?ver=4.1.0

    The error icon is shown at the end of line 13:

    11 var i={
    12 delay:200,hideWithoutSuffix:!0,insertTpl:”@${
    13 ID
    14 }

    The console also says that (no error icon there though):

    JQMIGRATE: Migrate is installed, version 1.4.1 jquery-migrate.min.js?ver=1.4.1:2

    /wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1

    Varun Dubey
    Participant

    @datenfresser You can find them inside user meta
    http://prntscr.com/m7gdur
    To set default values you can check previous thread

    Email notification default settings

    #302168
    Venutius
    Moderator

    One aspect I forgot was if the user is not logged in, ths would fix that:

    const notificationsCounter = document.getElementById('ab-pending-notifications');
    const notificationsIndicator = document.getElementById('wp-admin-bar-bp-notifications');
    
    function counterChange() {
    	if (notificationsCounter.innerText == '0') {
    		notificationsIndicator.style.display = 'none';
    	} else {
    		notificationsIndicator.style.display = 'block';
    	}
    }
    
    if (notificationCounter){
        notificationsCounter.addEventListener('change', counterChange);
    }
    counterChange();
    #283047
    mutoha
    Participant

    Is there a function to branch pages?

    Currently I am supplementing that function with the following code.

    $arr = explode( '/', $_SERVER['REQUEST_URI'] );
    if ( isset($arr[1]) && $arr[1] === 'members' ) :
    
    	if( is_user_logged_in() ) :
    		
    		if( bp_loggedin_user_id() == bp_displayed_user_id() ) :
    		
    			if( ( $arr[3] === '' || $arr[3] === 'activity' || $arr[3] === 'profile' || $arr[3] === 'following' || $arr[3] === 'followers' ) && $arr[4] != 'following' && isset($arr[3]) ) :
    				echo 'hello';
    
    			elseif( $arr[3] === 'forums' ) :
    				echo 'hello';
    
    			elseif( $arr[3] === 'bp-messages' || $arr[3] === 'settings' || $arr[3] === 'notifications' || $arr[3] === 'following' ) :
    				echo 'hello';
    		
    			endif;
    			
    		else:
    			
    			if( ( $arr[3] === '' || $arr[3] === 'activity' || $arr[3] === 'profile' || $arr[3] === 'following' || $arr[3] === 'followers' ) && isset($arr[3]) ) :
    				echo 'hello';
    										
    			elseif( $arr[3] === 'forums' && isset($arr[3]) ) :
    				echo 'hello';
    			
    			endif;	
    			
    		endif;
    
    	else:
    
    		echo 'guest';
    
    	endif;
    	
    endif;	

    But It’s not cool..
    Please inform me if you have a better method to solve the problem than the one previously mentioned.

    #282749
    rahulsavsani
    Participant

    I have real estate theme. I want web hook notifications such that when a user applies for a property on my site, notification with property details and applicant details should be sent to the owner of that property. Is it possible with buddypress notifications? And If yes, please guide me through the steps.

    #282717
    mrditt
    Participant

    As you know, with Buddypress users see an email whenever someone sends them a message and they are offline. We have asked repeatedly to your support if Cometchat overrides BP’s direct messaging function at the basic pricing tier? Because Cometchat email notifications are according to your pricing menu are only available to the highest tier Enterprise pricing and that would cost $12,000 US per year! This functionality is something that Buddypress already does, free, so if CometChat ove rides this functionality then we cannot pay you $12,000 to get it back. Are we missing something? We have tried to ask your support this question but have not received a response. Thank you.

    kaneesha
    Participant

    Hi there,

    So i’ve managed it with a mix of my initial code which i posted firstly and your permalink, so i’ve changed basically this:

    $notif = '<span class="noticecount">'. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .'</span>';

    to this:

    $notif = '<a href="' . bp_get_notifications_unread_permalink() . '"><span class="noticecount"><i class="noticecounttitle">Notifications</i>'. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .'</span></a>

    Ok so far so good, but this alchemy failed badly with my unread messages version.
    I tested bp_get_messages_permalink(), or bp_get_unread_messages_permalink() and basically the wierdest combinations one can imagine but nothing worked.

    I’ve searched then here the BP froums plus additionally stack overflow but it seems there are so many techniques to link stuff that i’m utterly lost here.

    There were also permalink tags with the term slug this and slug that so i thought i ask here again before my head explodes.

Viewing 25 results - 126 through 150 (of 1,091 total)
Skip to toolbar