WP YouTube Lyte; support for playlists (almost) included

Work on the next version of WP YouTube Lyte is almost finished. The main new features you can expect in version 0.8.0 are:

  • support for playlists
  • support for HD video (if size of the embedded player is big enough)
  • updated UI elements & player sizes to match new, dark YouTube player style
  • removed support for legacy YouTube embed code

Embedding a playlist will be as simple as adding

httpv://www.youtube.com/playlist?list=<playlist_id>.

The result will look like this documentary about Arcade Fire (4 video’s in one playlist):

Playlist: arcade fire documentary
Watch this playlist on YouTube

Now off to testing this blogpost with an embedded playlist in all browsers I can get my hands on. Your feedback (off course) is always welcome as well! If all goes as planned I’ll push 0.8.0 to the wordpress svn later this week.

WP YouTu.be Lyte: a minor release & some meandering thoughts

Yesterday I pushed WP YouTube Lyte 0.7.3 out the gates. The main trigger for that new release was a bug report about the plugin not behaving as expected when using the youtu.be-links that you get when clicking the “share”-button on YouTube.  Being from that TLD mysself I could not but fix this; the new version recognizes and parses both httpv://youtube.com/watch?v=videoid and httpv://youtu.be/videoid links in posts, pages and widgets. Other features: Slovenian translation (thanks Mitja Mihelič @arnes.si) and a small change to the donottrack-inclusion to make it work over https (hat tip; Chris @ campino2k.de).
Speaking of donottrack: I’ve finally started rewriting that privacy-enhancing plugin. It might … No, it WILL take some time, but expect a whitelist-based approach where you’ll be able to get a report of all inclusions of external content (images, css, javascript, …) in your site and where you can just tick a checkbox per domain you want to allow. All other current and future domains that rogue plugins try to smuggle in after you configured, will be stopped. Next to document.write’s I hope to be able to catch innerHTML and DOM methods like insertBefore and appendChild. If you’re a javascript DOM magician, I could sure use your help on those!
Not sure where I’ll be going with WP YouTube Lyte, it feels pretty complete to me. Stuff that might be added at a later stage;

Do comment below or contact me if you have other feature requests though! And thanks for all the downloads (36.000 and counting)!!
And as is traditional of WP YouTube Lyte announcements, here’s a small video to celebrate the new release; Intergalactic Lovers, a Belgian band, playing “Delay” live.

Intergalactic Lovers - Delay - 23-05-2011

Quick & dirty “CDN” in WordPress

If you want a quick & dirty way to speed up WordPress without any plugins:

  1. create a subdomain in DNS, e.g. static.yourblog.org
  2. add that subdomain as a ServerAlias to your Apache config (remember to restart apache)
  3. add the following to your wp-config.php:
    define('WP_CONTENT_URL','http://static.yourblog.org/wp-content');

If you want to do this the right way; plugins such as WP Super Cache or W3 Total Cache do a much better job at this.

WordPress dashboard fatal error; blame & tweak APC!

I upgraded APC a couple of days ago and subsequently encountered a fatal error when trying to load my WordPress dashboard (but not the other wp-admin pages);

Fatal error: Call to undefined function wp_dashboard_setup() in wp-admin/index.php on line 15

Google confirmed the obvious; APC and WordPress didn’t get along (again), and the most common solution (next to switching from APC to XCache or eAccelerator) is to alter wp-admin/index.php by replacing
require_once(ABSPATH . 'wp-admin/includes/dashboard.php');
with
require_once('includes/dashboard.php');
But I prefer not to change code that is bound to be overwritten at every WordPress upgrade and surely other PHP-apps suffer from the same problem, so instead I tweaked APC by adding the following line to my configuration:
apc.include_once_override=0
This tells APC not to optimize include_once (it’s complicated). Why I have to explicitly specify this, if “0” is the default value anyhow, is beyond me though.

Audio-only YouTube embedding with WP YouTube Lyte 0.7

Last night I finished version 0.7.0 of WP YouTube Lyte. The bump in version number (0.6.5 to 0.7.0) is because of a new feature: the ability to embed YouTube as audio-only player, as seen on Pitchfork. Because after all, as great a source for music discovery as YouTube can be, you really don’t want to force your visitors to watch yet another clumsy fan-made slideshow while they’re listening to your latest musical crush, do you?
Embedding YouTube as an audio-only player is dead-simple; add an ‘a’ instead of a ‘v’ to the YouTube link and you’re good to go!
httpa://www.youtube.com/watch?v=iFjgv1MO724
becomes this audio-only embedded YouTube with Dorian Concept’s “Her Tears Taste Like Pears”;

Follow-up Friday: Ubuntu Unity, Android security & WordPress Stats

