| Server IP : 54.36.91.62 / Your IP : 216.73.217.94 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/www/cj79373/components/com_community/templates/jomsocial/layouts/stream/ |
Upload File : |
<?php
/**
* @copyright (C) 2013 iJoomla, Inc. - All rights reserved.
* @license GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html)
* @author iJoomla.com <webmaster@ijoomla.com>
* @url https://www.jomsocial.com/license-agreement
* The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0
* More info at https://www.jomsocial.com/license-agreement
*/
defined('_JEXEC') or die();
$appName = explode('.', $act->app);
$appName = $appName[0];
// Grab primary object to be used in permission checking, defined by appname
$obj = $act;
if ($appName == 'groups') {
$obj = $this->group;
}
if ($appName == 'events') {
$obj = $this->event;
}
$my = CFactory::getUser();
$allowLike = ($my->authorise('community.add', 'activities.like.' . $this->act->actor, $obj));
$showLocation = !empty($this->act->location);
// @todo: delete permission shoudl be handled within ACL system
$allowDelete = (($act->actor == $my->id) || $isCommunityAdmin || ($act->target == $my->id)) && ($my->id != 0);
// Allow system message deletion only for admin
if ($act->app == 'users.featured') {
$allowDelete = $isCommunityAdmin;
}
$allowComment = CActivitiesHelper::isActionAllowed($act->app, 'comment');
$allowComment = $allowComment && ($my->authorise('community.add', 'activities.comment.' . $this->act->actor, $obj));
if ($act->app == 'groups.discussion.reply' || $act->app == 'discussion.like' || $act->app == 'groups.discussion' || $act->app == 'groups.bulletin' ||
$act->app == 'events' || $act->app == 'groups' || strpos($act->app, 'featured') !== false || $act->app=='albums.comment') {
$allowComment = false;
}
// Allow comment for system post
if ($appName == 'system') {
$allowComment = !empty($my->id);
}
// No like/comment support from the activity stream
if ($appName == 'photos' || $appName == 'videos') {
// $allowLike = false;
// $allowComment = false;
}
if ($appName == 'photos') {
if ($config->get('lockphotoswalls')) {
$isConnected = CFriendsHelper::isConnected($my->id, $this->act->actor);
$allowComment = $allowComment && $isConnected;
}
}
if ($appName == 'videos') {
if ($config->get('lockvideoswalls')) {
$isConnected = CFriendsHelper::isConnected($my->id, $this->act->actor);
$allowComment = $allowComment && $isConnected;
}
}
if ($appName == 'kunena') {
$allowLike = true;
$allowComment = false;
}
if (!$my->id || $act->app == 'videos.comment') {
$allowLike = false;
$allowComment = false;
}
//temp fix to pass variables to loaded template
$this->set('allowLike', $allowLike)
->set('allowComment', $allowComment)
->set('enablereaction', !!$config->get('enablereaction'));
$this->load('stream/actions');
$this->load('stream/comment');