aboutsummaryrefslogtreecommitdiff
path: root/mod/thewire
diff options
context:
space:
mode:
Diffstat (limited to 'mod/thewire')
-rw-r--r--mod/thewire/languages/en.php1
-rw-r--r--mod/thewire/views/rss/object/thewire.php59
2 files changed, 25 insertions, 35 deletions
diff --git a/mod/thewire/languages/en.php b/mod/thewire/languages/en.php
index 9716fc060..3c83d145f 100644
--- a/mod/thewire/languages/en.php
+++ b/mod/thewire/languages/en.php
@@ -20,6 +20,7 @@ $english = array(
'thewire:noposts' => "No wire posts yet",
'item:object:thewire' => "Wire posts",
'thewire:update' => 'Update',
+ 'thewire:by' => 'Wire post by %s',
'thewire:previous' => "Previous",
'thewire:hide' => "Hide",
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;