Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter akyboy

    (@akyboy)

    Got it!!

    “>Send Message

    But this is if you run BBPress as well. Not sure if its going to work with plain WP

    AleksDerFar

    (@aleksderfar)

    Can you explain a bit more? I’m interested too thank you.

    Plugin Author Shamim Hasan

    (@shamim51)

    Yes it works with pain WP.

    alex_pen

    (@alex_pen)

    I also would like to know how i can add feature to directly pm a user. Could you please explain how its done?

    Thank you

    Plugin Author Shamim Hasan

    (@shamim51)

    <a href='<?php echo fep_action_url("newmessage&to=USERLOGIN")' ?>>Send Message</a>

    Change USERLOGIN with user login to whom message will be send

    alex_pen

    (@alex_pen)

    How can i customize this link to contact the author of a an entry instead of one specific person?

    I used the following link, that I found in another discussion

    <a href="<?php get_bloginfo("wpurl");?>/inbox/?fepaction=newmessage&message_title=<?php the_title(); ?>&to=<?php the_author_meta("user_login");?>">Contact Me</a>

    My problem with this code is, that it doesn’t set the username in the hidden “recipient” field resulting in an error when I try to submit a message.

    Plugin Author Shamim Hasan

    (@shamim51)

    Is your code show display name in to field?
    Many new functions are added in version 3.1
    I suggest to use

    <a href='<?php echo fep_action_url("newmessage&to=USERLOGIN&message_title= TITLE") ?>'>Send Message</a>

    Change USERLOGIN and TITLE accordingly

    alex_pen

    (@alex_pen)

    I found a solution for my problem.

    Everytime I clicked on the link the hidden field for the username was set to the user id instead of the name.

    So I replaced line 218 of fep-class.php with following code

    $message_to = ( isset( $_POST['message_to'] ) ) ? esc_html( $_POST['message_to'] ): $to;

    That did the trick for me.

    Plugin Author Shamim Hasan

    (@shamim51)

    replace with

    $message_to = ( isset( $_POST['message_to'] ) ) ? esc_html( $_POST['message_to'] ): fep_get_userdata( $to, 'user_login' );

    Plugin file also updated accordingly

    alex_pen

    (@alex_pen)

    Thank you for the support and the quick update of the plugin

    Thread Starter akyboy

    (@akyboy)

    Hi

    After last update my link to pm user from forum doesn’t work any more

    <a href="https://www.cannedbandits.org/office/?fepaction=newmessage&to=<?=preg_replace('/^wg_/i','',bbp_get_displayed_user_field('display_name'))?>">Send Message</a>

    Once i click i will see new message page , username is inserted but when i insert title and message , click send i see error:

    Error: You must enter a valid recipient!

    https://www.serdarevic.net/screens/2015-03-24_21-31-51.png

    Plugin Author Shamim Hasan

    (@shamim51)

    is bbp_get_displayed_user_field(‘display_name’) return/echo username? That should be username.

    If still found this problem please download this plugin from wordpress and install.

    Thanks

    Thread Starter akyboy

    (@akyboy)

    yes, username is automatically inserted into To: field
    once i click to send pm, i get that error.

    can i send you pm here,… so i can setup temporary acc for you on our site so you can see

    Plugin Author Shamim Hasan

    (@shamim51)

    ok

    Thread Starter akyboy

    (@akyboy)

    how can i contact you here? privately is there pm that i can send you here

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘PM from user page’ is closed to new replies.