Recent Comments

All the cool kids are doing it, so here it is. If you put a number at the end, like comments/50, you will se the last 50 comments. Neat huh? Want to see something really fancy? After you put the number on the end, add “rss” like this. Hot damn. It’s even valid. Some feedback would be helpful, because I don’t have an aggregator to test it in on this machine. As Mike would say, “Baaaahhhh.”

The real reason I put this up in the first place is that there is some good discussion (and sometimes not) in the comments occasionally that I feel gets lost in the shuffle. Furthermore, the RSS monkeys have no idea which posts have comments already, or to know automatically if new comments have been posted since they last checked the feed, so this will give them something else to subscribe to for the closer-to-full PhotoMatt Experience. 😉

4 thoughts on “Recent Comments

  1. Share! Share! How is it done, and how are you handling parameters as part of the URI and not on a query string?

    (Oh, and if I didn’t say it last night, having a site redesign, even if only halfway, has to be the coolest birthday present ever. You rock!)

  2. Alrighty, well there’s a comments.php script, but the extension is abstracted away using content negotiation by Apache. It’s a little tricky to explain, but really easy once you get it. Then everything after comments/ is put by Apache in PATH_INFO, which I get to using the superglobal $_SERVER['PATH_INFO']. I then explode that on forward slashes, type the integer for security, and use the arguments passed in the script to generate the page.

  3. I’ve been experimenting with something similar for my blog’s archives. My blogware (MyPHPBlog) generates ugly archive URLs by default; they look like this:

    That URL could be simplified a little bit. The ‘blogid’ and ‘tem’ params are strictly necessary, as they’ll default to my main blog’s settings.
    But with the PATH_INFO mods I’ve made, you can now request a url like this, instead:

    As you can see, I haven’t abstracted away the ‘.php’ extension (yet), but the URL is much friendlier.