aboutsummaryrefslogtreecommitdiff
path: root/mod/thewire/views
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-03 08:24:19 -0400
committerCash Costello <cash.costello@gmail.com>2011-11-03 08:24:19 -0400
commit7f8b7adeb346c8d07e2da4b72e9f78e8ffcb82b9 (patch)
treeafe696440cc41dc715fa066a92e1c1818b69ddf2 /mod/thewire/views
parent21f67d2117ed460c7d8374c9b42348e2eea2b0f4 (diff)
downloadelgg-7f8b7adeb346c8d07e2da4b72e9f78e8ffcb82b9.tar.gz
elgg-7f8b7adeb346c8d07e2da4b72e9f78e8ffcb82b9.tar.bz2
Refs #4027 updated all rss views except for groups
Diffstat (limited to 'mod/thewire/views')
-rw-r--r--mod/thewire/views/rss/object/thewire.php59
1 files changed, 24 insertions, 35 deletions
diff --git a/mod/thewire/views/rss/object/thewire.php b/mod/thewire/views/rss/object/thewire.php
index 8229f46f1..494c2c8dc 100644
--- a/mod/thewire/views/rss/object/thewire.php
+++ b/mod/thewire/views/rss/object/thewire.php
@@ -2,46 +2,35 @@
/**
* Elgg thewire rss view
*
- * @package Elgg
- * @subpackage Core
+ * @package ElggTheWire
*/
$owner = $vars['entity']->getOwnerEntity();
-if ($owner) {
- $title = elgg_echo('thewire:by', array($owner->name));
-} else {
- $subtitle = strip_tags($vars['entity']->description);
- $title = elgg_get_excerpt($subtitle, 32);
+if (!$owner) {
+ return true;
}
-?>
+$title = elgg_echo('thewire:by', array($owner->name));
+$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8');
+$pubdate = date('r', $vars['entity']->getTimeCreated());
+
+$description = autop($vars['entity']->description);
+
+$creator = elgg_view('page/components/creator', $vars);
+$georss = elgg_view('page/components/georss', $vars);
+$extension = elgg_view('extensions/item', $vars);
+
+$item = <<<__HTML
<item>
-<guid isPermaLink='false'><?php echo $vars['entity']->getGUID(); ?></guid>
-<pubDate><?php echo date("r", $vars['entity']->time_created) ?></pubDate>
-<link><?php echo htmlspecialchars($vars['entity']->getURL()); ?></link>
-<title><![CDATA[<?php echo $title; ?>]]></title>
-<description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description>
-<?php
-$owner = $vars['entity']->getOwnerEntity();
-if ($owner) {
- ?>
- <dc:creator><?php echo $owner->name; ?></dc:creator>
- <?php
-}
-?>
-<?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>
+ $creator$georss$extension
</item>
+
+__HTML;
+
+echo $item;