COMMENT SYSTEM ONLINE
In one sitting–except a break for lunch, a friend dropping by, and a few phone (fancy hearing from you Jenny) calls–I wrote the long anticipated and requested comment system.
Many of the ideas are shamelessly stolen from genius Phil Hagelberg.
Please report any bugs here. Enjoy.
Jeremiah – email – 2005-05-14 21:42:19
Nice work Ben, I was wondering when I was going to be able to post comments to your blog…
There seems to be a little trouble with the cursor positioning though… Maybe its on my computer.
sab771 – email – 2005-05-15 01:23:07
No, the cursor is goofy for me too.
Wait, now it’s fixed.
Um… maybe not.
Ben – email – 2005-05-15 01:40:05
Fixed Firefox jumping cursor bug (i think).
Ben – email – 2005-05-15 01:46:26
Fixed nasty regex matching incorrectly for s when preceded with r bug which resulted in converting the characters “rs” to a non-sgml character in posts.
Phil – email – 2005-05-15 14:02:58
Nice system. Just checking to see if you save name/email/uri in a cookie for later use.
Phil – email – 2005-05-15 17:23:16
Here’s a nifty regex to replace URIs in the comment with links to the given URI. My apologies if my entites get blasted by your system.
$regex = ‘/http:\/\/([^\ ,\n
Phil – email – 2005-05-15 17:24:13
Yep, it got taken out. Maybe this will go through:
$regex = ‘/http:\/\/([^\ ,\n<]*)/’;
$replace = “<a href=’http://$1′>http://$1</a>”;
$comment[content] = preg_replace($regex, $replace, $comment[content]);
Ben – email – 2005-05-16 00:31:49
Thanks for the regex code Phil, sorry my script blasted it the first time. Cookies are on the todo list.