By Edgar on Wednesday, 15 March 2017
Posted in General Issues
Likes 0
Views 512
Votes 0
Hello,

In Easy discuss I enabled the like function and button.
It works great but I would like to display the names of the user who liked a reply not in a popbox. Instead I would like their names are displayed directly near of the like button.

I found easily how to display by example total like a reply. But I don't find the command to displayd the names of the people who liked the reply.
May I know what code can I execute to display their names as simple text ?

Thanks for your help,

Edgar
Hi Edgar,

Perhaps you can try the code below:

$input = ED::request();
$postId = $input->get('postid', 0, 'int');

$user = ED::user();

// Here we need to load the likes library
$result = ED::likes()->getLikes($postId, $user->id);
foreach ($result as $user) {
echo $user->getPermalink();
echo $user->getName();exit;
}
·
Wednesday, 15 March 2017 18:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Muhammad,

Thanks a lot for your answer.
Unfortunately I copied this code in default.reply.item.php and it doesn't works, nothing is displayed.

Does this code need to be written in a specific file ?

Thanks for your help,

Edgar
·
Thursday, 16 March 2017 02:32
·
0 Likes
·
0 Votes
·
0 Comments
·
I am really sorry but unfortunately we cannot accommodate your request currently as it is beyond our support scope's policy as outlined in http://stackideas.com/support

Having said that, if you require us to perform the customization for you, you can always request for a quote from us at https://crm.stackideas.com and select "Customizations" . Our sales person would be glad to send you a quote for the customizations that you have requested.
·
Thursday, 16 March 2017 17:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

Thanks for your answer.
I knew your policy support has changed but just for this I have to see for a customization ?

I believed it was just few lines of codes, but maybe I am wrong on this ?

Have a nice day,

Edgar
·
Thursday, 16 March 2017 17:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Edgar,

I am sorry for the confusions but the codes were already provided by Fadhli and it will work, you just need to tweak it accordingly.
·
Friday, 17 March 2017 23:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark,

Sorry I didn't understand that was the good code.
I'm going to check what didn't function and would contact your custom services if I can make it works.

Have a nice week-end,

Edgar
·
Saturday, 18 March 2017 01:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for understand.

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.
·
Saturday, 18 March 2017 10:14
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post