Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'notification user id'

Viewing 25 results - 401 through 425 (of 1,091 total)
  • Author
    Search Results
  • #243049
    danbp
    Participant

    Yes you can, but why would you do that as all those counters are already in the user menu (on top right, under Howdy) and on each profile ? Tsssss…., but you’re the boss ! 😉

    To count friends use friends_get_friend_count_for_user( bp_loggedin_user_id() );
    To count messages use bp_get_total_unread_messages_count( bp_loggedin_user_id() )

    Complete solution

    function my_counter_nav_menu($menu) {  
    
    $notif_url = bp_core_get_user_domain(bp_loggedin_user_id()) .'notifications/';
    $friends_url = bp_core_get_user_domain(bp_loggedin_user_id()) .'friends/'; 
    $msg_url = bp_core_get_user_domain(bp_loggedin_user_id()) .'messages/';    
          
        if (!is_user_logged_in())
            return $menu;
        else
            $notif = '
    
    <li><a href=" ' .$notif_url. ' ">Notif ['. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .']</a></li>
    <li><a href=" ' .$friends_url. ' ">Friends ['. friends_get_friend_count_for_user( bp_loggedin_user_id() ) .']</a></li> 
    <li><a href=" ' .$msg_url. ' ">Messages ['.  bp_get_total_unread_messages_count( bp_loggedin_user_id() ) .']</a></li>
    
    ';
    				
        $menu = $menu . $notif;
        return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'my_counter_nav_menu' );

    Bu yardım olabilir ! 😉

    #243047
    danbp
    Participant

    Add this to bp-custom.php and give a try ! Should show at the left of the logout button on Buddy theme nav bar

    function my_nav_menu_notif_counter($menu) {  
    
    $url = bp_core_get_user_domain(bp_loggedin_user_id()) .'notifications/';   
           // condition: user must be loggedin
            if (!is_user_logged_in())
                    return $menu;
            else
                    $notif = '<li><a href=" ' .$url. ' ">Notif ['. bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ) .']</a></li>';
    				
                    $menu = $menu . $notif;
                    return $menu;
    }
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_notif_counter' );
    #242931
    gurselgunacar
    Participant

    Hello,

    I am trying to find a solution for 2 weeks. Please help me to fix that.

    I want to show message and notification count near nav menu.

    I found that we can show counts of message and notification with following php codes:

    <?php echo bp_notifications_get_unread_notification_count( bp_loggedin_user_id() );?>
    <?php bp_total_unread_messages_count() ?>

    But i couldnt add this codes in menu. I want to change menu like
    Forum Profile Message Notification Contact Blog
    to =>
    Forum Profile (5) Message (12) Notification Contact Blog

    Sorry for that but i dont know php well. My website : http://www.pckopat.net

    Thanks For Your Helps

    #242885
    chicho1969
    Participant

    Thanks in advance for who may help me.

    I´ve been trying, for more than one week, to create a custom notification and always got the same error, so I really need help:

     WordPress database error: [Table 'dbase_wp.n' doesn't exist]
    SELECT * FROM  n   WHERE user_id IN (2) AND secondary_item_id IN (393) AND component_name IN ('activity') AND component_action IN ('new_at_mention') AND is_new = 1  
    WordPress database error: [Incorrect table name '']
    INSERT INTO <code></code> (<code>user_id</code>,
    <code>item_id</code>,<code>secondary_item_id</code>,
    <code>component_name</code>,
    <code>component_action</code>,<code>date_notified</code>,
    <code>is_new</code>) 
    VALUES (2,0,393,'activity','new_at_mention','',1)
    The code Im using to try this is:
    
    function buddypress_celebrities_add_notification ( $activity, $subject, $message, $content, $receiver_user_id )
    { 
    	global $wpdb;
    	$bp = buddypress();
    	$subject = 'Celebrity birthday';
    	$message = '1 Say happy birthday to $famoso_name';
    	$content = '2 Say happy birthday to $famoso_name';
    	$args = array(
    		'user_id'           => 2,
    		'item_id'           => $activity->id,
    		'secondary_item_id' => 393,
    		'component_name'    => buddypress()->activity->id,
    		'component_action'  => 'new_at_mention',
    		'date_notified'     => $current_time,
    		'is_new'            => 1,
    	      );				 
    	 bp_notifications_add_notification( $args );
    				// $prueba = $args;
    } 
    add_action( 'bp_activity_sent_mention_email', 'buddypress_celebrities_add_notification', 10, 1 );
    
    // Then I call the function	
    buddypress_celebrities_add_notification ( );
    

    //and after it DATABASE ERROR…

    If someone can explain me what is going on or just point me in the righ direction to fix and understand this, I’ll be forever grateful.

    mobetman2
    Participant

    I’m using BP for a client’s employee intranet and I’ve setup a custom admin dashboard for the client. The dashboard has two panels, one for WP related action and the second for BP related actions.

    In the BP related panel, I want to add links for their authorized users to be able to send sitewide notifications and mass emails to their employees. Both these functions are on the frontend in the user’s profile messaging section.

    To make this happen I need to add a dynamic link so when a user clicks on the email icon in dashboard panel the user will go to the compose mass message tab (added by 3rd party plugin) in their specific profile on the frontend.

    I know how to accomplish this on the front end and in the menu navigation but none of the usual options or variables work inside the admin dashboard.

    Any suggestions or advice on how to accomplish this?

    #242729
    Jld142
    Participant

    This is my current code:

    <?php
    
    /* Link parent CSS file */
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
    function enqueue_parent_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }
    
    /* Count number of user notifications */
    function cg_current_user_notification_count() {
        $notifications = bp_core_get_notifications_for_user(bp_loggedin_user_id(), 'object');
        $count = !empty($notifications) ? count($notifications) : 0;
     
        echo $count;
    }
    
    /* Remove register BuddyPress Widget creator */
    function remove_bp_core_register_widgets() {
        remove_action(bp_core_register_widgets());
    }
    add_action('init','remove_bp_core_register_widgets()');
    
    function new_bp_core_register_widgets() {
    	add_action('widgets_init', create_function('', 'return register_widget("new_BP_Core_Login_Widget");') );
    }
    add_action( 'bp_register_widgets', 'bp_core_register_widgets' );
    
    /* New BuddyPress Login Widget */
    class new_BP_Core_Login_Widget extends WP_Widget {
    
    	/**
    	 * Constructor method.
    	 */
    	public function __construct() {
    		parent::__construct(
    			false,
    			_x( '(BuddyPress) Log In', 'Title of the login widget', 'buddypress' ),
    			array(
    				'description' => __( 'Show a Log In form to logged-out visitors, and a Log Out link to those who are logged in.', 'buddypress' ),
    				'classname' => 'widget_bp_core_login_widget buddypress widget',
    			)
    		);
    	}
    
    	/**
    	 * Display the login widget.
    	 *
    	 * @see WP_Widget::widget() for description of parameters.
    	 *
    	 * @param array $args Widget arguments.
    	 * @param array $instance Widget settings, as saved by the user.
    	 */
    	public function widget( $args, $instance ) {
    		$title = isset( $instance['title'] ) ? $instance['title'] : '';
    
    		/**
    		 * Filters the title of the Login widget.
    		 *
    		 * @since BuddyPress (1.9.0)
    		 * @since BuddyPress (2.3.0) Added 'instance' and 'id_base' to arguments passed to filter.
    		 *
    		 * @param string $title    The widget title.
    		 * @param array  $instance The settings for the particular instance of the widget.
    		 * @param string $id_base  Root ID for all widgets of this type.
    		 */
    		$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    
    		echo $args['before_widget'];
    
    		echo $args['before_title'] . esc_html( $title ) . $args['after_title']; ?>
    
    		<?php if ( is_user_logged_in() ) : ?>
    
    			<?php
    
     		 	/**
    		 	 * Fires before the display of widget content if logged in.
    		 	 *
    		 	 * @since BuddyPress (1.9.0)
    		 	 */
    			do_action( 'bp_before_login_widget_loggedin' ); ?>
    
    			<div class="bp-login-widget-user-avatar">
    				<a href="<?php echo bp_loggedin_user_domain(); ?>">
    					<?php bp_loggedin_user_avatar( 'type=thumb&width=50&height=50' ); ?>
    				</a>
    			</div>
    
    			<div class="bp-login-widget-user-links">
    				<div class="bp-login-widget-user-link"><?php echo bp_core_get_userlink( bp_loggedin_user_id() ); ?></div>
    				<p>TEST</p>
    				<div class="bp-login-widget-user-logout"><a class="logout" href="<?php echo wp_logout_url( bp_get_requested_url() ); ?>"><?php _e( 'Log Out', 'buddypress' ); ?></a></div>
    			</div>
    
    			<?php
    
    			/**
    		 	 * Fires after the display of widget content if logged in.
    		 	 *
    		 	 * @since BuddyPress (1.9.0)
    		 	 */
    			do_action( 'bp_after_login_widget_loggedin' ); ?>
    
    		<?php else : ?>
    
    			<?php
    
    			/**
    		 	 * Fires before the display of widget content if logged out.
    		 	 *
    		 	 * @since BuddyPress (1.9.0)
    		 	 */
    			do_action( 'bp_before_login_widget_loggedout' ); ?>
    
    			<form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
    				<label for="bp-login-widget-user-login"><?php _e( 'Username', 'buddypress' ); ?></label>
    				<input type="text" name="log" id="bp-login-widget-user-login" class="input" value="" />
    
    				<label for="bp-login-widget-user-pass"><?php _e( 'Password', 'buddypress' ); ?></label>
    				<input type="password" name="pwd" id="bp-login-widget-user-pass" class="input" value="" <?php bp_form_field_attributes( 'password' ) ?> />
    
    				<div class="forgetmenot"><label><input name="rememberme" type="checkbox" id="bp-login-widget-rememberme" value="forever" /> <?php _e( 'Remember Me', 'buddypress' ); ?></label></div>
    
    				<input type="submit" name="wp-submit" id="bp-login-widget-submit" value="<?php esc_attr_e( 'Log In', 'buddypress' ); ?>" />
    
    				<?php if ( bp_get_signup_allowed() ) : ?>
    
    					<span class="bp-login-widget-register-link"><?php printf( __( '<a href="%s" title="Register for a new account">Register</a>', 'buddypress' ), bp_get_signup_page() ); ?></span>
    
    				<?php endif; ?>
    
    			</form>
    
    			<?php
    
    			/**
    		 	 * Fires after the display of widget content if logged out.
    		 	 *
    		 	 * @since BuddyPress (1.9.0)
    		 	 */
    			do_action( 'bp_after_login_widget_loggedout' ); ?>
    
    		<?php endif;
    
    		echo $args['after_widget'];
    	}
    
    	/**
    	 * Update the login widget options.
    	 *
    	 * @param array $new_instance The new instance options.
    	 * @param array $old_instance The old instance options.
    	 * @return array $instance The parsed options to be saved.
    	 */
    	public function update( $new_instance, $old_instance ) {
    		$instance             = $old_instance;
    		$instance['title']    = isset( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
    
    		return $instance;
    	}
    
    	/**
    	 * Output the login widget options form.
    	 *
    	 * @param $instance Settings for this widget.
    	 */
    	public function form( $instance = array() ) {
    
    		$settings = wp_parse_args( $instance, array(
    			'title' => '',
    		) ); ?>
    
    		<p>
    			<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'buddypress' ); ?>
    			<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label>
    		</p>
    
    		<?php
    	}
    }
    
    ?>

    I was trying to following the below guide to remove the function that initializes the login widget and then redirect it to my own new one:

    http://venutip.com/content/right-way-override-theme-functions

    Obviously hasn’t worked. Any ideas ?

    mycru.io
    Participant

    Hi since 2 days people can’t upload activity updates with attached media anymore.

    I found something in the debug.log. Someone an idea ? What does it mean ? Anyone else having this problem ? ( as admin I can upload btw)

    [03-Aug-2015 10:25:11 UTC] PHP Notice: bp_core_get_notifications_for_user is deprecated since version 1.9! Use bp_notifications_get_notifications_for_user() instead. in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-includes/functions.php on line 3391
    [03-Aug-2015 10:25:11 UTC] PHP Notice: bp_core_get_notifications_for_user is deprecated since version 1.9! Use bp_notifications_get_notifications_for_user() instead. in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-includes/functions.php on line 3391
    [03-Aug-2015 10:25:12 UTC] PHP Notice: Undefined variable: fbcj_members_extension_check in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-content/plugins/buddypress-social-icons/buddypress-social-icons.php on line 11
    [03-Aug-2015 10:25:12 UTC] PHP Notice: Undefined variable: fbcj_group_extension_check in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-content/plugins/buddypress-social-icons/buddypress-social-icons.php on line 28
    [03-Aug-2015 10:25:12 UTC] PHP Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-includes/functions.php on line 3560
    [03-Aug-2015 10:25:12 UTC] PHP Strict Standards: Declaration of myCRED_Notifications::after_general_settings() should be compatible with myCRED_Module::after_general_settings($mycred) in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-content/plugins/mycred-notice-plus/mycred-notice-plus.php on line 203
    [03-Aug-2015 10:25:13 UTC] PHP Notice: Undefined variable: fbcj_members_extension_check in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-content/plugins/buddypress-social-icons/buddypress-social-icons.php on line 11
    [03-Aug-2015 10:25:13 UTC] PHP Notice: Undefined variable: fbcj_group_extension_check in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-content/plugins/buddypress-social-icons/buddypress-social-icons.php on line 28
    [03-Aug-2015 10:25:13 UTC] PHP Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-includes/functions.php on line 3560
    [03-Aug-2015 10:25:13 UTC] PHP Strict Standards: Declaration of myCRED_Notifications::after_general_settings() should be compatible with myCRED_Module::after_general_settings($mycred) in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-content/plugins/mycred-notice-plus/mycred-notice-plus.php on line 203
    [03-Aug-2015 10:25:14 UTC] PHP Notice: bp_core_get_notifications_for_user is deprecated since version 1.9! Use bp_notifications_get_notifications_for_user() instead. in /homepages/26/d553229553/htdocs/clickandbuilds/kawaii/wp-includes/functions.php on line 3391

    amanavohra
    Participant

    Hi,

    I am trying to add to group activity stream and send a notification but its not working – Help pls
    Adding to group activity like this

    
    add_post_type_support( 'product', 'buddypress-activity' );
    
    function customize_page_tracking_args() {
    	// Check if the Activity component is active before using it.
    	if ( ! bp_is_active( 'activity' ) ) {
    		return;
    	}
    	
    	global $bp;
    	$gid = $bp->groups->current_group->id;
    	$group = new BP_Groups_Group($gid, true);
    	$user_id = get_current_user_id();
    	
    	
    	groups_record_activity( array(
    			'action'  => apply_filters( 'groups_activity_new_update_action', sprintf( __( '%1$s publicó una actualización en %2$s', 'buddypress'), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $group ) . '">' . esc_attr( bp_get_group_name( $group ) ) . '</a>' ) ),
    			'content'   => $content,
    			'type'    => $type,
    			'item_id' => $gid,
    			'user_id' => $user_id
    	)
    	);
    
    }
    add_action( 'save_post', 'customize_page_tracking_args', 1000 );
    

    Adding to notification like this

    
    bp_notifications_add_notification( array(
    		'user_id'           => $cid,
    		'item_id'           => $post_id,
    		
    ) );
    
    enad12
    Participant

    Hello I have a theme with a live notification feature, I asked the creator of the theme about how to add more notifications but he told me it all came from a buddypress notification table, so I should find a way to add the notification behavior on BP and then his add on will took those automatically.

    I particularly want 2 more notification behaviors but I don’t really how to start, when you are in a group and you write something in one of the forums of that group, if somebody else write after you I woud like some kind of notification in order to follow the conversation. I tried the subscribe “+” but I didn’t receive nothing on my BP sire, (I can do it by email, but I would prefeer to avoid email notifications).

    Same case with comments on products (I have bP and Woocommerce integrated), when somebody write something in a product I would like to automatically subscribe that user to receive updates or notifications if somebody answer him or write after him.

    any idea how to adress those behaviors to facilitate the interaction between users?

    Thanks!

    #242493
    Nithin K Varrier
    Participant

    Hi,

    I’m trying to create custom notification in my plugin.

    created this function in Class:
    public function setup_globals( $args = array() ) {
    global $bp;
    $sr_notifications_test_slug = ‘sr_notifications_test’;
    parent::setup_globals( array(
    ‘id’ => ‘sr_notifications_test’,
    ‘slug’ => $sr_notifications_test_slug,
    ‘notification_callback’ => array( $this, ‘sr_format_notifications_test’ )
    ) );

    /* Register this in the active components array */
    $bp->active_components[$sr_notifications_test_slug] = ‘sr_notifications_test’;

    }

    created following function :

    function sr_format_notifications_test( $action, $item_id, $secondary_item_id, $total_items, $format = ‘string’ ) {

    switch ( $action ) {
    case ‘my_test’:
    $link = get_permalink( $item_id );
    $text = “Test Notification”;

    $return = apply_filters( $filter, array(
    ‘text’ => $text,
    ‘link’ => $link
    ), $link, (int) $total_items, $text, $link, $item_id, $secondary_item_id );
    break;
    }

    do_action( ‘sr_format_notifications_test’, $action, $item_id, $secondary_item_id, $total_items );
    return $return;
    }

    Notification added to DB:
    bp_notifications_add_notification( array(
    ‘user_id’ => $user_id,
    ‘item_id’ => $activity->id,
    ‘secondary_item_id’ => $activity->user_id,
    ‘component_name’ => buddypress()->activity->id,
    ‘component_action’ => ‘my_test’,
    ‘date_notified’ => bp_core_current_time(),
    ‘is_new’ => 1

    ) );

    Please help call back function is not calling.

    Thanks

    #242490
    kjgbriggs
    Participant

    I am looking to remove my WordPress Admin Bar (hide it completely) as users will not have access to most stuff on there anyway.

    I would however like to keep the BuddyPress notifications area (the thing that says Howdy…) that has all the account options on.

    I want to move this to an independent bar below my main menu as has been done on the BuddyPress site here, the bar that says BuddyPress.org My Sites and has the Howdy account bar on the right.

    Does anyone know how this was done and how to do it?

    #242052
    creativesinside
    Participant

    object(BP_Notifications_Notification)#394 (8) { ["id"]=> string(3) "297" ["item_id"]=> string(3) "242" ["secondary_item_id"]=> string(1) "1" ["user_id"]=> string(1) "1" ["component_name"]=> string(8) "messages" ["component_action"]=> string(11) "new_message" ["date_notified"]=> string(19) "2015-07-20 20:11:46" ["is_new"]=> string(1) "0" }

    The actual Post ID in question is 756.

    #242048
    creativesinside
    Participant

    Is this what you were looking for?
    object(BP_Notifications_Notification)#394 (8) { ["id"]=> string(26) "bp_get_the_notification_id" ["item_id"]=> NULL ["secondary_item_id"]=> NULL ["user_id"]=> NULL ["component_name"]=> NULL ["component_action"]=> NULL ["date_notified"]=> NULL ["is_new"]=> NULL }

    #242042
    creativesinside
    Participant

    Ack my bad! I’m fairly new to php and super new to Buddypress.

    Ok soooo … in the file notifications-loop.php inside the loop I’ve added:

    				$notificationid7 = bp_get_the_notification_id();
    				$obj = bp_notifications_get_notification( $notificationid7 );

    And where I need to display the link (also in notifications-loop.php):

    <a href="/pins/<?php echo $obj->item_id; ?>">view</a>

    Lastly, where I passed the item ID in bp-notifications-functions.php:

    function bp_notifications_add_notification( $args = array() ) {
    
    	$r = wp_parse_args( $args, array(
    		'user_id'           => 0,
    		'item_id'           => $post_id,
    		'secondary_item_id' => 0,

    However it’s echoing the notification number … not the post ID.

    #242012
    creativesinside
    Participant

    This is my code:

    <?php while ( bp_the_notifications() ) : bp_the_notification();
    
    $user_id = $bp->notifications->query_loop->notification->secondary_item_id;
    //bp_notifications_mark_notification(bp_get_the_notification_id(),false);
     ?>
    <?php 
                                $messageId = buddypress()->notifications->query_loop->notification->item_id;
                                $message = messages_get_message($messageId);
                                $image = null;
                                if ($message) {
                                    $title = apply_filters( 'bp_get_message_thread_from', bp_core_get_userlink( $message->sender_id ) );
                                    if ($message->subject == "comment on your post") {
                                       $title .= " commented on your post";
                                    } elseif ($message->subject == "like your post") {
                                       $title .= " liked your post";
                                    } else {
                                       $title = null;
                                    }
                                    
                                    $image = bp_messages_get_meta($messageId, 'images');
    				$obj = bp_notifications_get_notification( $id ); 
                                }
                             ?>

    And the echo:

    <div><a href="/pins/<?php echo $obj->item_id; ?>">VIEW</a></div>

    #242010
    creativesinside
    Participant

    Is this the proper way to have it setup at the function?

    function bp_notifications_add_notification( $args = array() ) {
    
    	$r = wp_parse_args( $args, array(
    		'user_id'           => 0,
    		'item_id'           => $post_id,
    		'secondary_item_id' => ,
    #242004
    creativesinside
    Participant

    Can I simply add post_id into this?

    function bp_notifications_add_notification( $args = array() ) {
    
    	$r = wp_parse_args( $args, array(
    		'user_id'           => 0,
    		'item_id'           => 0,
    		'secondary_item_id' => 0,
    		'component_name'    => '',
    		'component_action'  => '',
    		'date_notified'     => bp_core_current_time(),
    		'is_new'            => 1,
    		'allow_duplicate'   => false,
    	) );
    
    	// Check for existing duplicate notifications
    	if ( ! $r['allow_duplicate'] ) {
    		// date_notified, allow_duplicate don't count toward
    		// duplicate status
    		$existing = BP_Notifications_Notification::get( array(
    			'user_id'           => $r['user_id'],
    			'item_id'           => $r['item_id'],
    			'secondary_item_id' => $r['secondary_item_id'],
    			'component_name'    => $r['component_name'],
    			'component_action'  => $r['component_action'],
    			'is_new'            => $r['is_new'],
    		) );
    
    		if ( ! empty( $existing ) ) {
    			return false;
    		}
    	}
    
    	// Setup the new notification
    	$notification                    = new BP_Notifications_Notification;
    	$notification->user_id           = $r['user_id'];
    	$notification->item_id           = $r['item_id'];
    	$notification->secondary_item_id = $r['secondary_item_id'];
    	$notification->component_name    = $r['component_name'];
    	$notification->component_action  = $r['component_action'];
    	$notification->date_notified     = $r['date_notified'];
    	$notification->is_new            = $r['is_new'];
    
    	// Save the new notification
    	return $notification->save();
    }
    jreeve
    Participant

    I’ve been getting weird errors when trying to log an activity item via bp_activity_add():

    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '( user_id, component, type, action, content, primary_link, date_recorded, item_i' at line 1 for query INSERT INTO ( user_id, component, type, action, content, primary_link, date_recorded, item_id, secondary_item_id, hide_sitewide, is_spam ) VALUES ( 3163, 'members', 'new_member', '', '', '', '2015-07-16 15:47:00', 0, 0, 0, 0 ) made by require('wp-blog-header. php'), require_once('wp-load.php'), require_once('/srv/www/commons/current/web/wp-config. php'), require_once('wp-settings.php'), include('/themes/tuileries/functions.php'), bp_activity_add, BP_Activity_Activity->save

    As you can see, there’s no table name here. It should be INSERT INTO wp_bp_activities... or thereabouts. It looks like BP_Activity_Activity->save() is trying to access $bp->activity->table_name, but $bp->activity doesn’t have a table_name property at this stage. Instead, this is all that is in $bp->activity:

    
    BP_Activity_Component Object
    (
        [name] => Activity Streams
        [id] => activity
        [slug] =>
        [has_directory] =>
        [path] => /srv/www/commons/current/web/app/plugins/buddypress/
        [query] =>
        [current_id] =>
        [notification_callback] =>
        [admin_menu] =>
        [search_string] =>
        [root_slug] =>
        [meta_tables] => Array
            (
            )
    
        [global_tables] => Array
            (
            )
    
        [adminbar_myaccount_order] => 10
    )

    Why isn’t there a table name here? How can I fix this?

    Shaktimaan
    Participant

    Wordpress version is 4.2.2
    Buddypress Version 2.3.2.1
    bbpress Version 2.5.7
    my website http://atheistzone.com/
    I am using buddy premium theme.

    I am facing email related issue. I noticed it on Sunday when i sent mass emails from my old site and asked members to check out new site.

    I noticed about 30 emails in pending columns. Activation emails were sent sometimes but most of the times were not sent.

    Today i noticed another issue that is also related to email. Emails are sent but reaching about 10 to 45 minutes late in users’ account. I am also receiving notifications of new activity late.

    Both activation emails and notifications of new replies are affected by this issue. Notifications of comments on blog posts are also reaching about 10 to 45 late in my email account. I am not using any email related plugin.

    I have tested gmail as well as yahoo email account. Same problem. Email reaches late.

    I have contacted my web host, HostGator twice via chat but he said it is not a server issue and blames software.

    Rollercoasterider
    Participant

    1. Which version of WordPress are you running?
    4.2.2

    2. Did you install WordPress as a directory or subdomain install?
    3. If a directory install, is it in root or in a subdirectory?
    It is at domain.com/members

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

    5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting.
    This is a fresh install–relatively, I’ve been playing and testing with it for a month or two, but no posts–not yet public.

    6. Which version of BP are you running?
    2.3.2.1

    7. Did you upgraded from a previous version of BP? If so, from which version?
    I have updated my plugins whenever it asks so maybe, but the issues have been present pretty much since I started. I’vbe just been focusing on different areas.

    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?
    Advanced Access Manager: not activated
    Akismet: still need to get the API
    Child Theme Configurator
    Conditional Menus
    Lazy Load for Videos
    Microthemer: not activated
    Press Permit Core: not activated
    Restrict User Access
    Simple:Press
    UpdraftPlus – Backup/Restore
    User Role Editor
    Zippy Courses

    Some are not activated because I was trying out a few different plugins for user roles.

    9. Are you using the standard WordPress theme or customized theme?
    I have created a child theme from the Social Triggers theme for Zippy Courses

    10. Have you modified the core files in any way?
    I don’t think so.

    11. Do you have any custom functions in bp-custom.php?
    I don’t think so.

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

    13. Please provide a list of any errors in your server’s log files.
    How do I do this?
    I copied the 300 most recent and removed those that were not from the members folder (smf forum had the most) and got a list of 16–of course there would be more if it listed more than 300. But these give addresses and IPs.
    I’m probably not understanding how to do this.

    All of them are File not Found errors and there are 8 different ones–each error shows twice.
    8 refer to Zippy courses, referencing the child theme and wp-admin
    2: wp-admin/index.php
    2: wp-admin/plugins.php
    2: wp-admin/themes.php
    2: wp-admin/update-core.php

    The other 8 do not refer to Zippy Courses, but otherwise refer to the same end places.
    Does that help?

    14. Which company provides your hosting?
    Cyberlynk

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

    I switched themes to 2015 and then 2013 to see if it made a difference and it did not.

    I installed a fresh install of WP at a new location (domain.com/members) for using the zippy courses plugin. Afterwards I thought I should try out BuddyPress with it, so I installed and activated it.
    I’ve had some issues and I don’t know if its zippy courses, buddypress or something else. But I did just go to the codex and read that I should not have use softaculous to install WP.
    So I think I should start over again—not a huge deal since I’m just playing around with zippy and buddy, but I would rather not lose some of the things I’ve done. How can I save what I’ve done and still reinstall? Zippy courses has an importer/exporter, so that’s no problem, but what about the other stuff:
    I’ve set up user roles with a plugin and created a child theme and added a second menu and done some other things that, for me, took time.

    Some of the issues could simply be that I’m still learning (like the child-theme). All of the pages in both the zippy and buddypress core pages section say they are pointing to the page with the corresponding name. I have the front page set as Home. But when I try to go to the homepage it goes directly to the members page instead.
    When I try the links at the top: activity, notifications, profile, settings; they all go to

    The requested URL /members/members/Rollercoasterider/notifications/ was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    The only one that goes somewhere is the log out link and that goes to the Simple:Press forum I just set up—before I installed Simple:Press it went somewhere else. I don’t know why it is now going to Simple:Press. (Other than this now directing to Simple:Press, all these issues were present before I installed Simple:Press).

    Why do pretty permalinks need to be used? I thought I read something (a few years ago) about these causing problems.

    Site: http://theherosspouse.com/members/

    hich-em
    Participant

    Hello,
    1) Please i want when the user change his setting a green message in the page of profile general settings (~.com/members/hich-em/settings/) tell him changed successfully or error … i didn’t see it in my website for example i tried to change the email without giving the current password no erreur appears.

    2) i want when it changed successfully it send notification email tell him that his setting was changed

    thanks 🙂

    #241042
    milenushka
    Participant

    Hi @imath, thank you so much for writing back. For some reason I didn’t get the notification, and was depressed over the site for a month. Today I decided to finally face the issue again, and what a nice surprise!

    So my code is:

    add_filter( 'bp_blogs_record_post_post_types', 'inspired_record_more_types' );
    function inspired_record_more_types( $types ) {
         $types[] = 'projects';
         $types[] = 'sfwd-courses';
         $types[] = 'uig_image';
            return $types;
    }
    
    add_filter('bp_blogs_activity_new_post_action', 'record_cpt_activity_action', 1, 3);
    function record_cpt_activity_action( $activity_action,  $post, $post_permalink ) { 
    
       if( $post->post_type == 'projects' ) {
    	$activity_action  = sprintf( __( '%1$s created a new project, %2$s  ', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
       }
    if( $post->post_type == 'sfwd-courses' ) {
    	$activity_action  = sprintf( __( '%1$s added a new workshop, %2$s  ', 'buddypress'  ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
       }	
    if( $post->post_type == 'uig_image' ) {
    	$activity_action  = sprintf( __( '%1$s added a new image, %2$s  ', 'buddypress'  ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
       }
       return $activity_action;
    }
    
    function bbg_record_my_custom_post_type_comments( $post_types ) {
          $post_types[] = 'projects'; 
          return $post_types;
      }
      add_filter( 'bp_blogs_record_comment_post_types', 'bbg_record_my_custom_post_type_comments' );
    
    

    Thank you so much. I really appreciate it.

    #240989
    djsteveb
    Participant

    @jacipetersilie – best thing I have seen that is close to fbook like chat thing is the free “quick chat plugin” – however I do not use it to show as a widget on all pages and give a popup to users – as I think that would tax the server and web browser more than is reasonable if you have dozens of users – it might work, might not. I use quick chat for a single chat room on a single page.

    From what you are describing however, I wonder if you really need a chat plugin to do what you are saying – one to many message – like the super-admin send a message to all users, kind of privately… I think there are some plugins in the wild that allow admin to send an email (Which I guess would be a buddypress inbox notification (?)) – to all users… that would “one to many” message – and give people a way to “message you back” privately I think.

    I have also seen a plugin that will allow super admin to add a note to all dashboards – although I guess many bp users will not go to their dashboard when using most features –

    I suppose you could also assign users to a group, and select settings for them to get a notice email when a new group message is sent. Which may achieve what you are describing.

    If you just want one-to-many messaging chat with users who are actually logged into a chat room, I think it would be easy to do that with nusoft’s av-chat, there are settings in which you can make it so only certain users can post in the chat, have moderated chat, turn off pms and stuff like that – I guess I am not clear on what exactly you are trying to accomplish as I don’t use fbook and am not familiar with the kind of one to many fbook messaging you are talking about.

    aventurine_geode
    Participant

    WP Version: 4.2.2
    BP Version: 2.3.1

    Hey all!

    I’ve recently installed BP and so far the functionality is great, but unfortunately it didn’t integrate perfectly with my theme. I would like to go in and alter a few things, specifically:

    * Customize the search bar on the Members and Groups pages
    * Change the thickness and color of the horizontal rules used throughout
    * Change the color of the buttons used throughout (‘Post Update’, ‘Comment’, ‘Delete’, ‘Favorite’ etc.)
    * Remove the white circles behind the counters for Notifications, Messages, Friends etc. on user pages, as well as on the counters for Members and Group Members on those respective pages, and throughout
    * Remove the text highlight on the selected “section” of the various pages
    * Change the background color of the input fields throughout

    I am comfortable enough with CSS to do this and I’m sure it’s a simple matter, but I understand Buddypress’ CSS is integrated into its PHP files and I’m having a little trouble navigating, as I’m not familiar with PHP.

    Can anyone point me in the right direction as to where to access the style elements of the default BP theme to make these minor changes?

    sylkitt
    Participant

    Hi, I am creating the website dexterlist.com and the registered users do not receive any kind of notification (email, profile bell, live notifications) when someone comments to their posts. I am using a paid theme called Kleo: http://seventhqueen.com/themedemo/?product=kleo, WordPress version 4.2.2 and Buddypress version 2.3.1. The support forum of the Kleo theme told me it is not a theme problem but a Buddypress one. Please advise.

Viewing 25 results - 401 through 425 (of 1,091 total)
Skip to toolbar