Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Text::Emoticon::MSN(3)User Contributed Perl DocumentatioText::Emoticon::MSN(3)

NAME
       Text::Emoticon::MSN - Emoticon filter of	MSN Messenger

SYNOPSIS
	 use Text::Emoticon::MSN;

	 my $emoticon =	Text::Emoticon::MSN->new(
	     imgbase =>	"http://example.com/emo",
	 );

	 my $text = "Yet Another Perl Hacker ;-)";
	 print $emoticon->filter($text);

	 # it prints
	 # Yet Another Perl Hacker <img	src="http://example.com/emo/regular_smile.gif" />

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

METHODS
       new
	     $emoticon = Text::Emoticon::MSN->new(
		 imgbase => "http://yourhost.example.com/images/emoticons",
		 xhtml	 => 1,
		 class	 => "emoticon",
	     );

	   Constructs new Text::Emoticon::MSN object. It accepts two options:

	   imgbase
		 Base URL where	icon gif files are located. It defaults	to
		 "http://messenger.msn.com/Resource/emoticons" (the MSN	site)
		 but I don't recommend that, as	there's	a possibility MSN will
		 ban your site.

	   xhtml Whether it uses XHTML style img tags. It defaults to 1.

	   class CSS class used	in "img" tags. It defaults to nothing.

		   $emoticon = Text::Emoticon::MSN->new(class => "emo");

		 will print:

		   <img	src="blah.gif" class="emo" />

	   strict
		 Whether it will disable smileys with space in them.  defaults
		 to 0.

       filter
	     $filtered_text = $emoticon->filter($text);

	   Filters emoticons in	text and returns "img" tagged text (HTML).

TODO
       o   Handling original emoticons.	(Patches welcome)

       o   Common API for other	Emoticons like Yahoo! (maybe Text::Emoticons)

AUTHOR
       Tatsuhiko Miyagawa <miyagawa@bulknews.net>

       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

SEE ALSO
       http://messenger.msn.com/Resource/Emoticons.aspx

perl v5.24.1			  2006-01-11		Text::Emoticon::MSN(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS | TODO | AUTHOR | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Text::Emoticon::MSN&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help