Posts in the Tools Category

Gatekeeper 1.5 rc5

Published 18 years, 9 months past

It only took most of a year for this to happen, but WP-Gatekeeper 1.5 RC5 is now available.  The only change is that it will now auto-add the challenge to any standard WordPress 1.5 install from the moment you activate the plugin.  Before now, this auto-insertion wasn’t working on any WordPress install that had gzipping turned on, as many do.  A heap of thanks to Jeremy Dunck, who first identified the problem; and Andy Skelton, who showed me how to solve it.

For those who joined the party in the long silence since RC4, Gatekeeper is a WordPress plugin that lets you manage a series of challenge/response pairs.  The default challenge is “What color is an orange?” (correct response: “orange”), though you should definitely disable that one and add your own.  This helps stymie spambots, though of course it is easily defeated by a manual spammer—and they do exist—and it can do nothing to stop trackback spam.  I actually stopped using Gatekeeper on meyerweb when I installed Akismet, which may be good enough for most people.  For those who can’t or won’t run Akismet, though, Gatekeeper is a decent alternative.

Gatekeeper is technically a CAPTCHA, but it is a fully accessible CAPTCHA, as it uses no images.  It’s also highly configurable, allowing you to add as many challenges as you like and then rotating between them randomly.  I know of a few sites that are quite happy with Gatekeeper, and recently caught wind of a Django implementation of the same concept.

So it’s there and ready for use by those who are interested.  If I haven’t heard about any bugs within the next month or so, I’ll strip off the RC designation and go with 1.5 final.  And about time, too.

Note to WordPress 2.0.x users: I have no idea if WP-Gatekeeper 1.5 will work in WP2.  It may.  Then again, it may not.  I’d be interested to know either way.


S5 1.2a2

Published 18 years, 9 months past

The alpha 2 release of S5 1.2 is now available (177KB ZIP file; also available for previewing in the testbed).  There isn’t any major change here, but I did add some notable enhancements to the notes window.  These are:

  • On any slide with incrementals, an indicator of incremental progress will appear in square brackets next to the overall slide show progress on the title line.  It’s a little crude, I admit, but it serves the purpose well enough.
  • Clicking on the title of either the Elapsed Time or Remaining Time counters will “minimize” them.  Click a minimized title to maximize the box.  The actual minimum and maximum effects are purely CSS-driven, hooked onto a collapsed class name.  I’m still pondering the best way to handle this feature, so the class name may change, as for that matter may the mechanism by which one can min/max the boxes.  Suggestions are welcome.
  • Keypresses and clicks are passed from the note window back to the slide show.  In other words, the slide show fully is fully operable from either the slide show window or the notes window.  The only difference is that the notes window doesn’t have the navigation links and popup navigation menu (said difference to disappear in a future release).

That’s it.  In the process, though, I uncovered a bug that shows up in Safari 1.3.1 and 2.0, where it’s ignoring the show-first feature for incrementals.  I’m going to assume that the problem lies in the getIncrementals() function, though of course I could be wrong.  If anyone can spot the error and provide a fix, I’d be grateful.

Update 2 Mar 06: in addition to the Safari problem, I’ve discovered that IE/Win doesn’t seem to share event information between windows.  Thus, if you try to run the slide show from the notes window, errors get thrown.  I managed to fix this in clicker() by adding a test for notes-window events, but trap() has a very different structure and I’m not sure how to fix it.  Thus the testbed in IE/Win currently lets you advance the slide show from the notes window by clicking the mouse button, but keyboard navigation throws an error.  If anyone can tell me how to get around this, even with a pointer to a good article on passing events from one window to another, I’d be very grateful.


Opera and S5 1.2a1

Published 18 years, 11 months past

Just as a quick update, I’ve done some testing of S5 1.2a1 in the latest version of Opera I have available (which, under OS X, is version 8.51).  I’m happy to report that this copy of Opera has all of the S5 features supported in other browsers.  Incremental display, font scaling, keyboard navigation, and even the notes window are all present and account for.

