1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-22 14:13:03 +02:00

Added Facebook Like Menu and corrected some FB.init issues.

This commit is contained in:
Cameron
2015-06-02 13:17:52 -07:00
parent 4eb9f7884f
commit efe6f27c46
4 changed files with 74 additions and 27 deletions

View File

@@ -45,32 +45,12 @@ class social_comment
function facebook($data)
{
if(empty($this->facebookActive))
if(!deftrue('SOCIAL_FACEBOOK_INIT'))
{
return "<div class='alert alert-important alert-danger'>Unable to render comments. Missing Facebook appID.</div>";
}
$head = "
window.fbAsyncInit = function() {
FB.init({
appId : '".$this->facebookActive."',
xfbml : true,
version : 'v2.3'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = '//connect.facebook.net/en_US/sdk.js';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
";
e107::js('footer-inline', $head);
e107::js('footer-inline', SOCIAL_FACEBOOK_INIT);
if(E107_DEBUG_LEVEL > 0)
{