Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • Sebastian
    Participant

    @afu24

    Nobody who use this feature for roles besides admin?
    Any other ideas how can I solve my request?

    I wouldn’t prefere to install another plugin for site wide notices, because I really like this option from buddypress combining popup/ widget and notices in the message inbox 🙂
    It’s only that admins can use it right now.


    Sebastian
    Participant

    @afu24

    @shanebp: any ideas?
    Can not be that no one previously had that problem :DD


    Sebastian
    Participant

    @afu24

    Yes, when I grant the Trainer role the manage_options capability it works – but I won’t like to use this option.

    I can’t override bp-core-caps.php and change 'manage_options' to e.g. 'create_users' right?

    You could also write a function that also uses the map_meta_cap hook, but with a larger number re priority so that it runs after the function noted above.
    – sorry I didn’t get this. My knowledge of coding is near zero


    Sebastian
    Participant

    @afu24

    Ok now bp_moderate is obviously added in the list (in the plugin members) and granted to trainers but it doesn’t affect the site wide notices (still disabled).
    The only thing who seems to affect it is the capability manage_options but I wouldn’t like to grant them to trainers.


    Sebastian
    Participant

    @afu24

    Hi thx for your fast reply.

    Ok I would like to try it the other way round.

    I use the plugin Members to set capabilities and create new roles e.g. “trainer”. I tried to to add “bp_moderate” as a custom capability – buddypress capabilities are not listed there – but it didn’t work. Is the name wrong? Or is there no option to add this capability? As I read after some search here that buddypress have no connections to normal wp roles or capabilities.

    Or what did you mean?


    Sebastian
    Participant

    @afu24

    @shanebp: ok,
    i changed “bp_moderate” to “create_users” at line 29 in compose.php
    as I set this for the trainer role too:

    <?php if ( bp_current_user_can( 'create_users' ) ) : ?>
    		<p><label for="send-notice"><input type="checkbox" id="send-notice" name="send-notice" value="1" /> <?php _e( "This is a notice to all users.", "buddypress" ); ?></label></p>
    	<?php endif; ?>

    The changes works and the option field “send a notice to all users” displays also for trainers with capability “create_users”.

    BUT they can’t send notices at all/ still miss the capability and also don’t have the “notices” menu in the buddypress profil.
    An Error Message appears when they try to send message as site wide notice: “Notice was not created. Please try again.”

    What else do I have to change? I looked at other php files around there but didn’t find a solution. Can you help me out? Thx!


    Sebastian
    Participant

    @afu24

    Thanks @shanebp! Got it. Works perfectly for me 🙂

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