» in my experience...

» home | about | contact | résumé
» archives | donate | rss syndication

»
»
My Brother's house, several years ago.


Communiblog Communiblog expressed as RSS 2.0
Here at IMX
Memes R' Us
freetheaudio2.jpg
SuperNova 1987A from 1994 to 2003
GarageBand

Comment icons explained.
[ Posted by Dan on February 20, 2003 | 1 Comments ]

Morbus Iff was curious about "the faces you used for your commenting." He asked "How do you have that hooked into Movable Type? What's storing the 'what face you chose' info?" I answered via email, but it's probably useful to post this up on the site...

First, I don't write anything into any db tables or handle any hidden form elements, instead I'm using two plugins from Brad Choate (this one and that one). One of them lets me read any MovableType field and see if there is a key value pair in that field. I'm placing a key and value into the MTCommentBody field when a user submits a comment in this format...

faceurl=some/url/to/an/image.gif

...and goes at the end of the comment (placed there via JavaScript). At the same time, I set that value into a cookie. Currently, I am only saving that value if they select one of the faces I have in the pop up menu. If you select the 'normal guy' I don't save it's value (and assume a default later...)

In the individual archive template, I use the key-value plugin to look into the MTCommentBody fields to see if faceurl exists, and if so, we use its value to set the src of the face icon image. If there is none at all, I assume the default and insert the url for 'Normal Guy.'

THEN, when we output the value of the comment body, we regex MTCommentBody to remove any face url text...

s/faceurl\=[\w|\W|\S]*//g

Don't laugh an my lame regex skills. heheheh.

Future plans are to make it possible to save any URL to an image the user wants. Currently, if you select 'normal guy' as the face, and then write in "faceurl="http://yoursite.com/your_image.gif" on the bottom line of your comment, that url will be used. But it isn't currently saved.

Rumors are that the Pro version of MovableType will have custom form fields making all of the above unnecessary (except for the cookie thing).

 

I think it's also really important to add face icons to blogs as well. For my own online diary, I wrote a system where users could upload a photo and then (using javascript/PHP) crop it down to just their face, and this would become their icon. It then appears next to everything they add to the site (comments, shouts, links, photos etc).

I have written more about it in my article Making Faces - More Mozilla Issues


-Posted by Chris Beach on August 1, 2004 07:24 AM




Comment posting has been turned off because I don't have enough time and will to deal with the constant comment spamming. I'm very sorry and will fix this sometime soon (soon = before 2004 ends).

MovableType AmphetaDesk
NetNewsWire BlogTree Subscribe with Bloglines RSS Feed
Copyright © 2001 - 2003 by Daniel Kapusta