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 -r1.8 --- openacs-4/packages/forums/tcl/messages-format-procs.tcl 7 Aug 2017 23:48:11 -0000 1.7 +++ openacs-4/packages/forums/tcl/messages-format-procs.tcl 3 Sep 2024 15:37:38 -0000 1.8 @@ -5,7 +5,7 @@ namespace eval forum::format { ad_proc -public reply_subject { parent_subject } { - + Generates a subject string for a reply to an existing message. The prefix is always added using the system-wide locale to avoid @@ -21,39 +21,32 @@ regsub "^($prefix)+" $parent_subject {} parent_subject set subject [concat $prefix $parent_subject] - + return $subject } 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. -
- - 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 "" + set emoticons_map { + ":-)" "😊" + ";-)" "😉" + ":-D" "😃" + "8-)" "😎" + ":-(" "😟" + ";-(" "😢" + ":-O" "😱" + ":-/" "🤔" } return [string map $emoticons_map $content] }