Elgg  Version 1.11
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 $path = '';
28 if ($site_url['path']) {
29  $path = htmlspecialchars($site_url['path'], ENT_NOQUOTES, 'UTF-8');
30  $path = "::$path";
31 }
32 
33 $html = <<<__HTML
34  <guid isPermaLink="false">$domain$path::river::$item->id</guid>
35  <pubDate>$timestamp</pubDate>
36  <link>$url</link>
37  <title><![CDATA[$title]]></title>
38  <description><![CDATA[$body]]></description>
39 __HTML;
40 
41 echo $html;
ui datepicker title
Definition: admin.php:616
$name
Definition: layout.php:9
elgg_normalize_url($url)
Definition: output.php:311
$object
Definition: layout.php:18
$summary
Definition: layout.php:14
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:1246
if($site_url['path']) $html
Definition: layout.php:33
$url
Definition: exceptions.php:24
$body
Definition: layout.php:15
$item
Layout of a river item.
Definition: layout.php:8
if(!$site) if(!($site instanceof ElggSite)) $site description
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$path
Definition: layout.php:27
$timestamp
Definition: layout.php:13
elgg echo
Translates a string.
Definition: languages.js:43
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