From 4bfe3b4341006fe3b78cb597cfa091cd77e61b65 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 30 Mar 2008 06:49:28 +0100 Subject: [PATCH] mobile: add view mode selection dropbox --- mobile/functions.php | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/mobile/functions.php b/mobile/functions.php index 99afe10c..fe9dab4e 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -317,7 +317,16 @@ $subop = $_GET["subop"]; $catchup_op = $_GET["catchup_op"]; - if (!$view_mode) $view_mode = "Adaptive"; + if (!$view_mode) { + if ($_SESSION["mobile:viewmode"]) { + $view_mode = $_SESSION["mobile:viewmode"]; + } else { + $view_mode = "adaptive"; + } + } + + $_SESSION["mobile:viewmode"] = $view_mode; + if (!$limit) $limit = 30; if (!$feed) $feed = 0; @@ -418,12 +427,37 @@ print "Back, "; print "Search, "; print "Update"; + # print "Mark as read: "; # print "Page, "; # print "Feed"; print ")"; - + + print " " . __('View:'); + + print "
"; + + /* print ""; */ + + $sel_values = array( + "adaptive" => __("Adaptive"), + "all_articles" => __("All Articles"), + "unread" => __("Unread"), + "marked" => __("Starred")); + + print_select_hash("viewmode", $view_mode, $sel_values); + + print " + + "; + print "
"; + print ""; if (db_num_rows($result) > 0) { -- 2.39.5