Home › Forums › Front End PM PRO › Need help integration into forum
Tagged: asgaros forum, user id
- This topic has 4 replies, 2 voices, and was last updated 7 years, 8 months ago by goldstrikn.
- AuthorPosts
- April 20, 2018 at 9:34 am #13518goldstriknParticipant
Hi Shamimsplugins,
I’m hoping that I get communication from you, by buying the Pro version of FrontEnd PM. I filled out your contact form twice and I have not received replied to any of them.
I’m trying to use the following code into my forum, for the most part it works, but the issue is the username or userid of the post doesn’t append it to the send to message. It is always the admin username that gets appended. Here is the code that I used.
[code]function custom_links($user_id, $post_counter) {
echo do_shortcode(‘[fep_shortcode_message_to]‘);
}
add_action(‘asgarosforum_after_post_author’, ‘custom_links’, 10, 2);[/code]The $user_id is what I need to pass, but I’m not successful. Please help me with the code.
Thank you.
April 20, 2018 at 9:53 am #13524Shamim HasanKeymasterI am really sorry you did not received my replies. Both of the time i replied, may be ended in spam folder.
Please use following code in you theme’s (child theme’s if any) functions.php
add_action('asgarosforum_after_post_author', function( $user_id, $post_counter ){ echo do_shortcode( '[fep_shortcode_message_to to="'. fep_get_userdata( $user_id, 'user_nicename', 'id') .'"]' ); }, 10, 2);April 21, 2018 at 3:50 am #13555goldstriknParticipantThanks for your fast response. Indeed your replies did go to spam, but now they’re whitelisted.
Your code worked, thank you. Now, I have a new place that I need to add the do_shortcode to, but it is not working for me.
the following is needed to place a button.
function custom_profile_content($user_object) {
// My code …
print_r($user_object);
}
add_action(‘asgarosforum_custom_profile_content’, ‘custom_profile_content’);How can I add the code?
Please advise, and thanks again.
April 21, 2018 at 8:50 pm #13567Shamim HasanKeymasterPlease use following code in you theme’s (child theme’s if any) functions.php
add_action('asgarosforum_custom_profile_content', function( $user_object ){ echo do_shortcode( '[fep_shortcode_message_to to="'. $user_object->user_nicename .'"]' ); });April 22, 2018 at 9:11 pm #13580goldstriknParticipantThanks again for your great support.
- AuthorPosts
You need to purchase ‘Front End PM PRO’ to create topic in this support forum.
If you already purchased ‘Front End PM PRO’ please LOGIN.