1Text::Emoticon::MSN(3)User Contributed Perl DocumentationText::Emoticon::MSN(3)
2
3
4

NAME

6       Text::Emoticon::MSN - Emoticon filter of MSN Messenger
7

SYNOPSIS

9         use Text::Emoticon::MSN;
10
11         my $emoticon = Text::Emoticon::MSN->new(
12             imgbase => "http://example.com/emo",
13         );
14
15         my $text = "Yet Another Perl Hacker ;-)";
16         print $emoticon->filter($text);
17
18         # it prints
19         # Yet Another Perl Hacker <img src="http://example.com/emo/regular_smile.gif" />
20

DESCRIPTION

22       Text::Emoticon::MSN is a text filter that replaces text emoticons like
23       ":-)", ";-P", etc. to the icons of MSN Messenger, detailed in
24       http://messenger.msn.com/Resource/Emoticons.aspx
25

METHODS

27       new
28             $emoticon = Text::Emoticon::MSN->new(
29                 imgbase => "http://yourhost.example.com/images/emoticons",
30                 xhtml   => 1,
31                 class   => "emoticon",
32             );
33
34           Constructs new Text::Emoticon::MSN object. It accepts two options:
35
36           imgbase
37                 Base URL where icon gif files are located. It defaults to
38                 "http://messenger.msn.com/Resource/emoticons" (the MSN site)
39                 but I don't recommend that, as there's a possibility MSN will
40                 ban your site.
41
42           xhtml Whether it uses XHTML style img tags. It defaults to 1.
43
44           class CSS class used in "img" tags. It defaults to nothing.
45
46                   $emoticon = Text::Emoticon::MSN->new(class => "emo");
47
48                 will print:
49
50                   <img src="blah.gif" class="emo" />
51
52           strict
53                 Whether it will disable smileys with space in them.  defaults
54                 to 0.
55
56       filter
57             $filtered_text = $emoticon->filter($text);
58
59           Filters emoticons in text and returns "img" tagged text (HTML).
60

TODO

62       ·   Handling original emoticons. (Patches welcome)
63
64       ·   Common API for other Emoticons like Yahoo! (maybe Text::Emoticons)
65

AUTHOR

67       Tatsuhiko Miyagawa <miyagawa@bulknews.net>
68
69       This library is free software; you can redistribute it and/or modify it
70       under the same terms as Perl itself.
71

SEE ALSO

73       http://messenger.msn.com/Resource/Emoticons.aspx
74
75
76
77perl v5.32.0                      2020-07-28            Text::Emoticon::MSN(3)
Impressum