By Eric Martin on Saturday, 13 December 2014
Replies 1
Likes 0
Views 2.1K
Votes 0
In case someone else wanted to hide the like counter that is displayed on the Facebook social button I thought I'd post it here. This is what worked for me. Best if applied using override under your template. Feel free to post any issues you think I might have or that you ran into while trying/deploying it.
Issue:
I wanted ot remove the Facebook Like Hit Counter from the blog posts.
Solution:
Change the Facebook iframe source URL construct
1. Edit /home/plugin/public_html/components/com_easyblog/classes/facebook.php
2. Line 214 -> layout: "'.$layout.'", CHANGE TO layout: "'.button.'",
Why It Works:
Source URL sent to Facebook uses the button_count value to assign the Facebook Like button with a counter. Removing the _count tells Facebook that you don't want a counter with the button.
Request:
Add this option to backend admin interface in com_easyblog Social Integrations settings view.
Original:

$html .= EasyBlogHelper::addScriptDeclarationBookmarklet('$("#' . $placeholder . '").bookmarklet("facebookLike", {
url: "'.$url.'",
send: "'.$send.'",
layout: "'.$layout.'",
verb: "'.$verb.'",
locale: "'.$locale.'",
faces: "'.$faces.'",
theme: "'.$theme.'",
height: "'.$height.'",
width: "'.$width.'"
});');

Modified:

$html .= EasyBlogHelper::addScriptDeclarationBookmarklet('$("#' . $placeholder . '").bookmarklet("facebookLike", {
url: "'.$url.'",
send: "'.$send.'",
layout: "'.button.'",
verb: "'.$verb.'",
locale: "'.$locale.'",
faces: "'.$faces.'",
theme: "'.$theme.'",
height: "'.$height.'",
width: "'.$width.'"
});');
Hello Eric,

Thanks for the tutorial. Really appreciate this. You might want to add the feature request in our Voices page here: http://www.stackideas.com/voices/easyblog .
·
Saturday, 13 December 2014 21:07
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post