$fetch = $_GET["fetch"];
+ setcookie("ttrss_icons_url", ICONS_URL);
+
function getAllCounters($link) {
getLabelCounters($link);
getFeedCounters($link);
$count = $line["count"];
$last_error = $line["last_error"];
+ $has_img = is_file(ICONS_DIR . "/$id.ico");
+
if (!$smart_mode || $old_counters[$id] != $count) {
$old_counters[$id] = $count;
$fctrs_modified = true;
} else {
$error_part = "";
}
-
- print "<counter type=\"feed\" id=\"$id\" counter=\"$count\" $error_part/>";
+
+ if ($has_img) {
+ $has_img_part = "hi=\"$has_img\"";
+ } else {
+ $has_img_part = "";
+ }
+
+ print "<counter type=\"feed\" id=\"$id\" counter=\"$count\" $has_img_part $error_part/>";
}
}
AND owner_uid = '$owner_uid') as unread,
(SELECT title FROM ttrss_feed_categories
WHERE id = cat_id) AS category,
- cat_id,
+ cat_id,last_error,
(SELECT collapsed FROM ttrss_feed_categories
WHERE id = cat_id) AS collapsed
FROM ttrss_feeds WHERE owner_uid = '$owner_uid' ORDER BY $order_by_qpart");
}
// $class = ($lnum % 2) ? "even" : "odd";
-
- $class = "feed";
+
+ if ($line["last_error"]) {
+ $class = "error";
+ } else {
+ $class = "feed";
+ }
if ($unread > 0) $class .= "Unread";
var id = reply.childNodes[l].getAttribute("id");
var t = reply.childNodes[l].getAttribute("type");
var ctr = reply.childNodes[l].getAttribute("counter");
+ var error = reply.childNodes[l].getAttribute("error");
+ var has_img = reply.childNodes[l].getAttribute("hi");
if (id == "global-unread") {
parent.global_unread = ctr;
var feedctr = f_document.getElementById("FEEDCTR-" + id);
var feedu = f_document.getElementById("FEEDU-" + id);
var feedr = f_document.getElementById("FEEDR-" + id);
-
+ var feed_img = f_document.getElementById("FIMG-" + id);
+
if (feedctr && feedu && feedr) {
feedu.innerHTML = ctr;
+
+ if (has_img && feed_img) {
+ if (error) {
+// feed_img.src = "images/update_error.png";
+ feedr.className = feedr.className.replace("feed", "error");
+ } else if (id > 0) {
+ feedr.className = feedr.className.replace("error", "feed");
+// if (has_img) {
+// feed_img.src = getCookie("ttrss_icons_url") + "/" + id + ".ico";
+// } else {
+// feed_img.src = "images/blank_icon.gif";
+// }
+ }
+ }
if (ctr > 0) {
feedctr.className = "odd";
function printFeedEntry($feed_id, $class, $feed_title, $unread, $icon_file, $link) {
if (file_exists($icon_file) && filesize($icon_file) > 0) {
- $feed_icon = "<img src=\"$icon_file\">";
+ $feed_icon = "<img id=\"FIMG-$feed_id\" src=\"$icon_file\">";
} else {
- $feed_icon = "<img src=\"images/blank_icon.gif\">";
+ $feed_icon = "<img id=\"FIMG-$feed_id\" src=\"images/blank_icon.gif\">";
}
$feed = "<a href=\"javascript:viewfeed('$feed_id', 0);\">$feed_title</a>";
} */
ul.feedlist li.feedUnread,
+ul.feedlist li.errorUnread,
ul.feedlist li.labelUnread,
ul.feedlist li.virtUnread,
ul.feedlist li.tagUnread {
font-weight : bold;
}
+ul.feedlist li.errorSelected a,
+ul.feedlist li.errorUnread a,
+ul.feedlist li.errorUnreadSelected a {
+ color : #f04040;
+}
ul.feedlist li.feedSelected a,
ul.feedlist li.labelSelected a,
color : #5050aa;
}
-ul.feedlist li.feedUnreadSelected ,
+ul.feedlist li.feedUnreadSelected,
+ul.feedlist li.errorUnreadSelected,
ul.feedlist li.labelUnreadSelected,
ul.feedlist li.virtUnreadSelected,
ul.feedlist li.tagUnreadSelected {