diff options
author | jhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6> | 2009-12-20 18:29:11 -0500 |
---|---|---|
committer | jhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6> | 2009-12-20 18:29:11 -0500 |
commit | be071aeb7565e46c670a6d9486a1f1b8a06971ab (patch) | |
tree | 67a80c2fbea8c20c9ea74c5276378ca50a94e4f5 /blocks/rss_agw | |
parent | 3af9846d4ecc1e0274833740fd21012afe9ef51f (diff) | |
download | bayonetcms-be071aeb7565e46c670a6d9486a1f1b8a06971ab.tar.gz |
Bug fix to modules.php.
git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@381 c5b2fb0a-d05d-0410-98c8-828840a80ff6
Diffstat (limited to 'blocks/rss_agw')
-rw-r--r-- | blocks/rss_agw/index.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/blocks/rss_agw/index.php b/blocks/rss_agw/index.php index 83c3ff1..c811ecc 100644 --- a/blocks/rss_agw/index.php +++ b/blocks/rss_agw/index.php @@ -1,11 +1,17 @@ <link rel="stylesheet" type="text/css" href="blocks/rss_agw/style.css" media="screen"/> <?php +function stripBBCode($text_to_search) { + $pattern = '|[[\/\!]*?[^\[\]]*?]|si'; + $replace = ''; + return preg_replace($pattern, $replace, $text_to_search); +} + include 'rssreader.php'; $rss = new rss_php; - $rss->load('http://www.armedglobalwarfare.com/index.php?type=rss;action=.xml;limit=30'); + $rss->load('http://www.armedglobalwarfare.com/index.php?type=rss;action=.xml;limit=150'); $items = $rss->getItems(); #returns all rss items @@ -14,9 +20,11 @@ foreach($items as $story){ if($story['category']=="Tournament Announcements"){ $numFeeds++; + // $text = $story['description']; + // $text = preg_replace("(\[font(.+?)...)","",$text); 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 />"; + <span class=\"date\">{$story['pubDate']}</span><br />"; + echo "{$text}<br /><br />"; } } if(!$numFeeds){ |