]> git.quilime.com - clmpr.git/commitdiff
Added tag count to tags.php
authorGabriel Dunne <gdunne@quilime.com>
Sun, 18 Dec 2011 17:20:24 +0000 (09:20 -0800)
committerGabriel Dunne <gdunne@quilime.com>
Sun, 18 Dec 2011 17:20:24 +0000 (09:20 -0800)
get.php
tags.php

diff --git a/get.php b/get.php
index b61ed169f4c45fc47af0206a3822ba7b8a9c4846..d51cac8ddf5cdb343b306965c3b5fe137f46bf54 100644 (file)
--- a/get.php
+++ b/get.php
@@ -94,11 +94,11 @@ case 'xml' :
             <a class="uname" href="/?user=<?php echo $row['user'] ?>"><?php echo $row['user'] ?></a>
         </span>
 
-            <ul class="tags">
-                <?php foreach($row['tags'] as $tag) : ?>
-                <li><a href="/tags.php?tag=<?=$tag?>"><?=$tag?></a></li>
-                <? endforeach; ?>
-            </ul>        
+        <ul class="tags">
+            <?php foreach($row['tags'] as $tag) : ?>
+            <li><a href="/tags.php?tag=<?=$tag?>"><?=$tag?></a></li>
+            <? endforeach; ?>
+        </ul>        
 
         <?php 
         if ($user = get_user()):
index 6ac037fe9408442ea7f22a5b7ce2ff0956ba260d..79401491f406e73827cb80819f9d0a4b55f6908d 100644 (file)
--- a/tags.php
+++ b/tags.php
@@ -20,7 +20,7 @@ try {
     else {
        */
         $q = $dbh->prepare("SELECT * FROM tags 
-                            ORDER BY tag DESC");
+                            ORDER BY count DESC, tag ASC");
         $q->execute();
     //}
 
@@ -52,7 +52,7 @@ catch(PDOException $e)
 <?php for($i = 0; $row = $q->fetch(); $i++ ): 
 ?>
     
-    <li><span class="tag"><a href="<?php echo $row['tag'] ?>"><?php echo $row['tag'] ?></a></span></li>
+    <li><span class="tag"><a href="<?php echo $row['tag'] ?>"><?php echo $row['tag'] ?></a> <?php echo $row['count'] ?></span></li>
 
 <?php endfor; ?>
 </ul>