One of the reasons I had taken smilies off my site was because I didn't like the look of all these smilies on my comment form. Pruning my list of smilies was difficult, but the more smilies I had, the more "messy" the form. Also, with tons and tons of smilies, that meant writing a TON of code to make each one "clickable." Well, I think I've come up with a solution…
This script will launch a "smilie palette" that will update the comments form on the "parent" window with the smilie.
To take it one step further, I also created a php script that will load all the images from your (smilie) folder on the page… so you can have as many smilies on that palette as you can fill in your folder, and you don't have to sit there writing the code for each one as noted in the original javascript smilie script.
(also – a side note: Jason's (of Jason's Smilies) moved. Please update your bookmarks.)
Put this on your comments form:
<a href="#" onClick="window.open('/smilies/index.php','smilies','scrollbars=yes,width=400,height=300')">Add a smilie</a> (launches smilie 'palette')
Edit the "smilies" in there to the correct path to your smilie folder.
(side note: make sure the FORM tag surrounding your comments form has a *name* attriubte. Make a note of the value of that attribute. ie. if you see this: name="comments" … comments is the name of the form)
Then, download this file: SmilieIndex.txt (right-click and save target as) and rename it index.php. Edit the variables at the top of the page, and upload it into your smilie folder.
This is currently running on my personal journal. (Feel free to go there and test it out, etc. – but please don't actually hit the "post comment" button and leave pointless comments just to test out the smilies.)
Important update If you're using 2.6+ and/or the sanitize plugin for mt – make sure you're allowing IMG tags WITH width and height and src attributes… otherwise the smilie won't display in the comment…
Another important update: Script was upadated (just the txt file) (updated on 2/24/03 – at 12:30pm) so that it sorts your smilies alphabetically. So now you can rename your "most used" smilies (ie. Wink, Smile, Laugh, etc.) so that they'll show up first on your smilie palette.
Yet, another update: Some new modifications posted here.
'nother update: Lisa (Unixgal) wrote a version of this that will embed your smilie palette
Return of the update: VERSION 2 This one includes a variable that will let you customize the number of columns that are displayed. SmilieIndexV2.txt