Shamim Hasan

Forum Replies Created

Viewing 15 posts - 2,026 through 2,040 (of 2,457 total)
  • Author
    Posts
  • in reply to: New message form autopopulated specific to user #9785
    Shamim Hasan
    Keymaster

    What it shows?Does it shows any error? Does form showed up?

    in reply to: New message form autopopulated specific to user #9766
    Shamim Hasan
    Keymaster

    As you not supplying any “to” argument with this shortcode, by default this will send message to page author where you added this shortcode.
    Please not that if you are not logged in or same as “to” user, no form will show. So if you are that page author no form will show. Try create a test user account and log in with that account to see the form in action.

    in reply to: New message form autopopulated specific to user #9742
    Shamim Hasan
    Keymaster
    in reply to: show and reply to specific message ID #9721
    Shamim Hasan
    Keymaster

    That will not be practical because every field require individual type of validation and sanitize.

    You can easily capture id from url and add that in post meta. Use code like

    
    add_action( 'fep_action_message_after_send', function( $message_id, $message, $inserted_message ){
        wp_parse_str( $_SERVER['HTTP_REFERER'], $referrer );
        $id = !empty( $referrer['id'] ) ? absint($referrer['id']) : 0; //Change id with your parameter
        //here if require check some validation
        add_post_meta( $message_id, '_your_custom_meta_key', $id );
    }, 10, 3 );
    
    in reply to: show and reply to specific message ID #9709
    Shamim Hasan
    Keymaster

    You can use $_SERVER['HTTP_REFERER'] to capture id or create a hidden field to provide that id. If you need more secure way you can create 2 hidden field, one for id and another for token created for that id. So that if anybody change that id, that will mismatch token so that you can reject that.

    in reply to: Front End PM PRO features not Working #9701
    Shamim Hasan
    Keymaster

    In PRO version Multiple recipient, email beautify etc feature included. But in extensions page those will not show as installed. Those are separate extensions.

    Can you please check that your role is not blocked? Please go to Dashboard > Front End PM PRO > Settings > Security > Role to Role Block

    Also can you send me your Front End PM PRO > Settings > Emails tab screenshot?

    in reply to: show and reply to specific message ID #9680
    Shamim Hasan
    Keymaster

    When you are getting your ID (from web app)? If you can capture your ID when message sent you can add like bellow code

    
    add_action( 'fep_action_message_after_send', function( $message_id, $message, $inserted_message ){
        add_post_meta( $message_id, '_your_custom_meta_key', $id_from_web_app );
    }, 10, 3 );
    
    in reply to: Add Link to a Business Listing #9631
    Shamim Hasan
    Keymaster

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

    
    add_action( 'fep_display_after_message', function(){
    	$authordata = get_userdata( get_the_author_meta('ID') );
    	
    	if( in_array( 'administrator', $authordata->roles ) ){
    		echo '<a href="' . esc_url( home_url( 'business-directory/' ) ). get_the_author_meta('user_nicename') . '">' . get_the_author_meta('display_name') . '</a>';
    	}
    });
    
    

    Change ‘administrator’ to whatever your user role is. For testing purpose i have used ‘administrator’ so that you can check that only ‘administrator’ role users link will show.

    in reply to: Add Link to a Business Listing #9625
    Shamim Hasan
    Keymaster

    Please let me know the role slug of those users (“business users” role slug) who have business listing.

    in reply to: Add Link to a Business Listing #9619
    Shamim Hasan
    Keymaster

    You want to display only if message user is given user role or who is seeing that user is given user role?
    Which role you want to display?

    in reply to: Add Link to a Business Listing #9610
    Shamim Hasan
    Keymaster

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

    
    add_action( 'fep_display_after_message', function(){
    	echo '<a href="' . esc_url( home_url( 'business-directory/' ) ). get_the_author_meta('user_nicename') . '">' . get_the_author_meta('display_name') . '</a>';
    });
    
    

    It will add a link to user’s business directory in bottom of every message.

    in reply to: show and reply to specific message ID #9582
    Shamim Hasan
    Keymaster

    three arguments are sent from fep_action_message_after_send action.
    You can use fep_get_message_with_replies( $id ) to get message with replies of given id.
    Please see functions.php of this plugin to see code.

    in reply to: Activation license #9576
    Shamim Hasan
    Keymaster

    Thank you again.

    For clarification, If you do not update your license, the plugin will still works fine BUT you will not receive update. When you will go to update along with other plugin updates through WordPress you will see error for this plugin.

    in reply to: Page URL in Message #8904
    Shamim Hasan
    Keymaster

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

    
    add_filter( 'fep_filter_message_before_send', 'fep_cus_send_url', 999 );
    
    function fep_cus_send_url( $message ) {
        if( empty( $message['message_content'] ) || $message['post_parent'] )
        return $message;
    
        $message['message_content'] .= '<div>';
        $message['message_content'] .= esc_url( $_SERVER['HTTP_REFERER'] );
        $message['message_content'] .= '</div>';
        
        return $message;
    }
    

    Let me know.

    in reply to: Page URL in Message #8884
    Shamim Hasan
    Keymaster

    You can use fep_filter_message_before_send filter to add $_SERVER['HTTP_REFERER'] to the message.

Viewing 15 posts - 2,026 through 2,040 (of 2,457 total)