diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-21 02:36:32 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-21 02:36:32 +0000 |
commit | a19a4729b55ac72d487def1bc5da9f427c084ba9 (patch) | |
tree | 1fb0fa1c05a40666628dd17578e2269ff1995aa4 /core | |
parent | 78ce8615f3047e7f25d3d1642a7ff9713695705b (diff) |
Implement the 'Project News' block with actual news from GMC.. woot!
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> - - - |