Help with integration with Front End PM
Quote from goldstrikn on April 15, 2018, 7:45 pmHi,
I would like to know if you can assist in placing some code into my theme’s function file. What I want to do is to place a private message plugin, for which there is a way to do so, but I don’t know the hooks to your plugin.
The code that i’ll provide (see below) works with bbpress, but for Asgaros Forum, I wouldn’t know.
Please let me know how it would work.
add_action( 'bbp_theme_after_reply_author_details', function() { $user_nicename = get_the_author_meta('user_nicename'); if( ! $user_nicename || ! fep_current_user_can('send_new_message_to', $user_nicename ) ){ return ''; } ?> <div class="fep-bp-send-message"><?php echo do_shortcode( "[fep_shortcode_message_to class='fep-bp-send-message-a']"); ?></div> <?php });
Hi,
I would like to know if you can assist in placing some code into my theme’s function file. What I want to do is to place a private message plugin, for which there is a way to do so, but I don’t know the hooks to your plugin.
The code that i’ll provide (see below) works with bbpress, but for Asgaros Forum, I wouldn’t know.
Please let me know how it would work.
add_action( 'bbp_theme_after_reply_author_details', function() { $user_nicename = get_the_author_meta('user_nicename'); if( ! $user_nicename || ! fep_current_user_can('send_new_message_to', $user_nicename ) ){ return ''; } ?> <div class="fep-bp-send-message"><?php echo do_shortcode( "[fep_shortcode_message_to class='fep-bp-send-message-a']"); ?></div> <?php });
Uploaded files:
Quote from Asgaros on April 15, 2018, 8:17 pmHello @goldstrikn
You can use the following code to add custom content under the post-authors details:
function custom_links($user_id, $post_counter) { echo 'My code ...'; } add_action('asgarosforum_after_post_author', 'custom_links', 10, 2);
Hello @goldstrikn
You can use the following code to add custom content under the post-authors details:
function custom_links($user_id, $post_counter) { echo 'My code ...'; } add_action('asgarosforum_after_post_author', 'custom_links', 10, 2);
Quote from goldstrikn on April 19, 2018, 5:04 pmThanks for the info. That helped to get me started.
Now, I ran into an issue in relation to the author of the post. What I need to know is what is the tag for Asgaro author?
When I use post_author, it takes the page author, rather than the author of the thread discussion. I hope you know what I mean.
Please let me know if it is different than post_author.
Thanks for the info. That helped to get me started.
Now, I ran into an issue in relation to the author of the post. What I need to know is what is the tag for Asgaro author?
When I use post_author, it takes the page author, rather than the author of the thread discussion. I hope you know what I mean.
Please let me know if it is different than post_author.
Quote from Asgaros on April 19, 2018, 6:50 pmHello @goldstrikn
The variable $user_id always contains the ID of the user which wrote a post, so it should be safe to use.
Hello @goldstrikn
The variable $user_id always contains the ID of the user which wrote a post, so it should be safe to use.
Quote from goldstrikn on April 20, 2018, 2:09 pmThanks again, I got it sort it out. One more thing in regards to contact button. Can you help with a snippet of code to place the same contact button, but in the profile page?
I’m attaching the pic to where I’m referring. I would like the contact button to be under the Replies Created count.
Please advise.
Thanks.
Thanks again, I got it sort it out. One more thing in regards to contact button. Can you help with a snippet of code to place the same contact button, but in the profile page?
I’m attaching the pic to where I’m referring. I would like the contact button to be under the Replies Created count.
Please advise.
Thanks.
Uploaded files:Quote from Asgaros on April 20, 2018, 7:53 pmHello @goldstrikn
You can use the asgarosforum_custom_profile_content hook for this. The $user_object variable contains all necessary data:
function custom_profile_content($user_object) { // My code ... print_r($user_object); } add_action('asgarosforum_custom_profile_content', 'custom_profile_content');
Hello @goldstrikn
You can use the asgarosforum_custom_profile_content hook for this. The $user_object variable contains all necessary data:
function custom_profile_content($user_object) { // My code ... print_r($user_object); } add_action('asgarosforum_custom_profile_content', 'custom_profile_content');
Quote from TOF on April 22, 2018, 12:35 am@goldstrikn
I was looking for this … and after some researchs I put this code in my function.php file.
I have use an exemple from Yworld with WP Recall
I don’t know if it’s the best coding solution … because I’m not a pro … but its works great !!!
Now I have a message icon under each profil and each user name
You just have to click … and you are in the Front End PM page to write to the selected user !
Hope can this help you
//function my_menu() {
add_action(‘asgarosforum_after_post_author’, ‘my_function_asgaros_cabinet’, 30, 1);
function my_function_asgaros_cabinet($author_id) {
echo ‘<div>’;$user = get_author_name($author_id);
echo ‘<a href=”http://your_site.com/messages/?fepaction=newmessage&fep_to=’.$user.'” title=”‘.__(‘Message Privé’,’rcl-asgaros’).'”><i style=”color:’.$rcl_options[‘color_font_icon’].’;” class=”fa fa-comment”></i></a>’;
echo ‘</div>’;
}
add_action(‘asgarosforum_custom_profile_content’, ‘my_function_asgaros_cabinet2’, 30, 1);
function my_function_asgaros_cabinet2($author_id) {
echo ‘<div>’;
$author_id = $_GET[‘id’];$user = get_author_name($author_id);
echo ‘<a href=”http://your_site.com/messages/?fepaction=newmessage&fep_to=’.$user.'” title=”‘.__(‘Message Privé’,’rcl-asgaros’).'”><i style=”color:’.$rcl_options[‘color_font_icon’].’;” class=”fa fa-comment”></i> Message Privé</a>’;
echo ‘</div>’;
}
I was looking for this … and after some researchs I put this code in my function.php file.
I have use an exemple from Yworld with WP Recall
I don’t know if it’s the best coding solution … because I’m not a pro … but its works great !!!
Now I have a message icon under each profil and each user name
You just have to click … and you are in the Front End PM page to write to the selected user !
Hope can this help you
Uploaded files://function my_menu() {
add_action(‘asgarosforum_after_post_author’, ‘my_function_asgaros_cabinet’, 30, 1);
function my_function_asgaros_cabinet($author_id) {
echo ‘<div>’;$user = get_author_name($author_id);
echo ‘<a href=”http://your_site.com/messages/?fepaction=newmessage&fep_to=’.$user.'” title=”‘.__(‘Message Privé’,’rcl-asgaros’).'”><i style=”color:’.$rcl_options[‘color_font_icon’].’;” class=”fa fa-comment”></i></a>’;
echo ‘</div>’;
}
add_action(‘asgarosforum_custom_profile_content’, ‘my_function_asgaros_cabinet2’, 30, 1);
function my_function_asgaros_cabinet2($author_id) {
echo ‘<div>’;
$author_id = $_GET[‘id’];$user = get_author_name($author_id);
echo ‘<a href=”http://your_site.com/messages/?fepaction=newmessage&fep_to=’.$user.'” title=”‘.__(‘Message Privé’,’rcl-asgaros’).'”><i style=”color:’.$rcl_options[‘color_font_icon’].’;” class=”fa fa-comment”></i> Message Privé</a>’;
echo ‘</div>’;
}
Quote from goldstrikn on April 26, 2018, 3:26 pmThanks TOF, and Asgaros. The code provided did the trick.
Thanks TOF, and Asgaros. The code provided did the trick.
Quote from sven321 on April 28, 2018, 9:13 pmI have put the “Front END PM” plugin in a lightbox … is more flexible, without access to the forums Codex.
I have put the “Front END PM” plugin in a lightbox … is more flexible, without access to the forums Codex.
Quote from dimendia on June 30, 2018, 12:54 pmQuote from TOF on April 22, 2018, 12:35 am@goldstrikn
I was looking for this … and after some researchs I put this code in my function.php file.
I have use an exemple from Yworld with WP Recall
I don’t know if it’s the best coding solution … because I’m not a pro … but its works great !!!
Now I have a message icon under each profil and each user name
You just have to click … and you are in the Front End PM page to write to the selected user !
Hope can this help you
//function my_menu() {
add_action(‘asgarosforum_after_post_author’, ‘my_function_asgaros_cabinet’, 30, 1);
function my_function_asgaros_cabinet($author_id) {
echo ‘<div>’;$user = get_author_name($author_id);
echo ‘<a href=”http://your_site.com/messages/?fepaction=newmessage&fep_to=’.$user.'” title=”‘.__(‘Message Privé’,’rcl-asgaros’).'”><i style=”color:’.$rcl_options[‘color_font_icon’].’;” class=”fa fa-comment”></i></a>’;
echo ‘</div>’;
}
add_action(‘asgarosforum_custom_profile_content’, ‘my_function_asgaros_cabinet2’, 30, 1);
function my_function_asgaros_cabinet2($author_id) {
echo ‘<div>’;
$author_id = $_GET[‘id’];$user = get_author_name($author_id);
echo ‘<a href=”http://your_site.com/messages/?fepaction=newmessage&fep_to=’.$user.'” title=”‘.__(‘Message Privé’,’rcl-asgaros’).'”><i style=”color:’.$rcl_options[‘color_font_icon’].’;” class=”fa fa-comment”></i> Message Privé</a>’;
echo ‘</div>’;
}
@asgaros Ich habe diesen Code bei mir eingefügt, doch leider funktioniert es nicht..
Hast DU noch zufällig einen Code bei dem Front End PM auch integriert wird ?
Quote from TOF on April 22, 2018, 12:35 amI was looking for this … and after some researchs I put this code in my function.php file.
I have use an exemple from Yworld with WP Recall
I don’t know if it’s the best coding solution … because I’m not a pro … but its works great !!!
Now I have a message icon under each profil and each user name
You just have to click … and you are in the Front End PM page to write to the selected user !
Hope can this help you
//function my_menu() {
add_action(‘asgarosforum_after_post_author’, ‘my_function_asgaros_cabinet’, 30, 1);
function my_function_asgaros_cabinet($author_id) {
echo ‘<div>’;$user = get_author_name($author_id);
echo ‘<a href=”http://your_site.com/messages/?fepaction=newmessage&fep_to=’.$user.'” title=”‘.__(‘Message Privé’,’rcl-asgaros’).'”><i style=”color:’.$rcl_options[‘color_font_icon’].’;” class=”fa fa-comment”></i></a>’;
echo ‘</div>’;
}
add_action(‘asgarosforum_custom_profile_content’, ‘my_function_asgaros_cabinet2’, 30, 1);
function my_function_asgaros_cabinet2($author_id) {
echo ‘<div>’;
$author_id = $_GET[‘id’];$user = get_author_name($author_id);
echo ‘<a href=”http://your_site.com/messages/?fepaction=newmessage&fep_to=’.$user.'” title=”‘.__(‘Message Privé’,’rcl-asgaros’).'”><i style=”color:’.$rcl_options[‘color_font_icon’].’;” class=”fa fa-comment”></i> Message Privé</a>’;
echo ‘</div>’;
}
@asgaros Ich habe diesen Code bei mir eingefügt, doch leider funktioniert es nicht..
Hast DU noch zufällig einen Code bei dem Front End PM auch integriert wird ?