mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-16 06:25:57 +00:00
feed browser improvements
This commit is contained in:
27
backend.php
27
backend.php
@@ -1309,16 +1309,16 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<div id=\"infoBoxTitle\">Other feeds: Top 50</div>";
|
print "<div id=\"infoBoxTitle\">Other feeds: Top 25</div>";
|
||||||
|
|
||||||
print "<div class=\"infoBoxContents\">";
|
print "<div class=\"infoBoxContents\">";
|
||||||
|
|
||||||
print "<p>Showing top 50 registered feeds, sorted by popularity:</p>";
|
print "<p>Showing top 25 registered feeds, sorted by popularity:</p>";
|
||||||
|
|
||||||
$result = db_query($link, "SELECT feed_url,count(id) AS subscribers
|
$result = db_query($link, "SELECT feed_url,count(id) AS subscribers
|
||||||
FROM ttrss_feeds
|
FROM ttrss_feeds
|
||||||
WHERE auth_login = '' AND auth_pass = '' AND private = false
|
WHERE auth_login = '' AND auth_pass = '' AND private = false
|
||||||
GROUP BY feed_url ORDER BY subscribers DESC LIMIT 50");
|
GROUP BY feed_url ORDER BY subscribers DESC LIMIT 25");
|
||||||
|
|
||||||
print "<ul class='browseFeedList' id='browseFeedList'>";
|
print "<ul class='browseFeedList' id='browseFeedList'>";
|
||||||
|
|
||||||
@@ -1830,7 +1830,7 @@
|
|||||||
|
|
||||||
if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) {
|
if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) {
|
||||||
print " <input type=\"submit\" class=\"button\"
|
print " <input type=\"submit\" class=\"button\"
|
||||||
onclick=\"javascript:browseFeeds()\" value=\"Top 50\">";
|
onclick=\"javascript:browseFeeds()\" value=\"Top 25\">";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</td><td align='right'>
|
print "</td><td align='right'>
|
||||||
@@ -3894,10 +3894,27 @@
|
|||||||
|
|
||||||
print "<p>This panel shows feeds subscribed by other users of this system, just in case you are interested in some of them too.</p>";
|
print "<p>This panel shows feeds subscribed by other users of this system, just in case you are interested in some of them too.</p>";
|
||||||
|
|
||||||
|
$limit = db_escape_string($_GET["limit"]);
|
||||||
|
|
||||||
|
if (!$limit) $limit = 25;
|
||||||
|
|
||||||
$result = db_query($link, "SELECT feed_url,count(id) AS subscribers
|
$result = db_query($link, "SELECT feed_url,count(id) AS subscribers
|
||||||
FROM ttrss_feeds
|
FROM ttrss_feeds
|
||||||
WHERE auth_login = '' AND auth_pass = '' AND private = false
|
WHERE auth_login = '' AND auth_pass = '' AND private = false
|
||||||
GROUP BY feed_url ORDER BY subscribers DESC LIMIT 100");
|
GROUP BY feed_url ORDER BY subscribers DESC LIMIT $limit");
|
||||||
|
|
||||||
|
print "<div style=\"float : right\">
|
||||||
|
Top <select id=\"feedBrowserLimit\">";
|
||||||
|
|
||||||
|
foreach (array(25, 50, 100) as $l) {
|
||||||
|
$issel = ($l == $limit) ? "selected" : "";
|
||||||
|
print "<option $issel>$l</option>";
|
||||||
|
}
|
||||||
|
|
||||||
|
print "</select>
|
||||||
|
<input type=\"submit\" class=\"button\"
|
||||||
|
onclick=\"updateBigFeedBrowser()\" value=\"Show\">
|
||||||
|
</div>";
|
||||||
|
|
||||||
print "<p>Selection:
|
print "<p>Selection:
|
||||||
<input type='submit' class='button' onclick=\"feedBrowserSubscribe()\"
|
<input type='submit' class='button' onclick=\"feedBrowserSubscribe()\"
|
||||||
|
|||||||
16
prefs.js
16
prefs.js
@@ -1363,7 +1363,7 @@ function validatePrefsReset() {
|
|||||||
return confirm("Reset to defaults?");
|
return confirm("Reset to defaults?");
|
||||||
}
|
}
|
||||||
|
|
||||||
function browseFeeds() {
|
function browseFeeds(limit) {
|
||||||
|
|
||||||
xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=browse", true);
|
xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=browse", true);
|
||||||
xmlhttp.onreadystatechange=infobox_callback;
|
xmlhttp.onreadystatechange=infobox_callback;
|
||||||
@@ -1407,7 +1407,7 @@ function feedBrowserSubscribe() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateBigFeedBrowser() {
|
function updateBigFeedBrowser(limit) {
|
||||||
|
|
||||||
if (!xmlhttp_ready(xmlhttp)) {
|
if (!xmlhttp_ready(xmlhttp)) {
|
||||||
printLockingError();
|
printLockingError();
|
||||||
@@ -1416,10 +1416,18 @@ function updateBigFeedBrowser() {
|
|||||||
|
|
||||||
p_notify("Loading, please wait...");
|
p_notify("Loading, please wait...");
|
||||||
|
|
||||||
xmlhttp.open("GET", "backend.php?op=pref-feed-browser", true);
|
var query = "backend.php?op=pref-feed-browser";
|
||||||
|
|
||||||
|
var limit_sel = document.getElementById("feedBrowserLimit");
|
||||||
|
|
||||||
|
if (limit_sel) {
|
||||||
|
var limit = limit_sel[limit_sel.selectedIndex].value;
|
||||||
|
query = query + "&limit=" + param_escape(limit);
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlhttp.open("GET", query, true);
|
||||||
xmlhttp.onreadystatechange=feed_browser_callback;
|
xmlhttp.onreadystatechange=feed_browser_callback;
|
||||||
xmlhttp.send(null);
|
xmlhttp.send(null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function browserToggleExpand(id) {
|
function browserToggleExpand(id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user