Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disabling Admin ability to see User Notifications


  • manicexpression
    Participant

    @manicexpression

    Hi, is it possible to completely remove the ability for admins to see other users/admins notifications? It’s a feature we would rather be without.

    Also, is there a large delay in between messages being sent and received?

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

  • manicexpression
    Participant

    @manicexpression

    For the moment, as a temporary fix, I have completely removed the Notifications.php file from

    public_html/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/notifications.php


    shanebp
    Moderator

    @shanebp

    You could create a template overload of this file:
    bp-templates\bp-legacy\buddypress\members\single\notifications.php

    Then wrap the current markup with this conditional: bp_is_my_profile()


    manicexpression
    Participant

    @manicexpression

    Forgive me if I’m just making a mistake, I’ve never tried what you’re suggesting, in the link you sent me, it asks me to go to this directory,

    /bp-templates/bp-legacy/buddypress/

    But when I go there, there’s no Template file to copy, just more folders.

    Thoughts?


    shanebp
    Moderator

    @shanebp

    The template files are in various folders.
    Read the codex article carefully.
    I was explicit about which file to use.


    manicexpression
    Participant

    @manicexpression

    Ah, I see, I read it backwards to what you meant, thinking that was the 2nd file I had to use, and the first one I had to find. My bad.


    manicexpression
    Participant

    @manicexpression

    Okay, now I’m getting somewhere, This is how I’ve set it up,

    wp-content/themes/enfold(My theme)/community/members/single/notifications.php

    It seems to be overriding the original file as it should be, the only problem now is that notifications disappear entirely(when clicking on the notification tab on the profile, there’s just a white space where the information should be popping up)

    This is how I implemented your code,

    switch ( bp_current_action() ) :
    
    // Unread
    case 'unread' :
    bp_get_template_part( 'members/single/notifications/unread' );
    break;
    
    // Read
    case 'read' :
    bp_get_template_part( 'members/single/notifications/read' );
    break;
    
    // Any other
    default :
    bp_get_template_part( 'members/single/plugins' );
    break;
    
    bp_is_my_profile()
    endswitch;

    Now I’m not much of a coder, so I wouldn’t doubt that I’ve misinterpreted what you meant by “wrap the current markup”

    Regardless, thanks for your help so far,I was lost, now I’m less lost. 🙂


    shanebp
    Moderator

    @shanebp

    Please use the code button when sharing code.
    Try

    <?php
    if( bp_is_my_profile() ) {
    
        switch ( bp_current_action() ) :
    
            // etc. 
    
        endswitch;
    }
    else
       echo ' not allowed ';

    manicexpression
    Participant

    @manicexpression

    Sorry, I’ll keep that in mind for the future.

    This seems to have worked perfectly, thanks a bunch!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Disabling Admin ability to see User Notifications’ is closed to new replies.
Skip to toolbar