Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
content.php
Go to the documentation of this file.
1 <?php
6 $num_display = sanitize_int($vars['entity']->num_display, false);
7 // set default value for display number
8 if (!$num_display) {
9  $num_display = 8;
10 }
11 
12 $options = array(
13  'limit' => $num_display,
14  'pagination' => false,
15 );
16 
17 if (elgg_in_context('dashboard')) {
18  if ($vars['entity']->content_type == 'friends') {
19  $options['relationship_guid'] = elgg_get_page_owner_guid();
20  $options['relationship'] = 'friend';
21  }
22 } else {
23  $options['subject_guid'] = elgg_get_page_owner_guid();
24 }
25 
27 if (!$content) {
28  $content = elgg_echo('river:none');
29 }
30 
31 echo $content;
elgg_list_river(array $options=array())
List river items.
Definition: river.php:512
$content
Definition: content.php:26
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_in_context($context)
Check if this context exists anywhere in the stack.
Definition: pageowner.php:241
$num_display
Banned users admin widget.
Definition: content.php:6
$vars['title']
Definition: content.php:19
if(!$num_display) $options
Definition: content.php:12
sanitize_int($int, $signed=true)
Sanitizes an integer for database use.
Definition: database.php:180
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
Definition: pageowner.php:22