aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-05-14 18:49:25 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-05-14 18:49:25 +0000
commit47340a14348eb56725c58388d5c4f5134551e827 (patch)
treee6e56ce46be30856008c7b0231e4c7108291fff0
parent5a2ff4a25cf57cdc62c2847df5197f4d5ef9cc6b (diff)
downloadelgg-47340a14348eb56725c58388d5c4f5134551e827.tar.gz
elgg-47340a14348eb56725c58388d5c4f5134551e827.tar.bz2
Closes #646: GeoRSS support added to Locatable objects with coordinates on RSS feeds
git-svn-id: https://code.elgg.org/elgg/trunk@3292 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--views/rss/annotation/default.php11
-rw-r--r--views/rss/group/default.php11
-rw-r--r--views/rss/object/default.php11
-rw-r--r--views/rss/pageshells/pageshell.php2
-rw-r--r--views/rss/user/default.php11
5 files changed, 45 insertions, 1 deletions
diff --git a/views/rss/annotation/default.php b/views/rss/annotation/default.php
index 6d8cb8812..718a6b5e3 100644
--- a/views/rss/annotation/default.php
+++ b/views/rss/annotation/default.php
@@ -35,5 +35,16 @@
<?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'); ?>
</item>
diff --git a/views/rss/group/default.php b/views/rss/group/default.php
index 2905e0a82..24030b8e7 100644
--- a/views/rss/group/default.php
+++ b/views/rss/group/default.php
@@ -28,5 +28,16 @@
<?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'); ?>
</item>
diff --git a/views/rss/object/default.php b/views/rss/object/default.php
index d1df921a6..42fb4b4b9 100644
--- a/views/rss/object/default.php
+++ b/views/rss/object/default.php
@@ -36,5 +36,16 @@
<?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'); ?>
</item>
diff --git a/views/rss/pageshells/pageshell.php b/views/rss/pageshells/pageshell.php
index de0327968..b6f068ff0 100644
--- a/views/rss/pageshells/pageshell.php
+++ b/views/rss/pageshells/pageshell.php
@@ -32,7 +32,7 @@
?>
-<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" <?php echo elgg_view('extensions/xmlns'); ?> >
+<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" <?php echo elgg_view('extensions/xmlns'); ?> >
<channel xml:base=''>
<title><![CDATA[<?php echo $title; ?>]]></title>
<link><?php echo htmlentities($url); ?></link>
diff --git a/views/rss/user/default.php b/views/rss/user/default.php
index 36d5555fe..317ff4724 100644
--- a/views/rss/user/default.php
+++ b/views/rss/user/default.php
@@ -19,5 +19,16 @@
<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'); ?>
</item>