Archive for July, 2006

WordPress 2.0.4 security update

Two days ago, WordPress 2.0.4 has been released. Installation (or Upgrading WordPress) is not too difficult and highly recommended, as there’s at lease one security patch involved.

Speaking of which, the discussion around security issues always seems to trigger some hefty debates. Whether to reveal every problem immediately, or to keep it under the hood until a solution exists, or even don’t mention security at all, just make the fixed version available with some vague improvement promises. Well, read this one for yourself here: Dr Dave » Followup on WordPress Security Issue.

And BTW, my microsummaries plugin works fine with 2.0.4.

Popularity: 24%

Post to Twitter Tweet This Post to Delicious Delicious Post to Reddit Reddit This Post Post to StumbleUpon Stumble This Post

Tags:
Comments off

Wij vertrouwen stemcomputers niet!

Op initiatief van onder andere Rop Gonggrijp is de campagne Wij vertrouwen stemcomputers niet gestart. Hierbij wordt aandacht gevraagd voor het fundamentele probleem van de huidige inzet van stemcomputers bij verkiezingen.

Het fundamentele probleem is de oncontroleerbaarheid, achteraf valt er niets te bewijzen als er twijfel zou rijzen over een aspect van de hele stemprocedure. Alles zit in een feitelijk oncontroleerbare black box, de stemcomputer. Het gaat hierbij om de zelfde controleerbaarheid waarvoor wij waarnemers sturen naar landen die net opkrabbelen uit een dictatuur, waar verkiezingen traditioneel omgeven zijn door een cultuur van corruptie en fraude. Hoe zou zo’n waarnemer staan te kijken als er gebruik werd gemaakt van een gesloten computerprogramma?

Inmiddels krijgt de campagne veel aandacht, zowel in de media als bij de politiek. Volgens mij meer dan terecht, lees Vraag en Antwoord – wijvertrouwenstemcomputersniet en de conclusie is onontkoombaar. Een citaat:

Zijn jullie tegen moderne techniek? Willen jullie de vooruitgang tegenhouden?
Integendeel! Bij “Wij vertrouwen stemcomputers niet” stikt het juist van de programmeurs, netwerkspecialisten, computerveiligheidsexperts, systeembeheerders en andere techneuten. We genieten zelf elke dag met volle teugen van de mogelijkheden van de moderne techniek.

Op een mooie luchtige manier is de kern van het betoog als strip getekend door Koen Hottentot, in de strip De Verkiezingskast.

Zorgen we er voor dat we nog dit jaar weer met potlood en papier stemmen?

Controleerbare uitslagen nu! - www.wijvertrouwenstemcomputersniet.nl

Popularity: 16%

Post to Twitter Tweet This Post to Delicious Delicious Post to Reddit Reddit This Post Post to StumbleUpon Stumble This Post

Comments (4)

Keeping up with change

Greasemonkey is a great tool for changing a web page, just after it has been loaded. But this does not work for all those Ajaxified web 2.0 pages, where content is loaded on the fly.

There is a solution, though: just listen for DOM events which modify the page’s content. Keep up with the DOM changes so to say!

Background

In the days before Flickr was acquired by Yahoo, I made a Greasemonkey user script: Flickr – Link Original Image that inserts direct links to the original uploaded photos on top of thumbnails. This worked fine, by parsing the DOM just after page load and looking for every occurrence of photo thumbnails.

Now, after the recent relaunch of Flickr with dynamic Ajax loading, this script fails for those dynamically inserted thumbnails. Simply because they do not exist in the DOM when the page completes loading.

Solution

DOM level 2 specifies a couple of Mutation events. Now I register an event handler for the relevant events and take action whenever an image gets inserted, removed or moved around.

Read the rest of this entry »

Popularity: 29%

Post to Twitter Tweet This Post to Delicious Delicious Post to Reddit Reddit This Post Post to StumbleUpon Stumble This Post

Tags: , , ,
Comments off

Improved GM Microsummaries generator

Following up on Create Microsummaries with Greasemonkey, I added a user interface for choosing between an element’s ID attribute or a simple location path component.

This consists of a floating panel, where the relevant elements are shown with their ID selected. You then can choose to use the simple location path instead, if more appropriate. The first element with ID selector will be used as the XPath root (looking from right to left, that is).

Example XPath selector panel

Update: WordPress messes up the HTML, using screenshot image (and see script page for a better example)

GM Microsummary Generator UI

Leaving the default choice results in:

//div[@id='main']/ul[3]/li[3]/a

Deselecting every ID attribute results in XPath:

/html/body/div/div/ul[3]/li[3]/a

Get the user script here: Generate a Microsummaries Generator for Firefox 2.x

Popularity: 14%

Post to Twitter Tweet This Post to Delicious Delicious Post to Reddit Reddit This Post Post to StumbleUpon Stumble This Post

Tags:
Comments off

Create Microsummaries with Greasemonkey

Building your own Microsummaries Generator in XML for the new Firefox 2.0 (beta 1) can be a daunting task.

Figuring out the whole XPath string can be an annoying experience, especially counting the number of nested divs, table rows and such. To alleviate this, Greasemonkey comes to the rescue with my Microsummary Generator user script.

The general idea is that you start the script on your target page. Then you all individually discernible elements on the page will be highlighted when you move the mouse over the (just like for instance DOM Inspector). When you click the desired element, the script generates the proper Microsummaries Generator XML document for this element.

Determining the XPath for the Microsummary headline is currently done with these simple rules in mind:

Calculate the full XPath location path, down to the document root element (html). This results in a full nesting of named elements, indexed by their position if not the first of the same kind. Example:

    /html/body/div/div[2]/table/tr[3]/td[2]/a

If an element has an ID attribute, take this as the starting point. Example:

    //div[@id='stats']/span[2]

The general idea is that an “id’ed div” bears more semantic meaning, as intended by the website architect, and as such is much more likely to survive (minor) design and markup changes.
This, however, fails whenever an ID is generated for some other reason, like the title elements of this weblog (id=”post-31″). I have no solution for this yet, but I’m considering some user interface solution like this:

    /html/body/div/div[2]/table/tr[3]/td[2]/a
    |          |   |      |     |
    |          |   |      |     +- ( ) id='id2e7f2ab'
    |          |   |      +------- (*) id='statstab'
    |          |   +-------------- ( ) id='stats'
    |          +------------------ ( ) id='main'
    +----------------------------- ( ) use root element

Description: every element, which has an ID attribute, can be selected as the root of the XPath expression. 

So the current version of the script has a few rough edges and there are still many manual steps needed in order to get the resulting XML Generator properly installed into Firefox. Be sure to share your thoughts for improvement!

Popularity: 27%

Post to Twitter Tweet This Post to Delicious Delicious Post to Reddit Reddit This Post Post to StumbleUpon Stumble This Post

Tags: , , , ,
Comments (3)

Microsummaries Generator plugin for WordPress

If you’re a blogger, using WordPress, you may want to enable your blog for Microsummaries.

I wrote a simple plugin for WordPress which just does that: it takes the title of the latest blog post and provides this as the content for a Live Title within Firefox 2.0.

For downloading the plugin and installation instructions (really simple!), head over to the WP-Microsummary plugin page.

Enjoy, and don’t forget to share your thoughts!

Popularity: 68%

Post to Twitter Tweet This Post to Delicious Delicious Post to Reddit Reddit This Post Post to StumbleUpon Stumble This Post

Comments (16)

« Previous entries Next Page » Next Page »

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.