wordpress

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.

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().

My WordCamp NYC Talks

Authentication Hacks My first talk was on User Authentication with MU in Existing Ecosystems, all about integrating WP with LDAP/AD/CAS and other directory authentication schemes, as well as the hacks I did to make that integration bi-directional and deliver new user features. My slides are online (.MOV / .PDF), and you can read earlier blog […] » about 200 words

Spell Checking

Matt demanded accent-aware spell checking for the WordPress spell checking plugin his company acquired earlier this year. And just a little more than a month later, After the Deadline delivered. Now Beyoncé, café, coöperate, and even my resumé look prettier.

Separately, Wordnik offers a new take on online dictionaries, and they just launched an API.

The WordPress Way

Plugin Development

Will Norris‘ talk at WordCamp PDX introduces WordPress coding standards, common functions, and constants to would be plugin developers (and smacks those who’ve already done it wrong). Also notable: functions, classes, variables, and constants in the WordPress trunk.

Custom Installations

Just as WordPress has a number of hooks and filters that plugins can use to modify and extend behavior, it also has a cool way to customize the installation process.

Extending The WYSIWYG Editor

TinyMCE, the WYSIWYG editor in WordPress has a rich API to allow adding buttons and stuff, but the docs are hard to get into. We can get a jump on that by looking at how it’s implemented in other WP plugins. This code creates the buttons, while the function that responds to the button click and does the work is defined within the plugin. The TinyMCE plugins in core are also informative.

Hacking WordPress Login and Password Reset Processes For My University Environment

Any university worth the title is likely to have a very mixed identity environment. At Plymouth State University we’ve been pursuing a strategy of unifying identity and offering single sign-on to web services, but an inventory last year still revealed a great number of systems not integrated with either our single sign-on (AuthN) or authorization […] » about 1700 words

WordPress Hacks: Nested Paths For WPMU Blogs

Situation: you’ve got WordPress Multi-User setup to host one or more domains in sub-directory mode (as in site.org/blogname), but you want a deeper directory structure than WPMU allows…something like the following examples, perhaps: site.org/blogname1 site.org/departments/blogname2 site.org/departments/blogname3 site.org/services/blogname3 The association between blog IDs and sub-directory paths is determined in wpmu-settings.php, but the code there knows nothing […] » about 900 words

WordPress Hacks: Serving Multiple Domains

Situation: using WordPress MU (possibly including BuddyPress) on multiple domains or sub-domains of a large organization with lots of users. WordPress MU is a solid CMS to support a large organization. Each individual blog has its own place in the organization’s URL scheme (www.site.org/blogname), and each blog can have its own administrators and other users. […] » about 1400 words

What is David McNicol’s URL Cache Plugin?

The description to David McNicol’s URL Cache Plugin raises more questions than it answers:

Given a URL, the url_cache() function will attempt to download the file it represents and return a URL pointing to this locally cached version.

Where did he plan to use it? Does he envision the cache as an archive, or for performance? Why hasn’t it been updated since 2005?

It caught my interest because I’ve long been interested in a solution to link rot in my blog. A real “perma-permalink” would be very useful.

Too Bad The Hanzo Archives WordPress Plugin Is Caput

The Hanzo Archives WordPress plugin is something I’d be very excited to use. Ironically, it’s disappeared from the web (though the blog post hasn’t):

We’ve released a WordPress Plugin which automatically archives anything you link to in your blog posts; it also adds a ‘perma-permalink’ for the archived version adjacent to each original link.

An Amazon Web Services case study put me on to Hanzo a while ago, and in May 2008 I actually spoke with Mark Middleton (the markm who posted the entry above). Mark revealed that community take-up on the plugin and other general purpose web archiving services was below expectations. The company has since refocused on legal matters (even their blog tag-line has changed to “web archiving for compliance and e-discovery”).

I wonder if, now that the number of people and companies that have been blogging for years has grown, there might be more of a market for such a service.

Video or Audio Comments in WordPress with Riffly

In line with yesterday’s discovery of the Viddler WP plugin, Riffly Webcam Video Comments also supports video or audio comments within WordPress:

Riffly is a free service that easily plugs into your site allowing visitors to create video and audio comments.

The service is advertising supported. We cover all the costs for bandwidth, servers, and maintenance. Optionally, we also offer Premium Riffly accounts that provide you with additional benefits, such as advertising removal, control panel access, analytics, and much more.

Video Comments With Viddler WordPress Plugin

The Viddler WordPress plugin promises to “Enrich your site’s commenting experience by enabling video comments….” Users can record direcly from a web cam or choose a video they’ve previously uploaded to Viddler.com.

