Elgg  Version 1.9
body.php
Go to the documentation of this file.
1 <?php
12 $item = $vars['item'];
13 
14 $menu = elgg_view_menu('river', array(
15  'item' => $item,
16  'sort_by' => 'priority',
17  'class' => 'elgg-menu-hz',
18 ));
19 
20 // river item header
22 
23 $summary = elgg_extract('summary', $vars, elgg_view('river/elements/summary', array('item' => $vars['item'])));
24 if ($summary === false) {
25  $subject = $item->getSubjectEntity();
26  $summary = elgg_view('output/url', array(
27  'href' => $subject->getURL(),
28  'text' => $subject->name,
29  'class' => 'elgg-river-subject',
30  'is_trusted' => true,
31  ));
32 }
33 
34 $message = elgg_extract('message', $vars, false);
35 if ($message !== false) {
36  $message = "<div class=\"elgg-river-message\">$message</div>";
37 }
38 
39 $attachments = elgg_extract('attachments', $vars, false);
40 if ($attachments !== false) {
41  $attachments = "<div class=\"elgg-river-attachments clearfix\">$attachments</div>";
42 }
43 
44 $responses = elgg_view('river/elements/responses', $vars);
45 if ($responses) {
46  $responses = "<div class=\"elgg-river-responses\">$responses</div>";
47 }
48 
50 $object = $item->getObjectEntity();
51 $container = $object->getContainerEntity();
52 if ($container instanceof ElggGroup && $container->guid != elgg_get_page_owner_guid()) {
53  $group_link = elgg_view('output/url', array(
54  'href' => $container->getURL(),
55  'text' => $container->name,
56  'is_trusted' => true,
57  ));
58  $group_string = elgg_echo('river:ingroup', array($group_link));
59 }
60 
61 echo <<<RIVER
62 $menu
63 <div class="elgg-river-summary">$summary $group_string <span class="elgg-river-timestamp">$timestamp</span></div>
67 RIVER;
if($attachments!==false) $responses
Definition: body.php:44
$subject
Definition: exceptions.php:25
if($message!==false) $attachments
Definition: body.php:39
$summary
Definition: body.php:23
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:1464
fieldset div
Definition: admin.php:462
elgg_view_menu($menu_name, array $vars=array())
Render a menu.
Definition: views.php:687
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:1126
$container
Definition: body.php:51
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:610
if($responses) $group_string
Definition: body.php:49
$item
Body of river item.
Definition: body.php:12
$menu
Definition: body.php:14
$object
Definition: body.php:50
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:21
if($summary===false) $message
Definition: body.php:34
if(file_exists($welcome)) $vars
Definition: upgrade.php:93