| 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/c/o/o/coopiak/amisdesseniors-fr/aix/components/com_community/views/followers/ |
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
*/
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
jimport('joomla.application.component.view');
if (!class_exists("CommunityViewFollowers")) {
class CommunityViewFollowers extends CommunityView
{
public function display($data = NULL)
{
$mainframe = Factory::getApplication();
$jinput = $mainframe->input;
$document = Factory::getDocument();
$my = CFactory::getUser();
$userid = $jinput->get('userid', $my->id, 'INT');
$user = CFactory::getUser($userid);
$followers = CFactory::getModel('followers');
$sorted = $jinput->get->get('sort', 'latest', 'STRING');
$filter = $jinput->getWord('filter', 'all');
$rows = $followers->getFollowers($userid, $sorted, true, $filter);
$isMine = (($userid == $my->id) && ($my->id != 0));
$this->attachMiniHeaderUser($user->id);
// Display mini header if user is viewing other user's friend
if ($userid != $my->id) {
$this->attachMiniHeaderUser($userid);
}
$this->addPathway(Text::_('COM_COMMUNITY_PROFILE'), CRoute::_('index.php?option=com_community&view=profile&userid=' . $user->id));
if ($my->id == $userid) {
$this->addPathway(Text::_('COM_COMMUNITY_FOLLOWERS'));
} else {
$this->addPathway(Text::sprintf('COM_COMMUNITY_FRIEND_FOLLOWERS', $user->getDisplayName()));
}
// Check if friend is banned
$blockModel = CFactory::getModel('block');
$resultRows = array();
foreach ($rows as $row) {
$user = CFactory::getUser($row->id);
$obj = clone($row);
$obj->profileLink = CUrlHelper::userLink($row->id);
$obj->isBlocked = $blockModel->getBlockStatus($user->id, $my->id);
$resultRows[] = $obj;
}
unset($rows);
$pagination = $followers->getPagination();
$tmpl = new CTemplate();
$html = $tmpl->set('isMine', $isMine)
->set('userid', $userid)
->setRef('my', $my)
->setRef('followers', $resultRows)
->set('config', CFactory::getConfig())
->set('pagination', $pagination)
->fetch('followers/list');
echo $html;
}
public function following($data = NULL)
{
$mainframe = Factory::getApplication();
$jinput = $mainframe->input;
$document = Factory::getDocument();
$my = CFactory::getUser();
$userid = $jinput->get('userid', $my->id, 'INT');
$user = CFactory::getUser($userid);
$followers = CFactory::getModel('followers');
$sorted = $jinput->get->get('sort', 'latest', 'STRING');
$filter = $jinput->getWord('filter', 'all');
$rows = $followers->getFollowing($userid, $sorted, true, $filter);
$isMine = (($userid == $my->id) && ($my->id != 0));
$this->attachMiniHeaderUser($user->id);
$this->addPathway(Text::_('COM_COMMUNITY_PROFILE'), CRoute::_('index.php?option=com_community&view=profile&userid=' . $user->id));
if ($my->id == $userid) {
$this->addPathway(Text::_('COM_COMMUNITY_FOLLOWING'));
} else {
$this->addPathway(Text::sprintf('COM_COMMUNITY_FRIEND_FOLLOWING', $user->getDisplayName()));
}
// Check if friend is banned
$blockModel = CFactory::getModel('block');
$resultRows = array();
foreach ($rows as $row) {
$user = CFactory::getUser($row->id);
$obj = clone($row);
$obj->profileLink = CUrlHelper::userLink($row->id);
$obj->isBlocked = $blockModel->getBlockStatus($user->id, $my->id);
$resultRows[] = $obj;
}
unset($rows);
$pagination = $followers->getPagination();
$tmpl = new CTemplate();
$html = $tmpl->set('isMine', $isMine)
->set('userid', $userid)
->setRef('my', $my)
->setRef('following', $resultRows)
->set('config', CFactory::getConfig())
->set('pagination', $pagination)
->fetch('followers/following');
echo $html;
}
}
}