Cleaning up admin newsfeed
This commit is contained in:
12
lib/ajax.php
12
lib/ajax.php
@@ -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 "";
|
||||||
|
|||||||
6
templates/Sparkle/assets/css/main.css
vendored
6
templates/Sparkle/assets/css/main.css
vendored
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user