Support » Plugin: bbPress Messages » Avatars and delete

  • Hi Samuel,
    The plugin is looking good and I’m very pleased with it.
    Jujst a couple of things I’ve noticed that you might want to know about.

    The members avatars appear (or not), in an inconsistant way?
    When deleting a message(s), the programme just sits there saying ‘pending deletion’ and ‘your messages are being deleted’, but nothing seems to happen? It takes some fiddling around caanging pages etc to get it to finally dissapear?

    Not a deal breaker, but….
    Kind regards,
    Stewart

Viewing 7 replies - 1 through 7 (of 7 total)
  • Same thing here.

    About the user avatars, for me it only hapens on the main messages page, it works pretty well when I’m on a private chat (except one little part, check screenshot 2).

    On the main page, only Gravatar uploaded avatar are showing up :

    And on a private what, avatars locally uploaded works well, except this small part :

    When I’m trying to open the dead link into a new tab, here it is : http://i0.wp.com/wp_user_avatar

    Dunno if you get the same issue ?

    About the deleting posts, me too don’t really understand how it works and if there is a cron job that apply all actions every X mins, hours, days.

    • This reply was modified 1 year, 1 month ago by  akira010203.
    Plugin Contributor Samuel Elh

    (@elhardoum)

    Hi Stewart, hi Akira,

    Sorry for the delay here I was delayed with another schedule.

    1. Avatars:

    It seems you’re having an issue with the avatars not parsing locally uploaded avatars? if that is the case, I previously encountered such issue with BuddyPress where it targets and filters get_avatar function used to parse avatars HTML, while it does not filter get_avatar_url which many plugins including this one use to get the avatar URL, so I suggest adding the following code to your child theme’s functions file to make sure if it is not the problem:

    add_filter('BBP_MESSAGES_getChatAvatar', function($avatar, $chat){
        if ( isset( $chat['recipients'] ) && count($chat['recipients']) < 3 ) {
            foreach ( $chat['recipients'] as $user_id ) {
                if ( $user_id !== bbpm_messages()->current_user ) {
                    $html = get_avatar($user_id);
    
                    preg_match('/src=["\']?(.*?)["\']?(\s|\z|>)/si', $html, $src);
    
                    if ( !empty($src[1]) )
                        $avatar = $src[1];
                }
            }
        }
    
        return $avatar;
    }, 10, 2);

    If that’s not the issue then please help me out reproduce this bug and I’ll work on a fix.

    2. Message deletion:

    Yes, bbpm works on scheduling each task so it can be done internally and the user then will not have to wait for it to process. The question here is, does it delete messages as intended to? from my installation, it does work with no problems.

    Best,
    Samuel

    russ8523

    (@russ8523)

    Hi Samuel,

    1/. pasted the code as suggested, but no differance. Shall I remove the code?

    2/. The page doen’t refresh, it just sits there saying ‘pending deletion’ and ‘your messages are being deleted’, but nothing seems to happen?

    Regards,

    Stewart

    Plugin Contributor Samuel Elh

    (@elhardoum)

    Hello Stewart,

    1. Remove the code then. Send me an email with the credentials and explain which avatars should be displayed.

    2. No, the page will not refresh, once the message is deleted, nothing will happen. The user will at some point access the page again or refresh to find out the message is removed.

    Best,
    Samuel

    akira010203

    (@akira010203)

    Hi Samuel, in my case it works well, many thanks!

    last thing, do you know where I can set the correct size to the message part ?

    It must take the whole space on the page, like it was before, with the new plugin users must draw out to be able to see entirely his message.

    Plugin Contributor Samuel Elh

    (@elhardoum)

    Hi Akira,

    Some styling would do, like:

    .bbpm textarea[name="message"] {
      display: block;
      width: 100%;
      min-height: 5em;
    }

    hope it helps.

    Thanks,
    Samuel

    akira010203

    (@akira010203)

    It works perfectly!

    I found out one last “bug” which is the styling of the email notification settings on the profile :

    It would be great if you can help me out to solve this 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Avatars and delete’ is closed to new replies.