diff options
author | cash <cash.costello@gmail.com> | 2011-10-29 15:07:43 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-10-29 15:07:43 -0400 |
commit | 4106d50727d5a56ec1442b16e182fbd9acc6b167 (patch) | |
tree | 461b4ed1050214bdd681b7368ba56d5cb5a4092e /views/rss/user | |
parent | 508000e9e3a49c0f659279ba916bde4a771ed777 (diff) | |
download | elgg-4106d50727d5a56ec1442b16e182fbd9acc6b167.tar.gz elgg-4106d50727d5a56ec1442b16e182fbd9acc6b167.tar.bz2 |
Fixes #3201 updates rss view type for core Elgg
Diffstat (limited to 'views/rss/user')
-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..1500881f8 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'); + +$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; |