Just a couple of small updates on previous stories to keep you posted really.
We’ll start of with Ubuntu Natty Narwhal; beta 2 has been released earlier today. I’ve downloaded a lot of updated packages over the last few days, so I guess I’m on the second beta as well. The Unity launcher now comes out of hiding perfectly and it scrolls down automatically to show items at the bottom as well. There also was a bug with the menu-items of some applications (e.g. Firefox 4) disappearing which seems fixed. Hope they can get the launcher to behave with Java apps (e.g. my favorite mindmapping application) soon.
On another note: Lookout, the Android app that allows you to locate your handset and -if you have the paying version- remotely wipe it, seems to be getting some serious competition from …. Google. Enterprises who have Google Apps for Business can now locate, encrypt and wipe their Android devices. Especially the encryption is important news, but it really should be available and configurable in the Android OS itself
To finish off with some news about WordPress Stats secretive inclusion of Quantcast behavioral tracking: it seems like WordPress Stats plugin will be replaced by Automattics Jetpack, which according to the site:

supercharges your self‑hosted WordPress site with the awesome cloud power of WordPress.com

Jetpack actually is a “super-plugin” that offers functionality from Stats, Sharedaddy, After the deadline and other previously separately available Automattic plugins. The Jetpack WordPress.com stats module does still include the Quantcast “spyware”, doesn’t disclose this feature and doesn’t provide functionality that warrants Quantcast inclusion (in spite of Matt Mullenweg claiming “We’ve been using Quantcast to get some additional information on uniques that it’s hard for us to calculate”). But there is (some) good news in the Jetpack Stats source code though, because on line 145 it reads:

‘do_not_track’ => true, // @todo

This could mean that blog-owners will one day be able to opt out of 3rd party tracking or it might be that Stats will take e.g. Firefox DNT-header into account for your blog’s visitors. Having both would off course be what I will be rooting for!

Why your WordPress blog needs DoNotTrack

So what’s with all that nagging about tracking and that DoNotTrack plugin, you might wonder? Well, it’s pretty simple actually.

  1. Some very popular WordPress plugins include 3rd party tracking, sometimes even without properly disclosing, often without means to disable this behavior
  2. 3rd party tracking has privacy implications: all your visitors are tracked by the 3rd party, in general for behavioral marketing purposes (depending on what data is captured, tracking might even be illegal in some countries)
  3. 3rd party tracking has a performance impact: every visit to your blog will include between 2 and 5 extra requests for the 3rd party tracking to succeed, effectively delaying full page rendering

It is my conviction that blog owners should be able to install and use WordPress plugins without having to worry about undisclosed tracking and that plugins should provide a way to disable such 3rd party tracking if included.
As this is not the case yet, we have to resort to (messy) solutions to stop unwanted tracking from happening. And that’s exactly what DoNotTrack does. It’s a small javascript-hack in a WordPress-plugin to stop 3rd party tracking introduced by some of the most popular plugins.
Some details from the readme.txt:

  • What works:
  • What does not work (yet): Tracking code added using innerHTML or appendChild/insertBefore is not yet intercepted (but I’m working a solution for that)
  • What else might be added:
  • How you can help:
    • Provide me with links to plugins that include browser-based tracking + domain where the tracking is done.
    • Provide me with known opt-out code (javascript) to disable tracking services on a site.
    • Tell plugin writers you’re not happy with 3rd party tracking!
    • Tell your visitors about tracking & privacy, link to e.g. http://www.privacychoice.org/

And remember: if you host your WordPress blog yourself, you and nobody else should be able to decide who tracks your users!

Google Analytics for the privacy aware

While the entire German blogosphere seems to have discovered the pretty unpleasant, secretive inclusion of Quantcast tracking in the “WordPress.com Stats” plugin, I found an article on the blog that broke the story in Germany, that explains how you can somewhat limit (valid) privacy-concerns with Google Analytics.
You just have to push “_gat._anonymizeIp” as an option in the _gaq object, as shown on line 5 in this code snippet:

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-xxxxxxx-x']);
  _gaq.push(['_trackPageview']);
  _gaq.push(['_gat._anonymizeIp']);
  (function() {
    var ga = document.createElement('script');
    ga.type = 'text/javascript';
    ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(ga, s);
  })();
</script>

According to the relevant Google Analytics docs page, this:

“Tells Google Analytics to anonymize the information sent by the tracker objects by removing the last octet of the IP address prior to its storage. Note that this will slightly reduce the accuracy of geographic reporting.”

Call me naive (or overly idealistic), but shouldn’t your Google Analytics implementation have this option on as well?

Quantcast spyware puts selfhosted WordPress blogs in Automattic network

A quick update about the WordPress.com Stats plugin secretive inclusion of Quantcast tracking:

Coding for the New Year

Just a quickie before diving into 2011;

And this is how I feel about 2011:

Jon Hopkins - Light Through The Veins (Full 9 Minute HQ Version)

Have a great New Year!