<?php

/**
 * Open Source Social Network
 *
 * @package   Open Source Social Network
 * @author    Open Social Website Core Team <*****@*****.**>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
$object = $params->guid;
$OssnComments = new OssnComments();
$OssnLikes = new OssnLikes();
$comments = $OssnComments->GetComments($object);
echo "<div class='ossn-comments-list-{$object}'>";
if (is_object($comments)) {
    $count = 0;
    foreach ($comments as $comment) {
        if ($count <= 5) {
            $data['comment'] = get_object_vars($comment);
            echo ossn_view('components/OssnComments/templates/comment', $data);
        }
        $count++;
    }
}
echo '</div>';
if (ossn_isLoggedIn()) {
    echo '<div class="poster-image">';
    echo '<img src="' . ossn_site_url() . 'avatar/' . ossn_loggedin_user()->username . '/smaller" />';
    echo '</div>';
<?php

/**
 * Open Source Social Network
 *
 * @packageOpen Source Social Network
 * @author    Open Social Website Core Team <*****@*****.**>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
$object = $params['entity_guid'];
$OssnComments = new OssnComments();
$OssnLikes = new OssnLikes();
$comments = $OssnComments->GetComments($object, 'entity');
echo "<div class='ossn-comments-list-{$object}'>";
if ($comments) {
    $count = 0;
    foreach ($comments as $comment) {
        if ($count <= 5) {
            $data['comment'] = get_object_vars($comment);
            echo ossn_plugin_view('comments/templates/comment', $data);
        } elseif ($params->full_view === true) {
            $data['comment'] = get_object_vars($comment);
            echo ossn_plugin_view('comments/templates/comment', $data);
        }
        $count++;
    }
}
echo '</div>';
if (ossn_isLoggedIn()) {