summaryrefslogtreecommitdiff
path: root/classes/feeds.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-xclasses/feeds.php53
1 files changed, 19 insertions, 34 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index d9c772c9c..6e0f5ace3 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -28,8 +28,6 @@ class Feeds extends Handler_Protected {
$rss_link = htmlspecialchars(get_self_url_prefix() .
"/public.php?op=rss&id=$feed_id$cat_q$search_q");
- $error_class = $error ? "error" : "";
-
$reply .= "<span class='left'>";
$reply .= "<a href=\"#\"
@@ -37,25 +35,20 @@ class Feeds extends Handler_Protected {
onclick=\"App.displayDlg('".__("Show as feed")."','generatedFeed', '$feed_id:$is_cat:$rss_link')\">
<i class='icon-syndicate material-icons'>rss_feed</i></a>";
- $reply .= "<span id='feed_title' class='$error_class'>";
+ $reply .= "<span id='feed_title'>";
if ($feed_site_url) {
- $last_updated = T_sprintf("Last updated: %s",
- $feed_last_updated);
+ $last_updated = T_sprintf("Last updated: %s", $feed_last_updated);
- $target = "target=\"_blank\"";
- $reply .= "<a title=\"$last_updated\" $target href=\"$feed_site_url\">".
+ $reply .= "<a title=\"$last_updated\" target='_blank' href=\"$feed_site_url\">".
truncate_string(strip_tags($feed_title), 30)."</a>";
-
- if ($error) {
- $error = htmlspecialchars($error);
- $reply .= "&nbsp;<img title=\"$error\" src='images/error.png' alt='error' class=\"noborder\">";
- }
-
} else {
$reply .= strip_tags($feed_title);
}
+ if ($error)
+ $reply .= " <i title=\"" . htmlspecialchars($error) . "\" class='material-icons icon-error'>error</i>";
+
$reply .= "</span></span>";
$reply .= "<span class=\"right\">";
@@ -308,18 +301,10 @@ class Feeds extends Handler_Protected {
$score = $line["score"];
- $score_pic = "images/" . get_score_pic($score);
-
- $score_pic = "<img class='score-pic' score='$score' onclick='Article.setScore($id, this)' src=\"$score_pic\"
- title=\"$score\">";
-
- if ($score > 500) {
- $hlc_suffix = "high";
- } else if ($score < -100) {
- $hlc_suffix = "low";
- } else {
- $hlc_suffix = "";
- }
+ $score_pic = "<i class='material-icons icon-score' title='$score'
+ data-score='$score' onclick='Article.setScore($id, this)'>" .
+ get_score_pic($score) . "</i>";
+ $score_class = get_score_class($score);
$entry_author = $line["author"];
@@ -365,7 +350,7 @@ class Feeds extends Handler_Protected {
}
}
- $reply['content'] .= "<div class='hl $class' data-orig-feed-id='$feed_id' data-article-id='$id' id='RROW-$id' $mouseover_attrs>";
+ $reply['content'] .= "<div class='hl $class $score_class' data-orig-feed-id='$feed_id' data-article-id='$id' id='RROW-$id' $mouseover_attrs>";
$reply['content'] .= "<div class='left'>";
@@ -379,8 +364,8 @@ class Feeds extends Handler_Protected {
$reply['content'] .= "</div>";
$reply['content'] .= "<div onclick='return Headlines.click(event, $id)'
- class=\"title\"><span data-article-id=\"$id\" class='hl-content hlMenuAttach $hlc_suffix'>";
- $reply['content'] .= "<a class=\"title $hlc_suffix\"
+ class=\"title\"><span data-article-id=\"$id\" class='hl-content hlMenuAttach'>";
+ $reply['content'] .= "<a class=\"title\"
href=\"" . htmlspecialchars($line["link"]) . "\"
onclick=\"\">" .
truncate_string($line["title"], 200);
@@ -462,7 +447,7 @@ class Feeds extends Handler_Protected {
$content_encoded = htmlspecialchars($line["content"]);
$expanded_class = get_pref("CDM_EXPANDED") ? "expanded" : "expandable";
- $tmp_content = "<div class=\"cdm $expanded_class $hlc_suffix $class\"
+ $tmp_content = "<div class=\"cdm $expanded_class $score_class $class\"
id=\"RROW-$id\" data-content=\"$content_encoded\" data-article-id='$id' data-orig-feed-id='$feed_id' $mouseover_attrs>";
$tmp_content .= "<div class=\"header\">";
@@ -502,8 +487,8 @@ class Feeds extends Handler_Protected {
if (!get_pref("CDM_EXPANDED")) {
$tmp_content .= "<span class='collapse'>
- <img src=\"images/collapse.png\" onclick=\"return Article.cdmUnsetActive(event)\"
- title=\"" . __("Collapse article") . "\"/></span>";
+ <i class=\"material-icons\" onclick=\"return Article.cdmUnsetActive(event)\"
+ title=\"" . __("Collapse article") . "\">remove_circle</i></span>";
if (get_pref('SHOW_CONTENT_PREVIEW')) {
$tmp_content .= "<span class='excerpt'>" . $line["content_preview"] . "</span>";
@@ -1501,17 +1486,17 @@ class Feeds extends Handler_Protected {
return "rss_feed";
break;
case -3:
- return "new_releases";
+ return "whatshot";
break;
case -4:
return "inbox";
break;
case -6:
- return "cached";
+ return "restore";
break;
default:
if ($id < LABEL_BASE_INDEX) {
- return "images/label.png";
+ return "label";
} else {
$icon = self::getIconFile($id);