aboutsummaryrefslogtreecommitdiff
path: root/views/rss/object
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-20 14:32:40 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-20 14:32:40 +0000
commit69aa38ac22767d458399b33a7deccf410ee15f25 (patch)
tree0e31651934141d67bbce024a82480a1f07a22488 /views/rss/object
parent25bf2850a98d3f5784df9c998c906a118708c0be (diff)
downloadelgg-69aa38ac22767d458399b33a7deccf410ee15f25.tar.gz
elgg-69aa38ac22767d458399b33a7deccf410ee15f25.tar.bz2
Updating RSS views to allow for object creator and geolocation.
git-svn-id: http://code.elgg.org/elgg/trunk@6110 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/rss/object')
-rw-r--r--views/rss/object/creator.php8
-rw-r--r--views/rss/object/default.php18
-rw-r--r--views/rss/object/georss.php10
3 files changed, 20 insertions, 16 deletions
diff --git a/views/rss/object/creator.php b/views/rss/object/creator.php
new file mode 100644
index 000000000..2bc6fd57d
--- /dev/null
+++ b/views/rss/object/creator.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ *
+ */
+
+if ($owner = $vars['entity']->getOwnerEntity()) {
+ echo "<dc:creator>{$owner->name}</dc:creator>";
+}
diff --git a/views/rss/object/default.php b/views/rss/object/default.php
index 7b1ab10bc..c7ff172f7 100644
--- a/views/rss/object/default.php
+++ b/views/rss/object/default.php
@@ -20,22 +20,8 @@ if (empty($title)) {
$permalink = htmlspecialchars($vars['entity']->getURL());
$pubdate = date('r', $vars['entity']->time_created);
-$creator = '';
-if ($owner = $vars['entity']->getOwnerEntity()) {
- $creator = "<dc:creator>{$owner->name}</dc:creator>";
-}
-
-$georss = '';
-if (
- ($vars['entity'] instanceof Locatable) &&
- ($vars['entity']->getLongitude()) &&
- ($vars['entity']->getLatitude())
-) {
- $latitude = $vars['entity']->getLatitude();
- $longitude = $vars['entity']->getLongitude();
- $georss = "<georss:point>$latitude $longitude</georss:point>";
-}
-
+$creator = elgg_view('object/creator', $vars);
+$georss = elgg_view('object/georss', $vars);
$extension = elgg_view('extensions/item');
$item = <<<__HTML
diff --git a/views/rss/object/georss.php b/views/rss/object/georss.php
new file mode 100644
index 000000000..8aa027519
--- /dev/null
+++ b/views/rss/object/georss.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ *
+ */
+
+if (($vars['entity'] instanceof Locatable) &&
+ ($latitude = $vars['entity']->getLongitude()) && ($longitude = $vars['entity']->getLatitude())
+) {
+ echo "<georss:point>$latitude $longitude</georss:point>";
+} \ No newline at end of file