Example #1
0
 /**
  * Retrieves a list of posts created by a list of specified authors.
  *
  * @since	5.0
  * @access	public
  * @param	string
  * @return	
  */
 public static function getPostByBlogger(&$params, $authorId)
 {
     $db = EB::db();
     $config = EB::config();
     // Get the profile of the user.
     $author = EB::user($authorId);
     // Default posts to empty.
     $author->posts = array();
     $author->posts = modLatestBlogsHelper::getLatestPost($params, $author->id, 'blogger');
     return $author;
 }
    if ($team->access != 1 || $team->isMember) {
        $posts = modLatestBlogsHelper::getLatestPost($params, $teamId, 'team');
    }
    // Let the template know what header we want to use
    $templateForHeader = 'team';
}
// This will only get called when user is viewing the entry view of a blog post.
if ($filterType == 5 || $filterType == 'entry') {
    // Get the current view of the page
    $view = $app->input->get('view', '', 'cmd');
    // We need to have the id
    $id = $app->input->get('id', 0, 'int');
    // If the view is not entry, skip this
    if ($view != 'entry' || !$id) {
        return;
    }
    // Load up the blog table
    $blog = EB::table('Blog');
    $blog->load($id);
    // Ensure that the blog post has a proper author
    if (!$blog->created_by) {
        return;
    }
    // Now we load the posts
    $posts = modLatestBlogsHelper::getPostByBlogger($params, modLatestBlogsHelper::getBloggers($params, $blog->created_by));
}
// Filter blog posts by recent posts.
if ($filterType == 0 || $filterType == 'recent') {
    $posts = modLatestBlogsHelper::getLatestPost($params);
}
require JModuleHelper::getLayoutPath('mod_easybloglatestblogs');
Example #3
0
/**
 * @package		EasyBlog
 * @copyright	Copyright (C) 2010 Stack Ideas Private Limited. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 *
 * EasyBlog is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */
defined('_JEXEC') or die('Restricted access');
// override itemid.
// reset the itemid incase previously the itemid was assigned from other posts.
$itemId = modLatestBlogsHelper::_getMenuItemId($post, $params);
$url = EasyBlogRouter::_('index.php?option=com_easyblog&view=entry&id=' . $post->id . $itemId);
$posterURL = EasyBlogRouter::_('index.php?option=com_easyblog&view=blogger&layout=listings&id=' . $post->author->id . $itemId);
$posterName = $post->author->getName();
$disabled = true;
if ($params->get('enableratings')) {
    $disabled = false;
}
?>
<div class="mod-item">

	<?php 
if ($params->get('photo_show')) {
    ?>
		<?php 
    if (!empty($post->source)) {