KBD

Keith Devens .com

Tuesday, March 16, 2010 Flag waving
I think I was basically a victim of what I like to call 'dumb people' -- people who are never going... – Joss Whedon (on the cancellation of Firefly)
← Aaaaargh.... I hate PHP, yet againRelated entries →

Daily link icon Friday, April 25, 2003

Comments work again

Comments work again. They were disabled for a while because I was working on my CMS code that handles form submissions. It took me a lot longer than I expected to get this stuff done because of a bunch of different things.

As part of the process, I wound up making a whole "cookie framework" so now it's really simple to deal with cookies from within my CMS. PHP's built-in cookie handling sucks (the only characters that are allowed in cookie names are those that are valid for PHP variables). Plus, I actually validate cookies according to a generated checksum, so if cookies are tampered with on the client side they'll be ignored (and then deleted, mwa ha ha). I may even include an option to encrypt cookies automatically, or on a per-cookie basis. Pretty cool.

Another thing that held me up and frustrated me a whole bunch is that I had a bug in one of my libraries. It's like generational garbage collection... you check the code you've written more recently for errors, and then you keep going further and further back in your code until you finally track down what it was. Within my custom markup language parser I'm using for my config files, as well as to serialize cookies, I had a line that was basically like "return substr($str,0,$len)". It turns out that if the string is empty (which means that $len would be zero), that returns false, not an empty string like I expected.

Plus, along the way I wound up changing a few other things about how my CMS works, how models are loaded, etc. etc. For instance, now that all data validation can be done in the code for the "action", I don't need to do it anymore in the model function that's called to save data. So that simplified the model code a lot.

So, it turned out to be a much bigger job than I expected, but my CMS continues to rock and get better Smiley Now that I have the form framework in, I can finish up my wiki, get a real backend administration interface going, etc.

← Aaaaargh.... I hate PHP, yet againRelated entries →

Comments XML gif

Keith wrote:

Testing just to make sure I wasn't lying that comments work again Smiley winking

Keith | 25-Apr-2003 2:14pm est | #1891

Keith wrote:

Ok, one more time to make sure that I get e-mailed when comments are left.

Keith | 25-Apr-2003 2:15pm est | #1892

Keith wrote:

Ok, one more time to make sure the web site is being properly input into the database.

Keith | 25-Apr-2003 2:21pm est | #1893

sparticus (http://www.iamsparticus.co.uk) wrote:

You know what you should do with cookies, put some in the comments thing a-la movabletype. That'd save my lazy ass some work typing in my name and website everytime I want to write something pointless

∴ sparticus | 25-Apr-2003 2:37pm est | http://www.iamsparticus.co.uk | #1902

Keith (http://www.keithdevens.com/) wrote:

That's what I do. It does remember it, right?

Keith | 25-Apr-2003 2:38pm est | http://www.keithdevens.com/ | #1903

Reverend JIm (http://revjim.net/) wrote:

Testing to see if it remembers my info.

∴ Reverend JIm | 25-Apr-2003 3:34pm est | http://revjim.net/ | #1907

Reverend JIm (http://revjim.net/) wrote:

Yes it does.

∴ Reverend JIm | 25-Apr-2003 3:34pm est | http://revjim.net/ | #1908

Keith (http://www.keithdevens.com/) wrote:

It work?

Keith | 25-Apr-2003 3:34pm est | http://www.keithdevens.com/ | #1909

Keith (http://www.keithdevens.com/) wrote:

Ha, good.

Keith | 25-Apr-2003 3:34pm est | http://www.keithdevens.com/ | #1910

Reverend JIm (http://revjim.net/) wrote:

Ut-oh. You took away e-mail based comment subscriptions?

∴ Reverend JIm | 25-Apr-2003 3:34pm est | http://revjim.net/ | #1911

Keith (http://www.keithdevens.com/) wrote:

Yeah, they went away when I switched to my CMS. It was one of the features I considered expendable, where I'd rather have gotten my CMS up and running without it than wait until I implemented it to make the switch.

That's one of the things I'm going to work on now.

Keith | 25-Apr-2003 3:37pm est | http://www.keithdevens.com/ | #1912

Reverend JIm (http://revjim.net/) wrote:

Subscribing to a single entry comments RSS feed is useless. So, personally, I can't think of a better way to be notified of comments. And I hate not being able to be notified of new comments.

Someone should implement a central comment notification server (like weblogs.com is for weblog updates). Any weblog that has a full comments feed can participate. Each entry has a "subscribe" link that goes to the central server. The central server then requests feeds from (or gets pinged when there is an update) each weblog that is registered. When it sees new items, it catalogs them and then looks to see if any of its users are subscribed to that item. If so, it notifies them. This could be either via RSS, email, or Jabber message.

Heh. I over think everything.

∴ Reverend JIm | 25-Apr-2003 4:03pm est | http://revjim.net/ | #1913

sparticus (http://www.iamsparticus.co.uk) wrote:

Oh I see what you mean, I thought it was just like for when you where accessing your cms and stuff. Good work!

∴ sparticus | 25-Apr-2003 6:39pm est | http://www.iamsparticus.co.uk | #1914

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

March 2010
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 1 posts

Recent comments XML

Quantum physics and free will

I knew you were going to say that....

Tom Massey: Mar 15, 9:26pm

Generated in about 0.127s.

(Used 8 db queries)