mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 07:45:55 +00:00
tag cloud improvements
This commit is contained in:
@@ -1362,7 +1362,7 @@ function displayDlg(id, param) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_progress("Loading, please wait...");
|
notify_progress("Loading, please wait...", true);
|
||||||
|
|
||||||
xmlhttp.open("GET", "backend.php?op=dlg&id=" +
|
xmlhttp.open("GET", "backend.php?op=dlg&id=" +
|
||||||
param_escape(id) + "¶m=" + param_escape(param), true);
|
param_escape(id) + "¶m=" + param_escape(param), true);
|
||||||
|
|||||||
@@ -3864,9 +3864,27 @@
|
|||||||
// from here: http://www.roscripts.com/Create_tag_cloud-71.html
|
// from here: http://www.roscripts.com/Create_tag_cloud-71.html
|
||||||
|
|
||||||
function printTagCloud($link) {
|
function printTagCloud($link) {
|
||||||
|
|
||||||
|
/* get first ref_id to count from */
|
||||||
|
|
||||||
|
$query = "";
|
||||||
|
|
||||||
|
if (DB_TYPE == "pgsql") {
|
||||||
|
$query = "SELECT MIN(id) AS id FROM ttrss_user_entries, ttrss_entries
|
||||||
|
WHERE int_id = id AND owner_uid = ".$_SESSION["uid"]."
|
||||||
|
AND date_entered > NOW() - INTERVAL '30 days'";
|
||||||
|
} else {
|
||||||
|
$query = "SELECT MIN(id) AS id FROM ttrss_user_entries, ttrss_entries
|
||||||
|
WHERE int_id = id AND owner_uid = ".$_SESSION["uid"]."
|
||||||
|
AND date_entered > DATE_SUB(NOW(), INTERVAL 30 DAY)";
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = db_query($link, $query);
|
||||||
|
$first_id = db_fetch_result($result, 0, "id");
|
||||||
|
|
||||||
$query = "SELECT tag_name, COUNT(post_int_id) AS count
|
$query = "SELECT tag_name, COUNT(post_int_id) AS count
|
||||||
FROM ttrss_tags WHERE owner_uid = ".$_SESSION["uid"]."
|
FROM ttrss_tags WHERE owner_uid = ".$_SESSION["uid"]."
|
||||||
|
AND post_int_id >= '$first_id'
|
||||||
GROUP BY tag_name ORDER BY count DESC LIMIT 50";
|
GROUP BY tag_name ORDER BY count DESC LIMIT 50";
|
||||||
|
|
||||||
$result = db_query($link, $query);
|
$result = db_query($link, $query);
|
||||||
|
|||||||
@@ -416,8 +416,8 @@
|
|||||||
print "<div id=\"infoBoxTitle\">".__('Tag Cloud')."</div>";
|
print "<div id=\"infoBoxTitle\">".__('Tag Cloud')."</div>";
|
||||||
print "<div class=\"infoBoxContents\">";
|
print "<div class=\"infoBoxContents\">";
|
||||||
|
|
||||||
print "Showing top 50 most popular tags (<a
|
print "Showing most popular tags for the last month (<a
|
||||||
href='javascript:toggleTags(true)'>show all</a>):<br/>";
|
href='javascript:toggleTags(true)'>browse all</a>):<br/>";
|
||||||
|
|
||||||
print "<div class=\"tagCloudContainer\">";
|
print "<div class=\"tagCloudContainer\">";
|
||||||
|
|
||||||
|
|||||||
@@ -37,12 +37,12 @@ function toggleTags(show_all) {
|
|||||||
closeInfoBox();
|
closeInfoBox();
|
||||||
display_tags = true;
|
display_tags = true;
|
||||||
p.innerHTML = __("display feeds");
|
p.innerHTML = __("display feeds");
|
||||||
notify_progress("Loading, please wait...");
|
notify_progress("Loading, please wait...", true);
|
||||||
updateFeedList();
|
updateFeedList();
|
||||||
} else if (display_tags) {
|
} else if (display_tags) {
|
||||||
display_tags = false;
|
display_tags = false;
|
||||||
p.innerHTML = __("tag cloud");
|
p.innerHTML = __("tag cloud");
|
||||||
notify_progress("Loading, please wait...");
|
notify_progress("Loading, please wait...", true);
|
||||||
updateFeedList();
|
updateFeedList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user