diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/helpers/core_block.php | 1 | ||||
-rw-r--r-- | core/views/admin_block_news.html.php | 14 |
2 files changed, 9 insertions, 6 deletions
diff --git a/core/helpers/core_block.php b/core/helpers/core_block.php index 79fc0bf4..defde6ce 100644 --- a/core/helpers/core_block.php +++ b/core/helpers/core_block.php @@ -79,6 +79,7 @@ class core_block_Core { $block->id = "gProjectNews"; $block->title = _("Gallery Project News"); $block->content = new View("admin_block_news.html"); + $block->content->feed = feed::parse("http://gallery.menalto.com/node/feed", 3); $blocks[] = $block; return implode("\n", $blocks); diff --git a/core/views/admin_block_news.html.php b/core/views/admin_block_news.html.php index 963a8cbd..e75a40b4 100644 --- a/core/views/admin_block_news.html.php +++ b/core/views/admin_block_news.html.php @@ -1,9 +1,11 @@ <? defined("SYSPATH") or die("No direct script access."); ?> <ul> - <li>10-Apr <a href="#">Gallery 3.1 released!</a></li> - <li>26-Feb <a href="#">New theme tutorials now available</a></li> - <li>4-Feb <a href="#">Gallery 3.0 released!</a></li> + <? foreach ($feed as $entry): ?> + <li> + <a href="<?= $entry["link"] ?>"><?= $entry["title"] ?></a> + <p> + <?= text::limit_words(strip_tags($entry["description"]), 25); ?> + </p> + </li> + <? endforeach ?> </ul> - - - |