Technology

Improving Will Norris’ Open Graph Plugin

Will Norris put together a nice WordPress plugin to place Open Graph metadata on the page. Today I patched it to address a few bugs I and others have found.

The patch switches functions that depended on globalizing $post to use $wp_query->queried_object and similar.

opengraph_default_url() is changed to try get_permalink() only when is_singlular() is true. Otherwise it uses the blog’s base URL. This isn’t perfect, but it’s better than having the front page and all tag/category/archive pages report their og:url as being the permalink for the first post on the page.

As suggested here, I changed the opengraph_default_description() to use the post’s excerpt if is_singular() and the post includes an excerpt.

I changed opengraph_default_image() to test if the theme supports post thumbnails before calling has_post_thumbnail() to avoid the Fatal error: Call to undefined function has_post_thumbnail() errors.

I submitted it as a bug report in the plugins Trac, but I don’t check there for tickets on my own plugins, so you might apply the patch yourself.

Things Learned About Natural Language Processing at THATcamp Bay Area

The first session I joined at THATcamp was Aditi Muralidharan‘s text mining boot camp, and the topic seemed to set my agenda for the rest of the event (though I wish Aditi had also hosted her proposed data visualization session). Aditi’s blog: mininghumanities.com. If I understood correctly, much of Aditi’s presentation and experience is based on the […] » about 200 words

What The Critics Are Missing About The Apple TV

It’s not just the critics, nobody seems to get the story on Apple’s new TV-connected device right. Darrell Etherington at The Apple Blog says it’s a non starter for him, and Ars Technica’s John Siracusa describes it as just the most recent entry in a product line that has been “a persistent loser” for the company. […] » about 800 words

Speed WordPress MultiSite With X-Sendfile For Apache

Like WordPress MU before, MultiSite implementations of WordPress 3.0 use a script to handle image and other attachment downloads. That script checks permissions and maps the request path to the files path on disk, then reads the file out to the web server, which sends it to the browser. That approach has some inefficiencies, and […] » about 400 words

Migrating From WordPress MU To WordPress 3.0 Multi Site

I’ve been running a few instances of WordPress MU for a while now, so I was more than a little anxious about the merge of the MU functionality into the core of WordPress. It’s a good thing, but sometimes such dramatic changes pose rocky challenges.

Not so in this case.

Pete Mall blogged about it in May, and I’m happy to say that I followed those instructions (summary: upgrade, it will work) to upgrade both this site and Scriblio.net recently. The biggest challenge I faced was in migrating my SVN checkout (not discussed in Pete’s post, but people who install via FTP or use the auto upgrader don’t need to worry about this), and Pete noted the only gotcha that I might have encountered: changing the .htaccess to use a different file that had been used in WPMU.

I tested the migration on this site, and it rocked so much that I decided to go forward with upgrading the other site, even though WP3.0 hasn’t been formally released yet. Rock n roll.

Huffington Post Introduces Badges and Social Rewards

