Using admin only – how can admin send emails to anyone?


Home Forums Front End PM PRO Using admin only – how can admin send emails to anyone?

This topic is: Not Resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #16162
    Hansen
    Participant

    I’m using the admin only functionality with max recipients set to 0. This works fine for normal users, but it seems to apply for admins as well – I do want them to freely send to all users.

    Additionally I want to change the order of “Message box” so its on the all left side, and “New message” after announcement. I tried searching the forum and following the codes sent by another user, but that didn’t work (it only created a couple of additional empty menu items)

    #16167
    Shamim Hasan
    Keymaster

    You can use Role to Role block feature. Please go to Front End PM PRO > Settings > Security > Role to Role Block
    Set “From Role” as any role (except Administrator as you want admin to send message ), “To Role” as “All Roles” and “Block For” as “New Message”. This block other role users from sending new message (They can send message to admin, if you set that).

    For changing order add following code in your theme’s (child theme’s if any) functions.php

    add_filter( 'fep_menu_buttons', function( $menu ) {
        $menu['message_box']['priority'] = 1;
        $menu['newmessage']['priority'] = 2;
        $menu['announcements']['priority'] = 3;
        $menu['directory']['priority'] = 4;
        $menu['settings']['priority'] = 5;
        return $menu;
    }, 50 );
    
    #16171
    Hansen
    Participant

    Rule to Rule block:
    Got it working, thanks.

    Changing order:
    The code you pasted generates the following (note that I have restyled it and have custom localization):
    http://ss.argo.no/303P0b183c3Z
    Code:
    http://ss.argo.no/2a262w3Q2y1D

    Another question:
    I want to create a “toggle” button for the “fep-action-table” (I want as clean UI as possible). I can manage to add the JS which toggle the stuff myself, but how do I add a custom button to the menu (i.e. “Edit”) with an unique class?

    #16181
    Shamim Hasan
    Keymaster

    I am sorry, had a typo in code. I have corrected it is last reply. please use that code.

    To add a menu button with unique class add following code in your theme’s (child theme’s if any) functions.php

    add_filter( 'fep_menu_buttons', function( $menu ) {
        $menu['cus_button'] = array(
            'title'		=> __( 'Edit', 'front-end-pm' ),
    	'action'	=> 'edit',
            'class'         => 'fep-button your_unique_class',
    	'priority'	=> 15,
        );
        return $menu;
    });
    
    #16190
    Hansen
    Participant

    Cheers, got it working!

    Regarding the extra button: How can I display it only on the “Message Box” page? And have it unlinked/# (its just a JS toggle-button)

    #16198
    Shamim Hasan
    Keymaster

    You can use conditional
    eg.

    add_filter( 'fep_menu_buttons', function( $menu ) {
        if ( isset( $_GET['fepaction'] ) && $_GET['fepaction'] == 'message_box' ){
        $menu['cus_button'] = array(
            'title'		=> __( 'Edit', 'front-end-pm' ),
    	'action'	=> 'edit',
            'class'         => 'fep-button your_unique_class',
    	'priority'	=> 15,
        );
        }
        return $menu;
    });
    
Viewing 6 posts - 1 through 6 (of 6 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.