*/ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die; /** detect and display facebook language **/ if (!defined('FACEBOOK_LANG_AVAILABLE')) { define('FACEBOOK_LANG_AVAILABLE', 1); } $lang =& JFactory::getLanguage(); $currentLang = $lang->get('tag'); $fbLang = explode(',', trim(FACEBOOK_LANGUAGE)); $currentLang = str_replace('-', '_', $currentLang); $fbLangScript = '<script src="http://connect.facebook.net/en_GB/all.js" type="text/javascript"></script>'; if (in_array($currentLang, $fbLang) == FACEBOOK_LANG_AVAILABLE) { $fbLangScript = '<script src="http://connect.facebook.net/' . $currentLang . '/all.js" type="text/javascript"></script>'; } $fbLangScript = CUrlHelper::httpsURI($fbLangScript); ?> <div id="fb-root"></div><b><?php echo JText::_('COM_COMMUNITY_OR'); ?> </b> <script type="text/javascript"> function cFbButtonInitLoop(){ // keep looping until user status is not 'notConnected' if( typeof window.FB != 'undefined' && window.FB._apiKey != '<?php echo $config->get('fbconnectkey'); ?> ' && typeof window.jomFbButtonInit == 'function' ){