Using lists instead of tables with sfGuardAuth

For some reason, symfony 1.1’s new sfForm class is using sfWidgetFormSchemaFormatterTable by default, instead of sfWidgetFormSchemaFormatterList. This means that you get a form based on tables, while I prefer to think of my form as a list to fill in. To change this you can use this chain:

$form->getWidgetSchema()->setFormFormatterName(‘list’);

The question is, “where do you put this [...]

Symfony, a PHP web application framework

Recently I made a library for a client which needed database access, cache and configuration. For this I decided to try Zend Framework for the first time. ZF was excellent for this, because you can cherry-pick what components you want, without having to include everything. For my next project however I’m going to build a [...]

Image + Geotag + automation = Map Gallery

My latest personal project is a wordpress plugin that automatically reads geotags from images and adds the image as a point on a google map. You insert the map using a shortcode () and there you go. Shortcodes were introduced with Wordpress 2.5, and I rely on some PHP5 functions, so those are the requirements. [...]

Working with image meta data in Exif and IPTC headers from PHP

Most people know that when you take a picture a digital camera it writes the image to a file, but quite a few people do not know that there’s usually a lot more data being written to this image file. The extra data being written is meta data (data about data), and it may contain lots [...]

New google charts wrapper in PHP

I’ve been doing a freelance project for a while for one of the biggest media corporations in Norway. Without going into details it involves tying together a lot of data and make it available on a map. I’m building the back-end for this thing, and it needs to support charts and diagrams.

Callback-functions explained

Very many programming and scripting languages today allows you to use callback functions, both built-in functions and user defined functions. This is all good and dandy, but unfortunately very many programmers don’t know what a callback function is or does, and definately not how to use one. In this article I will try to explain [...]

Session security in PHP, and how to improve it.

When you first start out with PHP, you soon realize that you need a way to save small chunks of data like client input across pages. There are two fairly simple ways of doing this in PHP. Sessions are useful for storing this data for shorter periods of time i.e per browser session while cookies [...]