Some time ago, after some struggle, I managed to somehow add clickable smileys-selection to the 4.7.x version, where it seems to be missing (http://drupal.org/node/150305).
Now, upgrading to Drupal 5.1, I noticed the similar solution already existing in the 5.x-1.1 version, but compared to my older code already working on the site in question, I found it insufficient:
--- It fails completely on CCK node types, where multiple text-areas are used. Only just one selection-box (fieldset) is present far away from textareas (due to weights), and inserts to no textarea at all. So it's no use for CCK content-types.
--- I prefer having the Smileys attached to the textarea itself (just like image_assist button), which is more compact as opposed to separate fieldset seen in 5.x-1.1, and perhaps also more correct, considering that Smileys are no selection in the form at large, but merely a tool for handling the one single textarea. This approach also allows the CCK issue to be solved.
--- I wnated the Smileys also in Private messages (privatemsg module).
So, I reworked and improved my previous patch for 5.x-1.1. The Privatemsg part shows up only when that module is enabled, with a new checkbox in admin settings. Multiple textareas on CCK nodes works fine. Smileys are attached directly to textareas.
The smileys.js and smileys.css files are completely replaced for this patch, I'll submit these below.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | smileys.css_.txt | 397 bytes | JirkaRybka |
| #1 | smileys.js_.txt | 940 bytes | JirkaRybka |
| smileys-select-box.patch | 3.76 KB | JirkaRybka |
Comments
Comment #1
JirkaRybka commentedThis is the JavaScript file needed for my patch.
Comment #2
JirkaRybka commentedAnd finally the .css file... Please remove the .txt extension - Drupal.org didn't allow me to attach a .css file :-/
Comment #3
csc4 commentedSmileys for CCK would be great +1 for this patch
Comment #4
JirkaRybka commentedI'm giving up on this - the solution currently present in smileys module is still unusable for CCK content types, as well as non-node forms (where input formats are still applied, such as private messages (privatemsg module), user profile, and the like), but works reasonably well, and with a bit of hook_form_alter() and theme alterations I managed to make it look right too... So I think there's no need for my completely different alternative solution (which was more of a hack, needed back on 4.7.x).
So, closing my own issue, as obsolete (almost 2 years outdated now).
The CCK/non-node usability should get an own issue (if there's not one already), but currently I'm not concerned too much.