PM from user page
-
Hi guys
So if im on some user page id like to have link to directly pm him from here.
Example:
-
Got it!!
But this is if you run BBPress as well. Not sure if its going to work with plain WP
Can you explain a bit more? I’m interested too thank you.
Yes it works with pain WP.
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
<a href='<?php echo fep_action_url("newmessage&to=USERLOGIN")' ?>>Send Message</a>Change USERLOGIN with user login to whom message will be send
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.
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
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.
replace with
$message_to = ( isset( $_POST['message_to'] ) ) ? esc_html( $_POST['message_to'] ): fep_get_userdata( $to, 'user_login' );Plugin file also updated accordingly
Thank you for the support and the quick update of the plugin
Hi
After last update my link to pm user from forum doesn’t work any more
<a href="http://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!
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
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
ok
how can i contact you here? privately is there pm that i can send you here
The topic ‘PM from user page’ is closed to new replies.