Alex Brearley

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 34 total)
  • Author
    Posts
  • in reply to: Making message read-only #11107
    Alex Brearley
    Participant

    Made those changes – no change. The php error is specifically on line 75 where the function is called by the hook – still thinks there should be 1 not 3. I tried:

    public function cmdu_read_only_message($can)
    //public function cmdu_read_only_message($can, $cap, $id)

    {
    print_r($can);
    die();

    And the result was 1

    in reply to: Making message read-only #11053
    Alex Brearley
    Participant
    This reply has been marked as private.
    in reply to: Making message read-only #10910
    Alex Brearley
    Participant

    v7.1

    in reply to: Making message read-only #10891
    Alex Brearley
    Participant

    I’m getting a PHP warning saying that I’m missing argument 2 and 3 in that filter hook. Are you sure there are 3 parameters?

    in reply to: Making message read-only #10777
    Alex Brearley
    Participant

    Is $id in the code snippet the parent/first post ID or is it the latest message post ID (won’t be parent ID if someone has replied)? What I’m looking to do is given a parent ID (the first message) make that message and all subsequent post ID’s read only.

    add_filter( ‘fep_current_user_can’, function( $can, $cap, $id ){
    if( ‘send_reply’ == $cap && 123 == $id )
    return false;

    return $can;
    }, 10, 3);

    in reply to: Making message read-only #10673
    Alex Brearley
    Participant

    What would be best practice to hide a message entirely from a user so that they can no longer see the message thread in the inbox?

    in reply to: Making message read-only #10542
    Alex Brearley
    Participant

    Thank you

    in reply to: Making message read-only #10501
    Alex Brearley
    Participant

    one particular message – I have the parent message ID

    Alex Brearley
    Participant

    Thank you – I will give this code snippet a go.

    Out of interest, is it possible to use the fep_filter_message_before_send filter to also halt/abort creation of the message by manipulating the variables within its scope? I am wondering if I could within this filter check that something related to my app is correct and if not abort creation of the message.

    in reply to: Show persons name rather than user name #10049
    Alex Brearley
    Participant

    Thanks for this – I have indeed not set the Display Name for each user – it has defaulted to their user name. I will find an appropriate hook to change that on registration.

    Alex Brearley
    Participant

    So basically, change $message_to_id to an array of user ids. Do I need to return $message_to_id from the function or is it just enough to change it? Are there 3 parameters on _before_send like there are on after_send?

    I presume that once multiple participants have been added, any future replies will go to everyone i.e. if I send the first message to two people, if one of those 2 people respond, I receive it and the other person from the 2 receive it? Or, is it the case that the _before_send hook has to everytime a reply is sent, work out the to list?

    Alex Brearley
    Participant

    If the shortcode does not support multiple users in to, would it be possible to add the users using the fep_action_message_after_send hook i.e. insert post_meta data to add that particular message ID to other users inbox?

    in reply to: show and reply to specific message ID #9725
    Alex Brearley
    Participant

    Thank you ever so much for your help 🙂

    in reply to: show and reply to specific message ID #9718
    Alex Brearley
    Participant

    As a suggestion, would you be open to updating the shortcode to accept post_meta values?

    For example:

    fep_shortcode_new_message_form to=”{current-post-author}” subject=”{current-post-title}” post_meta=”id,12345678″]

    in reply to: show and reply to specific message ID #9715
    Alex Brearley
    Participant

    sorry, our messages overlapped – thanks for your help I will give that a go

Viewing 15 posts - 16 through 30 (of 34 total)