summaryrefslogtreecommitdiff
path: root/TWiki/SmiliesPlugin.mdwn
blob: 8a7c0ee007570b317d09f32c9eafc209dbc23fdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# <a name="The_Smilies_Plugin"> The Smilies Plugin </a>

Smilies are common in e-mail messages and bulletin board posts. They are used to convey an emotion, such as a smile :-) or a frown :-( . This plugin automatically converts certain smilies to a nice small icon.

Here is the list of smilies supported by this plugin. To add others, attach new icons to this topic and tweak the table below.

<table border="1" cellpadding="1" cellspacing="0">
  <tr>
    <th bgcolor="#99CCCC"><strong>You type</strong></th>
    <th bgcolor="#99CCCC"><strong>You see</strong></th>
    <th bgcolor="#99CCCC"><strong>Emotion</strong></th>
  </tr>
  <tr>
    <td><nop>:-) </nop></td>
    <td> %ATTACHURL%/smile.gif </td>
    <td> "smile" </td>
  </tr>
  <tr>
    <td><nop>:) </nop></td>
    <td> %ATTACHURL%/smile.gif </td>
    <td> "smile" </td>
  </tr>
  <tr>
    <td><nop>:cool: </nop></td>
    <td> %ATTACHURL%/cool.gif </td>
    <td> "cool!" </td>
  </tr>
  <tr>
    <td><nop>:( </nop></td>
    <td> %ATTACHURL%/frown.gif </td>
    <td> "frown" </td>
  </tr>
  <tr>
    <td><nop>:-( </nop></td>
    <td> %ATTACHURL%/frown.gif </td>
    <td> "frown" </td>
  </tr>
  <tr>
    <td><nop>:o </nop></td>
    <td> %ATTACHURL%/redface.gif </td>
    <td> "embarrassment" </td>
  </tr>
  <tr>
    <td><nop>:D </nop></td>
    <td> %ATTACHURL%/biggrin.gif </td>
    <td> "big grin" </td>
  </tr>
  <tr>
    <td><nop>;) </nop></td>
    <td> %ATTACHURL%/wink.gif </td>
    <td> "wink" </td>
  </tr>
  <tr>
    <td><nop>;-) </nop></td>
    <td> %ATTACHURL%/wink.gif </td>
    <td> "wink" </td>
  </tr>
  <tr>
    <td><nop>:p </nop></td>
    <td> %ATTACHURL%/tongue.gif </td>
    <td> "razz (stick out tongue)" </td>
  </tr>
  <tr>
    <td><nop>:rolleyes: </nop></td>
    <td> %ATTACHURL%/rolleyes.gif </td>
    <td> "roll eyes (sarcastic)" </td>
  </tr>
  <tr>
    <td><nop>:mad: </nop></td>
    <td> %ATTACHURL%/mad.gif </td>
    <td> "mad!" </td>
  </tr>
  <tr>
    <td><nop>:eek: </nop></td>
    <td> %ATTACHURL%/eek.gif </td>
    <td> "eek!" </td>
  </tr>
  <tr>
    <td><nop>:confused: </nop></td>
    <td> %ATTACHURL%/confused.gif </td>
    <td> "confused" </td>
  </tr>
</table>

## <a name="_TOPIC_Global_Settings"> %TOPIC% Global Settings </a>

Plugin settings are stored as preferences variables. To reference a plugin setting write <code>**%&lt;plugin&gt;\_&lt;setting&gt;%**</code>, for example, <code>**%INTERWIKIPLUGIN\_SHORTDESCRIPTION%**</code>

* One line description, shown in the %TWIKIWEB%.TextFormattingRules topic:
  * Set SHORTDESCRIPTION = Render smilies as icons, like ` :-)` for :-) or ` :cool:` for :cool:

* Set DEBUG to 1 to get debug messages in `data/debug.txt`. Default: `0`
  * Set DEBUG = 0

* The name of the topic containig your Smilies. Default: <code>**%WEB%.SmiliesPlugin**</code>
  * #Set TOPIC = [[TWiki/SmiliesPlugin]]

* The way the _emoticon_ is displayed. You can use <code>**$emoticon**</code> (e.g. <code>:D</code>), <code>**$url**</code> (e.g. <code>%ATTACHURL%/biggrin.gif</code>) and <code>**$tooltip**</code> (e.g. `"big grin"`). Default: <code>**&lt;img src="$url" alt="$tooltip" /&gt;**</code>

          * #Set FORMAT = <img src="$url" alt="$emoticon" />

## <a name="Plugin_Installation_Instructions"> Plugin Installation Instructions </a>

* Download the ZIP file from the Plugin web (see below)
* Unzip <code>**%TOPIC%.zip**</code> in your twiki installation directory. Content: <table border="1" cellpadding="1" cellspacing="0">
  <tr>
    <th bgcolor="#99CCCC"><strong>File:</strong></th>
    <th bgcolor="#99CCCC"><strong>Description:</strong></th>
  </tr>
  <tr>
    <td><code><b>data/TWiki/%TOPIC%.txt</b></code></td>
    <td> Plugin topic </td>
  </tr>
  <tr>
    <td><code><b>data/TWiki/%TOPIC%.txt,v</b></code></td>
    <td> Plugin topic repository </td>
  </tr>
  <tr>
    <td><code><b>lib/TWiki/Plugins/%TOPIC%.pm</b></code></td>
    <td> Plugin Perl module </td>
  </tr>
  <tr>
    <td><code><b>pub/TWiki/%TOPIC%/*.gif</b></code></td>
    <td> Plugin icon files </td>
  </tr>
</table>
* Test if the plugin is correctly installed:
  * You will see a series of icons on next line: <br /> :-) :) :cool: :( :o :D ;) :p :rolleyes: :mad: :eek: :confused:

## <a name="Plugin_Info"> Plugin Info </a>

<table border="1" cellpadding="1" cellspacing="0">
  <tr>
    <td align="right"> Plugin Author: </td>
    <td> %TWIKIWEB%.AndreaSterbini </td>
  </tr>
  <tr>
    <td align="right"> Plugin Version: </td>
    <td> 20 Apr 2002 </td>
  </tr>
  <tr>
    <td align="right"> Change History: </td>
    <td>   </td>
  </tr>
  <tr>
    <td align="right"> 20 Apr 2002 </td>
    <td> Improved performance; removed non-standard Plugin API dependencies; added standard plugin topic content -- %TWIKIWEB%.PeterThoeny </td>
  </tr>
  <tr>
    <td align="right"> 23 Nov 2001 </td>
    <td> Added TOPIC and FORMAT setting </td>
  </tr>
  <tr>
    <td align="right"> 10 Jun 2001 </td>
    <td> Packaged into ZIP </td>
  </tr>
  <tr>
    <td align="right"> 28 Feb 2001 </td>
    <td> Initial version </td>
  </tr>
  <tr>
    <td align="right"> CPAN Dependencies: </td>
    <td> none </td>
  </tr>
  <tr>
    <td align="right"> Other Dependencies: </td>
    <td> none </td>
  </tr>
  <tr>
    <td align="right"> Perl Version: </td>
    <td> 5.0 </td>
  </tr>
  <tr>
    <td align="right"> Plugin Home: </td>
    <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%</a></td>
  </tr>
  <tr>
    <td align="right"> Feedback: </td>
    <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev</a></td>
  </tr>
</table>

**_Related Topics:_** %TWIKIWEB%.TWikiPreferences, %TWIKIWEB%.TWikiPlugins

-- %TWIKIWEB%.AndreaSterbini - 28 Dec 2000 <br /> -- %TWIKIWEB%.PeterThoeny - 20 Apr 2002