diff options
author | jhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6> | 2009-12-20 13:38:08 -0500 |
---|---|---|
committer | jhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6> | 2009-12-20 13:38:08 -0500 |
commit | be4f83cd2a17a0ec05f5bce50c91befaafaa6e0c (patch) | |
tree | 6f20672cf5df66044b3fa9dd71fc3bcdc484abe6 /blocks/rss_agw/index.php | |
parent | 1a619f2638a4f77fb8ea9557edeefb883d8c06f8 (diff) | |
download | bayonetcms-be4f83cd2a17a0ec05f5bce50c91befaafaa6e0c.tar.gz |
Test.
git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@376 c5b2fb0a-d05d-0410-98c8-828840a80ff6
Diffstat (limited to 'blocks/rss_agw/index.php')
-rw-r--r-- | blocks/rss_agw/index.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/blocks/rss_agw/index.php b/blocks/rss_agw/index.php new file mode 100644 index 0000000..83c3ff1 --- /dev/null +++ b/blocks/rss_agw/index.php @@ -0,0 +1,29 @@ +<link rel="stylesheet" type="text/css" href="blocks/rss_agw/style.css" media="screen"/> +<?php + + include 'rssreader.php'; + + $rss = new rss_php; + + $rss->load('http://www.armedglobalwarfare.com/index.php?type=rss;action=.xml;limit=30'); + + $items = $rss->getItems(); #returns all rss items + + $numFeeds = 0; + echo "<div class=\"rss\" >"; + foreach($items as $story){ + if($story['category']=="Tournament Announcements"){ + $numFeeds++; + echo "<a href=\"{$story['link']}\" target=\"_blank\"><span class=\"title\">{$story['title']}</span></a><br /> + <span class=\"date\">{$story['pubDate']}</span><br /> + {$story['description']}<br /><br />"; + } + } + if(!$numFeeds){ + echo "No new updates for this news feed."; + } + echo "</div>"; + // echo "<pre>"; + //print_r($items); + // echo "</pre>"; +?> |