Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla4/group.php.tar

home/lmsyaran/public_html/j3/plugins/hikashop/group/group.php000064400000016516151157107230020443
0ustar00<?php
/**
 * @package	HikaShop for Joomla!
 * @version	4.4.1
 * @author	hikashop.com
 * @copyright	(C) 2010-2021 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php

class plgHikashopGroup extends JPlugin
{
	function __construct(&$subject, $config) {
		parent::__construct($subject, $config);
	}

	function onProductFormDisplay(&$product,&$html) {
		$subscriptiontype = hikashop_get('type.subscription');
		$type = 'product';
		if(hikaInput::get()->getInt('legacy') != 1 &&
!empty($product->product_type) &&
$product->product_type=='variant'){
			$type = 'variant';
		}
		$html[] = array(
			'name' => 'product_group_after_purchase',
			'label' => 'USER_GROUP_AFTER_PURCHASE',
			'content' =>
$subscriptiontype->display('product_group_after_purchase',@$product->product_group_after_purchase,$type)
		);
	}

	function onHikashopBeforeDisplayView(&$view) {
		$app = JFactory::getApplication();
		if(!hikashop_isClient('administrator'))
			return true;

		$viewName = $view->getName();
	 	$layoutName = $view->getLayout();
		if($viewName != 'checkout' || $layoutName != 'step')
			return true;

		$order = $view->initCart();

		if($this->checkGuest($order))
			return true;

		$sr = explode(',', $view->simplified_registration);
		$remove = null;
		foreach($sr as $k => $r){
			if($r==2) $remove = $k;
		}
		if(!is_null($remove)) unset($sr[$k]);
		$view->simplified_registration = implode(',',$sr);

	}

	function onBeforeCheckoutViewDisplay($layout, &$view) {
		if($layout != 'login')
			return;

		$order = $view->checkoutHelper->getCart();

		$user = JFactory::getUser();
		if(empty($user->guest))
			return true;

		$hkUser = hikashop_loadUser();
		if(empty($hkUser))
			return;

		if($this->checkGuest($order))
			return true;

		$view->options['registration_guest'] = false;
	}

	function onAfterProductUpdate(&$element) {
		$this->_checkProductGuest($element);
	}

	function onAfterProductCreate(&$element) {
		$this->_checkProductGuest($element);
	}

	function _checkProductGuest(&$element) {
		$config = hikashop_config();
		$simplified_registration =  explode(',',
$config->get('simplified_registration'));
		if(array_search(2, $simplified_registration) === false)
			return;
		if(!empty($element->product_group_after_purchase) &&
$element->product_group_after_purchase != 'all' &&
$element->product_group_after_purchase != '') {
			$app = JFactory::getApplication();
			$app->enqueueMessage(JText::_('GUEST_CHECKOUT_NOT_POSSIBLE_WITH_USER_GROUP_AFTER_PURCHASE_FOR_CUSTOMERS'),
'warning');
		}
	}

	function onBeforeUserCreate(&$user,&$do) {
		$app = JFactory::getApplication();
		if(hikashop_isClient('administrator') ||
!empty($user->user_cms_id) || !@$app->guest || !$do)
			return;

		$class = hikashop_get('class.cart');
		$order = $class->loadFullCart();
		$do = $this->checkGuest($order);
	}
	function onBeforeUserUpdate(&$user,&$do) {
		$app = JFactory::getApplication();
		if(hikashop_isClient('administrator') ||
!empty($user->user_cms_id) || !@$app->guest || !$do)
			return;

		$class = hikashop_get('class.cart');
		$order = $class->loadFullCart();
		$do = $this->checkGuest($order);
	}

	function onBeforeOrderCreate(&$order,&$do) {
		if(!isset($order->order_user_id) || !$do)
			return;

		$class = hikashop_get('class.user');
		$user = $class->get($order->order_user_id);
		if(empty($user->user_cms_id)){
			$do = $this->checkGuest($order);
		}
	}

	function checkGuest(&$order) {
		if(isset($order->cart)){
			$obj =& $order->cart;
		}else{
			$obj =& $order;
		}
		if(!isset($obj->products) || !is_array($obj->products))
			return true;
		foreach($obj->products as $product){
			if(!empty($product->product_group_after_purchase) &&
$product->product_group_after_purchase != 'all' &&
$product->product_group_after_purchase != '') {
				$app = JFactory::getApplication();
				$app->enqueueMessage(JText::_('GUEST_CHECKOUT_NOT_POSSIBLE_WITH_USER_GROUP_AFTER_PURCHASE'));
				return false;
			}
		}
		return true;
	}

	function onAfterOrderCreate( &$order,&$send_email) {
		return $this->onAfterOrderUpdate( $order,$send_email);
	}

	function onAfterOrderUpdate(&$order,&$send_email) {
		$config =& hikashop_config();
		$confirmed = $config->get('order_confirmed_status');
		if(!isset($order->order_status))
			return true;
		if(!empty($order->order_type) && $order->order_type !=
'sale')
			return true;

		$app = JFactory::getApplication();
		$db = JFactory::getDBO();

		$class = hikashop_get('class.order');
		$dbOrder = $class->get($order->order_id);
		$class = hikashop_get('class.user');
		$data = $class->get($dbOrder->order_user_id);

		if(empty($data->user_cms_id) &&
!hikashop_isClient('administrator'))
			return true;

		$db->setQuery('SELECT b.*,a.* FROM `#__hikashop_order_product` as
a LEFT JOIN `#__hikashop_product` as b ON a.product_id=b.product_id WHERE
a.order_id = '.(int) $dbOrder->order_id.' AND
b.product_group_after_purchase!=\'\'');
		$allProducts = $db->loadObjectList();

		if(empty($allProducts))
			return true;

		if(empty($data->user_cms_id) &&
hikashop_isClient('administrator')) {
			$app->enqueueMessage('The customer
'.$dbOrder->order_user_id.' does not have a joomla user
account so his group cannot be changed','notice');
			return true;
		}

		if($order->order_status != $confirmed){
			return true;
		}

		jimport('joomla.access.access');
		$userGroups = JAccess::getGroupsByUser($data->user_cms_id, false);
		$user = clone(JFactory::getUser($data->user_cms_id));

		$no_change=true;
		foreach($allProducts as $oneProduct){
			if(hikashop_isAllowed($oneProduct->product_group_after_purchase,$data->user_cms_id)){
				continue;
			}
			$no_change=false;

			$userGroups[] = $oneProduct->product_group_after_purchase;

			if(hikashop_isClient('administrator')){
				$app->enqueueMessage('The user
'.$dbOrder->order_user_id.' is now in the group
'.$oneProduct->product_group_after_purchase);
			}
		}
		if(!$no_change){
			$user->set('groups',$userGroups);
			$user->save();
		}

		if($no_change){
			if(hikashop_isClient('administrator')){
				$app->enqueueMessage('The customer of that order is already in
the good user group','notice');
			}
			return true;
		}else{
			$pluginsClass = hikashop_get('class.plugins');
			$plugin =
$pluginsClass->getByName('hikashop','group');
			$force_logout = @$plugin->params['force_logout'];
			if( empty($force_logout) ){
				return true;
			}
			$conf = JFactory::getConfig();
			$handler = $conf->get('session_handler',
'none');
			if($handler=='database'){
				$db->setQuery('DELETE FROM
'.hikashop_table('session',false).' WHERE client_id=0
AND userid = '.(int)$data->user_cms_id);
				$db->execute();
			}
			if(!hikashop_isClient('administrator')){
				$app->logout( $data->user_cms_id );
			}
		}
	}

	function _updateGroup($user_id,$new_group_id,$remove_group_id=0) {
		$user = clone(JFactory::getUser($user_id));
		jimport('joomla.access.access');
		$userGroups = JAccess::getGroupsByUser($user_id, true);
		$userGroups[] = $new_group_id;
		if(!empty($remove_group_id)){
			$key = array_search($remove_group_id, $userGroups);
			if(is_int($key)){
				unset($userGroups[$key]);
			}
		}
		$user->set('groups',$userGroups);
		$user->save();
	}
}
home/lmsyaran/public_html/libraries/joomla/facebook/group.php000064400000016171151161227240020506
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Group class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/group/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookGroup extends JFacebookObject
{
	/**
	 * Method to read a group. Requires authentication and user_groups or
friends_groups permission for non-public groups.
	 *
	 * @param   string  $group  The group id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getGroup($group)
	{
		return $this->get($group);
	}

	/**
	 * Method to get the group's wall. Requires authentication and
user_groups or friends_groups permission for non-public groups.
	 *
	 * @param   string   $group   The group id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFeed($group, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($group, 'feed', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the group's members. Requires authentication and
user_groups or friends_groups permission for non-public groups.
	 *
	 * @param   string   $group   The group id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getMembers($group, $limit = 0, $offset = 0)
	{
		return $this->getConnection($group, 'members', '',
$limit, $offset);
	}

	/**
	 * Method to get the group's docs. Requires authentication and
user_groups or friends_groups permission for non-public groups.
	 *
	 * @param   string   $group   The group id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getDocs($group, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($group, 'docs', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the groups's picture. Requires authentication and
user_groups or friends_groups permission.
	 *
	 * @param   string  $group  The group id.
	 * @param   string  $type   To request a different photo use square |
small | normal | large.
	 *
	 * @return  string   The URL to the group's picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($group, $type = null)
	{
		if ($type)
		{
			$type = '?type=' . $type;
		}

		return $this->getConnection($group, 'picture', $type);
	}

	/**
	 * Method to post a link on group's wall. Requires authentication and
publish_stream permission.
	 *
	 * @param   string  $group    The group id.
	 * @param   string  $link     Link URL.
	 * @param   string  $message  Link message.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createLink($group, $link, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['link'] = $link;

		if ($message)
		{
			$data['message'] = $message;
		}

		return $this->createConnection($group, 'feed', $data);
	}

	/**
	 * Method to delete a link. Requires authentication.
	 *
	 * @param   mixed  $link  The Link ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLink($link)
	{
		return $this->deleteConnection($link);
	}

	/**
	 * Method to post on group's wall. Message or link parameter is
required. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $group        The group id.
	 * @param   string  $message      Post message.
	 * @param   string  $link         Post URL.
	 * @param   string  $picture      Post thumbnail image (can only be used
if link is specified)
	 * @param   string  $name         Post name (can only be used if link is
specified).
	 * @param   string  $caption      Post caption (can only be used if link
is specified).
	 * @param   string  $description  Post description (can only be used if
link is specified).
	 * @param   array   $actions      Post actions array of objects containing
name and link.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPost($group, $message = null, $link = null, $picture
= null, $name = null, $caption = null,
		$description = null, $actions = null)
	{
		// Set POST request parameters.
		if ($message)
		{
			$data['message'] = $message;
		}

		if ($link)
		{
			$data['link'] = $link;
		}

		if ($name)
		{
			$data['name'] = $name;
		}

		if ($caption)
		{
			$data['caption'] = $caption;
		}

		if ($description)
		{
			$data['description'] = $description;
		}

		if ($actions)
		{
			$data['actions'] = $actions;
		}

		if ($picture)
		{
			$data['picture'] = $picture;
		}

		return $this->createConnection($group, 'feed', $data);
	}

	/**
	 * Method to delete a post. Note: you can only delete the post if it was
created by the current user. Requires authentication.
	 *
	 * @param   string  $post  The Post ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deletePost($post)
	{
		return $this->deleteConnection($post);
	}

	/**
	 * Method to post a status message on behalf of the user on the
group's wall. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $group    The group id.
	 * @param   string  $message  Status message content.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createStatus($group, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($group, 'feed', $data);
	}

	/**
	 * Method to delete a status. Note: you can only delete the status if it
was created by the current user. Requires authentication.
	 *
	 * @param   string  $status  The Status ID.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteStatus($status)
	{
		return $this->deleteConnection($status);
	}
}
home/lmsyaran/public_html/j3/htaccess.back/joomla/facebook/group.php000064400000016171151161420420021535
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Group class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/group/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookGroup extends JFacebookObject
{
	/**
	 * Method to read a group. Requires authentication and user_groups or
friends_groups permission for non-public groups.
	 *
	 * @param   string  $group  The group id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getGroup($group)
	{
		return $this->get($group);
	}

	/**
	 * Method to get the group's wall. Requires authentication and
user_groups or friends_groups permission for non-public groups.
	 *
	 * @param   string   $group   The group id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFeed($group, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($group, 'feed', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the group's members. Requires authentication and
user_groups or friends_groups permission for non-public groups.
	 *
	 * @param   string   $group   The group id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getMembers($group, $limit = 0, $offset = 0)
	{
		return $this->getConnection($group, 'members', '',
$limit, $offset);
	}

	/**
	 * Method to get the group's docs. Requires authentication and
user_groups or friends_groups permission for non-public groups.
	 *
	 * @param   string   $group   The group id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getDocs($group, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($group, 'docs', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the groups's picture. Requires authentication and
user_groups or friends_groups permission.
	 *
	 * @param   string  $group  The group id.
	 * @param   string  $type   To request a different photo use square |
small | normal | large.
	 *
	 * @return  string   The URL to the group's picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($group, $type = null)
	{
		if ($type)
		{
			$type = '?type=' . $type;
		}

		return $this->getConnection($group, 'picture', $type);
	}

	/**
	 * Method to post a link on group's wall. Requires authentication and
publish_stream permission.
	 *
	 * @param   string  $group    The group id.
	 * @param   string  $link     Link URL.
	 * @param   string  $message  Link message.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createLink($group, $link, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['link'] = $link;

		if ($message)
		{
			$data['message'] = $message;
		}

		return $this->createConnection($group, 'feed', $data);
	}

	/**
	 * Method to delete a link. Requires authentication.
	 *
	 * @param   mixed  $link  The Link ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLink($link)
	{
		return $this->deleteConnection($link);
	}

	/**
	 * Method to post on group's wall. Message or link parameter is
required. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $group        The group id.
	 * @param   string  $message      Post message.
	 * @param   string  $link         Post URL.
	 * @param   string  $picture      Post thumbnail image (can only be used
if link is specified)
	 * @param   string  $name         Post name (can only be used if link is
specified).
	 * @param   string  $caption      Post caption (can only be used if link
is specified).
	 * @param   string  $description  Post description (can only be used if
link is specified).
	 * @param   array   $actions      Post actions array of objects containing
name and link.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPost($group, $message = null, $link = null, $picture
= null, $name = null, $caption = null,
		$description = null, $actions = null)
	{
		// Set POST request parameters.
		if ($message)
		{
			$data['message'] = $message;
		}

		if ($link)
		{
			$data['link'] = $link;
		}

		if ($name)
		{
			$data['name'] = $name;
		}

		if ($caption)
		{
			$data['caption'] = $caption;
		}

		if ($description)
		{
			$data['description'] = $description;
		}

		if ($actions)
		{
			$data['actions'] = $actions;
		}

		if ($picture)
		{
			$data['picture'] = $picture;
		}

		return $this->createConnection($group, 'feed', $data);
	}

	/**
	 * Method to delete a post. Note: you can only delete the post if it was
created by the current user. Requires authentication.
	 *
	 * @param   string  $post  The Post ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deletePost($post)
	{
		return $this->deleteConnection($post);
	}

	/**
	 * Method to post a status message on behalf of the user on the
group's wall. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $group    The group id.
	 * @param   string  $message  Status message content.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createStatus($group, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($group, 'feed', $data);
	}

	/**
	 * Method to delete a status. Note: you can only delete the status if it
was created by the current user. Requires authentication.
	 *
	 * @param   string  $status  The Status ID.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteStatus($status)
	{
		return $this->deleteConnection($status);
	}
}
home/lmsyaran/public_html/j3/libraries/joomla/facebook/group.php000064400000016171151162057570021032
0ustar00<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Facebook
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Facebook API Group class for the Joomla Platform.
 *
 * @link        http://developers.facebook.com/docs/reference/api/group/
 * @since       3.2.0
 * @deprecated  4.0  Use the `joomla/facebook` package via Composer instead
 */
