By Chronistin on
I successfully installed the smileys module, but now my users want those little critters clickable. I tried to implement that feature using javascript (had it working way back in a selfmade script), but somehow it just does not work. I'm guessing that this is because the smileys appear in a "block" instead of the fieldset (not quite sure about this).
Can anybody point me in the right direction?
thanks,
Chronistin
Comments
let understand correctly
So do you want that side block of smiley's "clickable" that automaticly inserts the corresponding code for that smiley. Like the way other forums have it (phbb)?
I would like this feature too, I'm looking into the way phbb does it. I'll let you know how it turns out.
some problems
Little problem, the way drupal does the input fields isnt close to the way its done on phpbb. Also whats more worse is each smiley has (most of them anyways) multipul keywords to display it. The way the smileys module works is it prints out a variable containing all those acronyms/keywords. I dont know how you could cut it down to only say the first word.
VideoJunky.Net - Coming Soon
TinyMCE
Ah, now I see what you wanted - various editors for htmlareas, such as TinyMCE, have this sort of option. TinyMCE's got about 16 smileys you can click from a popup, and it adds the code, but it is not so easy to add more if that is what you want. Good enough, probably, though.
Rick Cogley :: rick.cogley@esolia.co.jp
Tokyo, Japan
thanks for your answers
although I always wanted to try tinyMCE (can I use the 4.6.0 module in a 4.5.0 environment?), I do not want to lose my custom-smileys.
videojunky, I'm not much of a php-programmer. In what way would the issue of multiple keywords influence "clickable" smileys? The way I understand it, this would be a separate feature ( i.e., keyword induced smileys would work as they do now, but _in addition to that_ you could also click the icon to insert it.
If someone finds a way to do that, please let me know. (& if I find a way to do it, I will let you know.)
I would like clickable
I would like clickable smileys as well. Has there been any progress on this? I suppose it should be enough to make a javascript powered block where when you click on a smiley it just adds the smiley code. The trick is in having the actuall clickable smiley button display a smiley that is set in smiley module administration. Other than that, the thing should be quite easy to do, right?
Anyone did it?
Thanks alot
Daniel
Clickable Smileys
I tried to make clickable smileys, and it seems to work! :-)
I'm on Drupal 4.7.3., Smileys module 1.45.2.4, and no WYSIWYG editor (we're using the Texy module for pseudo-markups in our texts).
At the end of smileys.module file I added the following:
In addition, a brand new file must be added to the 'smileys' folder (the same where the .module file is), named "smileys.js", which should read:
This patch adds all your available Smileys below textareas (everywhere excepting admin pages - TODO: more friendly page-selection depending on content-type or filters used?), clicking these smileys sets the corresponding acronym (first from the Smiley's list) into the textarea, at cursor position when possible (code snippet taken from img_assist), surrounded by spaces to ensure standalone smileys are ok. Multiple textareas on one page (CCK) works well.
You need to style this Smiley-list somehow in your theme's style.css - there are DIVs with class "smileys" and "smiley" to allow you something like "display:block; float:right", producing a nice Smileys control bar. In my case it fits just right to the img_assist icon.