Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
generic_comment.php
Go to the documentation of this file.
1 <?php
9 $annotation = $vars['annotation'];
10 
11 $poster = $annotation->getOwnerEntity();
12 $poster_name = htmlspecialchars($poster->name, ENT_NOQUOTES, 'UTF-8');
13 $pubdate = date('r', $annotation->getTimeCreated());
14 $permalink = $annotation->getURL();
15 
16 $title = elgg_echo('generic_comment:title', array($poster_name));
17 
18 $creator = elgg_view('page/components/creator', array('entity' => $annotation));
19 $extensions = elgg_view('extensions/item', $vars);
20 
21 $item = <<<__HTML
22 <item>
23  <guid isPermaLink='true'>$permalink</guid>
24  <pubDate>$pubdate</pubDate>
25  <link>$permalink</link>
26  <title><![CDATA[$title]]></title>
27  <description><![CDATA[{$vars['annotation']->value}]]></description>
29 </item>
30 
31 __HTML;
32 
33 echo $item;
$creator
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$extensions
$permalink
$vars['entity']
ui autocomplete ui menu item
Definition: forms.css.php:250
if(!$site) if(!($site instanceof ElggSite)) $site description
$poster_name
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
$annotation
$pubdate