To use the notes feature, here’s what I do.  Upon loading the base slideshow into Opera, I position the window on my secondary monitor, which is here taking the role of an LCD projector.  Then I hit “n”, causing the notes window to appear on my laptop’s monitor (in the role of the presenter’s machine).  After bringing the slide show window back to the fore, I select “Full Screen” in the “View” menu, and the presentation maximizes itself to the secondary monitor.  As I navigate through the slide show, the notes window stays perfectly synched with the presentation.

There may be better ways to get the notes window on the primary monitor and the presentation on the secondary monitor, but that one worked for me.

I did notice some odd bugs here and there in Opera 8.02, a copy of which I also have hanging around, but nothing that was a show-stopper.  The one that sticks out in my mind was that multi-slide jumping wasn’t cleared out after the jump.  For example, from the first slide I’d type “3 (right arrow)” to skip to slide four.  Hitting the right arrow again jumped me to slide 7, which is wrong.  Opera 8.5 acted as intended, so I’m going to assume that it has something to do with how the JavaScript is written.

If there are problems in Opera 8.5 or Opera 9 that my testing didn’t uncover, let me know.  I’ll fix anything I can—and if there’s anything I can’t, I’ll turn it over to the Opera community to figure out.  Members of that community have already been invaluable in figuring out how to work around bugs in Opera’s CSS handling in order to make the controls available, so I’m confident they’ll be able to handle anything I can’t figure  out.


S5 1.2a1

Published 18 years, 11 months past

It’s back: S5 1.2 alpha 1 is now available (177 KB Zip archive), and you can play with either the OSF or XOXO versions of the latest development version if you just want to preview it online.  In addition, I’ve set up a contact address specifically for S5 questions and feedback.  You can find a link to this new address on the main S5 page.

New to S5 1.2:

  • The progress indicator (e.g., 6/10) is now a permalink to the currently-displayed slide.  This will require an update to any S5 1.1-era themes, but it’s a minimal thing.  Granted, the current alpha doesn’t have updated styles to handle the presence of a link.  I’ll get to it.

  • Bug fixes intended to make it more Konqueror-friendly.  I do not know if Konqueror will run S5 1.2.  I do not have access to Konqueror.  The fixes I included were sent to me by helpful S5 users, and may or may not have resolved all problems.  If there are still bugs in S5 when displayed in Konqueror, you are invited to submit bug fixes in the comments, or via the contact address I mentioned before.  Bug reports should be done in the comments, where other Konqueror users can see them, and not via the contact address.

  • Vastly improved integration with Opera.  As chronicled in “Opera and S5 1.1“, S5 was originally intended to be a cross-browser emulation of OperaShow.  As time went on and features were added, the two diverged.  Thanks to efforts by Hallvord Steen, Opera should now be shut out of a lot less of S5 than it was.  In fact, it may well be feature-complete as compared to S5 1.1, and will get most of S5 1.2’s features.  With one possible exception…

  • A “notes” window capability.  The notes view is largely the work of Shaun Inman, who wrote me last week to say, “Hey, I did this.  Interested?”  Was I ever!  I’d been meaning to do it ever since I saw the notes view in Keynote, but Shaun got there first, clever wolf that he is.

    To see this in action, in either the OSF or XOXO versions, hit “n”, or call up the controls and click on the three-line icon on the left.  A new “notes” window will open, looking very much like the “notes” view in Keynote.  This window displays whatever notes the author has created for the current and next slides; these are done by placing content in an element with a class of notes, pretty much exactly like the handout feature from earlier versions of S5.  The notes window also includes timers showing the time elapsed since the presentation was opened and the time elapsed since the current slide was loaded.  There’s also a pauseable countdown timer for those who prefer to keep track of time that way.  (I added the countdown timer.  Yay me!)

    The general idea is that you load up your presentation, open the notes window, and put the presentation up on the projector while keep the notes window on your presentation machine.  (Which is of course only possible if you turn off video mirroring.)  As you move through the slide show, you can see notes to yourself and keep track of time so you don’t run over.  Keen.  I don’t know how much I personally will use the notes, but I’m all over the timers like they were a stack of pancakes and I were Mrs. Butterworth.

    At the moment, the JavaScript that opens the notes window is minimal, so the notes window is fairly chromeless and not resizeable in IE/Win.  It’s also a bit rough in terms of some of its layout, as befits the alpha status.  I’m also considering adding a keyboard command for “fullscreen”, which would maximize all open S5 windows to fill the screen they’re currently occupying, and possibly also strip away the browser chrome.  I did a few experiments along those lines, but wasn’t satisfied with the results, so it didn’t get into this release.

    On a related note, I’m not sure that notes can be made to use with Opera so long as S5 relies on OperaShow, because OperaShow by its very nature makes all browser windows fullscreen.  If there’s a way to get OperaShow to put one window on one monitor, and a second on a second monitor, then that would be the answer.  If not, I’m not sure what to do short of abandoning OperaShow usage entirely, which seems strange and wrong.  But we’ll see.  If nothing else, we can verify that everything in S5 besides the notes feature works in Opera, and push those changes into an S5 1.1.1 release.

