By Patrick Hüsler on Friday, 27 July 2018
Posted in General Issues
Replies 5
Likes 0
Views 1.2K
Votes 0
Dear Stackideas Support Team

I like to motivate visitors to get in contact with registered users by clicking on a conversation button that opens a conversation window with the relevant user. I found your conversation's data api
"data-es-conversations-compose" under https://stackideas.com/docs/easysocial/developers/html/conversations.

But I struggle to integrate it to the HTML field of the user profile (using ES > Customs Field > Workflows [Beitragende Experten PLUS type: User])

Can you please assist me.

Kind regards
Patrick
Hey Patrick,

Hm, those codes are PHP and you can't add PHP codes in the field but not really sure why do you want to add a link there since on the header itself, there is already a conversation button that allows users to interact with the current user being viewed.
·
Saturday, 28 July 2018 00:29
·
0 Likes
·
0 Votes
·
0 Comments
·
I tried to make the conversation button public but it did not worked. Maybe I missed something. Do you have an idea?
·
Saturday, 28 July 2018 01:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I am really sorry for the delay of this reply as it is a weekend for us here.

I assume you would like to paste this code into one of your PHP file right?

If yes, you can try use this following code and see how it goes.


<?php
require_once(JPATH_ROOT . '/administrator/components/com_easysocial/includes/easysocial.php');
ES::initialize();
// set your user id here which you would like conversation to
$userId = 810;
?>

<button data-es-provide="tooltip"
data-es-conversations-compose
class="btn btn-es-default-o btn-sm"
type="button"
data-es-conversations-id="<?php echo $userId;?>"
>
Start a conversation
</button>
·
Saturday, 28 July 2018 10:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex

This helps for the moment. Let me see what I can do with it and I would contact you again if it is not working for me.

Thank you for your response.

Kind regards
Patrick
·
Monday, 30 July 2018 14:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Alright, keep us update if you need further assistance on this.
·
Monday, 30 July 2018 15:05
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post