Not long ago I was bored – I was thinking about something to code. I had a talk about a fotoalbum with my girlfriend – written in PHP(PHP Hypertext Preprocessor) -, so we could share some fotos. There are a lot of them out there, sure, but they all had some limitations, bad layout, etc. that made us think about it. Even the gallery I use right now is not what I really wanted to have. So I build my own.
### Templates ###
The main goal was to use templates. Templates are kind of easy: you can imagine it as a simple html-page with a template language where you need it (like when you want to have a variable title or you want to iterate through guestbook entries). I like templates, I often work with them and I really think you should use them wherever you can. So let’s use templates.
#### Mambo, HTML and CSS ####
Another thing that came to my mind was using it with [Mambo](http://www.mamboserver.com/). This is not as easy as I thought because with Mambo you can’t use your own stylesheet and have correct html code. And I wanted it to validate as strict HTML 4.01. With [Cascading Style Sheets](http://www.w3c.org/Style/CSS). Which should also validate. This is a problem not solved so far (except when using the Mambo wrapper).
### Sessions and Databases ###
Using sessions and a database today is kind of “state of the art”. I wouldn’t want to work without these nowadays, these mechanisms are really handy and make a programmers live easier.
### Tables or divs? ###
When I came to designing I thought about a layout for displaying thumbnails – how much columns, should I use slow tables or fast divs? It uses divs, as you might have thought. But – which is really great I believe – it has no fixed columns. This means if you resize your browser window the thumbnails wrap to fit width. That way you – as the user – can control how much images you want to be displayed on screen. No more large white space between images – no more expanding websites where you have to scroll vertically (though there are mice out there that are able to do that). Isn’t that great?
### View fotoalbum ###