Monthly Archives: April 2008

The Right Way to Use JavaScript in Your WordPress Plugin

Ozh explains how to properly use JavaScript in your WordPress plugins. There are two key parts: Use wp_enqueue_script() to load external libraries and standalone scripts, instead of generating your own script header tags. On admin pages, use the admin_print_scripts-[mypage] action hook to register the code on only your plugin’s page, not every admin page. Both [...]

WordPress Database Errors and the Post Hoc Fallacy

Glenn Reynolds at Instapundit mentioned WordPress today in not-so-flattering terms (emphasis added): LIEBERMAN CAMPAIGN CRASHED OWN WEBSITE: “The server that hosted the joe2006.com Web site failed because it was overutilized and misconfigured.” That’s like when people send me a link to their underpowered WordPress blog, then it produces a “Database Error” message when too many [...]

How I Rip and Encode MP3s on the Ubuntu Linux Command Line

I like to know how to use the command line for everything I can. Here are the tools and commands I use to make mp3s. First, I rip from the CDROM to a wav file. cdparanoia 1 prokofiev1.wav cdparanoia lets me specify the input device, but I don’t need to, since the default—/dev/cdrom—is what I [...]

CSS Naked Day

If you think things look odd here today, it’s because I’ve disabled my blog’s styling for “CSS Naked Day.” The idea is to emphasize that styling on the web–particularly, that done with CSS, or “cascading style sheets”–should be separate from the structure, or markup. In part, one should separate style from content because a number [...]

Cell Tower in Your House

This is what I need: my own “femtocell,” a cellular phone base station that you can put in your home. It connects through your broadband Internet to give your phone a strong signal. I don’t use a landline, and despite being in Boston my connections are sometimes embarrassingly poor, often losing the signal mid-call. So [...]