class JFacebookGroup extends JFacebookObject
{
	/**
	 * Method to read a group. Requires authentication and user_groups or
friends_groups permission for non-public groups.
	 *
	 * @param   string  $group  The group id.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getGroup($group)
	{
		return $this->get($group);
	}

	/**
	 * Method to get the group's wall. Requires authentication and
user_groups or friends_groups permission for non-public groups.
	 *
	 * @param   string   $group   The group id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getFeed($group, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($group, 'feed', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the group's members. Requires authentication and
user_groups or friends_groups permission for non-public groups.
	 *
	 * @param   string   $group   The group id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getMembers($group, $limit = 0, $offset = 0)
	{
		return $this->getConnection($group, 'members', '',
$limit, $offset);
	}

	/**
	 * Method to get the group's docs. Requires authentication and
user_groups or friends_groups permission for non-public groups.
	 *
	 * @param   string   $group   The group id.
	 * @param   integer  $limit   The number of objects per page.
	 * @param   integer  $offset  The object's number on the page.
	 * @param   string   $until   A unix timestamp or any date accepted by
strtotime.
	 * @param   string   $since   A unix timestamp or any date accepted by
strtotime.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function getDocs($group, $limit = 0, $offset = 0, $until = null,
$since = null)
	{
		return $this->getConnection($group, 'docs', '',
$limit, $offset, $until, $since);
	}

	/**
	 * Method to get the groups's picture. Requires authentication and
user_groups or friends_groups permission.
	 *
	 * @param   string  $group  The group id.
	 * @param   string  $type   To request a different photo use square |
small | normal | large.
	 *
	 * @return  string   The URL to the group's picture.
	 *
	 * @since   3.2.0
	 */
	public function getPicture($group, $type = null)
	{
		if ($type)
		{
			$type = '?type=' . $type;
		}

		return $this->getConnection($group, 'picture', $type);
	}

