NAME
HTML::TagCloud::Extended - HTML::TagCloud extension
SYNOPSIS
use HTML::TagCloud::Extended;
my $cloud = HTML::TagCloud::Extended->new();
$cloud->add($tag1, $url1, $count1, $timestamp1);
$cloud->add($tag2, $url2, $count2, $timestamp2);
$cloud->add($tag3, $url3, $count3, $timestamp3);
my $html = $cloud->html_and_css( { timestamp_desc => 50 } );
DESCRIPTION
This is HTML::TagCloud extension module.
This module allows you to register timestamp with tags. And tags' color will be changed according to it's timestamp.
TIMESTAMP AND COLORS
When you call 'add()' method, set timestamp as last argument.
$cloud->add('perl', 'http://www.perl.org', 20, '2005-07-15 00:00:00');
TIMESTAMP FORMAT
follow three types of format are allowed.
COLORS
This module chooses color from follow four types according to tag's timestamp.
- earliest
- earlier
- later
- latest
You needn't to set colors becouse the default colors are set already.
But when you want to set colors by yourself, of course, you can.
HTML::TagCloud::Extended->colors->set(
earliest => '#000000',
earlier => '#333333',
later => '#999999',
latest => '#cccccc',
);
LIMITING
When you want to limit the amount of tags, 'html()', 'html_and_css()' and follow new method 'html_tags()' need second argument as hash reference.
$cloud->html_and_css( { counts => 20 } );
This is combination of sorting type and amount.
SORTING TYPE FOR LIMITING
- counts
- counts_desc
- timestamp
- timestamp_desc
OTHER NEW FEATURES
-
my $html_tags = $cloud->html_tags({counts_desc => 20}); print "<ul>\n"; foreach my $html_tag ( @$html_tags ) { print "<li>$html_tag</li>\n"; } print "</ul>\n";
- base_font_size
-
HTML::TagCloud::Extended->base_font_size(30);
default size is 24.
- font_size_range
-
HTML::TagCloud::Extended->font_size_range(10);
default range is 12.
SEE ALSO
AUTHOR
Lyo Kato <kato@lost-season.jp>
COPYRIGHT AND LICENSE
This library is free software. You can redistribute it and/or modify it under the same terms as perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 281:
Expected text after =item, not a number