From 69aa38ac22767d458399b33a7deccf410ee15f25 Mon Sep 17 00:00:00 2001 From: nickw Date: Thu, 20 May 2010 14:32:40 +0000 Subject: 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 --- views/rss/object/creator.php | 8 ++++++++ views/rss/object/default.php | 18 ++---------------- views/rss/object/georss.php | 10 ++++++++++ 3 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 views/rss/object/creator.php create mode 100644 views/rss/object/georss.php (limited to 'views/rss/object') 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 @@ +getOwnerEntity()) { + echo "{$owner->name}"; +} 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 = "{$owner->name}"; -} - -$georss = ''; -if ( - ($vars['entity'] instanceof Locatable) && - ($vars['entity']->getLongitude()) && - ($vars['entity']->getLatitude()) -) { - $latitude = $vars['entity']->getLatitude(); - $longitude = $vars['entity']->getLongitude(); - $georss = "$latitude $longitude"; -} - +$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 @@ +getLongitude()) && ($longitude = $vars['entity']->getLatitude()) +) { + echo "$latitude $longitude"; +} \ No newline at end of file -- cgit v1.2.3