Elgg  Version 1.9
layout.php
Go to the documentation of this file.
1 <?php
7 $item = $vars['item'];
8 
9 $name = $item->getSubjectEntity()->name;
10 $name = htmlspecialchars($name, ENT_NOQUOTES, 'UTF-8');
11 $title = elgg_echo('river:update', array($name));
12 
13 $timestamp = date('r', $item->getTimePosted());
14 $summary = elgg_view('river/elements/summary', $vars, false, false, 'default');
16 
17 
18 $object = $item->getObjectEntity();
19 if ($object) {
20  $url = htmlspecialchars($object->getURL());
21 } else {
22  $url = elgg_normalize_url('activity');
23 }
24 
26 $domain = htmlspecialchars($site_url['host'], ENT_NOQUOTES, 'UTF-8');
27 
28 $html = <<<__HTML
29  <guid isPermaLink="false">$domain::river::$item->id</guid>
30  <pubDate>$timestamp</pubDate>
31  <link>$url</link>
32  <title><![CDATA[$title]]></title>
33  <description><![CDATA[$body]]></description>
34 __HTML;
35 
36 echo $html;
ui datepicker title
Definition: admin.php:592
$name
Definition: layout.php:9
elgg_normalize_url($url)
Definition: output.php:290
$object
Definition: layout.php:18
$summary
Definition: layout.php:14
$comment description
Definition: save.php:49
elgg parse_url
Parse a URL into its parts.
Definition: elgglib.js:432
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
$url
Definition: exceptions.php:24
$body
Definition: layout.php:15
$item
Layout of a river item.
Definition: layout.php:8
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$timestamp
Definition: layout.php:13
elgg echo
Translates a string.
Definition: languages.js:43
$html
Definition: layout.php:28
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
$title
Definition: layout.php:11
$site_url
Definition: layout.php:25
$domain
Definition: layout.php:26
if(file_exists($welcome)) $vars
Definition: upgrade.php:93