Elgg  Version 2.3
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 datepicker title
Definition: admin.css.php:662
if(!$site) if(!($site instanceof ElggSite)) $site description
$poster_name
elgg echo
Translates a string.
Definition: languages.js:48
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:336
elgg item
Definition: admin.css.php:441
$annotation
$pubdate