Archive for the ‘ Web ’ Category

WordPress and jQuery UI

While working on a quite large WordPress plugin, I’ve started to use jQuery UI for all sorts of widgets on the admin panels. At first I was delighted that that WordPress (3.0.1) had the UI libraries pre-packaged, thinking that it would save me the trouble of including them myself. Well, turns out that was wishful thinking!

For some reason the WordPress version of jQuery UI is severely stripped down. Out of the box, I couldn’t use Dialog, Datepicker and Accordion elements. I couldn’t find a CSS file for it, either. First, I worked around this by downloading the official jQuery UI distro and selectively including the missing elements. What I should have done much sooner is simply ditch the packaged version and use the official one!

To get it to work:

  • download jQuery UI 1.7.3, with all components selected
  • in the admin_init action callback, register┬áthe script and stylesheet
  • in the admin_menu callback, enqueue the library, with the packaged jQuery as a dependency:
    wp_enqueue_script( ‘my-jquery-ui’, null, array(‘jquery’), null, true );

That way you don’t even have to explicitly enqueue the base jQuery library, and I haven’t hit a snag since.

Easykey

I hate having to remember a bazillion passwords for all those websites that require an account. I also don’t want to re-use the same password everywhere – that’s a good method to become an identity theft victim. I don’t trust password managers.

Sounds like a dilemma? No! I wrote Easykey, a password generator, for the current browser of my choice, Chrome. It takes the domain portion of the URL you’re currently surfing at and deterministically creates a unique, strong password. It will be the same everytime you arrive at this site, and will differ for all other sites.

A site won’t be able to guess another site’s password: the underlying mechanism is inspired by the PGP encryption algorithm. You could say that Easykey calculates the password by “encrypting” the domain name using a secret “private key” phrase that the user supplies. Due to the nature of the integer factorization problem, it should be impossible to guess the private key.

The benefits for the user are these:

  • You never have to remember a password again.
  • You have a strong, unique password for every online account.
  • A single click fills the password into form fields.
  • No password manager needed. Locally stored passwords are a security issue and thus avoided.

Want to try the extension? Check it out!

Download

(All written in Javascript, so you can check the code.)

Computational Sensomotorics website

Written from scratch: using only PHP, mySQL, Javascript, HTML and CSS, I’ve created a quite functional new webpage for our department.

It features:

  • barrier-free design: degrades gracefully for less-capable browsers
  • database-driven: pages can be generated on-line using the editorial interface, in BBCode – makes writing pages easy. Includes file management tools and automatic Flash video embedding.
  • bibliographical tools: Citing papers and other publications is important, so some work has gone into that direction.
  • database tools: an admin backend takes care of automatical versioning of pages, and of creating and restoring database backups.