Skip to content

Wikipedia now supports the geo microformat

Andy Mabbett recently added the geo microformat to Wikipedia's template system. Consequently, all Wikipedia pages that are based on this template do from now on contain geo. What's the benefit of all this? You might, for example, use the Operator or Webcards Firefox extensions to find a place in Google Maps or Yahoo! Maps with a single click. Other applications may parse a Wikipedia article and process the metadata in other ways. Examples: List of impact craters on Earth, Hamstead railway station.

Andy is a member of the WikiProject Microformats, a group of users who want to actively promote the use of microformats in the world's greates encyclopedia. Great job!

The Observer Pattern and PHP4

Matt Zandstra wrote a great and highly recommended article about The Observer Pattern for the Zend Developer Zone. The tutorial is geared at intermediate and expert users, and of course users of PHP5. Now, for those of you who - like me - sometimes still have to work with PHP Version Four, the example won't work out of the box.

Since the observer pattern came in quite handy for my current project, I'd like to share the minor fixes I had to apply to the code. The methods attach() and detach() are the only two methods you'll have to change. Just edit them like so:


function attach($obs) {
    $this->observers[get_class($obs)] = $obs;
}

function detach($obs) {
    unset($this->observers[get_class($obs)]);
}
 

I don't know why Matt used delete() to detach an observer because in the manual it says under delete(): This is a dummy manual entry to satisfy those people who are looking for unlink() or unset() in the wrong place. Whatever, I hope some of you will find my entry useful when hunting for this specific problem.

BarCamp, Tag 2: jQuery

Dirk stellt jetzt jQuery vor. I've played around with this javascript framework before, yes even used it in a project, but I still need to learn more about it. Be sure to check out VisualQuery, too. Example (bad): BOA ;O) Also, check out the "Fisheye menu" demo at this page (click link at bottom of page). Awesome. You can also select only the specific parts of jQuery for download that you need for your project, thus reducing size even further.

The next session is about Jamal.