How do you make news fun? Or, how do you make moderating often fractious comments on news stories fun? You follow FourSquare’s example and introduce badges: The Moderator badge allows you to more actively participate in this process. If you are a Level 1 Moderator (earned by flagging at least 20 comments that we deleted, […] » about 200 words

Cleaning Up Category Relationships In A WordPress Scriblio Site

A few lines of SQL I used to clean up a Scriblio site. It’s probably useless to anybody but me. I’m not suggesting anybody else use this code, as it will result in changed or deleted data.

Update the post author for catalog records (identified because they have a specific post meta entry):

UPDATE wp_8_postmeta
JOIN wp_8_posts ON wp_8_posts.ID = wp_8_postmeta.post_id
SET post_author = 15
WHERE meta_key = 'scrib_meditor_content'

Get the categories attached to every catalog record (except the “catalog” category):

SELECT tr.object_id , tr.term_taxonomy_id
FROM wp_8_term_relationships tr
JOIN wp_8_posts p ON p.ID = tr.object_id
WHERE tr.term_taxonomy_id IN (
	SELECT term_taxonomy_id
	FROM wp_8_term_taxonomy
	WHERE taxonomy = "category"
	AND term_id != 30
)
AND post_author = 15
ORDER BY tr.object_id , tr.term_taxonomy_id

Using the above list of object ids and term taxonomy ids, build a series of queries like the following to delete them:

DELETE FROM wp_8_term_relationships WHERE object_id = 12275 AND term_taxonomy_id = 271872 ;

Insert a catalog category relationship for all catalog records:

INSERT INTO wp_8_term_relationships
SELECT p.ID , '271871' , '0'
FROM wp_8_posts p
LEFT JOIN wp_8_term_relationships tr ON p.ID = tr.object_id AND tr.term_taxonomy_id = 271871
WHERE post_author = 15
AND tr.term_taxonomy_id IS NULL

Solving Problems In Secret

Matt Blaze computer and information science at University of Pennsylvania and blogs about security at Exhaustive Search. His recent post on mistakes in spying techniques, protocols, and hardware caught my interest: Indeed, the recent history of electronic surveillance is a veritable catalog of cautionary tales of technological errors, risks and unintended consequences. Sometime mishaps lead […] » about 400 words

Is The Filesystem Finally Dead?

From Rob Foster/Nimble Design:

By releasing the iPhone OS, Apple is putting a bullet in the head of a long standing convention that most folks could do without.

He’s talking about the filesystem. User-accessible filesystems, anyway.

This isn’t news, I don’t think the Newton even had a hidden filesystem, but it hasn’t gotten old yet.

My question: when will I finally get a system that cleverly mixes cloud and local storage to give me seamless access to all my photos, videos, music, and email…ever?

Edison Phonograph EULA

Think end user license agreements (EULAs) are recent inventions? Thomas Edison used them on his phonograph cylinder at the start of the 1900s. The EULA didn’t protect Edison from innovations elsewhere; discs quickly beat out cylinders once the patents expired. Photo from fouro. » about 100 words

College Students Use, Love, Are Aware Of The Limitations Of Wikipedia

How Today’s College Students Use Wikipedia For Course-Related Research: Overall, college students use Wikipedia. But, they do so knowing its limitation. They use Wikipedia just as most of us do — because it is a quick way to get started and it has some, but not deep, credibility. 52% of respondents use Wikipedia frequently or […] » about 200 words

Scott Smitelli On Hacking YouTube’s Content ID DRM System

Scott Smitelli uploaded a total of 82 test videos and received 35 Content ID emails in the name of science: testing YouTube’s Content ID system. He reversed the audio, shifted the pitch, altered the time (without changing pitch), resampled (pitch and time), added noise, messed with the volume, chunked it up into pieces, and fiddled with the stereo fields. In the end, he found both amusing and frustrating results.

He did his tests about a year ago. Google appears to have caught on and disabled his YouTube account, who knows if they’ve addressed some of the holes in the system he found.

Social Media Usage Stats

Retrevo claims to help electronics shoppers decide what to buy, when to buy, and where to buy it,” so their recent survey on social media addition is probably more significant as link bait than as serious research. Despite my concerns about confirmation bias, I’m as amused as anybody by the numbers. 8% of adult respondents say […] » about 200 words

URL Path Bug In WordPress.com Video Server

You’ve got to both respect Automattic for releasing their internal code as open source while also giving them a break for not assuring that it works for anybody else. One of their projects, the WordPress.com Video Server is a sophisticated WordPress plugin that handles video transcoding and offers a bit of a YouTube in a box solution for WordPress.

The bug I found is that the code assumes WPMU is running in subdomain mode, rather than subdirectory mode. This assumption causes an ajax request to go to the wrong URL and return the wrong data. The patch simply applies WordPress’ plugins_url() function that debuted in 2.6.

The Cost Of IE’s Non-Compliance

Google this month dropped Internet Explorer 6 support in Google Apps and YouTube, and others are lining up at idroppedie6.com. Still, even newer versions of IE suffer from poor standards support, and there are doubts about the just announced IE9. To put this in perspective, BillforBill.com is adding up the costs of all the workarounds […] » about 100 words

WordPress Bug In setup_postdata()

WordPress is built around the Loop, and all the cool kids are using multiple loops on the same page to show the main post and feature other posts. The problem is: WordPress doesn’t properly reset the $pages global for each post. If the post in main loop (or default query) is paged, then all the other posts will show the same paged content as in the main post. I started a ticket and submitted a patch, but in the meantime you might have to unset( $GLOBALS['pages'] ) in your custom loops just before calling the_post().