Вячеслав Тихановский > Mojolicious-Plugin-TweetButton > Mojolicious::Plugin::TweetButton

Download:
Mojolicious-Plugin-TweetButton-0.0003.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.0003   Source  

NAME ^

Mojolicious::Plugin::TweetButton - TweetButton Helper Plugin

SYNOPSIS ^

    # Mojolicious
    $self->plugin('tweet_button');

    # Mojolicious::Lite
    plugin 'tweet_button';
    plugin 'tweet_button' => {via => 'vtivti'};

DESCRIPTION ^

Mojolicous::Plugin::TweetButton adds a tweet_button helper to Mojolicious. It is compatible with the button described on twitter page http://twitter.com/goodies/tweetbutton.

Helper

    <%= tweet_button %>

Generate tweet button.

Arguments

All the arguments can be set globally (when loading a plugin) or locally (in the template).

count
    <%= tweet_button count => 'horizontal' %>

Location of the tweet count box (can be "vertical", "horizontal" or "none"; "vertical" by default).

url
    <%= tweet_button url => 'http://example.com' %>

The URL you are sharing (HTTP Referrer by default).

text
    <%= tweet_button url => 'Wow!' %>

The text that will appear in the tweet (Content of the <title> tag by default).

via
    <%= tweet_button via => 'vtivti' %>

The author of the tweet (no default).

related
    <%= tweet_button related => 'kraih:A robot' %>

Related twitter accounts (no default).

lang
    <%= tweet_button lang => 'fr' %>

The language of the tweet (no default).

METHODS ^

Mojolicious::Plugin::TweetButton inherits all methods from Mojolicious::Plugin and implements the following new ones.

register

    $plugin->register;

Register helper in Mojolicious application.

DEVELOPMENT ^

Repository

    http://github.com/vti/mojolicious-plugin-tweet_button

AUTHOR ^

Viacheslav Tykhanovskyi, vti@cpan.org.

CREDITS ^

In alphabetical order:

COPYRIGHT AND LICENSE ^

Copyright (C) 2010, Viacheslav Tykhanovskyi

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.

SEE ALSO ^

Mojolicious, Mojolicious::Guides, http://mojolicious.org.

syntax highlighting: