Re:Ask HN: How to design private messaging emoticons?
by fbailey on Monday July 07, 2008 @03:42AM
(#238414)
sorry but completely wrong: We (geeks on Hacker News) don't like emoticons, the users out there love them
That said, implementing said emoticons is a simple task. Assign a list of emoticon codes and image files (eg. ":)" => "smile.gif" and ":D" => "grin.gif") either hardcoded or in a database table depending on your needs, and use a simple search-and-replace function to replace the emoticon code with an image tag of the file. Make sure this is done when the message's body is parsed, and NOT before it gets inserted into the database.