aboutsummaryrefslogtreecommitdiff
path: root/views/default/simplepie/group_module.php
diff options
context:
space:
mode:
authorcapo <capo@riseup.net>2014-01-12 18:55:35 +0100
committercapo <capo@riseup.net>2014-01-12 18:55:35 +0100
commite79633358a5165bb68f6d0e1b8fe855d84cea8cc (patch)
treeaf3c05426eaec1c6aecd983db7e4bc5b5a5a8a16 /views/default/simplepie/group_module.php
parent74a2c0f73100209d1c10259a3f862d3645ab5dbb (diff)
downloadelgg-e79633358a5165bb68f6d0e1b8fe855d84cea8cc.tar.gz
elgg-e79633358a5165bb68f6d0e1b8fe855d84cea8cc.tar.bz2
fix identation
Diffstat (limited to 'views/default/simplepie/group_module.php')
-rw-r--r--views/default/simplepie/group_module.php66
1 files changed, 30 insertions, 36 deletions
diff --git a/views/default/simplepie/group_module.php b/views/default/simplepie/group_module.php
index 17b2dba0c..d9860d65f 100644
--- a/views/default/simplepie/group_module.php
+++ b/views/default/simplepie/group_module.php
@@ -29,68 +29,62 @@ if ($feed_url) {
$excerpt = true;
$post_date = true;
$num_items = 7;
-
$cache_location = elgg_get_data_path() . '/simplepie_cache/';
if (!file_exists($cache_location)) {
mkdir($cache_location, 0777);
}
-
$feed = new SimplePie($feed_url, $cache_location);
-// doubles timeout if going through a proxy
-//$feed->set_timeout(20);
+ // doubles timeout if going through a proxy
+ //$feed->set_timeout(20);
+ // only display errors to profile owner
-
-// only display errors to profile owner
$num_posts_in_feed = $feed->get_item_quantity();
-if (!$num_posts_in_feed) {
- if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) {
- $content .= '<p>' . elgg_echo('simplepie:notfound') . '</p>';
+ if (!$num_posts_in_feed) {
+ if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) {
+ $content .= '<p>' . elgg_echo('simplepie:notfound') . '</p>';
+ }
}
-}
-// don't display more feed items than user requested
+ // don't display more feed items than user requested
if ($num_items > $num_posts_in_feed) {
$num_items = $num_posts_in_feed;
}
$feed_link = elgg_view('output/url', array(
- 'href' => $feed->get_permalink(),
- 'text' => $feed->get_title(),
-));
+ 'href' => $feed->get_permalink(),
+ 'text' => $feed->get_title(),
+ ));
-// need to center
+ // need to center
$content .= "<h2 class=\"simplepie-heading\">$feed_link</h2>";
$content .= '<ul class="simplepie-list">';
foreach ($feed->get_items(0, $num_items) as $item) {
- $item_link = elgg_view('output/url', array(
- 'href' => $item->get_permalink(),
- 'text' => $item->get_title(),
-));
-
-if ($excerpt) {
- $text = strip_tags($item->get_description(true), $allowed_tags);
- $excerpt = elgg_get_excerpt($text);
-}
-
-if ($post_date) {
- $item_date_label = elgg_echo('simplepie:postedon');
- $item_date = $item->get_date('j F Y | g:i a');
- $post_date = "$item_date_label $item_date";
-}
-
- $content .= <<<HTML
-
+ $item_link = elgg_view('output/url', array(
+ 'href' => $item->get_permalink(),
+ 'text' => $item->get_title(),
+ ));
+
+ if ($excerpt) {
+ $text = strip_tags($item->get_description(true), $allowed_tags);
+ $excerpt = elgg_get_excerpt($text);
+ }
+
+ if ($post_date) {
+ $item_date_label = elgg_echo('simplepie:postedon');
+ $item_date = $item->get_date('j F Y | g:i a');
+ $post_date = "$item_date_label $item_date";
+ }
+
+ $content .= <<<HTML
<li class="mbm elgg-item">
<h4 class="mbs">$item_link</h4>
<p class="elgg-subtext">$post_date</p>
<div class="elgg-content">$excerpt</div>
</li>
HTML;
-
- }
+ }
$content .= "</ul>";
-
}
elgg_pop_context();