Earth Home Links Archives Photos About Home

Widgetizing

Posted on Sunday September 20, 2009 at 1:16 pm. Tags: ,

I’m making some apparently much-needed upgrades to my Wordpress theme. Since I downloaded, modified, and installed this theme, WP has developed “widgets”, which seem to function as drag-and-drop objects for common things like recent posts, comments, archives, etc. Plus, my new plugins like WP-Cumulus and Fotobook have available widgets.

So this site might look a little messy for a while. I currently have widgets installed on the right toolbar. I’m going to modify their CSS to get them looking the same (they’re pretty close already) and then finish up the installation. I’m hoping that it’ll make the whole setup a little more modular, so I can move things around a little without getting elbow-deep in CSS theme sewage.

So stay tuned. A prettier supercres.net coming right up, hopefully.

wget considered harmful

Posted on Friday September 18, 2009 at 3:25 pm. Tags: , ,

Considered harmful to Wordpress, anyway.

I was trying to type my previous entry, about getting Fotobook working, especially the second bit about getting the update script running automatically through my crontab. The problem was… I couldn’t type wget!

It’s kind of an important part of the crontab line; that’s the command that has Unix load the given page. But for some reason, every time the word wget was in the post, I got an error when I tried to publish my edits. I’m guessing that Wordpress tries to execute wget when it finds it (for reasons unknown; a bug?). So I spent longer than I care to recount trying to figure out how to disguise wget in my code, but have it appear normally on the entry so it could be copy-pasted into Terminal.

The first solution I looked for was an HTML tag like to make it not interpreted, and just presented literally. Didn’t work. And my search for a better tag was fruitless, though CDATA looked good for a while. (Guess it doesn’t interpret in XML.)

Then I tried inserting things inside wget. Putting a “|” in the middle obviously worked, but it’s ugly, and I’d have to explain it. So I looked for some latin-1 character that would be invisible.  was close, but for some reason, when it copy-pasted into Terminal, it eliminated the “g“. A 0×0 .gif image would’ve worked, but my stylesheet gives every image padding plus a border, so it looked like a white box in the middle.

Then the lightbulb— any HTML tag that wouldn’t get rendered into something visible would work. I tried <>. That showed up as <> (weird). </> was invisible, but when I went back to edit, WP had gotten rid of it as obviously useless. So then I just used bold tags.

wg<b></b>et worked. Hurrah.

Kludgy, but it works. If you have a better, more elegant solution, I would love to hear it.

Photos galore

Posted on Friday September 18, 2009 at 11:21 am. Tags: , , ,

Oh, this is so so cool.

I got the Fotobook plugin for Wordpress, and now my Photos page is automatically populated with all my Facebook photo albums. And since I installed Lightbox plugin, clicking on the photo enlarges it in a cool Flash (?) overlay.

Very fun. Highly recommended.

Update:
And now I have my cron job working. (On the hour, it repopulates the Photos page with all my most recent Facebook albums and photos.) For the benefit of future Googlers, you’ll want to put something like this in your crontab.

0 * * * * wget --delete-after "http://supercres.net/wp-content/plugins/fotobook/cron.php?secret=************&update"

…Making sure, of course, that it’s all one line and that you replace my URL with the one given in your Fotobook settings. Also note that wget is not included with OS X; they have curl, but I didn’t try that. (I’m putting it in my local machine’s crontab since my website server has shell access but not crontab.)

AND FINALLY… you have no idea how hard it was to get the word wget in a post. For some reason, Wordpress tries to execute it when I click the “Update Post” button. Another post about that coming soon.