/** * Returns a human-readable version of the river. * * @param int|array $subject_guid Acting entity to restrict to. Default: all * @param int|array $object_guid Entity being acted on to restrict to. Default: all * @param string $subject_relationship If set to a relationship type, this will use * $subject_guid as the starting point and set * the subjects to be all users this entity has this * relationship with (eg 'friend'). Default: blank * @param string $type The type of entity to restrict to. Default: all * @param string $subtype The subtype of entity to restrict to. Default: all * @param string $action_type The type of river action to restrict to. Default: all * @param int $limit The number of items to retrieve. Default: 20 * @param int $posted_min The minimum time period to look at. Default: none * @param int $posted_max The maximum time period to look at. Default: none * @param bool $pagination Show pagination? * * @return string Human-readable river. * @deprecated 1.8 Use elgg_list_river() */ function elgg_view_river_items($subject_guid = 0, $object_guid = 0, $subject_relationship = '', $type = '', $subtype = '', $action_type = '', $limit = 20, $posted_min = 0, $posted_max = 0, $pagination = true) { elgg_deprecated_notice("elgg_view_river_items deprecated for elgg_list_river", 1.8); $river_items = get_river_items($subject_guid, $object_guid, $subject_relationship, $type, $subtype, $action_type, $limit + 1, $posted_min, $posted_max); // Get input from outside world and sanitise it $offset = (int) get_input('offset', 0); // view them $params = array('items' => $river_items, 'count' => count($river_items), 'offset' => $offset, 'limit' => $limit, 'pagination' => $pagination, 'list-class' => 'elgg-list-river'); return elgg_view('page/components/list', $params); }
/** * Returns a human-readable version of the river. * * @param int|array $subject_guid Acting entity to restrict to. Default: all * @param int|array $object_guid Entity being acted on to restrict to. Default: all * @param string $subject_relationship If set to a relationship type, this will use $subject_guid as the starting point and set the subjects to be all users this entity has this relationship with (eg 'friend'). Default: blank * @param string $type The type of entity to restrict to. Default: all * @param string $subtype The subtype of entity to restrict to. Default: all * @param string $action_type The type of river action to restrict to. Default: all * @param int $limit The number of items to retrieve. Default: 20 * @param int $posted_min The minimum time period to look at. Default: none * @param int $posted_max The maximum time period to look at. Default: none * @return string Human-readable river. */ function elgg_view_river_items($subject_guid = 0, $object_guid = 0, $subject_relationship = '', $type = '', $subtype = '', $action_type = '', $limit = 20, $posted_min = 0, $posted_max = 0, $pagination = true) { // Get input from outside world and sanitise it $offset = (int) get_input('offset', 0); // Get river items, if they exist if ($riveritems = get_river_items($subject_guid, $object_guid, $subject_relationship, $type, $subtype, $action_type, $limit + 1, $offset, $posted_min, $posted_max)) { return elgg_view('river/item/list', array('limit' => $limit, 'offset' => $offset, 'items' => $riveritems, 'pagination' => $pagination)); } return ''; }