$file = JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php';
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_leaderboard');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$total = (int) $params->get('total', 10);
// Get the layout to use.
$model = FD::model('Leaderboard');
// Should we exclude admin here
$config = FD::config();
$excludeAdmin = !$config->get('leaderboard.listings.admin');
$options = array('ordering' => 'points', 'limit' => $total, 'excludeAdmin' => $excludeAdmin);
$users = $model->getLadder($options);
defined('_JEXEC') or die('Unauthorized Access');
// Include main engine
$file = JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php';
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$my = FD::user();
// If the user is not logged in, don't show the menu
if (!$my->id) {
    return;
}
// Load up the module engine
$modules = FD::modules('mod_easysocial_notifications');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css');
$modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
require JModuleHelper::getLayoutPath('mod_easysocial_notifications', $layout);
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$my = FD::user();
// Load our own helper file.
require_once dirname(__FILE__) . '/helper.php';
// Load up the module engine
$modules = FD::modules('mod_easysocial_login');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
JFactory::getDocument()->addStylesheet('modules/mod_easysocial_signupbox/styles/style.css');
JFactory::getDocument()->addStylesheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css');
// Get the layout to use.
$suffix = $params->get('suffix', '');
$return = EasySocialModLoginHelper::getReturnURL($params);
$config = FD::config();
// Facebook codes.
$facebook = FD::oauth('Facebook');
require JModuleHelper::getLayoutPath('mod_easysocial_signupbox', 'default');
defined('_JEXEC') or die('Unauthorized Access');
// Include main engine
$file = JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php';
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$my = FD::user();
// If the user is not logged in, don't show the menu
if (!$my->guest) {
    return;
}
// Load up the module engine
$modules = FD::modules('mod_easysocial_registration_requester');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css', 'javascript');
// $modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
require JModuleHelper::getLayoutPath('mod_easysocial_registration_requester', $layout);
if (!JFile::exists($file) || !JFile::exists($easyblog)) {
    return;
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
// Include EasyBlog's library
require_once JPATH_ROOT . '/components/com_easyblog/helpers/helper.php';
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_easyblog_posts');
$model = EasyBlogHelper::getModel('Blog');
// Get the module options
$total = (int) $params->get('total', 5);
$sorting = $params->get('sorting', 'latest');
// Let's load the list of posts now
$posts = $model->getBlogsBy('latest', '', $sorting, $total);
// We need to format the blog post accordingly.
$posts = EasyBlogHelper::formatBlog($posts, false, true, true, true);
// Get the author of the blog posts
foreach ($posts as $post) {
    $post->user = FD::user($post->created_by);
}
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
if (JFactory::getUser()->id) {
    return;
}
// Include the engine file.
require_once $file;
FD::language()->loadSite();
// Check if Foundry exists
if (!FD::exists()) {
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$my = FD::user();
// Load our own helper file.
require_once dirname(__FILE__) . '/helper.php';
// Load up the module engine
$modules = FD::modules('mod_easysocial_logbox');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
$modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$config = FD::config();
$facebook = FD::oauth('Facebook');
// Get any callback urls.
$return = EasySocialModLogBoxHelper::getReturnURL($params);
// Get the profile id
$profileId = $params->get('profile_id');
// Load up the current user.
$my = FD::user();
// If the user is not logged in, don't show the menu
if (!$my->id) {
    return;
}
// THis module will only appear on group pages
$view = JRequest::getVar('view');
$layout = JRequest::getWord('layout');
$id = JRequest::getInt('id');
if ($view != 'groups' || $layout != 'item' || !$id) {
    return;
}
require_once dirname(__FILE__) . '/helper.php';
// Get the current group object
$group = FD::group($id);
// Load up the module engine
$modules = FD::modules('mod_easysocial_group_menu');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css');
$modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
// Load list of apps for this group
$apps = EasySocialModGroupsMenuHelper::getApps($params, $group);
// Get a list of pending members from the group
$pending = EasySocialModGroupsMenuHelper::getPendingMembers($params, $group);
require JModuleHelper::getLayoutPath('mod_easysocial_group_menu', $layout);
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
jimport('joomla.filesystem.file');
// Include main engine
$file = JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php';
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
// Load up the module engine
$modules = FD::modules('mod_easysocial_photos');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css');
// Get the layout to use
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$options = array('ordering' => $params->get('ordering', 'created'), 'limit' => $params->get('limit', 20));
$model = FD::model('Photos');
$photos = $model->getPhotos($options);
require JModuleHelper::getLayoutPath('mod_easysocial_photos', $layout);
if (JFactory::getUser()->id) {
    return;
}
// Include the engine file.
require_once $file;
FD::language()->loadSite();
// Check if Foundry exists
if (!FD::exists()) {
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$my = FD::user();
// Load our own helper file.
require_once dirname(__FILE__) . '/helper.php';
// Load up the module engine
$modules = FD::modules('mod_easysocial_register');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
$modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$config = FD::config();
// Get the profile id
$profileId = $params->get('profile_id');
$registerType = $params->get('register_type', 'quick');
// If there's no profile id, then we automatically assign the default profile id
if (empty($profileId)) {
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$my = FD::user();
// If user is not loagged in, just return
if (!$my->id) {
    return;
}
// Load up the module engine
$modules = FD::modules('mod_easysocial_followers');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$options = array();
if ($params->get('total')) {
    $options['limit'] = $params->get('total');
}
// Check filter type
$filter = $params->get('filter', 'followedBy');
$model = FD::model('Followers');
if ($filter == 'following') {
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
FD::language()->loadAdmin();
// Load up helper file
require_once dirname(__FILE__) . '/helper.php';
$config = FD::config();
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_dating_search');
// We need these packages
$modules->addDependency('css', 'javascript');
$modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
// module setting
$withCover = $params->get('withCover', 0);
$limit = $params->get('total', 6);
//get the fields
$modFields = EasySocialModDatingSearchHelper::getFields($params);
if (!$modFields) {
    return;
}
$genderList = array();
$file = JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php';
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_stream');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$total = $params->get('total', 10);
// Get the layout to use.
$stream = FD::stream();
$stream->getPublicStream($total);
$readmoreURL = '';
$readmoreText = '';
if ($my->id == 0) {
$file = JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php';
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
FD::language()->loadSite();
// Check if Foundry exists
if (!FD::exists()) {
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
// Load up helper file
require_once dirname(__FILE__) . '/helper.php';
$categories = EasySocialModGroupsCategoriesHelper::getCategories($params);
if (!$categories) {
    return;
}
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_groups_categories');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
require JModuleHelper::getLayoutPath('mod_easysocial_groups_categories', $layout);
// Load up the current user.
$my = FD::user();
// If the user is not logged in, don't show the menu
if (!$my->id) {
    return;
}
// THis module will only appear on group pages
$view = JRequest::getVar('view');
$layout = JRequest::getWord('layout');
$id = JRequest::getInt('id');
if ($view != 'events' || $layout != 'item' || !$id) {
    return;
}
require_once dirname(__FILE__) . '/helper.php';
// Get the current event object
$event = FD::event($id);
// Load up the module engine
$modules = FD::modules('mod_easysocial_event_menu');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css');
$modules->loadScript('script.js');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
// Load list of apps for this group
$apps = EasySocialModEventsMenuHelper::getApps($params, $event);
// Get a list of pending members from the event
$pending = EasySocialModEventsMenuHelper::getPendingMembers($params, $event);
require JModuleHelper::getLayoutPath('mod_easysocial_event_menu', $layout);
    return;
}
// Include the engine file.
require_once $engine;
FD::language()->loadSite();
// Check if Foundry exists
if (!FD::exists()) {
    return;
}
$my = FD::user();
// If module is configured to display groups from logged in user, ensure that the user is logged in
if ($params->get('filter') == '3' && $my->guest) {
    return;
}
// Load up helper file
require_once dirname(__FILE__) . '/helper.php';
$groups = EasySocialModGroupsHelper::getGroups($params);
if (!$groups) {
    return;
}
// Load up the module engine
$modules = FD::modules('mod_easysocial_groups');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
require JModuleHelper::getLayoutPath('mod_easysocial_groups', $layout);
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$config = FD::config();
// If photos is not enabled, do not display the albums
if (!$config->get('photos.enabled')) {
    return;
}
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_albums');
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
// module setting
$withCover = $params->get('withCover', 0);
$limit = $params->get('total', 6);
// Retrieve recent albums from the site.
$albumsModel = FD::model('Albums');
$recentAlbums = $albumsModel->getAlbums('', '', array('core' => false, 'withCovers' => $withCover, 'limit' => $limit, 'order' => 'created', 'direction' => 'desc', 'excludeblocked' => 1, 'privacy' => true));
require JModuleHelper::getLayoutPath('mod_easysocial_albums', $layout);
Пример #17
0
$file = JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php';
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_users');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
// Get the layout to use.
$model = FD::model('Users');
$options = array('ordering' => 'a.' . $params->get('ordering', 'registerDate'), 'direction' => $params->get('direction', 'desc'), 'limit' => $params->get('total', 10));
// Check filter type
if ($params->get('filter', 'recent') == 'online') {
    $options['login'] = true;
    $options['frontend'] = true;
}
$file = JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php';
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
FD::language()->loadSite();
// Check if Foundry exists
if (!FD::exists()) {
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
// Load up helper file
require_once dirname(__FILE__) . '/helper.php';
$categories = EasySocialModEventsCategoriesHelper::getCategories($params);
if (!$categories) {
    return;
}
$my = FD::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_events_categories');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
require JModuleHelper::getLayoutPath('mod_easysocial_events_categories', $layout);
$file = JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php';
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
FD::language()->loadSite();
// Check if Foundry exists
if (!FD::exists()) {
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
// Load up helper file
require_once dirname(__FILE__) . '/helper.php';
$events = EasySocialModEventsHelper::getEvents($params);
if (empty($events)) {
    return;
}
$my = ES::user();
// Load up the module engine
$modules = FD::modules('mod_easysocial_events');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
require JModuleHelper::getLayoutPath('mod_easysocial_events', $layout);
require_once $file;
require_once dirname(__FILE__) . '/helper.php';
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
FD::language()->loadSite();
// Get the current logged in user
$my = FD::user();
if (!$my->id && !$params->get('show_sign_in', true)) {
    return;
}
// Load up the module engine
$modules = FD::modules('mod_easysocial_dropdown_menu');
// We need these packages
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
$modules->addDependency('css', 'javascript');
$modules->loadScript('script.js');
// Get menu items
$items = array();
if ($my->guest) {
    $config = FD::config();
    $facebook = FD::oauth('Facebook');
    $loginReturn = ModEasySocialDropdownMenuHelper::getReturnURL($params);
} else {
    if ($params->get('render_menus', false)) {
        $items = ModEasySocialDropdownMenuHelper::getItems($params);
    }
if (!JFile::exists($engine)) {
    return;
}
// Include the engine file.
require_once $engine;
// Check if Foundry exists
if (!FD::exists()) {
    return;
}
// Ensure that this is a logged in user, otherwise there is no way to get their friends
$my = FD::user();
if ($my->guest) {
    return;
}
// Load up the module engine
$lib = FD::modules('mod_easysocial_friends');
// We need these packages
$lib->loadComponentScripts();
$lib->loadComponentStylesheets();
$lib->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
// Retrieve the user's friends now.
$model = FD::model('Friends');
$limit = $params->get('limit', 6);
$options = array('limit' => $limit);
// Retrieve the list of friends
$friends = $model->getFriends($my->id, $options);
if (!$friends) {
    return;
jimport('joomla.filesystem.file');
if (!JFile::exists($file)) {
    return;
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$option = JRequest::getVar('option');
if ($option == 'com_easysocial' && !$params->get('show_on_easysocial', false)) {
    return;
}
// Load our css
FD::document()->init();
// Load up EasySocial's language file
FD::language()->loadSite();
// Load up the module engine
$modules = FD::modules('mod_easysocial_toolbar');
$modules->loadComponentScripts();
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$toolbar = FD::get('Toolbar');
$options = array('forceoption' => true, 'toolbar' => true, 'dashboard' => $params->get('show_dashboard', true), 'friends' => $params->get('show_friends', true), 'conversations' => $params->get('show_conversations', true), 'notifications' => $params->get('show_notifications', true), 'search' => $params->get('show_search', true), 'login' => $params->get('show_login', true), 'profile' => $params->get('show_profile', true), 'responsive' => $params->get('responsive', true));
require JModuleHelper::getLayoutPath('mod_easysocial_toolbar', $layout);
// If user is not logged in, skip this
if (JFactory::getUser()->guest) {
    return;
}
// Include main engine
$file = JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php';
if (!JFile::exists($file)) {
    return;
}
require_once $file;
FD::language()->loadSite();
if (!FD::exists()) {
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
$modules = FD::modules('mod_easysocial_profile_completeness');
// We need foundryjs here
$modules->loadComponentScripts();
$modules->loadComponentStylesheets();
// We need these packages
$modules->addDependency('css', 'javascript');
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
$my = FD::user();
$total = $my->getProfile()->getTotalFields(SOCIAL_PROFILES_VIEW_EDIT);
$filled = (int) $my->completed_fields;
// Avoid using maintenance script to do this because it is possible that a site might have >1000 users
// Using this method instead so that every user will at least get executed once during login
// Won't happen on subsequent logins
if (empty($filled)) {
    $fields = FD::model('Fields')->getCustomFields(array('profile_id' => $my->getProfile()->id, 'data' => true, 'dataId' => $my->id, 'dataType' => SOCIAL_TYPE_USER, 'visible' => SOCIAL_PROFILES_VIEW_EDIT, 'group' => SOCIAL_FIELDS_GROUP_USER));
Пример #24
0
    return;
}
// Include the engine file.
require_once $file;
// Check if Foundry exists
if (!FD::exists()) {
    FD::language()->loadSite();
    echo JText::_('COM_EASYSOCIAL_FOUNDRY_DEPENDENCY_MISSING');
    return;
}
// Get the current logged in user object
$my = FD::user();
// If the user has already logged in, do not show the button
if ($my->id) {
    return;
}
// Load up the module engine
$modules = FD::modules('mod_easysocial_oauth');
$modules->loadComponentStylesheets();
$modules->loadComponentScripts();
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.
$layout = $params->get('layout', 'default');
$suffix = $params->get('suffix', '');
// Facebook codes.
$facebook = FD::oauth('Facebook');
// Get any callback urls.
$return = FD::getCallback();
$return = base64_encode($return);
require JModuleHelper::getLayoutPath('mod_easysocial_oauth', $layout);