Elgg  Version 1.11
body.php
Go to the documentation of this file.
1 <?php
12 $item = $vars['item'];
13 /* @var ElggRiverItem $item */
14 
15 $menu = elgg_view_menu('river', array(
16  'item' => $item,
17  'sort_by' => 'priority',
18  'class' => 'elgg-menu-hz',
19 ));
20 
21 // river item header
23 
24 $summary = elgg_extract('summary', $vars);
25 if ($summary === null) {
26  $summary = elgg_view('river/elements/summary', array(
27  'item' => $vars['item'],
28  ));
29 }
30 
31 if ($summary === false) {
32  $subject = $item->getSubjectEntity();
33  $summary = elgg_view('output/url', array(
34  'href' => $subject->getURL(),
35  'text' => $subject->name,
36  'class' => 'elgg-river-subject',
37  'is_trusted' => true,
38  ));
39 }
40 
41 $message = elgg_extract('message', $vars);
42 if ($message !== null) {
43  $message = "<div class=\"elgg-river-message\">$message</div>";
44 }
45 
46 $attachments = elgg_extract('attachments', $vars);
47 if ($attachments !== null) {
48  $attachments = "<div class=\"elgg-river-attachments clearfix\">$attachments</div>";
49 }
50 
51 $responses = elgg_view('river/elements/responses', $vars);
52 if ($responses) {
53  $responses = "<div class=\"elgg-river-responses\">$responses</div>";
54 }
55 
57 $object = $item->getObjectEntity();
58 $container = $object->getContainerEntity();
59 if ($container instanceof ElggGroup && $container->guid != elgg_get_page_owner_guid()) {
60  $group_link = elgg_view('output/url', array(
61  'href' => $container->getURL(),
62  'text' => $container->name,
63  'is_trusted' => true,
64  ));
65  $group_string = elgg_echo('river:ingroup', array($group_link));
66 }
67 
68 echo <<<RIVER
69 $menu
70 <div class="elgg-river-summary">$summary $group_string <span class="elgg-river-timestamp">$timestamp</span></div>
74 RIVER;
$subject
Definition: exceptions.php:25
$summary
Definition: body.php:24
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1246
fieldset div
Definition: admin.php:470
elgg_view_menu($menu_name, array $vars=array())
Render a menu.
Definition: views.php:692
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_friendly_time($time)
Displays a UNIX timestamp in a friendly way.
Definition: views.php:1146
if($message!==null) $attachments
Definition: body.php:46
$container
Definition: body.php:58
elgg echo
Translates a string.
Definition: languages.js:43
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
ui datepicker td span
Definition: admin.php:634
if($responses) $group_string
Definition: body.php:56
$item
Body of river item.
Definition: body.php:12
$menu
Definition: body.php:15
$object
Definition: body.php:57
if($summary===null) if($summary===false) $message
Definition: body.php:41
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
Definition: pageowner.php:18
$timestamp
Definition: body.php:22
if($attachments!==null) $responses
Definition: body.php:51
if(file_exists($welcome)) $vars
Definition: upgrade.php:93