	/**
	 * Method to post a link on group's wall. Requires authentication and
publish_stream permission.
	 *
	 * @param   string  $group    The group id.
	 * @param   string  $link     Link URL.
	 * @param   string  $message  Link message.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createLink($group, $link, $message = null)
	{
		// Set POST request parameters.
		$data = array();
		$data['link'] = $link;

		if ($message)
		{
			$data['message'] = $message;
		}

		return $this->createConnection($group, 'feed', $data);
	}

	/**
	 * Method to delete a link. Requires authentication.
	 *
	 * @param   mixed  $link  The Link ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteLink($link)
	{
		return $this->deleteConnection($link);
	}

	/**
	 * Method to post on group's wall. Message or link parameter is
required. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $group        The group id.
	 * @param   string  $message      Post message.
	 * @param   string  $link         Post URL.
	 * @param   string  $picture      Post thumbnail image (can only be used
if link is specified)
	 * @param   string  $name         Post name (can only be used if link is
specified).
	 * @param   string  $caption      Post caption (can only be used if link
is specified).
	 * @param   string  $description  Post description (can only be used if
link is specified).
	 * @param   array   $actions      Post actions array of objects containing
name and link.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createPost($group, $message = null, $link = null, $picture
= null, $name = null, $caption = null,
		$description = null, $actions = null)
	{
		// Set POST request parameters.
		if ($message)
		{
			$data['message'] = $message;
		}

		if ($link)
		{
			$data['link'] = $link;
		}

		if ($name)
		{
			$data['name'] = $name;
		}

		if ($caption)
		{
			$data['caption'] = $caption;
		}

		if ($description)
		{
			$data['description'] = $description;
		}

		if ($actions)
		{
			$data['actions'] = $actions;
		}

		if ($picture)
		{
			$data['picture'] = $picture;
		}

		return $this->createConnection($group, 'feed', $data);
	}

	/**
	 * Method to delete a post. Note: you can only delete the post if it was
created by the current user. Requires authentication.
	 *
	 * @param   string  $post  The Post ID.
	 *
	 * @return  boolean   Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deletePost($post)
	{
		return $this->deleteConnection($post);
	}

	/**
	 * Method to post a status message on behalf of the user on the
group's wall. Requires authentication and publish_stream permission.
	 *
	 * @param   string  $group    The group id.
	 * @param   string  $message  Status message content.
	 *
	 * @return  mixed   The decoded JSON response or false if the client is
not authenticated.
	 *
	 * @since   3.2.0
	 */
	public function createStatus($group, $message)
	{
		// Set POST request parameters.
		$data = array();
		$data['message'] = $message;

		return $this->createConnection($group, 'feed', $data);
	}

	/**
	 * Method to delete a status. Note: you can only delete the status if it
was created by the current user. Requires authentication.
	 *
	 * @param   string  $status  The Status ID.
	 *
	 * @return  boolean Returns true if successful, and false otherwise.
	 *
	 * @since   3.2.0
	 */
	public function deleteStatus($status)
	{
		return $this->deleteConnection($status);
	}
}