MaisonBisson

a bunch of stuff I would have emailed you about

Fiddling With Open Source Software for Libraries Theme

I generally liked CommentPress, but when the Institute for the Future of the Book website went down recently, it started throwing errors in the dashboard. So I decided to re-do the Open Source Software For Libraries website using Derek Powazek’s DePo Masthead. I think it’s a beautifully readable theme, and I only had to make […] » about 200 words

Obama’s Use of Complete Sentences Stirs Controversy

From the Borowitz Report: In the first two weeks since the election, President-elect Barack Obama has broken with a tradition established over the past eight years through his controversial use of complete sentences, political observers say. “Every time Obama opens his mouth, his subjects and verbs are in agreement,” says Mr. Logsdon.  “If he keeps […] » about 100 words

Tricky Uses of bSuite

After writing the project page for wpSMS I didn’t have much more to say in a blog post announcing it. The cool thing about writing Pages in WordPress is that I can create a taxonomy like /projects/wpsms/ to place them in. The downside is that new pages never appear in the RSS feed.

So I need both the page and a blog post to announce it. I could have simply copied the content from the wpSMS page into a blog post, but that creates confusion and splits the audience between the two pages. Instead, I’m using two bSuite features: the [inclu``de] shortcode and the post redirection support.

  1. Create the page.
  2. Start a new post.
    1. In the post body put the include shortcode like this: [inclu``de post_id="123" field="post_content"].
    2. In the custom fields put an entry with the key: “redirect” and the full URL to to your page.
  3. Relax, you’re done.

The include shortcode will copy all the content from the page (so you don’t have to manage it twice), and the redirect custom field will tell bSuite to redirect anybody trying to read that post to your page.

Using WordPress With External SMTP Server

I really don’t like having sendmail running on a webserver, but some features of WordPress just don’t work if it can’t send email (user registration, for example). Still, WordPress offers support to send email through external SMTP servers instead if a local mailer.

In <a href="http://trac.wordpress.org/browser/tags/2.6.3/wp-includes/pluggable.php">/wp-includes/pluggable.php</a> around line 377, change

``` $phpmailer->isMail(); ```

to

``` $phpmailer->isSMTP(); ```

Then, in <a title="/tags/2.6.3/wp-includes/class-phpmailer.php - WordPress Trac - Trac" href="http://trac.wordpress.org/browser/tags/2.6.3/wp-includes/class-phpmailer.php">/wp-includes/class-phpmailer.php</a> around line 155, set your SMTP host:

``` var $Host = "my.smtphost.com"; ```

You may also need to set a username and password, and tell WP to attempt authentication. You’ll see those in the lines below the hostname variable.

``` var $SMTPAuth = true; var $Username = "username"; var $Password = "password"; ```

On the other hand, you could do this via a plugin, perhaps even Callum McDonald’s WP Mail SMTP.

Uploading .docx Files In WordPress

It may be a sign that none of the core WordPress developers much likes or uses Microsoft Office, but the core code hasn’t been updated to recognize the Office 2007 file extensions like .docx, .pptx, or .xlsx. It’s no criticism, wouldn’t have discovered it if a user hadn’t complained, and I stewed a bit before deciding it was a bug.

It’s now ticket #8194 in the WordPress.org Trac. It only affects my MU users now, though, and the same patch works there.

You’ll find a few mentions of doc, ppt, and xls in wp-includes/functions.php (around lines 1613-1615 and 1651-1654 in 2.6.3). Once corrected, those lines should look something like this:

``` 'document' => array('doc','docx','pages','odt','rtf','pdf'), 'spreadsheet' => array('xls','xlsx','numbers','ods'), 'interactive' => array('ppt','pptx','key','odp','swf'), ```
``` 'doc|docx' => 'application/msword', 'pot|pps|ppt|pptx' => 'application/vnd.ms-powerpoint', 'wri' => 'application/vnd.ms-write', 'xla|xls|xlsx|xlt|xlw' => 'application/vnd.ms-excel', ```

Update: Sweet! It’s been accepted and should be in the WP2.7 release.

World Usability Day Today

The Usability Professionals’ Association says “a cell phone should be as easy to access as a doorknob.” And since 2005 they’ve been organizing World Usability Day to help make that happen. Locally the UPA Boston chapter is holding events at the Boston Museum of Science (in Cambridge, actually) that explore the clues we use to […] » about 200 words

Declaration of Metadata Independance

Declaration of Metadata Independance: We hold these truths to be self-evident, that Metadata is essential to all Users, and that the Creation of Metadata endows certain inalienable Rights, that among these are the right to collect, the right to share and the pursuit of Happiness through the reuse of the Metadata… (read more) Via. » about 100 words

Presidents Change…Presidential Limousines Change

Presidential Limos are armored, yes, but Gregg Merksamer reveals that George W. Bush’s limos sport five-inch thick glass, more than twice as thick as in Clinton’s limo. Merksamer should know, he wrote the book on so-called “professional cars”. He says half an inch is enough to stop a .44 magnum at point blank range, and […] » about 100 words