<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>deploy/www/player_tags.php</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,6 +2,48 @@
 
 // TODO: Oh god, these functions need templates.
 
+
+/**
+ * This determines how the clans get ranked and tagged, and how to only show non-empty clans.
+**/
+function player_size(){
+    $res = array();
+    $db = new DBAccess();
+    $sel = &quot;select (level-3-round(days/5)) as sum, player_id, uname from players where confirmed = 1 and health&gt;0 order by sum desc&quot;;
+    $counts = $db-&gt;FetchAll($sel);
+    $largest = reset($counts);
+    $max = $largest['sum'];
+    foreach($counts as $player_info){
+        // make percentage of highest, multiply by 10 and round to give a 1-10 size
+        $res[$player_info['uname']] = array('player_id'=&gt;$player_info['player_id'],
+        	'size'=&gt;
+             floor(( (($player_info['sum']-1 &lt;1? 0 : $player_info['sum']-1)) /$max)*10)+1
+             );
+    }
+    return $res;
+}
+
+function render_player_tags(){
+    $players = player_size();
+    //$clans = @natsort2d($clans, 'level');
+    $res = &quot;&lt;div id='player-tags'&gt;
+                &lt;h4 id='player-tags-title'&gt;
+                    All Players
+                &lt;/h4&gt;
+            &lt;ul&gt;&quot;;
+    foreach($players as $player =&gt; $info){
+        $res .= &quot;&lt;li class='player-tag size{$info['size']}'&gt;
+                &lt;a href='player.php?player_id=&quot;.urlencode($info['player_id']).&quot;'&gt;$player&lt;/a&gt;
+            &lt;/li&gt;&quot;;
+    }
+    $res .= &quot;&lt;/ul&gt;
+            &lt;/div&gt;&quot;;
+    return $res;
+}
+
+
+
+
 // Display the recently active players
 function render_active($limit=5, $alive_only=true) {
 	$where_cond = ($alive_only? 'and health&gt;0' : '');</diff>
      <filename>deploy/lib/specific/lib_player_list.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,9 @@
 &lt;?php
 // File for creating the clan ranking tag cloud.
 
-
+/**
+ * This determines how the clans get ranked and tagged, and how to only show non-empty clans.
+**/
 function clan_size(){
     $res = array();
     $db = new DBAccess();</diff>
      <filename>deploy/lib/specific/lib_tags.php</filename>
    </modified>
    <modified>
      <diff>@@ -846,8 +846,42 @@ table .quickstats td{
 	margin-top: 1em;
 }
 
+/* Clan leader options */
+#leader-panel {
+    width: 40%;
+    float:left;
+    text-align: center;
+    border: thin solid white;
+    padding-bottom: 5px;
+}
+#leader-panel ul{
+    list-style-type: none;
+    margin: 3px;
+    height: 2.3em;
+}
+#leader-panel li {
+    width: 49%;
+    float: left;
+}
+#leader-options{
+    padding: 5px 5px 5px 5px;
+    width: 100%;
+}
+#leader-panel-title {
+    font-weight: bold;
+    text-align: center;
+}
+#clan-options {
+    width: 50%;
+    float: right;
+    list-style-type: none;
+}
 
-
+/* Player tags */
+#player-tags .player-tag{
+	float:left;
+	margin-right: 1em;
+}
 /*  Clan tags section */
 #clan-tags{
     clear: both;
@@ -862,77 +896,34 @@ table .quickstats td{
 }
 
 /* Clan member tags styles */
+#clan-members .member a, #player-tags .player-tag a{
+    color:orange;
+    background-color:green;
+}
 #clan-members {
     clear: both;
     margin-top: 3px;
 }
-
 #clan-members ul {
     list-style-type: none;
 }
-
 #clan-members-title {
     margin-bottom: 3px;
 }
-
 #clan-members-count {
     margin-bottom: 1em;
     text-align: center;
 }
-
 #clan-members .member{
     float:left;
     color:orange;
     background-color:green;
     margin: 5px 5px 5px 5px;
 }
-
-#clan-members .member a{
-    color:orange;
-    background-color:green;
-}
-
 #clan-page-title {
     text-align: center;
 }
 
-
-#leader-panel {
-    width: 40%;
-    float:left;
-    text-align: center;
-    border: thin solid white;
-    padding-bottom: 5px;
-}
-
-#leader-panel ul{
-    list-style-type: none;
-    margin: 3px;
-    height: 2.3em;
-}
-
-#leader-panel li {
-    width: 49%;
-    float: left;
-}
-
-
-#leader-options{
-    padding: 5px 5px 5px 5px;
-    width: 100%;
-}
-
-#leader-panel-title {
-    font-weight: bold;
-    text-align: center;
-}
-
-#clan-options {
-    width: 50%;
-    float: right;
-    list-style-type: none;
-}
-
 /*  End of Clan Tags section */
 
 #clan-tags .size10{ /* Reverse the biggest tag color */</diff>
      <filename>deploy/www/css/style.css</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bae74a0cf48b1555ee1813dbcb2d8526bfe38cac</id>
    </parent>
  </parents>
  <author>
    <name>Roy</name>
    <email>roy.ronalds@gmail.com</email>
  </author>
  <url>http://github.com/tchalvak/ninjawars/commit/fcbb24c0e15a5eb06d6cbc2247a7c6fd1d188411</url>
  <id>fcbb24c0e15a5eb06d6cbc2247a7c6fd1d188411</id>
  <committed-date>2009-11-13T13:53:44-08:00</committed-date>
  <authored-date>2009-11-13T13:51:16-08:00</authored-date>
  <message>  Player_tags: Starting player tags page.</message>
  <tree>f3773934af5640bd549d03cbc81ea596c96a6c52</tree>
  <committer>
    <name>Roy</name>
    <email>roy.ronalds@gmail.com</email>
  </committer>
</commit>
