Skip to:
Content
Pages
Categories
Search
Top
Bottom

"This is a notice to all users." Not visible too members

  • @craftersuniversity

    Participant

    I just noticed a problem with the ” This is a notice to all users.” function of BuddyPress. While i can check the box and make the message visible to myself as an admin, and my other account with “Moderator” privileges, but not my normal users, which has “participant” privileges. How can this be fixed? I want the notice to be visible to all logged in users.

    Thanx in advance and marry Christmas 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • @craftersuniversity

    Participant

    Bump

    @craftersuniversity

    Participant

    I’ve done some more detective work now, and it seems that it has to be a PHP bug of some sort. Changing themes doesn’t work, even BuddyPress default wont display the “Notice for all” message to normal members with status “Participants”. Higher role levels like Editor or Administrator does get to see the message though, so this definitely has something to do with WordPress roles in combination with BuddyPress plugin. I also checked the source code of the page. When logged in as a low ranking member ( role Subscriber ) the text in the notice isn’t even part of the page source code…

    @craftersuniversity

    Participant

    I found a piece of code that cind of work when i put it in the child themes header.php:

    
    <?php if ( function_exists( 'bp_message_get_notices' ) ) : ?>
    <?php if ( bp_is_active( 'messages' ) ) : ?>
    <?php bp_message_get_notices(); /* Site wide notices to all users */ ?>
    <?php endif; ?>
    <?php endif; ?>

    However, this makes it visible for all, even visitors that has not logged in, which is not what i want. I would like this to be visible only for logged in members, which means i have to add it too one of the php files in BuddyPress installation, but which one? Can anyone help me with this?

    @hnla

    Participant

    You don’t provide any detail as to the theme your using custom thirdparty, bp-legacy theme compatibility, bp-default.

    The problems suggest a custom theme causing the issue, although you do state tha changing to bp-default does not correct problem, it may then lie with this role you have?

    As for adding that code directly to a template you would need a conditional check to see if a user is logged in, have a look at the functions file in bp-legacy around line 380 to see how sitewide notices are handled.

    @craftersuniversity

    Participant

    I’m sorry, i didn’t realize that the theme was of importance for changing PHP files. I have a child theme based on Twenty Eleven. As far as “custom thirdparty, bp-legacy theme compatibility, bp-default” goes, i have no idea what that means…

    My role is always administrator. Also, when logged in as administrator, i see the notice for all, but not when i log into an account with subscriber/participant role.

    I should point out here that i know nothing about PHP….i need dumbed down answers i am afraid….

    @craftersuniversity

    Participant

    @hnla
    Any ideas Hugo?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘"This is a notice to all users." Not visible too members’ is closed to new replies.
Skip to toolbar