Skip to content
Snippets Groups Projects
Commit 7e2449a8 authored by Oliver's avatar Oliver
Browse files

Bugfixes

parent 02e69e9a
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ class RSSFeed implements iWidget
private $zeilen;
public function __construct($width, $height){
$this->zeilen = $height / 55;
$this->zeilen = $height / 64;
//var_dump($this->zeilen); die();
}
......@@ -25,7 +25,7 @@ class RSSFeed implements iWidget
}
private function getRssFeed($url){
$output = '';
$output = '<div class="box">';
$counter = 0;
define('MAGPIE_CACHE_DIR', 'cache');
define('MAGPIE_CACHE_AGE', '60');
......@@ -34,18 +34,21 @@ class RSSFeed implements iWidget
$num_items = 10;
$rss = fetch_rss( $url );
$items = array_slice($rss->items, 0,$num_items);
$output .= "<img style=\"vertical-align: middle; width: 40px; height: 40px;\" src=\"widgets/RSSFeed/png/01_12.png\">&nbsp;<span style=\"color: white\">".$rss->channel['title']."</span><br /><br />";
$output .= "<img style=\"vertical-align: middle; width: 40px; height: 40px;\" src=\"widgets/RSSFeed/png/01_12.png\">&nbsp;".$rss->channel['title']."</h1><br /><br />";
}
$output .= "<ul id='feed'>";
foreach ($items as $item){
$href = $item['link'];
$title = $item['title'];
$output .= "<li><span style=\"font-size: 14px; color: #FFFFFF;\"><img align=\"bottom\" style=\"width: 20px; height: 20px;\" src=\"widgets/RSSFeed/png/".$this->getImage()."\" />&nbsp;$title</span></li>";
// Fix fuer die Warpzone
$title = str_replace('?n','\'n', $title);
$title = str_replace('n?','n\'', $title);
$output .= "<li><img align=\"bottom\" style=\"width: 20px; height: 20px;\" src=\"widgets/RSSFeed/png/".$this->getImage()."\" /><div><h2>$title</h2></div></li>";
if($counter > $this->zeilen) break;
$counter++;
}
$output .= "</ul>";
$output .= "</ul></div>";
return $output;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment