Archive for the ‘Blogosphorum’ Category

Blogonews.

UPDATE: Sometime over the weekend, I broke the stupid import script. I guess I have some more motivation to fix it now.

Some work on the RSS/Forum hybrid, over the past week:

  • Added mod_rewrite support, for pretty little hyperlinks like this one. Shockingly painless, that one, but then these are very simple RewriteRules.
  • Renamed project from boring “RSS Forum” to utterly retarded “Blogosphorum”. There’s a WordPress tag for it now, as well, so you’ll always remember why I’m not in marketing.
  • Added grouping for forums, so they’re sorted a little better now.
  • Added “first page” and “last page” links to thread navigation.
  • Threads are culled after 2 weeks now, instead of 30 days. Older threads don’t get that much traffic anyway, and I’m not crazy about the amount of wasted processing. On a related note, the fetch data script is crap, and I need to re-build it. Also there are some character encoding issues. Yarg.
  • Learned that it’s actually my own damn fault that WordPress threads are truncating. Not that I’ve fixed it, but I know it’s my fault. See above for notes on fetch data script.
  • Finally, the big news: Added ability to reply to threads from the forums. Setting it up to work with WP blogs was pretty trivial (duplicate form fields and form action - the only hard part is parsing the orignal article to pull out the post id). Gawker’s system was anything but. To elaborate, the Gawker system requires:
    • Make post request to page, with valid username and password, via cURL.
    • Parse response, pull out four cookies, out of about ten that it returns. There are some duplicate keys, as well, so you have to be careful to pull the correct value for each.
    • Send another post request, again via cURL, with those cookies and the actual comment text.
  • Happy news: I was going to go through and make the CSS/XHTML validate, then found out that it already did. Exception: I don’t control anyone else’s content, so the feed content might not validate. Everything I wrote does, though. Not even any warnings. Pretty nice.

Thank god for Live HTTP Headers, or that Gawker thing never would have worked. Also thank god for cURL, which is about a million times faster than trying to use fsockopen. Even with such excellent tools to draw on, it took about 3 hours to get the thing working. Live HTTP Headers, in particular, is what made this possible. That would have been completely fucking impossible without being able to see the HTTP traffic real-time. If you are serious about web app development, install it, and also FireBug, right now.

All in all, this is turning into a fun little project. Once I get the XML parsing in a less-horrible state, I think I’ll be ready to add more feeds to it, and start wailing on the thing properly. I’m also considering offering a user control panel, so users can log in and pick from the overall list of feeds, to pare it down to just what they want. It adds a bit of ownership to the process, so you aren’t stuck just reading what I want to read.