index.php 788 B

123456789101112131415161718
  1. <?php
  2. // Show the FACEBOOK login button
  3. $_template['show_message'] = false;
  4. //if (api_is_anonymous() && api_get_setting('facebook_login_activate') == 'true') {
  5. if (api_is_anonymous()) {
  6. require_once api_get_path(SYS_CODE_PATH)."auth/external_login/facebook.inc.php";
  7. $_template['show_message'] = true;
  8. // the default title
  9. $button_url = api_get_path(WEB_PLUGIN_PATH)."add_facebook_login_button/img/cnx_fb.png";
  10. $href_link = facebookGetLoginUrl();
  11. if (!empty($plugin_info['settings']['add_facebook_login_button_facebook_button_url'])) {
  12. $button_url = api_htmlentities($plugin_info['settings']['add_facebook_login_button_facebook_button_url']);
  13. }
  14. $_template['facebook_button_url'] = $button_url;
  15. $_template['facebook_href_link'] = $href_link;
  16. }