2014-01-25 05:18:31 -08:00
|
|
|
<?php
|
|
|
|
|
2016-12-19 17:57:03 -08:00
|
|
|
if(e_ADMIN_AREA !==true)
|
2014-01-25 05:18:31 -08:00
|
|
|
{
|
2020-12-02 13:17:23 -08:00
|
|
|
|
2014-01-25 05:18:31 -08:00
|
|
|
e107::css('social', 'css/fontello.css');
|
2021-07-15 17:38:39 -07:00
|
|
|
// e107::link(array('rel'=>'preload', 'href'=> "{e_PLUGIN}social/font/fontello.woff2?21917124", 'as' => "font", 'type'=>"font/woff2", 'crossorigin' => 'anonymous'));
|
2016-03-13 15:00:54 -07:00
|
|
|
e107::css('social' ,'css/social.css');
|
2015-04-08 20:20:10 -07:00
|
|
|
|
2016-12-19 17:57:03 -08:00
|
|
|
$appID = false;
|
|
|
|
|
2015-04-08 20:20:10 -07:00
|
|
|
$social = e107::pref('core','social_login');
|
2015-05-20 11:20:22 -07:00
|
|
|
|
|
|
|
if(!empty($social) && is_array($social))
|
|
|
|
{
|
2016-12-19 17:57:03 -08:00
|
|
|
if(!empty($social['Facebook']['keys']['id']))
|
|
|
|
{
|
|
|
|
$appID = $social['Facebook']['keys']['id'];
|
|
|
|
}
|
|
|
|
|
2015-05-20 11:20:22 -07:00
|
|
|
}
|
2015-04-08 20:20:10 -07:00
|
|
|
|
2017-10-11 16:18:56 -07:00
|
|
|
if(deftrue('XURL_TWITTER') && XURL_TWITTER !== '#')
|
|
|
|
{
|
|
|
|
$screenName = basename(XURL_TWITTER);
|
|
|
|
e107::meta('twitter:site','@'.$screenName);
|
|
|
|
}
|
2016-08-09 09:26:48 -07:00
|
|
|
|
2015-04-08 20:20:10 -07:00
|
|
|
if(!empty($appID))
|
|
|
|
{
|
|
|
|
e107::meta('fb:app_id', $appID);
|
2015-06-02 13:17:52 -07:00
|
|
|
|
2015-06-05 17:12:49 -07:00
|
|
|
$locale = strtolower(CORE_LC)."_".strtoupper(CORE_LC2);
|
|
|
|
|
2015-06-02 13:17:52 -07:00
|
|
|
$init = "
|
|
|
|
|
|
|
|
window.fbAsyncInit = function() {
|
|
|
|
FB.init({
|
|
|
|
appId : '".$appID."',
|
|
|
|
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;
|
2015-06-05 17:12:49 -07:00
|
|
|
js.src = '//connect.facebook.net/".$locale."/sdk.js';
|
2015-06-02 13:17:52 -07:00
|
|
|
fjs.parentNode.insertBefore(js, fjs);
|
|
|
|
}(document, 'script', 'facebook-jssdk'));
|
|
|
|
|
|
|
|
";
|
|
|
|
|
|
|
|
define('SOCIAL_FACEBOOK_INIT', $init);
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
define('SOCIAL_FACEBOOK_INIT', false);
|
2015-04-08 20:20:10 -07:00
|
|
|
}
|
|
|
|
|
2015-06-02 13:17:52 -07:00
|
|
|
|
2014-01-25 05:18:31 -08:00
|
|
|
}
|
|
|
|
|