PHP, Plugins

Posted 2009.03.30 18.47 in Computers/Internet/Technology

So I’ve been working more on the dropdown menus and I’m about 98% satisfied with them. I ran into some areas where either “I wuz doin it wrong” or the plugin didn’t work as I thought it would/should. Basically there were three things that I had to fix/change. First, the menu sorting was not ideal; I wanted it to have two levels of sorting and it only did one. Second, it was supposed to highlight the page title you were on, and this didn’t work for pages in the 3rd level. And finally, if you were on a 1st or 2nd level page, it sometimes highlighted all the child-page titles as well, seemingly at random.

Now, my level of PHP experience is about here: I bought a book and have learned how to make minor changes to wordpress themes. Still, I’m not shy about diving in headfirst, and always keep a backup incase I royally screw things up. I’ve got a pretty successful track record of debugging / fixing / modifying software written in languages that I know nothing about. Anyway, it was not too terribly difficult to edit the php file and make it behave the way I wanted it to. Except for one crazy thing.

After messing around with it for an hour, testing, tinkering, testing, things appeared to be working. Then I tried to go into the admin area, and started getting all these error messages. Problems with headers and stuff. I assumed that at some point in my tinkering I had broken things, and although the site seemed to work, I’d busted the admin side. So more tinkering, some googling, and suchforth.

Eventually what I learned was that PHP is incredibly picky when it comes to whitespace at the top or bottom of the files. I normally leave some blank lines at the end for no particular reason when I’m editing in vi and it’s not a problem in html, css, or anything else. So I never would have guessed that a blank line at the end of a PHP file would cause so much devestation. Still, at least it was easy enough to fix, and considering that was the worst mistake I made, all in all it was a pretty successful expedition into PHP and plugins.

And – I got the functionality I wanted out of the dropdown thingy. So, yay me! ūüôā

Upgrade, Upgrade, Upgrade

Posted 2009.03.30 15.13 in Computers/Internet/Technology

Why is it that every time I update a wordpress plugin, there’s a new version available? I have this one that as soon as I installed it, like the day after there was an upgrade available. So I put it off and put it off, then finally yesterday I did the upgrade. ¬†Make the stupid upgrade notice go away. So you know what? Yeah. Today there’s another upgrade.

I mean, I know that it’s most likely a bugfix, what is irking me is that this upgrade happened less than 24 ¬†hours after I caved in and installed the last upgrade.

Now I’m thinking of just deleting the plugin. It’s not anything critical anyways, not like it’s driving my dropdown menus or anything like that. It would be nice though if they’d at least say what had changed – I couldn’t find that last time, like what’s different between 3.0.1 and 3.0.3 that would make me want to go through the process?

I understand that WordPress itself is going to release a big upgrade next month. They’ve rejiggered how widgets work and done some stuff to how themes work. I hope it doesn’t mean having to redo all the work I’ve just finished on my theme. Grrr. Not that I want things to be static and unchanging, but… it’s just annoying to have to do things over and over.

I guess one doesn’t have to upgrade. But then you get stuck on some older thing, ignoring progress and clinging to outdated software isn’t good either.

I dunno.

Nucking Futters.

Posted 2009.03.30 9.07 in Life On Drugs, Pointless Blather

I forgot to take my cryptospam again yesterday. ¬†This is a problem I have with any medication you’re supposed to take every day. ¬†Eventually, I can’t remember not taking it, because my head fills up with memories of taking it. ¬†I’ve taken it a hundred times. ¬†How can I be sure one of those times wasn’t today?

I was thinking of getting a t-shirt made with the word NUTS printed on it, front and back, in big block letters. ¬†Let people make what they will of that. ¬†Or when it gets warm enough not to need a sweater or jacket, I might start wearing my lab coat everywhere. ¬†I don’t work in a lab, but I own a lab coat. ¬†You know, long white coat, some pockets, clearly intended for a doctor or lab type person. ¬†I could even make up an official looking passcard to clip to it. ¬†The passcard would also say NUTS. Although people might then think I worked in a nut factory. ¬†Then again, maybe I do.