One known problem is that when Firefox displays an S5 show using the text/xml or text/xhtml+xml MIME types, which is necessary for slide shows that incorporate things like MathML and SVG, things break because innerHTML ceases to be supported.  I have a proposed fix submitted by an S5 user, but did not get it into 1.2a1.  I plan to correct this before reaching the first beta release.

A number of people have asked for a merging of effects libraries like Script.aculo.us and FACE, and there have even been scattered implementations of same.  It’s definitely tempting.  I’m not at all confident that this will happen for 1.2, though, mostly because I don’t understand enough programming to make the connections.  I’m also not sure how many of these I could pile into the code before the whole thing came crashing down.  I have hopes that we’ll be able to work out a “best practices” way to add such capabilities to any S5 presentation file, and let each author add them or not as they see fit.

So there you go.  Have at it!


Japanese Color Blending

Published 18 years, 11 months past

What is it about the Japanese that they loooove to blend colors?

Lest you think I’m indulging in some sort of bizarre racial stereotyping, I submit for your consideration the Technorati search results for blogs and other sites pointing to my Color Blender.  The Blender been moderately popular ever since its release, but so far as I can tell, the Asian market is just eating it up.  If I see a new Japanese site appear in my egorati feed, the odds are 49 out of 50 that it’ll be linking to the Blender.

So what’s the deal there?  Anyone have insights, specuation, or even translations that might shed some light on this little enigma?

(Note: it turns out that these are Chinese blogs using Japanese fonts, and not Japanese sites as I originally thought.  I’m leaving the original entry intact rather than update it.  Still, this means that the essence of the original question remains, even if the geography was off by a bit.)


Mapping the News

Published 19 years, 1 week past

The Hertfordshire Oil Storage Terminal explosion and fire has doubtless dominated news in the UK and Europe, though in all honesty it hasn’t gotten major play here in the US.  Doubtless that’ll change if it’s found to be a terrorist attack and not an accident, but that’s not actually my point.  It occurred to me that this is a relatively high-yield detonation, and I have the means to chart its effects in a basic way.

So, based on the seismic report of a 2.4 magnitude event, I’ve estimated the yield at about four metric tons of TNT (as per the chart found on the Wikipedia‘s Richter scale article, as well as other sources).  As you can see on the chart, that gives figures consistent with initial damage reports: the 0.25psi ring extends out to 1.02 kilometers (0.64 miles), which is about where you’d stop seeing widespread window shattering and door displacement.

Remember that the distances shown don’t define the distance out to which a human would be able to feel a blast, and certainly don’t say anything about the distance at which a blast could be heard.  And also remember that I’m making a rough estimate of yield based on an initial estimate of the explosion’s seismic magnitude, not to mention I just made a guess as to the exact epicenter.

