Uncategorized

I am the Wo-Man! Well, not really…

Yes, I am feeling like quite the guru right now. It’s silly, I know; all I did was hack a little code. Since I have been reading through the archives of NP.com, I have realized how truly irritating the idea of having the archive pages in reverse chronological order is. Yes, Michael complained about the confusion before, and yes, I thought I understood where he was coming from, but until you read 50 or so slightly more than a screenful posts while having first start near the bottom of the page, then scroll down a little to read the post, then scroll up a couple of Page-Ups to read the next article, you don’t understand. So I fixed my page. And therein lies the guru-ness.

I have never been good at editing others’ code. They either comment too much, or not enough, or use short cryptic variable names (anybody look at Greymatter’s code?! Geez-us!), or use names sentences long. And I like object-oriented code, good C++ or Java or something like that. I have always disliked Visual Basic on principle, and have never strived to learn it well, even in school. And scripting languages are the epitomy of evil.

So when I sought out to change the order of presentation of entries on my archive pages while keeping the same reverse-order on the front page, I knew finding the relevant couple of lines could be difficult for me. I made entirely too many changes, then went back and got rid of the superfluous junk I added. For those running BlogWorks XML who are interested, here is the only real change that was necessary:

GetMonthsPosts (in xmlsubs.asp) is a function called that helps create the archive files that are displayed (the .asp or .html files). In that function, there is a For Loop that retrieves each entry from your XML file. Reverse this loop to read “For i = n_blogs-1 to 0 step -1”. That’s it. Upload your xmlsubs.asp and republish your blogs and archives. I take no responsibility if it doesn’t work, but it seems to be working here, so…