Performer for WordPress

The worlds best CMS just got better, with the creation of a plugin for Performer. Unless you’ve been living under a rock you’ll have heard me waffle on about my JavaScript mini-library which allows you to use those cool effects that your favourite JavaScript library (such as jQuery, Prototype and MooTools) allows you to do. But without writing a single line of JavaScript. Yes, it’s true.

Here’s a simple example. Click here to be amazed.

If everything went to plan this text came pleasingly into view. You might think "Yeah, I’ve seen that JavaScript stuff before", but look at the code I wrote to make that work:

<a href="#" class="toggler targetEl-performerdemo1">Click here to be amazed</a>
<div id="performerdemo1" class="hider"> ... </div>

Yup, just CSS classes.

If you want more information please visit the main Performer website, or download the WordPress plugin here.

Spoof email example

At a party last night a friend of mine told me about a new spoof email he’d seen. I wasn’t aware of it (I don’t keep my ear very close to that particular ground) but here’s an example just forwarded to me:

> Subject: Attention - Important Notification
> Date: Mon, 19 Oct 2009 05:14:44 -0600
> From: tech-admin <tech-admin@myjournal.com>
> To: info@myjournal.com
>
> Attention!
>
> On October 22, 2009 server upgrade will take place. Due to this the
> system may be offline for approximately half an hour.
> The changes will concern security, reliability and performance of mail
> service and the system as a whole.
> For compatibility of your browsers and mail clients with upgraded server
> software you should run SSl certificates update procedure.
> This procedure is quite simple. All you have to do is just to click the
> link provided, to save the patch file and then to run it from your
> computer location. That's all.
>
> http://updates.myjournal.com.secure.digi1adm.org/ssl/id=7335328053-info@myjournal.com-patch30892.exe
>
> Thank you in advance for your attention to this matter and sorry for
> possible inconveniences.
>
> System Administrator
>
> __________ Information from ESET Smart Security, version of virus
> signature database 4520 (20091018) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com

Scarily real, huh? The “http://updates.myjournal.com” subdomain makes it look very official. So, be careful out there.

Internet Explorer bug with cloneNode()

I just spent the best part of an hour bashing my head against a keyboard because Internet Explorer wasn’t doing my JavaScript right, but Firefox and Chrome were. Turns out it was a simple solution. I had code like this:

element.innerHTML = element.innerHTML + '\n';
var clone = element.cloneNode(true);
targetElement.appendChild(clone);

But for some reason, despite the true parameter being passed to cloneNode() so it would clone children, no children would appear. Even stranger, this:

element.innerHTML = element.innerHTML + '\n';
alert(element.innerHTML);
var clone = element.cloneNode(true);
targetElement.appendChild(clone);

Alerted the element.innerHTML without its children. Turns out this line:

element.innerHTML = element.innerHTML + '\n';

Messes everything up, even in Internet Explorer 8. All I wanted to do was make the modified HTML source a little nicer, but it screwed up in the web developers nemesis.

Hopefully this helps someone else.

Share your stats

There’s a meme on Twitter at the moment entitled Share your Stats where web guys are sharing statistics about the browsers viting websites. I’m not sure who started this meme, but I guess they are trying to get a feel for how prevalent Internet Explorer is, particularly version 6. You know most web developers don’t like Internet Explorer 6, right?

Anyway, I have a few sites I can share the statistics for. Here they are:

Share Your Stats meme results
Website Browsers Operating systems
Firefox Internet Explorer Safari Chrome Opera Windows Mac Linux
stillbreathing.co.uk 51.47% 29.11% 9.55% 5.04% 1.79% 75.88% 16.87% 6.55%
wibsite.com 69.68% 18.28% 4.81% 4.15% 1.10% 77.50% 15.62% 6.28%
myjournal.com 34.58% 51.40% 8.41% 2.80% n/a 86.92% 8.41% 0.93%
performerjs.org 65.73% 11.32% 8.45% 9.77% 2.88% 73.52% 16.72% 9.11%
beatsbase.com 45.40% 33.97% 12.06% 5.71% 2.86% 80.95% 17.14% 1.27%
comp-unlimited.co.uk 16.91% 75.21% 3.83% 2.23% 0.46% 93.45% 4.73% 1.14%
Large business website 7.52% 81.22% 9.01% 1.63% 0.35% 90.28% 8.71% 0.26%

That’s pretty much what I expected, with a very large proportion of visitors to the more commercial sites weighted towards Internet Explorer and Windows. For the other sites, particularly those with a heavy web development slant, the statistics show a wider spread of browsers. It’s good to see Chrome making inroads, but these kind of results must be somewhat disheartening for Opera.

Wibstats – statistics for WordPress MU and BuddyPress

Update 9th September 2009: I’m too good to you, I really am. The screenshots are now out of date as I’ve just committed a new version (0.4) which contains even more reports, a cleaned up interface and a few bug fixes. Please download and try it out.

I finally got the page about Wibstats updated with some screenshots. If you’re looking for the best (in my opinion, anyway!) stats plugin for WordPress MU – and it works with BuddyPress – head over here.

If you just can’t wait, here are some screenshots:

Main stats page

Searches

Recent visitor map

Session report

There you have it. A top-notch plugin for WordPress MU and Buddypress that gives every blog in your system their own powerful statistics.