aboutsummaryrefslogtreecommitdiff
path: root/views/rss
diff options
context:
space:
mode:
Diffstat (limited to 'views/rss')
-rw-r--r--views/rss/annotation/default.php80
-rw-r--r--views/rss/canvas/default.php32
-rw-r--r--views/rss/group/default.php70
-rw-r--r--views/rss/object/default.php83
-rw-r--r--views/rss/page_elements/contentwrapper.php10
-rw-r--r--views/rss/pageshells/pageshell.php64
-rw-r--r--views/rss/river/item/list.php50
-rw-r--r--views/rss/search/entity_list.php17
-rw-r--r--views/rss/user/default.php57
9 files changed, 225 insertions, 238 deletions
diff --git a/views/rss/annotation/default.php b/views/rss/annotation/default.php
index 1433ba9b0..8ff34b7fa 100644
--- a/views/rss/annotation/default.php
+++ b/views/rss/annotation/default.php
@@ -1,50 +1,46 @@
<?php
+/**
+ * Elgg generic comment
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ */
- /**
- * Elgg generic comment
- *
- * @package Elgg
- * @subpackage Core
+$vars['entity'] = get_entity($vars['annotation']->entity_guid);
+$title = substr($vars['annotation']->value, 0, 32);
+if (strlen($vars['annotation']->value) > 32) {
+ $title .= " ...";
+}
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- */
-
-
- $vars['entity'] = get_entity($vars['annotation']->entity_guid);
- $title = substr($vars['annotation']->value,0,32);
- if (strlen($vars['annotation']->value) > 32)
- $title .= " ...";
-
?>
<item>
- <guid isPermaLink='true'><?php echo $vars['entity']->getURL(); ?>#<?php echo $vars['annotation']->id; ?></guid>
- <pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate>
- <link><?php echo $vars['entity']->getURL(); ?>#<?php echo $vars['annotation']->id; ?></link>
- <title><![CDATA[<?php echo $title; ?>]]></title>
- <description><![CDATA[<?php echo (autop($vars['annotation']->value)); ?>]]></description>
- <?php
- $owner = get_entity($vars['entity']->owner);
- if ($owner)
- {
+ <guid isPermaLink='true'><?php echo $vars['entity']->getURL(); ?>#<?php echo $vars['annotation']->id; ?></guid>
+ <pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate>
+ <link><?php echo $vars['entity']->getURL(); ?>#<?php echo $vars['annotation']->id; ?></link>
+ <title><![CDATA[<?php echo $title; ?>]]></title>
+ <description><![CDATA[<?php echo (autop($vars['annotation']->value)); ?>]]></description>
+ <?php
+ $owner = get_entity($vars['entity']->owner);
+ if ($owner) {
?>
- <dc:creator><?php echo $owner->name; ?></dc:creator>
+ <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'); ?>
- </item>
+ }
+ ?>
+ <?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> \ No newline at end of file
diff --git a/views/rss/canvas/default.php b/views/rss/canvas/default.php
index a5c30fe52..0cfa8b49a 100644
--- a/views/rss/canvas/default.php
+++ b/views/rss/canvas/default.php
@@ -1,21 +1,15 @@
<?php
-
- /**
- * Elgg default layout
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- */
-
- for ($i = 1; $i < 8; $i++) {
-
- if (isset($vars["area{$i}"]))
- echo $vars["area{$i}"];
-
+/**
+ * Elgg default layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+for ($i = 1; $i < 8; $i++) {
+ if (isset($vars["area{$i}"])) {
+ echo $vars["area{$i}"];
}
-
-?> \ No newline at end of file
+} \ No newline at end of file
diff --git a/views/rss/group/default.php b/views/rss/group/default.php
index 6ab14ecce..68247f3ca 100644
--- a/views/rss/group/default.php
+++ b/views/rss/group/default.php
@@ -1,43 +1,39 @@
<?php
-
- /**
- * Elgg default group view
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- */
+/**
+ * Elgg default group view
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
?>
- <item>
- <guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?></guid>
- <pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate>
- <link><?php echo htmlspecialchars($vars['entity']->getURL()); ?></link>
- <title><![CDATA[<?php echo (($vars['entity']->name)); ?>]]></title>
- <description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description>
- <?php
- $owner = $vars['entity']->getOwnerEntity();
- if ($owner)
- {
+<item>
+<guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?></guid>
+<pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate>
+<link><?php echo htmlspecialchars($vars['entity']->getURL()); ?></link>
+<title><![CDATA[<?php echo (($vars['entity']->name)); ?>]]></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>
+<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'); ?>
- </item>
+ }
+?>
+<?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 060e471c4..5d11599dc 100644
--- a/views/rss/object/default.php
+++ b/views/rss/object/default.php
@@ -1,51 +1,48 @@
<?php
+/**
+ * Elgg default object view
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
- /**
- * Elgg default object view
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- */
-
- $title = $vars['entity']->title;
- if (empty($title)) {
- $subtitle = strip_tags($vars['entity']->description);
- $title = substr($subtitle,0,32);
- if (strlen($subtitle) > 32)
- $title .= " ...";
+$title = $vars['entity']->title;
+if (empty($title)) {
+ $subtitle = strip_tags($vars['entity']->description);
+ $title = substr($subtitle,0,32);
+ if (strlen($subtitle) > 32) {
+ $title .= " ...";
}
+}
?>
- <item>
- <guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?></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)
- {
+<item>
+<guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?></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>
+<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'); ?>
- </item>
+ }
+?>
+<?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/page_elements/contentwrapper.php b/views/rss/page_elements/contentwrapper.php
index 15397d552..9d8a1392e 100644
--- a/views/rss/page_elements/contentwrapper.php
+++ b/views/rss/page_elements/contentwrapper.php
@@ -1,5 +1,9 @@
<?php
+/**
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
- echo $vars['body'];
-
-?> \ No newline at end of file
+echo $vars['body']; \ No newline at end of file
diff --git a/views/rss/pageshells/pageshell.php b/views/rss/pageshells/pageshell.php
index 2abb83c5a..6faf85ead 100644
--- a/views/rss/pageshells/pageshell.php
+++ b/views/rss/pageshells/pageshell.php
@@ -1,44 +1,40 @@
<?php
+/**
+ * Elgg RSS output pageshell
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @link http://elgg.org/
+ *
+ */
- /**
- * Elgg RSS output pageshell
- *
- * @package Elgg
- * @subpackage Core
- * @link http://elgg.org/
- *
- */
+header("Content-Type: text/xml");
+echo "<?xml version='1.0'?>\n";
- header("Content-Type: text/xml");
-
- echo "<?xml version='1.0'?>\n";
+// Set title
+if (empty($vars['title'])) {
+ $title = $vars['config']->sitename;
+} else if (empty($vars['config']->sitename)) {
+ $title = $vars['title'];
+} else {
+ $title = $vars['config']->sitename . ": " . $vars['title'];
+}
-
-
- // Set title
- if (empty($vars['title'])) {
- $title = $vars['config']->sitename;
- } else if (empty($vars['config']->sitename)) {
- $title = $vars['title'];
- } else {
- $title = $vars['config']->sitename . ": " . $vars['title'];
- }
-
- // Remove RSS from URL
- $url = str_replace('?view=rss','',full_url());
- $url = str_replace('&view=rss','',full_url());
+// Remove RSS from URL
+$url = str_replace('?view=rss','',full_url());
+$url = str_replace('&view=rss','',full_url());
?>
<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>
- <title><![CDATA[<?php echo $title; ?>]]></title>
- <link><?php echo htmlentities($url); ?></link>
- <?php echo elgg_view('extensions/channel'); ?>
- <?php
+<channel>
+ <title><![CDATA[<?php echo $title; ?>]]></title>
+ <link><?php echo htmlentities($url); ?></link>
+ <?php echo elgg_view('extensions/channel'); ?>
+ <?php
- echo $vars['body'];
-
- ?>
- </channel>
+ echo $vars['body'];
+
+ ?>
+</channel>
</rss> \ No newline at end of file
diff --git a/views/rss/river/item/list.php b/views/rss/river/item/list.php
index c74a99f97..5ac43c544 100644
--- a/views/rss/river/item/list.php
+++ b/views/rss/river/item/list.php
@@ -1,16 +1,20 @@
<?php
+/**
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
- if (isset($vars['items']) && is_array($vars['items'])) {
-
- $i = 0;
- if (!empty($vars['items']))
+if (isset($vars['items']) && is_array($vars['items'])) {
+
+ $i = 0;
+ if (!empty($vars['items'])) {
foreach($vars['items'] as $item) {
-
+
// echo elgg_view_river_item($item);
if (elgg_view_exists($item->view,'default')) {
- $body = elgg_view($item->view,array(
- 'item' => $item
- ),false,false,'default');
+ $body = elgg_view($item->view,array('item' => $item),false,false,'default');
$time = date("r",$item->posted);
if ($entity = get_entity($item->object_guid)) {
$url = htmlspecialchars($entity->getURL());
@@ -18,25 +22,23 @@
$url = $vars['url'];
}
$title = strip_tags($body);
-
-?>
+
+ ?>
<item>
- <guid isPermaLink='true'><?php echo $url; ?></guid>
- <pubDate><?php echo $time; ?></pubDate>
- <link><?php echo $url; ?></link>
- <title><![CDATA[<?php echo $title; ?>]]></title>
- <description><![CDATA[<?php echo (autop($body)); ?>]]></description>
+ <guid isPermaLink='true'><?php echo $url; ?></guid>
+ <pubDate><?php echo $time; ?></pubDate>
+ <link><?php echo $url; ?></link>
+ <title><![CDATA[<?php echo $title; ?>]]></title>
+ <description><![CDATA[<?php echo (autop($body)); ?>]]></description>
</item>
-<?php
-
+ <?php
+
}
-
+
$i++;
- if ($i >= $vars['limit']) break;
-
+ if ($i >= $vars['limit']) {
+ break;
+ }
}
-
}
-
-
-?> \ No newline at end of file
+} \ No newline at end of file
diff --git a/views/rss/search/entity_list.php b/views/rss/search/entity_list.php
index 8864b62da..05e90904f 100644
--- a/views/rss/search/entity_list.php
+++ b/views/rss/search/entity_list.php
@@ -1,9 +1,14 @@
<?php
+/**
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
- $entities = $vars['entities'];
- if (is_array($entities) && sizeof($entities) > 0) {
- foreach($entities as $entity)
- echo elgg_view_entity($entity);
+$entities = $vars['entities'];
+if (is_array($entities) && sizeof($entities) > 0) {
+ foreach($entities as $entity) {
+ echo elgg_view_entity($entity);
}
-
-?> \ No newline at end of file
+} \ No newline at end of file
diff --git a/views/rss/user/default.php b/views/rss/user/default.php
index b3418538a..dd8fb43ed 100644
--- a/views/rss/user/default.php
+++ b/views/rss/user/default.php
@@ -1,34 +1,31 @@
<?php
-
- /**
- * Elgg default user view
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- */
+/**
+ * Elgg default user view
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
?>
- <item>
- <guid isPermaLink='true'><?php echo $vars['entity']->getURL(); ?></guid>
- <pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate>
- <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>
+<item>
+<guid isPermaLink='true'><?php echo $vars['entity']->getURL(); ?></guid>
+<pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate>
+<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>