Viddler evangelist Colin Devroe has it on his site, where I can see it requires would-be commenters have a Viddler account. That last bit is too bad. I like Viddler, but I can’t force my readers to like it and get accounts as a prerequisite to commenting.

Systems Wrangling Session At WordCamp Developer Day

What is the current status of web servers…Is Apache 2.x “fast enough?”

Automattic uses Lightspeed (for PHP), nginx (for static content), and Apache (for media uploads). For WordPress-generated content, all server options are approximately the same speed.

What about APC?

Automattic uses beta versions of APC, and provides a 3-5x performance increase. It’s tied closely to the PHP version, so Automattic recently switched from PHP 4 to PHP 5.

Databases?

MySQL scales well and is easy enough to use that there’s little reason to consider other DBs for WordPress content. Other applications may have different needs. Note: FriendFeed uses MySQL to store schema-less data. Single-table key lookups in MySQL are faster than getting the data from Memcached.

Caching?

Automattic uses Batcache for full-page caching (.002 to .003 second), Memcached persistent object cache, very limited MySQL query cache (never larger than 256MB), sufficiently large key buffer.

HyperDB?

HyperDB solves DB scaling problems.

Backups

User-data backed up every hour, if something changed. Every blog backed up every 12 hours. Dedicated MySQL slaves do LVM snapshots for backups.

Andy Peatling on BuddyPress

Why BuddyPress? “Build passionate users around a specific niche.”

Do you have to become a social network? “No, look at GigaOM Pro,” a recently launched subscription research site based on BuddyPress.

But, yo do get “BYOTOS: bring your own terms of service.” That is, you get to control content and interactions. And your service won’t be subject to the whims of a larger network like FaceBook (or vagaries of their service — think Ma.gnolia)

It’s pretty easy, Andy says, to create a custom BuddyPress component, and there are already a number at the BuddyPressDEV Community.

Google’s Matt Cutts On Building Better Sites With WordPress

90% of WordPress blogs he sees are spam. But for those who aren’t spammers and want to do better in Google…. “WordPress automatically solves a ton of SEO issues…WordPress takes care of 80-90% of SEO.” Still, he recommends a few extra plugins: Akismet — reduce spam comments Cookies for Comments — reduce spam comments FeedBurner […] » about 400 words

WordPress Action Ticketing API

This plugin is the next step after my proposal for a common invite API. Here’s how I described it when requesting hosting at the plugin directory: A common framework for registering tickets that will be acted upon later. Use it to manage challenge/response interactions to confirm email addresses, phone numbers, IM screen names, Twitter accounts, […] » about 500 words

Fixing Batcache to Send The Correct Content-Type Header

I’m a fan of Batcache, the Memcached-based WordPress full-page cache solution, but I’ve discovered that it ignores the content-type header set when the page is initially generated and re-sends all content with content-type: text/html. I posted a note about this at the WordPress support forums, but then I realized what the problem was: apache_response_headers() doesn’t return the content type, but headers_list() does.

The solution is to replace apache_response_headers() with headers_list() in the code, though headers_list() is PHP 5+ only, so it might be a while before we see a change like this committed. Still, I’ll shamelessly tag Andy Skelton (Batcache’s author) on it.

Do We Need A WordPress Common Invite or Challenge-Response API?

The BuddyPress forums have a number of threads about handling invitations (two worth looking at: one, two), but no real solution has emerged. At the same time, there’s also a need for some means of confirming other actions such as password resets, email changes (both of those are already handled by WPMU, I know), cell phone numbers to receive SMS messages, and other actions that need to be confirmed later.

So I’m proposing a generic API to handle things like this. The built-in WordPress cron and ajax functions seem to offer a clear pattern for creating such an API: Simply, plugins and core code could register an action and a function to be called when that action is executed. The API could also store data to be sent to that function when it is executed.

Among the things I’d do with this?

  • Confirm email addresses
  • Confirm cell phone numbers via text message
  • Confirm IM accounts
  • Confirm Twitter accounts
  • Confirm password reset requests
  • Confirm invitations in BuddyPress

Anybody else interested?

Fixing User Meta To Accept Repeating Fields — Just In Time For The WordPress Has-Patch Marathon

There’s a WordPress has-patch marathon going on now and I’m hoping one of my recent patches gets some attention. I’m hoping to fix the user meta functions to allow them to accept multiple values per key, per user.

It’s listed there among the other has-patch tickets in Trac, and there’s been some discussion in WP-Hackers. Why not take a look?