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 . '/administrator/components/com_easyblog/includes/easyblog.php';
$my = ES::user();
// Load up the module engine
$modules = ES::modules('mod_easysocial_easyblog_posts');
$model = EB::model('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 = EB::formatter('list', $posts, false);
// Get the author of the blog posts
foreach ($posts as $post) {
    $post->user = ES::user($post->created_by);
}
// We need these packages
$modules->addDependency('css', 'javascript');
// Get the layout to use.