Exemple #1
0
        echo $act->title;
        ?>
			<div>
			<link rel="stylesheet" href="<?php 
        echo JURI::root();
        ?>
plugins/community/activitycomment/style.css" type="text/css" />
			<script type="text/javascript" src="<?php 
        echo JURI::root();
        ?>
plugins/community/activitycomment/activitycomment.js"></script>
			<?php 
        JPlugin::loadLanguage('plg_activitycomment', JPATH_ADMINISTRATOR);
        require_once JPATH_PLUGINS . DS . 'community' . DS . 'activitycomment' . DS . 'helper.php';
        $my =& CFactory::getUser();
        $rows = ActivityComments::getComments($act->id);
        $likes = ActivityComments::getLikes($act->id);
        ?>
			<?php 
        if ($my->id != 0) {
            $params = ActivityComments::getParams();
            $showLikeIcon = $params->get('uselikeicon', 1) == 1 ? '' : ' noicon';
            $showCommentIcon = $params->get('usecommenticon', 1) == 1 ? '' : ' noicon';
            ?>
			<span class="small"><a class="activity-comments<?php 
            echo $showCommentIcon;
            ?>
" href="javascript:void(0);" onclick="activityShowComment('<?php 
            echo $act->id;
            ?>
');"><?php 
Exemple #2
0
    function morecomments($response, $id)
    {
        require_once JPATH_PLUGINS . DS . 'community' . DS . 'activitycomment' . DS . 'helper.php';
        JPlugin::loadLanguage('plg_activitycomment', JPATH_ADMINISTRATOR);
        $rows = ActivityComments::getComments($id, true);
        ob_start();
        foreach ($rows as $wall) {
            $user =& CFactory::getUser($wall->post_by);
            $date = JFactory::getDate($wall->date);
            ?>
		<div class="wallcmt small" id="activity-comment-item-<?php 
            echo $wall->id;
            ?>
">
			<a href="<?php 
            echo CRoute::_('index.php?option=com_community&view=profile&userid=' . $wall->post_by);
            ?>
"><img class="wall-coc-avatar" src="<?php 
            echo $user->getThumbAvatar();
            ?>
"/></a>
			<a href="<?php 
            echo CRoute::_('index.php?option=com_community&view=profile&userid=' . $user->id);
            ?>
" class="wall-coc-author"><?php 
            echo $user->getDisplayName();
            ?>
</a> <?php 
            echo JText::_('POST ON');
            ?>
			<span class="wall-coc-date"><?php 
            echo $date->toFormat(JText::_('DATE_FORMAT_LC2'));
            ?>
</span>
					<?php 
            if (ActivityComments::isSiteAdmin()) {
                ?>
					 | <span class="coc-remove"><a href="javascript:void(0);" onclick="jax.call('community','plugins,activitycomment,removecomment','<?php 
                echo $wall->id;
                ?>
');"><?php 
                echo JText::_('REMOVE COMMENT');
                ?>
</a></span>
					<?php 
            }
            ?>
			<p><?php 
            echo $wall->comment;
            ?>
</p>
		</div>
	<?php 
        }
        $contents = ob_get_contents();
        ob_end_clean();
        $response->addScriptCall('activityMoreCommentsReplace', $id, $contents);
        return $response->sendResponse();
    }