From 57e24c82675e37ea9262e54e30836596caf77e76 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 22 Nov 2010 16:26:00 +0300 Subject: add experimental support for Twitter OAuth and Twitter feeds (bump schema) --- modules/pref-feeds.php | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) (limited to 'modules/pref-feeds.php') diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 2c4503592..df854f35e 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -26,6 +26,14 @@ return; } + if ($subop == "remtwitterinfo") { + + db_query($link, "UPDATE ttrss_users SET twitter_oauth = NULL + WHERE id = " . $_SESSION['uid']); + + return; + } + if ($subop == "getfeedtree") { $root = array(); @@ -345,7 +353,7 @@ # print "" . __('Login:') . ""; - print "
"; @@ -357,6 +365,10 @@ placeHolder=\"".__("Password")."\" value=\"$auth_pass\">"; + print "
+ ".__('Hint: you need to fill in your login information if your feed requires authentication, except for Twitter feeds.')." +
"; + # print ""; print ""; @@ -1231,7 +1243,7 @@ "; print "
- Hint: you can drag feeds and categories around. + ".__('Hint: you can drag feeds and categories around.')."
"; print ""; # feeds pane @@ -1316,6 +1328,32 @@ __('Clear all generated URLs')." "; print ""; #pane + + print "
"; + + $result = db_query($link, "SELECT COUNT(*) AS cid FROM ttrss_users + WHERE twitter_oauth IS NOT NULL AND twitter_oauth != '' AND + id = " . $_SESSION['uid']); + + $is_registered = db_fetch_result($result, 0, "cid") != 0; + + if (!$is_registered) { + print_notice(__('Before you can update your Twitter feeds, you must register this instance of Tiny Tiny RSS with Twitter.com.')); + } else { + print_notice(__('You have been successfully registered with Twitter.com and should be able to access your Twitter feeds.')); + } + + print ""; + + print " "; + + print ""; + + print "
"; + print ""; #container } -- cgit v1.2.3