Description
The enhanced emoticons plugin expands emoticon references such as :) or ;) to images like
and
. This enhanced plugin allows you to configure the available emoticons and their corresponding patterns in the emoticons properties file.
Plugin contributed from Jan Wessely
.
Availability
This plugin is available as of blojsom 2.23.
Installation and Setup
In your global /WEB-INF/plugin.properties file, add the following line:
enhanced-emoticons=org.blojsom.plugin.emoticons.EmoticonsPlugin
You may then add "enhanced-emoticons" to one of the flavor-based plugin chains. These plugin chains can be found in the individual blog's plugin.properties file. For example:
html.blojsom-plugin-chain=..., enhanced-emoticons, ...
The enhanced emoticons plugin has its own configuration file, emoticons.properties, that is referenced in /WEB-INF/web.xml.
<init-param>
<param-name>plugin-emoticons</param-name>
<param-value>emoticons.properties</param-value>
</init-param>
The emoticons.properties file will be located in the respective /WEB-INF/(blog-id) directory and contains key=value pairs like the following.
The emoticons property is used to define all of the emoticons available. Each value listed for this property must have a corresponding .pattern and image path property.
emoticons = angry, blush, confused, cool, cry, devil, grin, happy, laugh, love, mischief, plain, sad, shocked, silly, wink
angry.pattern=>(
angry=/images/smilies/angry.gif
blush.pattern=*^_^*
blush=/images/smilies/blush.gif
confused.pattern=`:|
confused=/images/smilies/confused.gif
cool.pattern=])
cool=/images/smilies/cool.gif
cry.pattern=:'(
cry=/images/smilies/cry.gif
devil.pattern=})
devil=/images/smilies/devil.gif
grin.pattern=:D
grin=/images/smilies/grin.gif
happy.pattern=:)
happy=/images/smilies/happy.gif
laugh.pattern=(D
laugh=/images/smilies/laugh.gif
love.pattern=<3
love=/images/smilies/love.gif
mischief.pattern=;7)
mischief=/images/smilies/mischief.gif
plain.pattern=:|
plain=/images/smilies/plain.gif
sad.pattern=:(
sad=/images/smilies/sad.gif
shocked.pattern=:O
shocked=/images/smilies/shocked.gif
silly.pattern=:P
silly=/images/smilies/silly.gif
wink.pattern=;)
wink=/images/smilies/wink.gif
The directories referenced here are relative to the root context of the web application. They will be used in constructing the proper URL to the image by appending the proper image filename to the blog URL.
You may download the Jive Emoticons
image pack for use in your weblog. Due to copyright restrictions, we cannot re-distribute the emoticons pack with blojsom. To use the Jive Emoticons image pack, unzip the jive-emoticons.zip and move the images sub-directory over to your web application's root context directory.
Usage and URL Parameters
Usage
Use the pattern that corresponds to the emoticon you want to include in your blog post. After the plugin runs, the emoticon references will be replaced by their corresponding image.
URL Parameters
There are no URL parameters to control the operation of the emoticons plugin.