Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 17 replies - 1 through 17 (of 17 total)

  • minto
    Participant

    @minto

    i know that.
    the site is http://klanwerk.de
    but the site is restricted for nonusers, so i would have provided you an adminacc
    for that you don’t have to register.

    but thanks.


    minto
    Participant

    @minto

    theme is spacious, i forgot^^


    minto
    Participant

    @minto

    yes its bbpress.
    everything works fine on that, so all setup should be fine also.

    but due to that BP overrides my search obviously, i wanted to ask here.. 🙂

    can I provide you a link via pm or mail?


    minto
    Participant

    @minto

    Same here, just like biswadip said.
    Trac solution did not work.


    minto
    Participant

    @minto

    Thanks for pasting, @carco

    Strangewise the issue remains, even with your entire script.
    Still no entries for user_id in db
    (which then might cause, that no notifs appear, probably?)
    but “users-who-like” works again^^


    minto
    Participant

    @minto

    as i just found out, also the “show-users-who-like”-display doesnt
    work anymore, in this setup..


    minto
    Participant

    @minto

    @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!


    minto
    Participant

    @minto

    still looking for a solution!


    minto
    Participant

    @minto

    Now I’ve put this in, but it still doesn’t work out:

    ‘//get the thread permalink for activity
    function ac_notifier_activity_get_permalink2( $activity_id, $activity_obj = false ) {
    global $bp;

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

    if ( ‘activity_comment’ == $activity_obj->type )
    $link = bp_get_activity_directory_permalink(). ‘p/’ . $activity_obj->item_id . ‘/’;
    else
    $link = bp_get_activity_directory_permalink() . ‘p/’ . $activity_obj->id . ‘/’;

    return apply_filters( ‘ac_notifier_activity_get_permalink2′, $link );
    }’


    minto
    Participant

    @minto

    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!


    minto
    Participant

    @minto

    @bobemil + @fadinho

    would it be possible that you paste the working code?
    because even my corrections of BP_LIKE_SLUG did not work..


    minto
    Participant

    @minto

    edit:

    The text from “users who like / who likes this” also disappeared..


    minto
    Participant

    @minto

    Best hack I could find, so far! (component works, database-entry work, notif appears – sometimes)
    Some few issues though…
    see pastebin..

    1. The Notification appears in the bar, but firstly it appears in the likers-notifications (quite earlier than in the liked-profile)

    2. Theres no text/link, the Notifs are empty

    3. In the likers-notifs, the live-notification(-plugin) appears (but also without text), but this doesnt happen on the liked-profile (with no appearing “notifications”-wording, right before the count + with no live-notification-popup)

    Would be great to have some more explanation!

    Thank you very much!


    minto
    Participant

    @minto

    finally found THIS and it works..

    thx 4 attention


    minto
    Participant

    @minto

    Hi!

    What would this code look like for 1.7?


    minto
    Participant

    @minto

    Solved!

    That was a Theme-problem..
    After updating the Custom-Community-Theme to Version 1.10
    everything works fine!

    Thx 4 attention!
    😀


    minto
    Participant

    @minto

    Hi!

    Any solution for this? I have the same issue..

    THX

Viewing 17 replies - 1 through 17 (of 17 total)
Skip to toolbar