diff options
Diffstat (limited to 'views/rss')
-rw-r--r-- | views/rss/canvas/default.php | 21 | ||||
-rw-r--r-- | views/rss/object/default.php | 29 | ||||
-rw-r--r-- | views/rss/pageshells/pageshell.php | 51 | ||||
-rw-r--r-- | views/rss/user/default.php | 22 |
4 files changed, 123 insertions, 0 deletions
diff --git a/views/rss/canvas/default.php b/views/rss/canvas/default.php new file mode 100644 index 000000000..2d2707918 --- /dev/null +++ b/views/rss/canvas/default.php @@ -0,0 +1,21 @@ +<?php
+
+ /**
+ * Elgg default layout
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @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 diff --git a/views/rss/object/default.php b/views/rss/object/default.php new file mode 100644 index 000000000..7c5fc11d8 --- /dev/null +++ b/views/rss/object/default.php @@ -0,0 +1,29 @@ +<?php
+
+ /**
+ * Elgg default object view
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ $title = $vars['entity']->title;
+ if (empty($title)) {
+ $title = substr($vars['entity']->description,0,32);
+ if (strlen($vars['entity']->description) > 32)
+ $title .= " ...";
+ }
+
+?>
+
+ <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 $title; ?>]]></title>
+ <description><![CDATA[<?php echo (nl2br($vars['entity']->description)); ?>]]></description>
+ </item>
diff --git a/views/rss/pageshells/pageshell.php b/views/rss/pageshells/pageshell.php new file mode 100644 index 000000000..8a34752bc --- /dev/null +++ b/views/rss/pageshells/pageshell.php @@ -0,0 +1,51 @@ +<?php
+
+ /**
+ * Elgg RSS output pageshell
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ *
+ */
+
+ header("Content-Type: text/xml");
+
+ echo "<?xml version='1.0'?>\n";
+
+ if (!$owner = page_owner_entity()) {
+ if (!isloggedin()) {
+ exit;
+ } else {
+ $owner = $vars['user'];
+ }
+ }
+
+ // 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());
+
+?>
+
+<rss version='2.0' xmlns:dc='http://purl.org/dc/elements/1.1/'>
+ <channel xml:base=''>
+ <title><![CDATA[<?php echo $title; ?>]]></title>
+ <link><?php echo $url; ?></link>
+ <?php
+
+ echo $vars['body'];
+
+ ?>
+ </channel>
+</rss>
\ No newline at end of file diff --git a/views/rss/user/default.php b/views/rss/user/default.php new file mode 100644 index 000000000..5d72b30df --- /dev/null +++ b/views/rss/user/default.php @@ -0,0 +1,22 @@ +<?php
+
+ /**
+ * Elgg default user view
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @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 (nl2br($vars['entity']->name)); ?>]]></title>
+ <description><![CDATA[<?php echo (nl2br($vars['entity']->description)); ?>]]></description>
+ </item>
|