From 16da0ce0f606397012c65950b07262fbecb2fc84 Mon Sep 17 00:00:00 2001
From: cash
Date: Sun, 4 Jul 2010 19:39:29 +0000
Subject: brought the simplepie plugin up to Elgg coding standards
---
views/default/settings/simplepie/edit.php | 8 +-
views/default/widgets/feed_reader/edit.php | 119 ++++++++++++++++-------------
views/default/widgets/feed_reader/view.php | 118 ++++++++++++++--------------
3 files changed, 128 insertions(+), 117 deletions(-)
(limited to 'views/default')
diff --git a/views/default/settings/simplepie/edit.php b/views/default/settings/simplepie/edit.php
index ae6cbf9de..4583394c3 100644
--- a/views/default/settings/simplepie/edit.php
+++ b/views/default/settings/simplepie/edit.php
@@ -1,8 +1,8 @@
wwwroot . 'mod/simplepie/sp_compatibility_test.php';
- $permit_url = $CONFIG->wwwroot . 'mod/simplepie/permissions.php';
+global $CONFIG;
+
+$compat_url = $CONFIG->wwwroot . 'mod/simplepie/sp_compatibility_test.php';
+$permit_url = $CONFIG->wwwroot . 'mod/simplepie/permissions.php';
?>
diff --git a/views/default/widgets/feed_reader/edit.php b/views/default/widgets/feed_reader/edit.php
index 5fd987701..77355bfa4 100644
--- a/views/default/widgets/feed_reader/edit.php
+++ b/views/default/widgets/feed_reader/edit.php
@@ -1,55 +1,64 @@
-num_items;
- if (!isset($num_items)) $num_items = 10;
-
- $excerpt = $vars['entity']->excerpt;
- if (!isset($excerpt)) $excerpt = 0;
-
- $post_date = $vars['entity']->post_date;
- if (!isset($post_date)) $post_date = 0;
-
-?>
-
-
-
-
-
-
-
-
-
- 'params[num_items]',
- 'options_values' => array( '3' => '3',
- '5' => '5',
- '8' => '8',
- '10' => '10',
- '12' => '12',
- '15' => '15',
- '20' => '20',
- ),
- 'value' => $num_items
- ));
-?>
-
-
-
- 'params[excerpt]', 'js' => 'id="params[excerpt]"', 'value' => $excerpt ));
- echo "";
- echo ' ' . elgg_echo('simplepie:excerpt');
-?>
-
-
-
- 'params[post_date]', 'js' => 'id="params[post_date]"', 'value' => $post_date ));
- echo "";
- echo ' ' . elgg_echo('simplepie:post_date');
-?>
-
+num_items;
+ if (!isset($num_items)) {
+ $num_items = 10;
+ }
+
+ $excerpt = $vars['entity']->excerpt;
+ if (!isset($excerpt)) {
+ $excerpt = 0;
+ }
+
+ $post_date = $vars['entity']->post_date;
+ if (!isset($post_date)) {
+ $post_date = 0;
+ }
+?>
+
+
+
+
+
+
+
+
+
+ 'params[num_items]',
+ 'options_values' => array( '3' => '3',
+ '5' => '5',
+ '8' => '8',
+ '10' => '10',
+ '12' => '12',
+ '15' => '15',
+ '20' => '20',
+ ),
+ 'value' => $num_items
+ ));
+?>
+
+
+
+ 'params[excerpt]', 'js' => 'id="params[excerpt]"', 'value' => $excerpt ));
+echo "";
+echo ' ' . elgg_echo('simplepie:excerpt');
+?>
+
+
+
+ 'params[post_date]', 'js' => 'id="params[post_date]"', 'value' => $post_date ));
+echo "";
+echo ' ' . elgg_echo('simplepie:post_date');
+?>
+
diff --git a/views/default/widgets/feed_reader/view.php b/views/default/widgets/feed_reader/view.php
index e689d3550..56bf4482d 100644
--- a/views/default/widgets/feed_reader/view.php
+++ b/views/default/widgets/feed_reader/view.php
@@ -1,70 +1,72 @@
pluginspath . '/simplepie/simplepie.inc';
- }
-
- $blog_tags = '
+
' . elgg_echo('simplepie:notset') . '
';
- }
+} else {
+ // display message only to owner
+ if (get_loggedin_userid() == page_owner()) {
+ echo '' . elgg_echo('simplepie:notset') . '
';
+ }
+}
?>
--
cgit v1.2.3