diff options
Diffstat (limited to 'views/rss/user/default.php')
-rw-r--r-- | views/rss/user/default.php | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/views/rss/user/default.php b/views/rss/user/default.php index a8b9d073c..1c7bf75e7 100644 --- a/views/rss/user/default.php +++ b/views/rss/user/default.php @@ -1,29 +1,34 @@ <?php /** - * Elgg default user view + * RSS user view * * @package Elgg * @subpackage Core */ -?> +$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8'); +$pubdate = date('r', $vars['entity']->getTimeCreated()); +$title = htmlspecialchars($vars['entity']->name, ENT_NOQUOTES, 'UTF-8'); +if ($vars['entity']->description) { + $description = autop($vars['entity']->description); +} else { + $description = ''; +} + +$georss = elgg_view('page/components/georss', $vars); +$extension = elgg_view('extensions/item', $vars); + +$item = <<<__HTML <item> -<guid isPermaLink='true'><?php echo $vars['entity']->getURL(); ?></guid> -<pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate> -<link><?php echo $vars['entity']->getURL(); ?></link> -<title><![CDATA[<?php echo (($vars['entity']->name)); ?>]]></title> -<description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description> -<?php - if ( - ($vars['entity'] instanceof Locatable) && - ($vars['entity']->getLongitude()) && - ($vars['entity']->getLatitude()) - ) { - ?> - <georss:point><?php echo $vars['entity']->getLatitude(); ?> <?php echo $vars['entity']->getLongitude(); ?></georss:point> - <?php - } -?> -<?php echo elgg_view('extensions/item'); ?> + <guid isPermaLink="true">$permalink</guid> + <pubDate>$pubdate</pubDate> + <link>$permalink</link> + <title><![CDATA[$title]]></title> + <description><![CDATA[$description]]></description> + $georss$extension </item> + +__HTML; + +echo $item; |