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 /WEB-INF/classes/blojsom-plugins.xml file, add the following:
<bean id="emoticons" class="org.blojsom.plugin.emoticons.EnhancedEmoticonsPlugin" init-method="init"
destroy-method="destroy">
<property name="emoticons">
<map>
<entry key="emoticons" value="angry, blush, confused, cool, cry, devil, grin, happy, laugh, love, mischief, plain, sad, shocked, silly, wink"/>
<entry key="angry.pattern" value=">("/>
<entry key="angry" value="/images/emoticons/mozilla_yell.gif"/>
<entry key="blush.pattern" value="*^_^*"/>
<entry key="blush" value="/images/emoticons/mozilla_embarassed.gif"/>
<entry key="confused.pattern" value="`:|"/>
<entry key="confused" value="/images/emoticons/mozilla_undecided.gif"/>
<entry key="cool.pattern" value="])"/>
<entry key="cool" value="/images/emoticons/mozilla_cool.gif"/>
<entry key="cry.pattern" value=":'("/>
<entry key="cry" value="/images/emoticons/mozilla_cry.gif"/>
<entry key="devil.pattern" value="})"/>
<entry key="devil" value="/images/emoticons/mozilla_innocent.gif"/>
<entry key="grin.pattern" value=":D"/>
<entry key="grin" value="/images/emoticons/mozilla_smile.gif"/>
<entry key="happy.pattern" value=":)"/>
<entry key="happy" value="/images/emoticons/mozilla_laughing.gif"/>
<entry key="laugh.pattern" value="(D"/>
<entry key="laugh" value="/images/emoticons/mozilla_laughing.gif"/>
<entry key="love.pattern" value="<3"/>
<entry key="love" value="/images/emoticons/mozilla_kiss.gif"/>
<entry key="mischief.pattern" value=";7)"/>
<entry key="mischief" value="/images/emoticons/mozilla_sealed.gif"/>
<entry key="plain.pattern" value=":|"/>
<entry key="plain" value="/images/emoticons/mozilla_smile.gif"/>
<entry key="sad.pattern" value=":("/>
<entry key="sad" value="/images/emoticons/mozilla_frown.gif"/>
<entry key="shocked.pattern" value=":O"/>
<entry key="shocked" value="/images/emoticons/mozilla_surprised.gif"/>
<entry key="silly.pattern" value=":P"/>
<entry key="silly" value="/images/emoticons/mozilla_tongueout.gif"/>
<entry key="wink.pattern" value=";)"/>
<entry key="wink" value="/images/emoticons/mozilla_wink.gif"/>
</map>
</property>
<property name="parseComments" value="false"/>
</bean>
You may then add "enhanced-emoticons" to one of the flavor-based plugin chains.
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.
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.
The parseComments property sets whether or not the plugin should be applied to comments.
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.