[wp-trac] Re: [WordPress Trac] #5191: Style tag cloud by color

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 15 09:07:45 GMT 2007


#5191: Style tag cloud by color
-------------------------+--------------------------------------------------
 Reporter:  webrocker    |        Owner:  anonymous
     Type:  enhancement  |       Status:  new      
 Priority:  normal       |    Milestone:  2.5      
Component:  General      |      Version:           
 Severity:  normal       |   Resolution:           
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by webrocker):

 Replying to [comment:5 Otto42]:
 > So, basically, #5172 does exactly what you want. You can style the
 weights as colors if you choose.
 hm... not quite, since the "X" in "tag-cloud-size-x" is an absolute number
 which depends on the amount of the tags shown, you need to know the
 numbers calculated aforehand for your stylesheet - so you have to expand
 your stylesheet everytime you choose to change the number of tags shown in
 your tag-cloud.
 {{{
 $tag_size = round($smallest + ( ( $count - $min_count ) * $font_step ),0);
 }}}
 The "$count" is dependend on  the call to the function in the template,
 where one will set how many tags will be shown - at least this is how I
 understand it :-)[[BR]]
 I still find it more comfortable (and more "wordpress-like") if the color-
 range could be set via the call to the function in the theme.[[BR]]
 [[BR]]
 But - if the color is calculated via the function, it would require an
 inline style, which is kind of ugly, too.[[BR]]
 :-)

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5191#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list