The Toolkit for Online Communities
17516 Community Members, 0 members online, 2107 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : Emoticons for forums?

Forum OpenACS Development: Emoticons for forums?

Icon of envelope Request notifications

Posted by Tilmann Singer on
A client wants forums with automatic conversion of smiley symbols ;-), :-) etc. to small images. Any objections if that becomes an optional functionality of forums?

I would make it a package parameter (off by default) that triggers a simple regsub on pages that display messages with a few predefined patterns plus some small image files beneath forums/www/graphics/. Would it be ok to include the images in the toolkit, or should they be downloadable optionally?

Any suggestions for already existing patterns and images that could be re-used? (I thought about looking into gaim, but if there's a place that doesn't require wading through C code then I'd prefer that)

2: Re: Emoticons for forums? (response to 1)
Posted by Lars Pind on
Tilmann, I'd love to see that. I'd say get to it! :-)


3: Re: Emoticons for forums? (response to 1)
Posted by Michael A. Cleverly on
TkChat (the GUI client for the Tcl'ers Wiki Chat) has a large number of emoticons (inlined base-64 encoded in .tcl) which should be simpler to grok than gaim's C code.  :-)

See http://wiki.tcl.tk/tkchat

4: Re: Emoticons for forums? (response to 1)
Posted by Patrick Giagnocavo on
Can I just point out that I have had very good results with using string map in similar situations?  It might be both more efficient, and easier to maintain, than a bunch of regexp's.
5: Re: Emoticons for forums? (response to 1)
Posted by Ben Koot on
Please add this sooner rather than later. People realy like this. also not this is default on all modern systems like msn messenger, so you can't do without it, how trivial it may seem.
6: Re: Emoticons for forums? (response to 1)
Posted by Frank N. on

I went looking for emoticon graphics as late as yesterday, when considering the functionality of the OACS. Here are a few links. It seems it is the same icons, that are used repeatedly all over the place, but don't ask me what license they are covered by, if any. (Compulsory smiley.)


My idea was to select a nice subset of the 15x15 emoticons, and tag the HTML with width and height tags. Most bboard software I have seen use straight smiley-to-graphics conversion for the simple types, and the format for the more complex ones are, say, :frown: etc.


7: Re: Emoticons for forums? (response to 6)
Posted by Tilmann Singer on
Frank, thanks for the links - unfortunately I have already added the icons from gaim for now, because they seem to be most complete and homogenous, although maybe a little too large for some layouts (19x19 png's). If you have time to wade through those sites, make sure that the copyright is ok and put together a collection of some smaller smileys, go ahead ;-)

(but please no animated ones - that's over the top IMHO)

The patch is here: http://openacs.org/bugtracker/openacs/patch?patch_number=4

The tcl command 'string map' is very useful indeed for this purpose. Currently the code does simply replace _all_ occurences of smiley patterns with the corresponding img tags - I wonder if there are going to be collisions with text that is not intended as emoticon, e.g. stuff inside of html tags. I left out the more likely patterns such as :) and :( to be a bit safer here.

8: Re: Emoticons for forums? (response to 7)
Posted by C. R. Oldham on
Yes, there are often collisions (at least with us techheads) in Trillian.  Try pasting complicated SQL or Tcl code into a Trillian window sometime.  It is entertaining for a brief period until you realize you can no longer figure out what the code does because the smileys are in the way. :-)
9: Re: Emoticons for forums? (response to 1)
Posted by Frank N. on

Tilmann, I will try to see what I can find of smileys with a proper and useful copyright. If my initial search is any indication, then I will have to luck out and find something claiming to be a canonical smiley collection from someone like the original author.

Many, but apparently not all, of the 15x15s on the two sites mentioned are also found in vBulletin, a commercial package, though who came up with them is anyone's guess.

Animated gifs are hugely popular on sites that have them. I happen to like them too. :-)


10: Re: Emoticons for forums? (response to 1)
Posted by Vadim Makarov on
The fix to collisions is to display a checkbox
[  ] Disable smiles
below the Post Message box if this feature is switched on. Make smiles above a hyperlink to the table of smiles, so that the user knows he can use them, and what to type.

I'm personally more concerned that this package parameter is left OFF by default :-). Sites that use smiles, especially animated ones, tend to have a different flavor of discussion - less informative and perhaps more social, attracting casual users who sometimes make posts consisting of smiles alone.

11: Re: Emoticons for forums? (response to 1)
Posted by Rafael Calvo on
can we add them to openacs.org?
it would be a neat feature to show off :-)
12: Re: Emoticons for forums? (response to 1)
Posted by Janine Ohmer on
If it gets turned on here, then please make sure it can be turned off by individual users, such as me.  I hate to be the grinch at this party but I don't care much for UBB style.  I don't object to it being added to the toolkit, since obviously many people like it, but I don't want to have my :) turned into a graphic when I post here!
13: Re: Emoticons for forums? (response to 1)
Posted by Tilmann Singer on
Janine, I don't like them either and my vote is not to switch them on for openacs.org, too ;-)

Vadim, that would solve the problem but it involves an additional column in the forums messages table which is a bit more of a change then I planned to make.

14: Re: Emoticons for forums? (response to 1)
Posted by Vadim Makarov on
If you don't want an extra column, maybe you can skip the emoticon conversion if post is HTML-formatted.
Posted by Tilmann Singer on

it's now in cvs, and activated both for html and plain text postings (if you set the parameter to 1). I suppose not doing the conversion in html mode would cause some confusion for the users who expect that behaviour, and emoticons won't  be switched on in forums with lots of technical discussion anyway so I think that's going to be ok.