From: Andrew Dolgov Date: Mon, 28 Nov 2005 12:54:43 +0000 (+0100) Subject: misc headlines view tweaks X-Git-Tag: schema_feature_freeze_for_1.1~44 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e5a99b885fe7131618f3896b43f776ee9d94d8ba;p=tt-rss.git misc headlines view tweaks --- diff --git a/backend.php b/backend.php index 7ea9bb2f..53e4698a 100644 --- a/backend.php +++ b/backend.php @@ -983,136 +983,133 @@ if (db_num_rows($result) > 0) { - print ""; - - print ""; - - print ""; - print "
- Select: - All, - Unread, - None -    - Toggle: Unread, - Starred"; - - print ""; - - if ($feed_site_url) { - print "$feed_title"; - } else { - print $feed_title; - } - - print "
"; - - } - - print ""; - - - - $lnum = 0; - - error_reporting (DEFAULT_ERROR_LEVEL); - - $num_unread = 0; - - while ($line = db_fetch_assoc($result)) { - - $class = ($lnum % 2) ? "even" : "odd"; - - $id = $line["id"]; - $feed_id = $line["feed_id"]; - - if ($line["last_read"] == "" && - ($line["unread"] != "t" && $line["unread"] != "1")) { - - $update_pic = "\"Updated\""; - } else { - $update_pic = "\"Updated\""; - } - - if ($line["unread"] == "t" || $line["unread"] == "1") { - $class .= "Unread"; - ++$num_unread; - } - - if ($line["marked"] == "t" || $line["marked"] == "1") { - $marked_pic = "\"Reset"; + print "
"; + + print ""; + + print ""; - // onclick=\"javascript:view($id,$feed_id)\"> - - print ""; - - print ""; - - print ""; - - if ($line["feed_title"]) { - print ""; - print ""; - } else { - print ""; + print "
+ Select: + All, + Unread, + None +    + Toggle: Unread, + Starred"; + + print ""; + + if ($feed_site_url) { + print "$feed_title"; } else { - $marked_pic = "\"Set"; + print $feed_title; } - - $content_link = "" . - $line["title"] . ""; - - print "
$update_pic - - $marked_pic$content_link - ".$line["feed_title"].""; - - print "" . - $line["title"]; - - if (get_pref($link, 'SHOW_CONTENT_PREVIEW')) { - - $content_preview = truncate_string(strip_tags($line["content_preview"]), - 101); - - if ($content_preview) { - print " - $content_preview"; + + print "
"; + + + print ""; + + $lnum = 0; + + error_reporting (DEFAULT_ERROR_LEVEL); + + $num_unread = 0; + + while ($line = db_fetch_assoc($result)) { + + $class = ($lnum % 2) ? "even" : "odd"; + + $id = $line["id"]; + $feed_id = $line["feed_id"]; + + if ($line["last_read"] == "" && + ($line["unread"] != "t" && $line["unread"] != "1")) { + + $update_pic = "\"Updated\""; + } else { + $update_pic = "\"Updated\""; + } + + if ($line["unread"] == "t" || $line["unread"] == "1") { + $class .= "Unread"; + ++$num_unread; + } + + if ($line["marked"] == "t" || $line["marked"] == "1") { + $marked_pic = "\"Reset"; + } else { + $marked_pic = "\"Set"; + } + + $content_link = "" . + $line["title"] . ""; + + print ""; + // onclick=\"javascript:view($id,$feed_id)\"> + + print ""; + + print ""; + + print ""; + + if ($line["feed_title"]) { + print ""; + print ""; + } else { + print ""; } - - print ""; - print ""; + + if (get_pref($link, 'HEADLINES_SMART_DATE')) { + $updated_fmt = smart_date_time(strtotime($line["updated"])); + } else { + $short_date = get_pref($link, 'SHORT_DATE_FORMAT'); + $updated_fmt = date($short_date, strtotime($line["updated"])); + } + + print ""; + + print ""; + + ++$lnum; } - - if (get_pref($link, 'HEADLINES_SMART_DATE')) { - $updated_fmt = smart_date_time(strtotime($line["updated"])); - } else { - $short_date = get_pref($link, 'SHORT_DATE_FORMAT'); - $updated_fmt = date($short_date, strtotime($line["updated"])); - } - print ""; - - print ""; + print "
$update_pic + + $marked_pic$content_link + ".$line["feed_title"].""; + + print "" . + $line["title"]; + + if (get_pref($link, 'SHOW_CONTENT_PREVIEW')) { + + $content_preview = truncate_string(strip_tags($line["content_preview"]), + 101); + + if ($content_preview) { + print " - $content_preview"; + } } + + print ""; + print "$updated_fmt 
$updated_fmt 
"; - ++$lnum; + } else { + print "
No articles found.
"; } - if ($lnum == 0) { - print "No articles found."; - } - - print ""; - print "