Sami kamal
Forum Replies Created
-
Forum: Plugins
In reply to: [BuddyPress Like] [Plugin: BuddyPress Like] Notifications?I tried this code, but still didn’t work:
/****************************************************** /* Notification *****************************************************/ function bp_like_setup_globals() { global $bp, $current_blog; $bp->bp_like->id = 'bp_like_notifier'; $bp->bp_like->slug = 'BP_LIKE_SLUG'; $bp->bp_like->notification_callback = '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 like_format_notifications( $action, $item_id, $secondary_item_id, $total_items ) { global $bp; $link=like_notifier_activity_get_permalink( $item_id ); if( 'activity_like' == $action ) { if ( (int)$total_items > 1 ) return apply_filters( 'log_multiple_verifications_notification', '<a href="'. $link .'" title="' . __( 'Likes', 'bp-like' ) . '">' . sprintf( __('You have %d new likes', 'bp-like' ), (int)$total_items ) . '</a>', $total_items ); else return apply_filters( 'log_single_verification_notification', '<a href="'. $link .'" title="' . __( 'likes', 'bp-like' ) . '">' . sprintf( __('You have %d new like', 'bp-like' ), (int)$total_items ) . '</a>', $total_items ); } do_action( 'like_format_notifications', $action, $item_id, $secondary_item_id, $total_items ); return false; } function like_remove_screen_notifications() { global $bp; if($has_access)//if user can view this activity, remove notification(just a safeguard for hidden activity) bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->bp_like->id, 'new_like' ); } add_action( 'bp_activity_screen_single_activity_permalink', 'like_remove_screen_notifications' ); //get the thread permalink for activity function like_notifier_activity_get_permalink( $item_id, $activity_obj = false ) { global $bp; if ( !$activity_obj ) $activity_obj = new BP_Activity_Activity( $item_id ); if ( 'activity_comment' == $activity_obj->type ) $link = $bp->root_domain . '/' . BP_ACTIVITY_SLUG . '/p/' . $activity_obj->item_id . '/'; else $link = $bp->root_domain . '/' . BP_ACTIVITY_SLUG . '/p/' . $activity_obj->id . '/'; return apply_filters( 'like_notifier_activity_get_permalink', $link ); }
and inside bp_like_add_user_like() function I put this after $liked_count = count( $users_who_like ):
bp_core_add_notification( $item_id, $user_id, $bp->bp_like->id, 'activity_like' );
any help?
Forum: Plugins
In reply to: [WP Query Search Filter] how to order a dropdown by parent terms?ok I fixed it with this in line 206:
$terms = get_terms($v['taxname'],'hide_empty='.$v['hide'].'&orderby=term_group');
I think this should be in core plus the extra pad for child terms.
thanks
Forum: Plugins
In reply to: [CSV Importer] Import hierarchical taxonomy termsthe following format seems to link posts to the hierarchical taxonomy.
—————————-
0,State
State, County
County, District
———————–However, the problem is when a county exists with same name under another state, or same district name under another county. In this case, the post is linked to existing county or district, it doesn’t take the top lovel “State” into consideration.
any idea?
Forum: Plugins
In reply to: [Video Onclick] [Plugin: Video Onclick] play video inlinenice to here that.. another feature request is buddypress support this would make it very useful for buddypress community too.
thanks