Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F9786464
emoticons.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
emoticons.php
View Options
<?php
/**
* Display Emoticons
*
* Sample plugin to replace emoticons in plain text message body with real icons
*
* @version 1.0.1
* @author Thomas Bruederli
* @website http://roundcube.net
*/
class
emoticons
extends
rcube_plugin
{
public
$task
=
'mail'
;
private
$map
;
function
init
()
{
$this
->
task
=
'mail'
;
$this
->
add_hook
(
'message_part_after'
,
array
(
$this
,
'replace'
));
$this
->
map
=
array
(
':)'
=>
html
::
img
(
array
(
'src'
=>
'./program/js/tiny_mce/plugins/emotions/img/smiley-smile.gif'
,
'alt'
=>
':)'
)),
':-)'
=>
html
::
img
(
array
(
'src'
=>
'./program/js/tiny_mce/plugins/emotions/img/smiley-smile.gif'
,
'alt'
=>
':-)'
)),
':('
=>
html
::
img
(
array
(
'src'
=>
'./program/js/tiny_mce/plugins/emotions/img/smiley-cry.gif'
,
'alt'
=>
':('
)),
':-('
=>
html
::
img
(
array
(
'src'
=>
'./program/js/tiny_mce/plugins/emotions/img/smiley-cry.gif'
,
'alt'
=>
':-('
)),
);
}
function
replace
(
$args
)
{
if
(
$args
[
'type'
]
==
'plain'
)
return
array
(
'body'
=>
strtr
(
$args
[
'body'
],
$this
->
map
));
return
null
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 6:35 AM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1234064
Default Alt Text
emoticons.php (1 KB)
Attached To
Mode
R3 roundcubemail
Attached
Detach File
Event Timeline
Log In to Comment