Still, it’s interesting to be able to chart the event like this.  To me, anyway.


Clearly Impossible?

Published 19 years, 3 months past

I’ve been pounding my brain against a problem in Photoshop CS for the last few months—no, not continuously—and I’ve given up.  Now I turn to the PSD experts in the crowd for help.

What I want to do seems simple enough.  The goal here is to have a PNG where the alpha channel coincides precisely with a visible pieces of the image.  In other words, if the visible image is a large black diamond, then I want the alpha channel to be in the same shape and intensity as the diamond.  That way, in IE/Win, there will be a big black diamond.  In other, more capable browsers, there will be a transparent diamond with a white mask, so I can set whatever background color I want.

Here are two images that, I hope, illustrate what I’m aiming to do.  The first image is what IE/Win would render, and the second is a representation of what another browser would render (the gray checkerboard pattern representing the transparent parts of the PNG).

I’ve fiddled with combinations of masks, layers, alpha channels, and more until my head feels ready to explode.  No matter what I do, I can get either an image that’s opaque (read: no alpha channel) in all browsers, or an image with a full alpha channel, where the alpha portion is filled with a light silver-gray in IE/Win.

It seems like there has to be a way to do this, and that someone out there knows what it is.  So how in the name of the sweet Virgin Mary do I get this to work?

Update: I sense that people aren’t getting what I want to do.  What I effectively want to do is take an image of the diamond—a GIF, a TIFF, whatever—and, in turning it into a PNG, add an alpha channel such that the diamond gets “knocked out” in programs that understand the alpha channel.  In those that don’t, like IE/Win, the regular image should just appear, with no alpha-channel effects.  Just the black diamond.

And I want to know how to do it in Photoshop, which is the tool I use.  Telling me how to do it in GIMP would be incredibly useful if I hadn’t thoroughly hated GIMP’s UI, and thus uninstalled it about ten minutes after installing it, back when I did.  (To be fair, it might have been the X11 UI that I hated, but since GIMP was the only X11 application I’ve run… you see where I’m headed with that, I hope.)


Opera and S5 1.1

Published 19 years, 4 months past

Oh, sure, I build a slide show system specifically because of a bug in Opera 7.5, and despite that I go fairly far out of my way to make sure that Opera will still be able to display the slide show using its unique and groundbreaking feature, OperaShow, and now I’m the bad guy.

A little history: the first version of S5 was meant to recreate what OperaShow did, except do it in other browsers.  That was pretty much it—but as I was fiddling with the JavaScript to make that work, I realized I could build my own navigation menu in the JavaScript.  So I did.  Then, when I tested to see if it worked in Opera, it didn’t.  I tried for a while, but couldn’t make it work.  So I decided to hide the menu from Opera.  Better no feature than a broken feature, and besides, it was the only one so hidden.

When I tossed S5 out to the public, I figured maybe twelve other people in the world would be interested.  It was one of those, “Hey, this is something I hacked together, look how geeky I am!”

And the crowd, against all expectations, went wild.

So the list of things I thought would be interesting to add some day suddenly took on extra weight.  There were people out there who actually wanted to use S5, and wanted things like font scaling and incremental display of slide content.  Furthermore, there were people contributing code to improve the system.  Out of nowhere, a little open source project erupted in the comments of my posts.

In order to keep things from bogging down, I defined a feature list for S5 1.0 and shipped it out.  All along, I made sure that the slide show would fall back to OperaShow in Opera.  To do so, I had to write a routine (called notOperaFix() because it had to fix things for browsers that aren’t Opera) that swapped around the media values for various linked style sheets, among other things.  I also had to define the S5 format so it was compatible with the OperaShow Format specification.  That meant changing some things from my original file format, and in my opinion not always for the better.

