scriptygoddess

23 Feb, 2003

Lazyman's smilies…

Posted by: Jennifer In: Scripts

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

103 Responses to "Lazyman's smilies…"

1 | Lily

July 4th, 2004 at 9:45 am

Avatar

I'm having a problem with my smileys in the comment page. I have already checked "allow all html" in the webconfig…but why's that tag can't read…help!

2 | Lily

July 4th, 2004 at 9:50 am

Avatar

I mean…that goes for Movabletype. img tag I mean

3 | AStarWithin

December 28th, 2004 at 1:28 am

Avatar

Smile! You've got smilies!
jnyhkn hyhhc –>I've been searching for a better smiley solution and I found a neat script at Scriptygoddess that would allow me to finally make my own smilies. Or collect a bunch that I like if I get lazy. Anyway, worth checking out….

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements