facebookActive = vartrue($social['Facebook']['keys']['id']); } } public function config() // Admin Area Configuration. { $engine = e107::pref('core','comments_engine','e107'); if($engine == 'social::facebook' && empty($this->facebookActive)) { e107::getMessage()->addInfo("Facebook comments requires that you have a facebook App ID. See the 'social login' area in admin-preferences to add one."); } $config = array(); $config[] = array('name' => "Facebook", 'function'=>'facebook'); return $config; } function facebook($data) { if(!deftrue('SOCIAL_FACEBOOK_INIT')) { return "
Unable to render comments. Missing Facebook appID.
"; } e107::js('footer-inline', SOCIAL_FACEBOOK_INIT); if(E107_DEBUG_LEVEL > 0) { $link = "http://developers.facebook.com/docs/plugins/comments/"; } else { $link = e_REQUEST_URL; } $pref = e107::pref('social'); $limit = vartrue($pref['facebook_comments_limit'], 10); $theme = vartrue($pref['facebook_comments_theme'], 'light'); $loading = vartrue($pref['facebook_comments_loadingtext'], 'Loading...'); $text = '
'.$loading.'
'; return $text; } }