BuddyDev

Search

Recent Profile Visitors page issue

  • Participant
    Level: Yogi
    Posts: 1112
    calu on #28403

    Hi Brajesh, I’m using Recent Profile Visitors plugin, but have discovered an issue in relation to adding a hook to the visitors page.

    If I place <?php bp_send_private_message_button(); ?> in the bp_after_member_body custom hook, the private message button should only be displayed on the profile page, which it does, except for the visitors page, where it is displayed in the body of the Recent Profile Visitors page, according to the hook attached.

    I guess this must be a bug?

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24599
    Brajesh Singh on #28407

    Hi Carsten,
    Please share 2 screenshots to show me the issue. I will need more details to provide assistance.

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1112
    calu on #28411

    Hi Brajesh here are 2 screenshots of what is going on. My point is, that the bp_send_private_message_button is acting correctly, except on visitors page, by only showing on profile pages. I hope this makes sense.

    Using the hook: bp_after_member_body:

    https://domain/members/jeff/
    https://imgur.com/HnxO0Um

    Send message button also displayed on https://domain/members/jette/visitors/
    https://imgur.com/5HnLv2k

    Here of course the button is inactive, but is displayed.

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24599
    Brajesh Singh on #28417

    Hi Carsten,
    I am sorry, I do not see anything wrong with that.

    You are using the ‘bp_after_member_body’ which gets fired on all user pages. That’s why the button is visible.

    I am not sure of your purpose but you should most probably use a different hook.

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1112
    calu on #28420

    Hi Brajesh, thanks for your reply.

    My point is, that the Send Private Message button with that hook is following the convention of only showing on profile pages, where it makes sense to send a message.

    Not on users own profile page, the settings page, the members directory page, or any other BP page than the recent visitor page.

    Not a big issue, I can probably hide it with css on recent visitors page.

    Regards
    Carsten

  • Participant
    Level: Yogi
    Posts: 1112
    calu on #28437

    Hi Brajesh, just to clarify my question and why this is important. Of course it makes no sense to have a send private message button anywhere else than on profile page.

    <?php bp_send_private_message_button(); ?> in the bp_after_member_body custom hook

    Why is the button displayed in /visitors but not in /members directory, the hook must be the same for those two directories?

    visitors directory

    /visitors
    https://imgur.com/8ShJ4Tw

    members directory
    /members

    https://imgur.com/e8DGqhz

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24599
    Brajesh Singh on #28450

    Hi Carsten,
    is it site/visitiros page or is it site/members/member_name/visitors page?

    The hook ‘bp_after_member_body’ fires on profile page(single user pages and not in the directory).

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1112
    calu on #28451

    Hi Brajesh, it’s site/members/member_name/visitors page which it involves.

    I have been going through all relevant hooks but can’t find the right one, so the Send Private Message button only shows under the profile

    Thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 24599
    Brajesh Singh on #28452

    Hi Carsten,
    Thank you.
    By profile, do you mean the “members/member_name/profile/ page?

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1112
    calu on #28453

    Hi Brajesh, by profile, I mean domain/members/member_name/, where the Send Private Message normally is displayed, in the div#item-buttons, in the div#item-header-content.

    Thanks

You must be logged in to reply to this topic.

This topic is: not resolved