]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
show the weight in output (for my own edification)
authorEvan Prodromou <evan@prodromou.name>
Tue, 29 Jul 2008 19:42:46 +0000 (15:42 -0400)
committerEvan Prodromou <evan@prodromou.name>
Tue, 29 Jul 2008 19:42:46 +0000 (15:42 -0400)
darcs-hash:20080729194246-84dde-4a47578d8727720097dab9362cb356bd8f4d2a7d.gz

actions/tag.php

index cc95690e21675f783dc780c8b34ea01a722689ee..b967136d9b21013668e270de5cacbbfc74c487ae 100644 (file)
@@ -111,14 +111,14 @@ class TagAction extends StreamAction {
                        }
                        
                        foreach ($tw as $tag => $weight) {
-                               $this->show_tag($tag, $weight/$sum);
+                               $this->show_tag($tag, $weight, $weight/$sum);
                        }
                        
                        common_element_end('p');
                }
        }
 
-       function show_tag($tag, $relative) {
+       function show_tag($tag, $weight, $relative) {
                
                # XXX: these should probably tune to the size of the site
                $cls = ($relative > 0.1) ? 'largest' :
@@ -129,7 +129,7 @@ class TagAction extends StreamAction {
                ($relative > 0.002) ? 'verysmall' :
                'smallest';
                
-               common_element('a', array('class' => $cls,
+               common_element('a', array('class' => "$cls weight-$weight",
                                                                  'href' => common_local_url('tag', array('tag' => $tag))),
                                           $tag);
                common_text(' ');