Cleaning up admin newsfeed

This commit is contained in:
BNoiZe
2013-11-15 22:50:54 +01:00
parent c2bae1f25a
commit a431cbcf9e
2 changed files with 11 additions and 7 deletions

View File

@@ -29,16 +29,14 @@ if ($action == "newsfeed") {
$news = simplexml_load_file('http://froxlor.org/feed.rss.php', null, LIBXML_NOCDATA); $news = simplexml_load_file('http://froxlor.org/feed.rss.php', null, LIBXML_NOCDATA);
if ($news !== false) { if ($news !== false) {
$json = array();
for ($i = 0; $i < 3; $i++) { for ($i = 0; $i < 3; $i++) {
$item = $news->channel->item[$i]; $item = $news->channel->item[$i];
$json[] = array(
'title'=> (string)$item->title,
'url'=> (string)$item->link,
'content' => preg_replace("/[\r\n]+/", "", strip_tags($item->description))
);
echo "<div class=\"newsitem\"><a href=\"" . (string)$item->link . "\" target=\"_blank\"><b>" . (string)$item->title . "</b>" . preg_replace("/[\r\n]+/", "", strip_tags($item->description)) . "</a></div>"; $title = (string)$item->title;
$link = (string)$item->link;
$content = preg_replace("/[\r\n]+/", "", strip_tags($item->description));
echo "<div class=\"newsitem\"><a href=\"" . $link . "\" target=\"_blank\"><b>" . $title . "</b>" . $content . "</a></div>";
} }
} else { } else {
echo ""; echo "";

View File

@@ -955,6 +955,12 @@ label.nobr {
.newsitem a { .newsitem a {
color: #333; color: #333;
} }
.newsitem a:hover {
text-decoration: none;
}
.newsitem a:hover b {
text-decoration: underline;
}
.newsitem b { .newsitem b {
margin-right: 15px; margin-right: 15px;
} }