From 386cbf27aa42980ad46322ba59f0ae550a2b9ac7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 13 Dec 2005 06:52:32 +0100 Subject: combined article display mode (option COMBINED_DISPLAY_MODE), remove xml feed output --- backend.php | 163 +++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 90 insertions(+), 73 deletions(-) (limited to 'backend.php') diff --git a/backend.php b/backend.php index ec662d818..97b5c5197 100644 --- a/backend.php +++ b/backend.php @@ -803,11 +803,6 @@ $view_mode = $_GET["view"]; $addheader = $_GET["addheader"]; $limit = $_GET["limit"]; - $omode = $_GET["omode"]; - - if ($omode == "xml") { - header("Content-Type: application/xml"); - } if (!$feed) { return; @@ -1050,6 +1045,8 @@ if ($feed < -10) error_reporting (0); + print "
"; + if (sprintf("%d", $feed) != 0) { if ($feed > 0) { @@ -1058,11 +1055,11 @@ $feed_kind = "Labels"; } - if (!$vfeed_query_part) { - $content_query_part = "SUBSTRING(content,1,300) as content_preview,"; - } else { - $content_query_part = ""; - } +// if (!$vfeed_query_part) { + $content_query_part = "content as content_preview,"; +// } else { +// $content_query_part = ""; +// } $result = db_query($link, "SELECT id,title, @@ -1109,55 +1106,64 @@ } if (!$result) { - if ($omode != "xml") { - print "
- Could not display feed (query failed). Please check label match syntax or local configuration.
"; - return; - } else { - print ""; - - } + print "
+ Could not display feed (query failed). Please check label match syntax or local configuration.
"; + return; } if (db_num_rows($result) > 0) { - if ($omode != "xml") { + print ""; + + if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { - print "
"; - print ""; - - print ""; - print "
Select: - All, - Unread, - None -    - Toggle: Unread, - Starred"; - + All, + Unread, + None +    + Toggle: Unread, + Starred"; + print ""; - - if ($feed_site_url) { - print "$feed_title"; - } else { - print $feed_title; - } - + + } else { + + print " + Select: + All, + Unread, + None +    + Toggle: Unread, + Starred"; + print "
"; + + + } + + print ""; + if ($feed_site_url) { + print "$feed_title"; + } else { + print $feed_title; + } + + print ""; + print ""; + + if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { print ""; - - } else { - print ""; } - + $lnum = 0; error_reporting (DEFAULT_ERROR_LEVEL); @@ -1184,9 +1190,9 @@ if ($line["unread"] == "t" || $line["unread"] == "1") { $class .= "Unread"; ++$num_unread; - $is_unread = 'true'; + $is_unread = true; } else { - $is_unread = 'false'; + $is_unread = false; } if ($line["marked"] == "t" || $line["marked"] == "1") { @@ -1212,10 +1218,9 @@ 200); } - if ($omode != "xml") { + if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { print ""; - // onclick=\"javascript:view($id,$feed_id)\"> print ""; @@ -1252,46 +1257,58 @@ print ""; } else { + + if ($is_unread) { + $add_class = "Unread"; + } else { + $add_class = ""; + } + + print "
"; + + print "
"; - print ""; - print "<![CDATA[" . $line["title"] . "]]>"; - print "" . $line["link"] . ""; - print "$updated_fmt"; - if ($content_preview) { - print ""; - } + print "
$updated_fmt
"; + + print "".$line["title"].""; - if ($line["feed_title"]) { - print ""; + if ($line["feed_title"]) { + print " (".$line["feed_title"].")"; } - print "
"; - } - + print "
"; + + print "
" . $line["content_preview"] . "
"; + + print "
$marked_pic
+
+
"; + + print "
"; + + } ++$lnum; } - if ($omode != "xml") { + if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { print "
$update_pic
"; - } else { - print ""; } } else { print "
No articles found.
"; } - if ($omode != "xml") { + print "
"; - print ""; + print ""; - if ($addheader) { - print ""; - } + if ($addheader) { + print ""; } } -- cgit v1.2.3-54-g00ecf