<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>themes/chyrp/extend/tag.twig</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -13,7 +13,8 @@
             '|/new_extension/([^/]+)/|' =&gt; '/?action=new_extension&amp;type=$1',
             '|/edit_extension/([^/]+)/|' =&gt; '/?action=edit_extension&amp;id=$1',
             '|/delete_extension/([^/]+)/|' =&gt; '/?action=delete_extension&amp;id=$1',
-            '|/type/([^/]+)/|' =&gt; '/?action=type&amp;url=$1'
+            '|/type/([^/]+)/|' =&gt; '/?action=type&amp;url=$1',
+            '|/tag/([^/]+)/|' =&gt; '/?action=tag&amp;url=$1'
         );
 
         # Boolean: $displayed
@@ -170,7 +171,9 @@
         }
 
         public function search() {
-            fallback($_GET['query'], &quot;&quot;);
+            if (empty($_GET['query']))
+                exit; # TODO
+
             $config = Config::current();
 
             if ($config-&gt;clean_urls and
@@ -223,6 +226,27 @@
             );
         }
 
+        public function tag() {
+            if (empty($_GET['url']))
+                exit; # TODO
+            
+            $versions = Version::find(
+                array(
+                    &quot;placeholders&quot; =&gt; true,
+                    &quot;where&quot; =&gt; array(&quot;tags like&quot; =&gt; &quot;%: \&quot;&quot;.$_GET['url'].&quot;\&quot;\n%&quot;)
+                )
+            );
+
+            $this-&gt;display(
+                &quot;extend/tag&quot;,
+                array(
+                    &quot;versions&quot; =&gt; new Paginator($versions, 25),
+                    &quot;tag&quot; =&gt; fix($_GET['url'])
+                ),
+                fix(_f(&quot;Versions tagged with \&quot;%s\&quot;&quot;, $_GET['url'], &quot;extend&quot;))
+            );
+        }
+
         public function new_extension() {
             if (!Visitor::current()-&gt;group-&gt;can(&quot;add_extension&quot;))
                 show_403(__(&quot;Access Denied&quot;), __(&quot;You do not have sufficient privileges to add extensions.&quot;, &quot;extend&quot;));
@@ -810,6 +834,12 @@ EOF;
                 return $route-&gt;action = &quot;search&quot;;
             }
 
+            # Viewing a tag
+            if ($route-&gt;arg[0] == &quot;tag&quot;) {
+                $_GET['url'] = $route-&gt;arg[1];
+                return $route-&gt;action = &quot;tag&quot;;
+            }
+
             # Custom pages added by Modules, Feathers, Themes, etc.
             foreach ($config-&gt;routes as $path =&gt; $action) {
                 if (is_numeric($action))</diff>
      <filename>modules/extend/controller.Extend.php</filename>
    </modified>
    <modified>
      <diff>@@ -76,7 +76,7 @@ function colorize(text) {
     var colorized = &quot;&quot;
     var bracket_color = &quot;&quot;
     for (i = 0; i &lt; text.length; i++) {
-        var index = Math.floor(Math.random()*5)
+        var index = Math.floor(Math.random()*7)
         if (text[i] == &quot;(&quot;)
             bracket_color = colors[index]
     </diff>
      <filename>themes/chyrp/javascripts/theme.js.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 &lt;div class=&quot;extension&quot;&gt;
     &lt;h1 style=&quot;background-color: #$ver.extension.type.color&quot;&gt;
         &lt;span class=&quot;version&quot;&gt;$ver.number&lt;/span&gt;
-        &lt;strong&gt;&lt;a href=&quot;$ver.extension.url&quot;&gt;$ver.extension.name&lt;/a&gt;&lt;/strong&gt;
+        &lt;strong&gt;&lt;a href=&quot;$ver.url&quot;&gt;$ver.extension.name&lt;/a&gt;&lt;/strong&gt;
         &lt;span class=&quot;author&quot;&gt;by &lt;strong&gt;${ ver.extension.user.full_name | fallback(ver.extension.user.login) }&lt;/strong&gt;&lt;/span&gt;
     &lt;/h1&gt;
     &lt;div class=&quot;content&quot;&gt;</diff>
      <filename>themes/chyrp/partials/version.twig</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4bb2741534d6c6f6a658692f64d8aaa499aebb09</id>
    </parent>
  </parents>
  <author>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </author>
  <url>http://github.com/vito/chyrp-site/commit/f710a7d689b57cf25848a27b178071e0dffec347</url>
  <id>f710a7d689b57cf25848a27b178071e0dffec347</id>
  <committed-date>2009-06-30T13:27:34-07:00</committed-date>
  <authored-date>2009-06-30T13:27:34-07:00</authored-date>
  <message>* Tag viewing.
* Corrected colorize to use all of the colors.
* Corrected the version links to link to the version rather than the
  extension.</message>
  <tree>0336995861b3510fbd39174f54efa043ae4459a1</tree>
  <committer>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </committer>
</commit>
