GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTML::TagCloud::Extended(3) User Contributed Perl Documentation HTML::TagCloud::Extended(3)

HTML::TagCloud::Extended - HTML::TagCloud extension

    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( {
        order_by => 'count_desc',
        limit    => 20,
    } );

    print $html;

This is extension of HTML::TagCloud.

This module allows you to register timestamp with tags. And color of tags will be changed according to it's timestamp.

Now, this doesn't depend on HTML::TagCloud.

When you call 'add()' method, set timestamp as last argument.

    $cloud->add('perl','http://www.perl.org/', 20, '2005-07-15 00:00:00');

follow three types of format are allowed.
2005-07-15 00:00:00
2005/07/15 00:00:00
20050715000000

This module chooses color from follow four types according to tag's timestamp.
earliest
earlier
later
latest

You needn't to set colors because the default colors are set already.

But when you want to set colors by yourself, of course, you can.

    my $cloud = HTML::TagCloud::Extended->new;

    $cloud->colors->set(
        earliest => '#000000',
    );

    $cloud->colors->set(
        earlier => '#333333',
        later   => '#999999',
        latest  => '#cccccc',
   );

    # or, you can set color for each attribute
    $cloud->colors->set(
        earliest => {
            link    => '#000000',
            hover   => '#CCCCCC',
            visited => '#333333',
            active  => '#666666',
        },
    );

When you want to limit the amount of tags, 'html()', html_and_css()' need second argument as hash reference.

    $cloud->html_and_css( { order_by => 'timestamp_desc' , limit => 20 } );

default is 'name'
name
name_desc
count
count_desc
timestamp
timestamp_desc

use_hot_color
set by size

    my $cloud = HTML::TagCloud::Extended->new(
        use_hot_color => 'size',
        hot_tags_size => 24,
    );

    # or set with accessor method

    my $cloud = HTML::TagCloud::Extended->new;

    $cloud->use_hot_color('size');
    $cloud->hot_tags_size(24);
    

Then, tags that's size is over 24 applys color for 'hot'. If you omit 'hot_tags_size', it'll be proper number automatically.

set by name

    my $cloud = HTML::TagCloud::Extended->new(
        use_hot_color => 'name',
        hot_tags_name => [ 'perl', 'ruby', 'python' ],
    );

    # or set with accessor method

    my $cloud = HTML::TagCloud::Extended->new;

    $cloud->use_hot_color('name');
    $cloud->hot_tags_name('perl', 'ruby', 'puthon');
    

You can alse change colors for 'hot' by yourself.

    $cloud->colors->set( hot => '#ff9900' );

    # or

    $cloud->colors->set(
        hot => {
            link    => '#000000',
            hover   => '#CCCCCC',
            visited => '#333333',
            active  => '#666666',
        },
    );
    
base_font_size
default size is 24

    # set as constructor's argument
    my $cloud = HTML::TagCloud::Extended->new(
        base_font_size => 30,
    );

    # or you can use accessor.
    $cloud->base_font_size(30);
    
size_suffix
default suffix is 'px'

You can choose it from [ mm cm in pt pc px ].

    # set as constructor's argument
    my $cloud = HTML::TagCloud::Extended->new(
        size_suffix => 'pt',
    );

    # or you can use accessor.
    $cloud->size_suffix('cm');
    
font_size_range
defualt range is 12.

    my $cloud = HTML::TagCloud::Extended->new(
        font_size_range => 10
    );

    $cloud->font_size_range(10);
    
css_class
default name is 'tagcloud'

    my $cloud = HTML::TagCloud::Extended->new(
        css_class => 'mycloud',
    ); 

    $cloud->css_class('mycloud');
    

HTML::TagCloud

Lyo Kato <lyo.kato@gmail.com>

This library is free software. You can redistribute it and/or modify it under the same terms as perl itself.

Hey! The above document had some coding errors, which are explained below:
Around line 287:
Expected text after =item, not a number
2005-12-04 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.