Index: openacs-4/packages/forums/tcl/messages-format-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/messages-format-procs.tcl,v diff -u -r1.7.2.1 -r1.7.2.2 --- openacs-4/packages/forums/tcl/messages-format-procs.tcl 20 Mar 2023 15:35:59 -0000 1.7.2.1 +++ openacs-4/packages/forums/tcl/messages-format-procs.tcl 20 Mar 2023 16:07:34 -0000 1.7.2.2 @@ -29,31 +29,24 @@ ad_proc emoticons { {-content:required} } { - Convert smileys (emoticons) to img references. It constructs a relative - image reference to graphics/imagename.gif, so it will only work when - used from pages that are directly under the forums/www/ directory. + Convert smileys (emoticons) in supplied content into emoji + HTML entities. - <p> - - If you change the images make sure to also adapt the image sizes in - the img tag that gets constructed here. + @see https://unicode.org/emoji/charts/full-emoji-list.html } { set emoticons_map [list] # if you change this list, consider changing # www/doc/emoticons.adp as well - foreach { emoticon image } { - ":-)" "smile" - ";-)" "wink" - ":-D" "bigsmile" - "8-)" "smile8" - ":-(" "sad" - ";-(" "cry" - ":-O" "scream" - ":-/" "think" - } { - lappend emoticons_map $emoticon - lappend emoticons_map "<img style=\"vertical-align:text-bottom\" src=\"/resources/forums/${image}.gif\" alt=\"$emoticon\" width=\"19\" height=\"19\">" + set emoticons_map { + ":-)" "😊" + ";-)" "😉" + ":-D" "😃" + "8-)" "😎" + ":-(" "😟" + ";-(" "😢" + ":-O" "😱" + ":-/" "🤔" } return [string map $emoticons_map $content] } Index: openacs-4/packages/forums/www/doc/emoticons.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/doc/emoticons.adp,v diff -u -r1.1 -r1.1.22.1 --- openacs-4/packages/forums/www/doc/emoticons.adp 22 Sep 2003 20:46:04 -0000 1.1 +++ openacs-4/packages/forums/www/doc/emoticons.adp 20 Mar 2023 16:07:34 -0000 1.1.22.1 @@ -4,35 +4,36 @@ <table> <tr> - <td>:-)</td><td><img src="/resources/forums/smile.gif"></td> + <td>:-)</td> + <td>😊</td> </tr> <tr> <td>;-)</td> - <td><img src="/resources/forums/wink.gif"></td> + <td>😉</td> </tr> - <tr> + <tr> <td>:-D</td> - <td><img src="/resources/forums/bigsmile.gif"></td> + <td>😃</td> </tr> <tr> - <td>8-)</td> - <td><img src="/resources/forums/smile8.gif"></td> + <td>8-)</td> + <td>😎</td> </tr> <tr> <td>:-(</td> - <td><img src="/resources/forums/sad.gif"></td> + <td>😟</td> </tr> <tr> <td>;-(</td> - <td><img src="/resources/forums/cry.gif"></td> + <td>😢</td> </tr> <tr> <td>:-O</td> - <td><img src="/resources/forums/scream.gif"></td> + <td>😱</td> </tr> <tr> <td>:-/</td> - <td><img src="/resources/forums/think.gif"></td> + <td>🤔</td> </tr> </table>