Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'notification user id'

Viewing 25 results - 476 through 500 (of 768 total)
  • Author
    Search Results
  • #171478
    minto
    Participant

    @carco
    nice hack, as i could say intuitively! πŸ˜€

    but for some reason still no notifs appearing!
    + the user_id-tables in the database give 0 for all entries!

    thx anyway!

    #171420
    Carco
    Participant

    function bp_like_check_installed() {
    global $wpdb;

    if ( !is_site_admin() )
    return false;

    if ( !get_site_option( ‘bp_like_settings’ ) || get_site_option( ‘bp-like-db-version’ ) )
    bp_like_install();

    if ( get_site_option( ‘bp_like_db_version’ ) < BP_LIKE_DB_VERSION )
    bp_like_install();
    }
    add_action( ‘admin_menu’, ‘bp_like_check_installed’ );
    add_action( ‘network_admin_menu’, ‘bp_like_check_installed’ );

    /**
    * for notifications
    */

    function bp_like_setup_globals() {
    global $bp, $current_blog;
    $bp->bp_like=new stdClass();
    $bp->bp_like->id = ‘bp-like’;
    $bp->bp_like->slug = ‘bp_like’;
    $bp->bp_like->notification_callback = ‘bp_like_format_notifications’;
    $bp->active_components[$bp->bp_like->slug] = $bp->bp_like->id;
    do_action( ‘bp_like_setup_globals’ );
    }
    add_action( ‘bp_setup_globals’, ‘bp_like_setup_globals’ );

    function bp_like_format_notifications( $action, $item_id, $secondary_item_id, $total_items,$format=’string’) {
    global $bp;
    $glue=”;
    $user_names=array();
    $activity = new BP_Activity_Activity( $item_id );
    $link=like_notifier_activity_get_permalink( $item_id );

    if($activity->user_id==$bp->loggedin_user->id){
    $text=__(“your”);
    $also=””;
    }
    else{
    $text=sprintf(__(“%s’s”), bp_core_get_user_displayname ($activity->user_id));//somone’s
    $also=” also”;
    }

    $users = array_keys( bp_activity_get_meta( $item_id, ‘liked_count’ ) );
    $total_user= $count=count($users);

    if ($count==0){
    bp_core_delete_notifications_by_item_id( $bp->loggedin_user->id, $activity->id, $bp->bp_like->slug, ‘new_bp_like_’.$activity->id);
    }

    if($count>2){
    $users=array_slice($users, $count-2);
    $count=$count-2;
    $glue=”, “;
    }

    else if($total_user==2)
    $glue=” and “;

    foreach((array)$users as $id)
    $user_names[]=bp_core_get_user_displayname ($id);

    if(!empty($user_names))
    $commenting_users=join ($glue, $user_names);
    else
    $commenting_users=”Somebody remove it after”;

    if($total_user>2)
    $text=$commenting_users.” and “.$count.” others”.$also.” liked on “.$text. ” post”;
    else
    $text=$commenting_users.$also .” liked on “.$text. ” post”;

    return array(‘link’=>$link,
    ‘text’=>$text);

    }

    function like_notifier_activity_get_permalink( $activity_id, $activity_obj = false ) {
    global $bp;

    if ( !$activity_obj )
    $activity_obj = new BP_Activity_Activity( $activity_id );

    $link = bp_get_activity_directory_permalink() . ‘p/’ . $activity_obj->id . ‘/’;

    return apply_filters( ‘like_notifier_activity_get_permalink’, $link );
    }

    function like_notifier_remove_notification($activity,$has_access){
    global $bp;
    if($has_access)
    bp_core_delete_notifications_by_item_id( $bp->loggedin_user->id, $activity->id, $bp->bp_like->slug, ‘new_bp_like_’.$activity->id);

    }
    add_action(“bp_activity_screen_single_activity_permalink”,”like_notifier_remove_notification”,10,2);

    ….

    bp_core_add_notification( $item_id, $activity[‘activities’][0]->user_id, $bp->bp_like->slug, ‘new_bp_like_’.$item_id );

    #171419
    m1000
    Participant

    Ooops, that was my mistage, database user didn’t have the right to delete tables.

    #170537
    terraling
    Participant

    Case?

    John sends a friend request to Lucy.

    Lucy receives an email notification which invites her to check out John’s profile.

    When she does she sees a ‘Cancel Friendship Request’ button. She also sees how fond John is of gerbils and she quickly hits the button, but gets an error message ‘Friendship request cannot be cancelled’.

    She can’t cancel it because she didn’t initiate it.

    It seems logically there might be 3 options:

    1. she sees no button (likewise when John appears on the member directory list);
    2. she sees a button which takes her to her friend requests page where she can accept or reject it; or,
    3. she is able to accept/reject it then and there.

    These options become more user friendly but harder to implement.

    I would have thought 1. is, ahem, fairly straightforward, and wouldn’t break anything anywhere else.

    It would be helpful if check_is_friend in bp-friends-classes.php returned not just ‘pending’, ‘is_friend’, or ‘not_friends’ but differentiated ‘pending’ according to whether the current user had initiated it or not.

    But now I’m getting a little out of my depth…

    #170427

    @henrywright-1,

    This is what i did to remove it from activation email, you can play with it to remove it from all

    function fix_bp_activation_subject($subject) {
    return __( "Activate Your Account",'buddypress ' );
    }
    add_filter( 'bp_core_activation_signup_user_notification_subject ','fix_bp_activation_subject');

    Naijaping

    bp-help
    Participant
    jstuartwp
    Participant

    Thanks for response!

    I did some research and found that s2member syncs profiles with buddypress, so that part is solved. The only thing I’m still really looking for is a notifications bar or widget, other than the wordpress one. Hopefully there is a plugin for that?

    #169918
    Hugo Ashmore
    Participant

    With Theme Compatibility BP doesn’t have control over sidebars, bp-default theme used to hardcode messages to it’s sidebar. This is an issue discussed on a ticket, the interim solution was to feed site messages into the WP footer, and add default styling to position them over the site towards top of the page.

    The solution is a widget, which is simple enough, I ran one up, but harder for users is knowing how to disable the existing feed into the wp_footer

    #169063

    In reply to: Notification Messages

    I was able to add notification message.

    I added this code in bp-activity-functions.php

    case ‘request_accepted’:
    $activity_id = $item_id;
    $poster_user_id = $secondary_item_id;
    $at_mention_link = bp_loggedin_user_domain() . bp_get_activity_slug();
    $at_mention_title = sprintf( __( ‘@%s Mentions’, ‘buddypress’ ), bp_get_loggedin_user_username() );

    if ( (int) $total_items > 1 ) {
    $text = sprintf( __( ‘You have %1$d pet requests’, ‘buddypress’ ), (int) $total_items );
    $filter = ‘bp_activity_multiple_at_mentions_notification’;
    } else {
    $user_fullname = bp_core_get_user_displayname( $poster_user_id );
    $text = sprintf( __( ‘%1$s accepted your pet request’, ‘buddypress’ ), $user_fullname );
    $filter = ‘bp_activity_single_at_mentions_notification’;
    }
    break;

    my problem is I need to remove the notification once clicked.

    Do you know where it is triggered?

    #168534
    minto
    Participant

    Here’s what I did meanwhile:

    1. removed all those junkcode, I had originally in πŸ˜‰

    2. found that display-issue in the above + corrected it in the code, which seemed responsible for no text/ no links being given (I inserted the missing a-href):
    return apply_filters( β€˜bp_activity_multiple_new_likes_notification’, β€˜β€˜ . $text . β€˜β€˜);
    … but this also did not bring up the link + text …

    3. wonder about that line:
    $link=ac_notifier_activity_get_permalink2( $activity_id );
    …removed the “2”, because with that in, my toolbar disappears…
    Should that be noticed in the ac_notifier too, with the need to keep the “2”?

    4. any notifications (even the live-notification-popup) still only appear on the likers-side, still not yet on the liked-user-profile!

    So this is, what it looks like atm:

    
    function bp_like_setup_globals() {
    global $bp, $current_blog;
    $bp->bp_like=new stdClass();
    $bp->bp_like->id = 'bp-like';
    $bp->bp_like->slug = 'bp_like';
    $bp->bp_like->notification_callback = 'bp_like_format_notifications';
    $bp->active_components[$bp->bp_like->slug] = $bp->bp_like->id;
    do_action( 'bp_like_setup_globals' );
    }
    add_action( 'bp_setup_globals', 'bp_like_setup_globals' );
    
    function bp_like_format_notifications( $action, $item_id, $secondary_item_id, $total_items,$format='string') {
    global $bp;
    $glue='';
    $user_names=array();
    $activity = new BP_Activity_Activity( $activity_id );
    $link=ac_notifier_activity_get_permalink( $activity_id );
    
    //si c’est le posteur d’origine, dites que vous Γͺtes, d’autre dire de% s aprΓ¨s
    if($activity->user_id==$bp->loggedin_user->id){
    $text=__("your");
    $also="";
    }
    else{
    $text=sprintf(__("%s’s"), bp_core_get_user_displayname ($activity->user_id));//quelqu’un
    $also=" also";
    }
    $ac_action='new_bp_like_'.$item_id;
    
    if($action==$ac_action){
    // if ( (int)$total_items > 1 ) {
    // $users=ac_notifier_find_involved_persons($activity_id);
    $total_user=$count=count($users);//montrent de nombreux utilisateurs uniques ont commentΓ©
    if($count>2){
    $users=array_slice($users, $count-2);//simplement indiquer le nom de deux affiches, le repos doit Γͺtre aussi et β€˜n’ autre a Γ©galement commentΓ©
    $count=$count-2;
    $glue=", ";
    }
    else if($total_user==2)
    $glue=" xxxx1xxxx ";//si il ya 2 utilisateurs uniques, disons x et y commentΓ©
    
    foreach((array)$users as $user_id)
    $user_names[]=bp_core_get_user_displayname($user_id);
    
    if(!empty($user_names))
    $commenting_users=join($glue, $user_names);
    
    if($total_user>2)
    $text=$commenting_users." xxxxxxxx2xxxxxxx ".$count." xxxx3xxxx".$also." xxxxxxxx4xxxxxxx on ".$text." post";//peut-on changer la poste Γ  quelque chose de significatif en fonction de l’élΓ©ment d’activitΓ©?
    else
    $text=$commenting_users.$also." xxxxxx5xxxxx on ".$text." post";
    
    if($format=='string')
    return apply_filters( 'bp_activity_multiple_new_likes_notification', '<a href="'.$link.'">'.$text.'</a>');
    else{
    return array('link'=>$link,
    'text'=>$text);
    }
    return false;
    }
    
    }
    

    any suggestions?

    thx in advance!

    #168145
    cameronwilby
    Participant

    I am helping Kathryn with this issue, here are the details for the installation.

    The original programmer for the site vanished, so the configuration is the way it is. Not asking anybody to solve the problem on our behalf, just opening the issue to more eyes. All help and all input is greatly appreciated.

    Wordpress: 3.5.2
    Buddypress: 1.7.3
    PHP: 5.3 (I suspect this might be the culprit.)

    Installed Plugins

    Legend – (A)Active, (-)Deactivated

    BUDDYPRESS PLUGINS

    (A)BP Auto Login on Activation 1.0.1
    (A)BP Export Users 1.1
    (A)BP Group Announcements 1.0.2
    (A)BP Group Hierarchy 1.3.9
    (A)BG Group Management 0.6
    (A)BP Group Organizer 1.0.7
    (-)BP Labs 1.3

    (A)BuddyPress 1.7.3
    (A)BuddyPress Activity Plus 1.5
    (A)BuddyPress Auto Group Join 2.2.1
    (A)BuddyPress Docs 1.4.3
    (A)BuddyPress Docs Wiki add-on 1.0.3
    (-)BuddyPress Edit Group Slug 1.2
    (A)BuddyPress Group Email Subscription 3.3.3
    (A)BuddyPress Groups Extras 3.5.7
    (A)BuddyPress Like 0.0.8
    (-)BuddyPress Live Notification 1.0.3
    (-)BuddyPress Usernames Only 0.6
    (A)bbPress 2.3.2
    (A)bbPress reCaptcha 1.1
    (A)bbPress Search Widget 2.0.0
    (A)bbPress Threaded Replies 0.4.3
    (A)GD bbPress Attachments 1.9.2

    OTHER

    (A)Akismet 2.5.7
    (A)Automessage 2.3.1
    (A)BackWPup 3.0.12
    (-)Blog Categories for Groups 1.0.4
    (-)Confirm User Registration 2.0.4
    (-)Disable Comments 0.9
    (-)downML – Download Media Library 0.3.1
    (A)Email Users 4.4.4
    (-)Fundraising 2.3.6
    (-)Invite Anyone 1.0.21
    (-)Live Stream Widget 1.0.4.2
    (A)New RoyalSlider 3.0.93
    (-)P3 (Plugin Performance Profiler) 1.4.1
    (A)Plugins Garbage Collector 0.9.12
    (A)Revolution Slider 2.3.8
    (-)Scheduled Content 1.1.1
    (-)Select Language At Signup 1.0.4
    (A)SI CAPTCHA Anti-Spam 2.7.6.4
    (A)Sidebar Login 2.5.3
    (A)Simple Badges 0.1-alpha20120703
    (-)Snapshot 2.3.3
    (-)Tweet Blender 3.3.15
    (A)Ultimate Maintenance Mode 1.5.0
    (-)W3 Total Cache 0.9.2.11
    (A)WordPress Importer 0.6.1
    (A)WP-DBManager 2.63
    (-)WP-reCAPTCHA 3.1.6
    (-)WP Htaccess Editor 1.2.0
    (-)WP UI – Tabs accordions and more. 0.8.7
    (A)Yoast Breadcrumbs 0.8.5

    #167928

    In reply to: My account menu

    mathieu.urstein
    Participant

    @espellcaste
    do you have some news?
    I have been able to take the notifications like this :

    // notifications
    function my_bp_adminbar_notifications_menu() {
    	global $bp;
    
    	if ( !is_user_logged_in() )
    		return false;
    
    	echo '<li id="menu-item-9991" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-9991 parent">';
    //	_e( 'Alerts', 'buddypress' );
    
    	if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
    		<a href="#"><span id="notifs_top"><?php echo count( $notifications ) ?></span></a>
    	<?php
    	}
    
    	echo '</a>';
    	echo '<ul class="sub-menu">';
    
    	if ( $notifications ) {
    		$counter = 0;
    		for ( $i = 0; $i < count($notifications); $i++ ) {
    			$alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>
    
    			<li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>
    
    			<?php $counter++;
    		}
    	} else { ?>
    
    		<li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'You have no new alerts.', 'buddypress' ); ?></a></li>
    
    	<?php
    	}
    
    	echo '</ul>';
    	echo '</li>';
    }
    #167017
    bp-help
    Participant

    @sushmitha
    Just some friendly advice but I would open a new topic because the initial topic is going on four years old and some of that information may have been outdated. If you do not find the help you need then consider perhaps posting it on the jobs board.

    #166562
    @mercime
    Participant

    @midexsoftware you can allow users to post anonymously in bbPress forums in Settings > Forums. As for notifications for each change in the forum, there’s no setting available by default. You could post at bbpress.org/forums/ for more assistance.

    #166126

    In reply to: Pending Notifications

    b a
    Participant

    OKay, I followed this guy http://androoha.com/web-design-tuts/80-custom-notifications-buddypress-en

    And it did a trick, in some way, so I will extend my question here.

    I managed to add function which adds notifications to database when I like an activity.
    It displays it well when I have only 1 notification with such component_action.
    But when I have to, it just merges my notifications into one, or something like this, sometimes it even brokes (but might be another issue)

    so here is my code in functions.php

    function bp_members_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { 
    	global $bp; 
    
    	switch ( $action ) {
    		case 'new_likes': 
    			$thanks_for      = $item_id; 
    			$who_thanked     = $secondary_item_id; 
    			$link = '/heregoeslink'; 
    			$return = '<a href="'.$link.'">'. $who_thanked .' liked your link!</a>'; 
    		break;
    	} 
    
    	return $return; 
    }

    I have 5 notifications in database with new_likes component_action and 4 of them belong to current user. so $total_user contains “4”,

    now I want to remake this code to display user notifications separatly.

    Many thanks even for reading till this )) I also try to continiue thiking for an answer and if something I’ll post it here

    #166070
    Tecca
    Participant

    You can make your own. Here’s mine as an example. You’ll need to tinker around with the CSS or code if you’d like to display them differently. What the below does is it shows a number (the amount of notifications you have) when you have one or more. It is hidden when there are none to display. Hovering over the number will display your notifications in a drop-down.

    Place into bp-custom.php:

    /**
    * Add Notification number to template
    */
    function my_bp_adminbar_notifications_menu() {
    global $bp;
    
    if ( !is_user_logged_in() )
        return false;
    
    echo '<div class="notices"><ul class="notices">';
    _e( '', 'buddypress' );
    
    if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
        <li class="parent"><span class="notice-badge"><?php echo count( $notifications ) ?></span>
    <?php
    }
    
    echo '</a>';
    echo '<ul class="sub-menu">';
    
    if ( $notifications ) {
        $counter = 0;
        for ( $i = 0; $i < count($notifications); $i++ ) {
            $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>
    
            <li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>
    
            <?php $counter++;
        }
    } else { ?>
    
        <li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'You have no new alerts.', 'buddypress' ); ?></a></li>
    
    <?php
    }
    
    echo '</ul></li>';
    echo '</ul></div>';
    }

    CSS:

    /*-------------------------- Notification dropdown -----------------------------------*/
    .notice-badge { font-weight: bold; cursor: default; background: #d33939; padding: 0 3px; border-radius: 10px }
    .parent.user-bar { width: 86px; text-align:left; float: right; font-weight: bold; }
    .notices { float: right; margin:0; line-height: 45px; z-index: 9999; }
    .notices a { color: #ffffff; }
    .notices ul, .notices { margin:0 2px 0 0; padding:0; list-style-type:none; list-style-position:outside; position:relative; }
    .notices ul a:link, .notices ul a:active, .notices ul a:visited { display:block; padding: 0; text-decoration:none; }
    .notices ul ul a:link, .notices ul ul a:active, .notices ul ul a:visited { width: 480px; display:block; padding:0 7px; text-decoration:none; }
    .notices ul ul a:hover { color: #0d385f; text-shadow: none; }
    .notices ul li { float:left; position:relative; background:none; padding:0 12px; }
    .notices ul li:hover { transition: all 100ms ease-in; }
    .notices ul ul { width: 480px; line-height: 35px; background: #ffffff; position:absolute; right: 0; top:45px; text-align:left; padding:0; display:none; border:1px solid #eeeeee; border-bottom:none; border-top:none; box-shadow:0 0 2px rgba(0, 0, 0, 0.15), 0 3px 5px rgba(0, 0, 0, 0.1); }
    .notices ul ul a { color:#248361; font-weight: bold; }
    .notices ul li ul a { float:left; }
    .notices ul li ul ul { left:-170px; top:2px; margin:0px; border-right:3px solid #cccccc; border-top:1px solid #eeeeee; }
    .notices ul li ul li { width: 480px; padding:0; margin:0; border-bottom:1px solid #eeeeee; max-width:none; list-style-type:none; text-shadow: none; }
    .notices ul li ul li:hover { background: #f5f5f5; }
    .noticesn ul li:hover ul ul, ul li:hover ul ul ul, ul li:hover ul ul ul ul { display:none; }
    .notices ul li:hover ul, .notices ul li li:hover ul, .notices ul li li li:hover ul, .notices ul li li li li:hover ul { display:block; }
    .notices ul li ul.children li { list-style-type:none; }
    .notices ul li ul li.current-menu-item { background:#f5f5f5; }
    .notices ul li ul li.current-menu-item a { color:#585858; }
    .notices ul li.current-menu-item span { color:#585858; }
    .notices ul li.parent { background-image: url(images/menu-arrow-transparent.png); background-position: center center; background-repeat: no-repeat; }
    .notices ul li.parent:hover { background-image: url(images/menu-arrow1.png); background-position: 14px 36px; background-repeat: no-repeat; }
    .notices ul li ul li.parent:hover { background-image: url(images/menu-arrow-left.png); background-position: 152px center; background-repeat: no-repeat; }

    Place into header.php or wherever you’d like your notifications shown:
    <?php my_bp_adminbar_notifications_menu()?>

    #164887
    joe35
    Participant

    Hi, @mercime

    Here I am again! The author of the theme did an update and thereby solved the two of the three problems I had. But the problem with the Crop tool persists, now in a different way. I can upload the image, I can see both images for one or two seconds and the crop tool and immediately after it automatically crop a part of the image without having the control over what portion of the picture will be cropped.

    Could you please take a look on my website and tell me what you think? I don’t think it is related to JQuery since I no longer get this jQuery error.

    Thanks in advance.

    My Site URL: http://kostassamaras.com/develment
    Username: Peter
    Password: joe36lok

    #164586
    P
    Participant

    @Chouf1, that’s my blog you’re linking to. I am not sure if they added Throttling to the new Buddypress version. I opened a ticket months ago, the milestone has been set to: version 1.7 to Future Release https://buddypress.trac.wordpress.org/ticket/3732. This is a bit frustrating since Throttling makes for great spam control.


    @tifire
    Go to /bp-friends/bp-friends-functions.php in your Buddypress installation and change the friends_add_friend function to the following:

    function friends_add_friend( $initiator_userid, $friend_userid, $force_accept = false ) {
    	global $bp;
    
    	$friendship = new BP_Friends_Friendship;
    
    	if ( (int) $friendship->is_confirmed )
    		return true;
    
    	$friendship->initiator_user_id = $initiator_userid;
    	$friendship->friend_user_id    = $friend_userid;
    	$friendship->is_confirmed      = 0;
    	$friendship->is_limited        = 0;
    	$friendship->date_created      = bp_core_current_time();
    	
    	/**
    	 * BuddyPress Friend Request Throttling
    	 *
    	 * Set a throttle period for user friendship requests
    	 *
    	 * @author Patrick Saad
    	*/
    	
    	global $wpdb;
    	$qry = "SELECT date_created FROM wp_bp_friends where initiator_user_id = '".$initiator_userid."' order by date_created desc limit 1";
        $user_friend_requests = $wpdb->get_results( $qry );
    	
    	if ($user_friend_requests)
    	{
    		$latest_user_request = strtotime($user_friend_requests[0]->date_created, time());
    		$time_since_latest_request = time() - $latest_user_request;
    		
    		// that's 2 minutes
    		$throttle_period = 60 * 2;
    		
    		// if the last request was over 5 minutes ago, allow it
    		
    		if ($time_since_latest_request < $throttle_period)
    			return false;
    	}
    	// End of BuddyPress Friend Request Throttling //
    
    	if ( $force_accept )
    		$friendship->is_confirmed = 1;
    
    	if ( $friendship->save() ) {
    
    		if ( !$force_accept ) {
    			// Add the on screen notification
    			bp_core_add_notification( $friendship->initiator_user_id, $friendship->friend_user_id, $bp->friends->id, 'friendship_request' );
    
    			// Send the email notification
    			friends_notification_new_request( $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );
    
    			do_action( 'friends_friendship_requested', $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );
    		} else {
    			// Update friend totals
    			friends_update_friend_totals( $friendship->initiator_user_id, $friendship->friend_user_id, 'add' );
    
    			do_action( 'friends_friendship_accepted', $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );
    		}
    
    		return true;
    	}
    
    	return false;
    }

    This will prevent a user from sending a friendship request to someone if their recent friendship request date was less than, say 2 minutes (change the $throttle_period variable to modify this time)

    Just gave this a fresh test, works in Buddypress 1.7.2. This same concept can be applied to comments, groups, etc, you just have to find the functions and play around.

    #163671
    kkradel
    Participant

    @mercime

    I guess I should have said I want to DISABLE the text box all together. Get rid of it.

    So I need to know where this exists in the code so I can delete it, or disable it.

    I know how to close the text box via the repeated text message underneath the login area. The placement of the text box doesn’t allow for accessing the drop down menus in the navigation bar.

    This is hindering my non-techie users from using the site.

    Thanks!

    doxaliber
    Participant

    @karmatosed, thank you for your response.

    I’ve tried the default theme without translation on my development site, here:
    http://devel.escrivere.com

    No way, notifications doesn’t work. πŸ™

    I’ve also another problem (but is less important, than the ones above).
    Users can’t edit their own forum posts, also if I’ve setup editing time to 15 minutes.

    Other ideas?

    #162812
    ethanthekiwi
    Participant

    Thanks, I realized that I didn’t have email notifications working. Once I enabled those using WP-Mail-SMTP, I got the friend request and could see the tab. The URL for that page is http://localhost/members/username/friends/requests/

    #162516
    oriadam
    Participant

    Hi @riente,
    I read your blog post twice but couldn’t get it…
    Did you edit the original BP code?
    Perhaps latest BP update changed the location of the function you edited.

    My code looks something like that:

    <?php
    require('wp-load.php');
    require_once('wp-includes/user.php');
    require_once('wp-includes/pluggable.php');
    require_once('wp-content/plugins/buddypress/bp-core/bp-core-loader.php');
    
    $from_id=get_current_user_id();
    if (empty($from_id)) exit; // do nothing if there's no current user
    ///////// ...some boring code here... ////////
    $sum=10; // for example
    $to_user_link = bp_core_get_userlink($to_id);
    $from_user_link = bp_core_get_userlink($from_id);
    
    $note_to="You got $sum points from $from_user_link"; // <--- notification to be sent to payee
    $note_from="You sent $sum points to $to_user_link";  // <--- notification to be sent to payer
    
    /********** Now how do I send the above notifications to the relevant users $from_id and $to_id? ********/
    bp_core_add_notification( $item_id, $to, $component_name, $component_action, $secondary_item_id);
    

    Thank you!

    David Cavins
    Keymaster

    Hi Modemlooper-

    My theme is a child theme of Twenty Twelve, so my style.css declares Template: twentytwelve.

    I followed your suggestion then took it a step farther and included slightly modified version of the js setup functions from the template pack in my `functions.php` file. I’ll post them here in case somebody else has the same problem I’m having:

    `function bp_support_theme_setup() {
    global $bp;

    // Load the default BuddyPress AJAX functions if it isn’t explicitly disabled or if it isn’t already included in a custom theme
    if ( ! function_exists( ‘bp_dtheme_ajax_querystring’ ) )
    require_once( BP_PLUGIN_DIR . ‘/bp-themes/bp-default/_inc/ajax.php’ );

    // Let’s tell BP that we support it!
    add_theme_support( ‘buddypress’ );

    if ( ! is_admin() ) {
    // Register buttons for the relevant component templates
    // Friends button
    if ( bp_is_active( ‘friends’ ) )
    add_action( ‘bp_member_header_actions’, ‘bp_add_friend_button’ );

    // Activity button
    if ( bp_is_active( ‘activity’ ) )
    add_action( ‘bp_member_header_actions’, ‘bp_send_public_message_button’ );

    // Messages button
    if ( bp_is_active( ‘messages’ ) )
    add_action( ‘bp_member_header_actions’, ‘bp_send_private_message_button’ );

    // Group buttons
    if ( bp_is_active( ‘groups’ ) ) {
    add_action( ‘bp_group_header_actions’, ‘bp_group_join_button’ );
    add_action( ‘bp_group_header_actions’, ‘bp_group_new_topic_button’ );
    add_action( ‘bp_directory_groups_actions’, ‘bp_group_join_button’ );
    }

    // Blog button
    if ( bp_is_active( ‘blogs’ ) )
    add_action( ‘bp_directory_blogs_actions’, ‘bp_blogs_visit_blog_button’ );
    }
    }
    add_action( ‘after_setup_theme’, ‘bp_support_theme_setup’, 11 );

    /**
    * Enqueues BuddyPress JS and related AJAX functions
    *
    * @since 1.2
    */
    function bp_support_enqueue_scripts() {

    // Add words that we need to use in JS to the end of the page so they can be translated and still used.
    $params = array(
    ‘my_favs’ => __( ‘My Favorites’, ‘buddypress’ ),
    ‘accepted’ => __( ‘Accepted’, ‘buddypress’ ),
    ‘rejected’ => __( ‘Rejected’, ‘buddypress’ ),
    ‘show_all_comments’ => __( ‘Show all comments for this thread’, ‘buddypress’ ),
    ‘show_all’ => __( ‘Show all’, ‘buddypress’ ),
    ‘comments’ => __( ‘comments’, ‘buddypress’ ),
    ‘close’ => __( ‘Close’, ‘buddypress’ )
    );

    // BP 1.5+
    if ( version_compare( BP_VERSION, ‘1.3’, ‘>’ ) ) {
    // Bump this when changes are made to bust cache
    $version = ‘20120412’;

    $params[‘view’] = __( ‘View’, ‘buddypress’ );
    $params[‘mark_as_fav’] = __( ‘Favorite’, ‘buddypress’ );
    $params[‘remove_fav’] = __( ‘Remove Favorite’, ‘buddypress’ );
    }
    // BP 1.2.x
    else {
    $version = ‘20110729’;

    if ( bp_displayed_user_id() )
    $params[‘mention_explain’] = sprintf( __( “%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.”, ‘buddypress’ ), ‘@’ . bp_get_displayed_user_username(), bp_get_user_firstname( bp_get_displayed_user_fullname() ), bp_get_user_firstname( bp_get_displayed_user_fullname() ) );
    }

    // Enqueue the global JS – Ajax will not work without it
    wp_enqueue_script( ‘dtheme-ajax-js’, BP_PLUGIN_URL . ‘/bp-themes/bp-default/_inc/global.js’, array( ‘jquery’ ), $version );

    // Localize the JS strings
    wp_localize_script( ‘dtheme-ajax-js’, ‘BP_DTheme’, $params );
    }
    add_action( ‘wp_enqueue_scripts’, ‘bp_support_enqueue_scripts’ );
    `

    Which is identical to installing the template pack only for the JS, I think. Everything’s working as expected, so I think we can consider this problem resolved. Thanks for your attention, Hugo and Modemlooper.

    -David

    #161570
    angslycke
    Participant

    @modemlooper Revisiting this thread. I’m still looking to change the activation e-mail to go to the site admin instead, and even though this should be fairly easy I must be missing something. The code should be something like this, right?

    `
    function my_redirect_activation_email()
    {
    return get_site_option( ‘admin_email’ );
    }
    add_filter(‘bp_core_activation_signup_user_notification_to’, ‘my_redirect_activation_email’);
    `

    Added this to my custom-functions.php but can’t seem to get it to work, WordPress stills sends the e-mail with the activation link to the new user instead. Any ideas? Thanks!

    #161538
    zaghareet
    Participant

    Sorry, I didn’t get an email notification that there was a reply.

    Yes, I did that and it didn’t change anything. Any other ideas?

Viewing 25 results - 476 through 500 (of 768 total)
Skip to toolbar