This topic has 3 replies, 2 voices, and was last updated 10 years by Abe.

  • Author
  • #14793
     mycolombianwife
    Participant

    Every time someone recieves a private message.
    First he will only be able to see an excerpt of about 60 characters.

    Since on my website, members have to pay a membership first to be able
    to read private messages, they will be directed to the membership level page,
    after clicking on the private message excerpt.

    Question: How I can reduce the characters of the private message excerpt length to about 6-10 characters.

    So basically what I want to prevent is that members are able to send private messages not paying members
    including their personal contact information, such as facebook, email ect…
    and therefore prevent prevent new registered members from buying a membership to read
    the private messages.

    Thank you!

    #15076
     Abe
    Keymaster

    Hi, That is handled by buddypress and you can adjust that using the ‘bp_get_message_thread_excerpt’ filter.
    Code example added to sweetdate-child/functions.php to adjust the length:

    COPY CODE
    
     add_filter( 'bp_get_message_thread_excerpt', 'kleo_custom_message_length');
    function kleo_custom_message_length($text) {
    return substr( $text,0 , 10 );
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #15305
     mycolombianwife
    Participant

    Great support I must say. This also worked like a charm.

    #15319
     Abe
    Keymaster

    Great 😉 Thanks

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘New private message excerpt length’ is closed to new replies.

Log in with your credentials

Forgot your details?