<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('fields:/user/cover/ajax'); class SocialFieldsGroupCover extends SocialFieldsUserCover { public function upload() { // Get the ajax library $ajax = FD::ajax(); $tmp = JRequest::getVar($this->inputName, '', 'FILES'); $file = array(); foreach ($tmp as $k => $v) { $file[$k] = $v['file']; } if (!isset($file['tmp_name']) || empty($file['tmp_name'])) { return $ajax->reject(JText::_('PLG_FIELDS_COVER_VALIDATION_INVALID_IMAGE')); } // Get user access $access = FD::access($this->uid, SOCIAL_TYPE_CLUSTERS); // Check if the filesize is too large
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('fields:/user/datetime/datetime'); class SocialFieldsEventDatetime extends SocialFieldsUserDatetime { }
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); // Extend from user boolean FD::import('fields:/user/boolean/boolean'); class SocialFieldsGroupBoolean extends SocialFieldsUserBoolean { }
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('fields:/user/multitextbox/multitextbox'); class SocialFieldsEventMultitextbox extends SocialFieldsUserMultitextbox { }
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('admin:/includes/group/group'); class SocialUserAppStory extends SocialAppItem { /** * event onLiked on story * * @since 1.0 * @access public * @param object $params A standard object with key / value binding. * * @return none */ public function onAfterLikeSave(&$likes) { if (!$likes->type) { return; } // Set the default element.
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('admin:/includes/fields/dependencies'); FD::import('fields:/event/permalink/helper'); class SocialFieldsEventPermalink extends SocialFieldItem { /** * Displays the field for creation. * * @author Jason Rey <*****@*****.**> * @since 1.3 * @access public * @param array $post The posted data. * @param SocialTableStepSession $session The session table. * @return string The html codes for this field. */ public function onRegister(&$post, &$session) { $value = !empty($post[$this->inputName]) ? $post[$this->inputName] : ''; $error = $session->getErrors($this->inputName);
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); // Include the fields library FD::import('admin:/includes/fields/dependencies'); // Include helper lib require_once dirname(__FILE__) . '/helper.php'; /** * Processes ajax calls for the Joomla_Email field. * * @since 1.0 * @author Jason Rey <*****@*****.**> */ class SocialFieldsUserJoomla_Email extends SocialFieldItem { /** * Determines if the email address is valid. * * @since 1.0 * @access public */
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('admin:/includes/maintenance/dependencies'); class SocialMaintenanceScriptFixPrivacyState extends SocialMaintenanceScript { public static $title = 'Fix privacy state column'; public static $description = 'Update privacy state column to be published by default.'; public function main() { $db = FD::db(); $sql = $db->sql(); // Update all privacy column for the `state` to be published $sql->update('#__social_privacy')->set('state', 1)->set('core', 1); $db->setQuery($sql); $db->query(); return true; } }
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('fields:/user/file/file'); /** * Field application for File * * @since 1.0 * @author Jason Rey <*****@*****.**> */ class SocialFieldsGroupFile extends SocialFieldsUserFile { }
/** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); // Include the fields library FD::import('admin:/includes/fields/dependencies'); // Include helper file. FD::import('fields:/user/joomla_username/helper'); /** * Processes ajax calls for the Joomla_Username field. * * @since 1.0 * @author Jason Rey <*****@*****.**> */ class SocialFieldsUserJoomla_Username extends SocialFieldItem { /** * Validates the username. * * @since 1.0 * @access public * @param null * @return JSON A jsong encoded string.
/** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); // Include the fields library FD::import('admin:/includes/fields/dependencies'); // Include helper file. FD::import('fields:/user/permalink/helper'); /** * Field application for Gender * * @since 1.0 * @author Jason Rey <*****@*****.**> */ class SocialFieldsUserPermalink extends SocialFieldItem { /** * Saves the permalink * * @since 1.0 * @access public * @param string * @return
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); // Include helper file. FD::import('fields:/user/address/helper'); /** * Profile view for Notes app. * * @since 1.0 * @access public */ class AddressFieldWidgetsProfile { public function profileHeaderB($key, $user, $field) { // Get the data $data = $field->data; if (!$data) { return; } $my = FD::user();
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('admin:/includes/location/provider'); class SocialLocationProvidersPlaces extends SocialLocationProviders { protected $queries = array('location' => '', 'radius' => 800, 'key' => '', 'query' => '', 'keyword' => ''); public function __construct() { $key = FD::config()->get('location.places.api'); if (empty($key)) { return $this->setError(JText::_('COM_EASYSOCIAL_LOCATION_PROVIDERS_PLACES_MISSING_APIKEY')); } $this->setQuery('key', $key); } public function setCoordinates($lat, $lng) { return $this->setQuery('location', $lat . ',' . $lng); } public function setSearch($search = '') {
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('admin:/includes/themes/themes'); class SocialRepostHelperStream { private $title = null; private $content = null; public function __construct($uid, $group, $element) { $stream = FD::stream(); $data = $stream->getItem($uid); $item = $data[0]; $this->title = $item->title; $this->content = $item->content; if (isset($item->preview) && $item->preview) { $this->content = $item->preview; } } public function getTitle() {
* @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); // Load triggers for fields. FD::import('admin:/includes/fields/triggers'); // Load handlers for triggers FD::import('admin:/includes/fields/handlers'); // Load apps dependencies. FD::import('admin:/includes/apps/apps'); /** * Responsible to manage the field items including * event triggers. * * @since 1.0 * @author Mark Lee <*****@*****.**> */ class SocialFields { /** * The triggerer object for fields. * @var SocialFieldTriggers */ private $triggerer = null; /**
/** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); // Include the fields library FD::import('admin:/includes/fields/dependencies'); // Include helper lib FD::import('fields:/user/joomla_email/helper'); /** * Field application for Joomla email * * @since 1.0 * @author Jason Rey <*****@*****.**> */ class SocialFieldsUserJoomla_email extends SocialFieldItem { /** * Displays the field input for user when they register their account. * * @since 1.0 * @access public * @param array * @param SocialTableRegistration
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('fields:/user/address/address'); class SocialFieldsGroupAddress extends SocialFieldsUserAddress { }
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('fields:/user/cover/cover'); class SocialFieldsEventCover extends SocialFieldsUserCover { }
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('apps:/event/links/helper'); class SocialEventAppLinks extends SocialAppItem { /** * Responsible to return the favicon object * * @since 1.2 * @access public * @return */ public function getFavIcon() { $obj = new stdClass(); $obj->color = '#5580BE'; $obj->icon = 'ies-link'; $obj->label = 'APP_EVENT_LINKS_STREAM_TOOLTIP'; return $obj; }
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('fields:/user/url/url'); class SocialFieldsEventUrl extends SocialFieldsUserUrl { }
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2015 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('site:/views/views'); class EasySocialViewConversations extends EasySocialSiteView { /** * Handle the output after a reply is posted. */ public function reply($data) { echo FD::json()->encode($data); parent::display(); } }
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('fields:/user/avatar/ajax'); class SocialFieldsEventAvatar extends SocialFieldsUserAvatar { public function upload() { // Get the ajax library $ajax = FD::ajax(); // Get the file $tmp = JRequest::getVar($this->inputName, '', 'FILES'); $file = array(); foreach ($tmp as $k => $v) { $file[$k] = $v['file']; } // Check if it is a valid file if (empty($file['tmp_name'])) { return $ajax->reject(JText::_('PLG_FIELDS_AVATAR_ERROR_INVALID_FILE')); } // Get user access
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); jimport('joomla.application.component.model'); FD::import('admin:/includes/model'); class EasySocialModelConversations extends EasySocialModel { private $data = null; protected $pagination = null; protected $limitstart = null; protected $limit = null; function __construct() { parent::__construct('conversations'); parent::initStates(); } /** * Adds a list of recipients that can see a particular message * * @param int $conversationId * @param int $messageId
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('admin:/tables/cluster'); FD::import('admin:/includes/indexer/indexer'); /** * Object mapping for `#__social_clusters` table. * * @author Mark Lee <*****@*****.**> * @since 1.2 */ class SocialTableGroup extends SocialTableCluster implements ISocialIndexerTable { /** * Retrieves the name of the group * * @since 1.0 * @access public * @return string The group's title */ public function getName()
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('admin:/tables/table'); /** * Temporary table to store temporary data. * * @since 1.0 * @author Jason Rey <*****@*****.**> */ class SocialTableTmp extends SocialTable { /** * The table id. * @var int */ public $id = null; /** * The unique id of temporary data. * @var int */
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); // Include the fields library FD::import('fields:/user/textarea/textarea'); class SocialFieldsUserHeadline extends SocialFieldsUserTextarea { }
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); // Import parent controller FD::import('site:/controllers/controller'); class EasySocialControllerFollowers extends EasySocialController { protected $app = null; /** * Suggest a list of friend names for a user. * * @since 1.0 * @access public * @param null * */ public function filter() { // Check for valid tokens. FD::checkToken(); // Check for valid user.
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); FD::import('admin:/controllers/controller'); class EasySocialControllerEasySocial extends EasySocialController { /** * Checks to see if there are any new columns that are added to the site * * @since 1.0 * @access public * @param string * @return */ public function sync() { // FD::checkToken(); $affected = FD::syncDB(); $view = $this->getCurrentView(); if (!$affected) { $view->setMessage(JText::_('COM_EASYSOCIAL_NO_COLUMNS_TO_UPDATE'));
<?php /** * @package EasySocial * @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved. * @license GNU/GPL, see LICENSE.php * EasySocial 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('Unauthorized Access'); // Include main views file. FD::import('admin:/views/views'); class EasySocialViewLanguages extends EasySocialAdminView { /** * Responds to the ajax calls * * @since 1.0 * @access public */ public function getLanguages($result) { return $this->ajax->resolve($result); } }
/** * Displays the group creation form * * @since 1.0 * @access public * @param string * @return */ public function form($errors = array()) { JToolbarHelper::apply('apply', JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_BUTTON_SAVE'), false, false); JToolbarHelper::save('save', JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_BUTTON_SAVE_AND_CLOSE')); JToolbarHelper::save2new('savenew', JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_BUTTON_SAVE_AND_NEW')); JToolbarHelper::divider(); JToolbarHelper::cancel('cancel', JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_BUTTON_CANCEL')); // Perhaps this is an edited category $id = JRequest::getInt('id'); $group = FD::table('Group'); $group->load($id); // Set page icon. $this->setIcon('ies-users'); // Load front end's language file FD::language()->loadSite(); // Set the structure heading here. if ($group->id) { $this->setHeading($group->get('title')); $this->setDescription(JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_EDIT_GROUP_DESC')); $categoryId = $group->category_id; $group = FD::group($id); } else { $this->setHeading(JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_CREATE_GROUP')); $this->setDescription(JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_CREATE_GROUP_CATEGORY_DESC')); // Get the category $categoryId = JRequest::getInt('category_id'); FD::import('admin:/includes/group/group'); $group = new SocialGroup(); } $category = FD::table('GroupCategory'); $category->load($categoryId); // Get the steps $stepsModel = FD::model('Steps'); $steps = $stepsModel->getSteps($categoryId, SOCIAL_TYPE_CLUSTERS); // Get the fields $lib = FD::fields(); $fieldsModel = FD::model('Fields'); $post = JRequest::get('post'); $args = array(&$post, &$group, &$errors); foreach ($steps as &$step) { if ($group->id) { $step->fields = $fieldsModel->getCustomFields(array('step_id' => $step->id, 'data' => true, 'dataId' => $group->id, 'dataType' => SOCIAL_TYPE_GROUP)); } else { $step->fields = $fieldsModel->getCustomFields(array('step_id' => $step->id)); } // @trigger onAdminEdit if (!empty($step->fields)) { $lib->trigger('onAdminEdit', SOCIAL_FIELDS_GROUP_GROUP, $step->fields, $args); } } $this->set('group', $group); $this->set('steps', $steps); $this->set('category', $category); $model = FD::model('GroupMembers', array('initState' => true)); $members = $model->getItems(array('groupid' => $group->id)); $pagination = $model->getPagination(); $this->set('members', $members); $this->set('ordering', $model->getState('ordering')); $this->set('direction', $model->getState('direction')); $this->set('limit', $model->getState('limit')); $this->set('pagination', $pagination); $activeTab = JRequest::getWord('activeTab', 'profile'); $this->set('activeTab', $activeTab); $this->set('isNew', empty($group->id)); return parent::display('admin/groups/form.group'); }