Despite a few people telling me to just drop OperaShow and OSF support because it wasn’t worth the effort, I kept those mechanisms in place as we moved to version 1.1.  I figured that since Opera had a slide show system, I’d let people use it.  Besides, any time I created a test copy of S5 that didn’t let Opera drop back to OperaShow, it completely failed to display the slide show.

Now S5 1.1 is out, and it has more features that people asked for—font scaling based on window size changes, incremental display, more keyboard commands, and so on.  Throughout it all, I made sure OperaShow would still work.  And it does.  It doesn’t get the keyboard commands, or the font scaling, or the incremental display.  I did try.  I couldn’t figure it out.

Now, there are those who apparently think that this means I’m a liar when I say S5 is cross-browser.  I admit it—S5 doesn’t work in Mosaic 1.0.  It also quite likely fails in IE5.0/Win.  Actually, I think it fails in IE5/Mac, which is ironic since my starting point for S5 was a rudimentary slide show system written by Tantek Çelik.  But it does not fail in Opera, because it’s quite intentionally designed to be OperaShow compatible.  It isn’t feature-identical, but then, the features in (and version number of) Opera for the Mac usually lag behind Opera for Windows.

Lying about S5’s cross-browser nature?  Giving Opera the cold shoulder?  Utterly wrong on both counts.  I’ve done everything I can to make sure Opera is still at this particular table.  Giving Opera the cold shoulder would have been me saying, “Screw it, I’m not providing a fallback to OperaShow and if Opera users don’t like it, they can install Firefox”.  And I’ll be totally honest: I’m sort of tempted.  I could clean up the markup; cut out some JavaScript gymnastics, including a backflip over a Gecko bug when dynamically changing media types, which I wouldn’t have to do if I weren’t still supporting OperaShow compatibility; and simplify my life.

After all, it’s not like I sprang this on the world.  The last eight beta and release candidate versions of S5 were published here.  Comments and contributions were solicited and welcomed, and many were received.  The state of Opera support has not changed one iota in all that time.  There were several months in which anyone could have stepped up to the plate and contributed fixes for Opera.  Did anyone?  No.

I’d do it myself, except I’m not sure I can.  For example, I just a few hours ago made a copy of the S5 package, unpacked it, and edited the JS file so it did no Opera detection: the scripts all ran on Opera the same as they do for any other browser.  I loaded it into both Opera 7.5 and 8.02 for OS X, which is what I have right now.  You know what happened?  Nothing.  The slide show didn’t happen.  The outline view came up, changed slightly, and then sat there.  And do you know why?  Because Opera defaults to identifying itself as Internet Explorer.

So I fixed that in the preferences, and tried again.  Everything worked just fine except for two things.  One, the browser window had a vertical scroll bar for no apparent reason.  Two, the controls were nowhere to be found, either by hovering over where they’re supposed to be or using the “C” key to toggle them.  I’m not sure why these two things are happening, because the JavaScript console reports nothing amiss.  That has me kind of stuck.

So here’s the deal.  Want S5 to be feature-equivalent in Opera?  Fine.  Take the S5 1.1 package and fix it for Opera—preferably version 6 or later, but I’ll take what I can get.  Liberally comment your code so I know what you did, and why, or else post fixes here.  I promise that, if this is done in such a way as to not degrade behavior in any other browser—because, remember, they don’t have anything like OperaShow on which they can fall back—and so that the code is maintainable, I’ll roll the changes into my version of S5, and release it as 1.1.1 or 1.1o or something.  (The same is true for any other browser, in fact.)

I’ll help out where I can, if anyone has questions about this bit of JS or that bit of CSS in the S5 directory.  Post them here and I’ll do my best to answer.  If I get hit with a bolt of genius and can suddenly fix the problems myself, I’ll do so, but odds are that won’t happen.  It will therefore be up to the community to help out.  This isn’t just me, as the credits page makes clear; S5 has long been a community effort.

Put another, more succinct way: don’t complain, contribute.  It’s more satisfying in the long run, and it’s more constructive.


Browse the Archive

Earlier Entries

Later Entries