]> git.wh0rd.org Git - tt-rss.git/commitdiff
limit tag browsing mode to top50 most popular
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 10 Aug 2007 04:12:29 +0000 (05:12 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 10 Aug 2007 04:12:29 +0000 (05:12 +0100)
functions.php
modules/popup-dialog.php

index 5fc20841a67f09013cbaa902feba401f0aee84da..336a6d4b9f991ec7642b675984d61a38610e200f 100644 (file)
                $result = db_query($link, "SELECT tag_name,SUM((SELECT COUNT(int_id) 
                        FROM ttrss_user_entries WHERE int_id = post_int_id 
                                AND unread = true)) AS count FROM ttrss_tags 
-                       WHERE owner_uid = ".$_SESSION['uid']." GROUP BY tag_name ORDER BY tag_name");
+                               WHERE owner_uid = ".$_SESSION['uid']." GROUP BY tag_name 
+                               ORDER BY count DESC LIMIT 55");
                        
                $tags = array();
 
                        $result = db_query($link, "SELECT tag_name,SUM((SELECT COUNT(int_id) 
                                FROM ttrss_user_entries WHERE int_id = post_int_id 
                                        AND unread = true)) AS count FROM ttrss_tags 
-                               WHERE owner_uid = ".$_SESSION['uid']." GROUP BY tag_name ORDER BY tag_name");
+                                       WHERE owner_uid = ".$_SESSION['uid']." GROUP BY tag_name 
+                                       ORDER BY count DESC LIMIT 50");
 
                        $tags = array();
        
index 562093d9d6d5788ac2deb6b5928b5ef3c1d8fa16..6590159d238bd8566a313d9048576b95509feb2c 100644 (file)
                        print "<div class=\"infoBoxContents\">";
 
                        print __("Showing most popular tags ")." (<a 
-                               href='javascript:toggleTags(true)'>".__('browse all')."</a>):<br/>";
+                       href='javascript:toggleTags(true)'>".__('browse more')."</a>):<br/>"; 
 
                        print "<div class=\"tagCloudContainer\">";