The joys of PHP

It is a wonderful thing when something you think might be really complicated turns out to be really simple.

On www.davebriggs.net, I have three columns. The left one holds links common to all pages, including the internal site navigation; the centre one holds all the content; and the right one has links and stuff relevant to that page.

The problem with the left hand column is that if I want to make a change to it, I would have to do so with all the pages one by one. While this wouldn’t be too much of a burden at the moment, when the site starts to expand it would become seriously time consuming.

Fortunately PHP (www.php.net; http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=php) comes to the rescue. By typing the HTML for the menu content into a separate HTML file, called say “menu.html”, I can then call up that file anytime I like using:

<?php
include(“filename.html”);
php?>

And that’s it!

So all I have to do is update menu.html and ALL the pages change in line with that!

Developments

Plenty has happened since I last posted. I have had a total re-think of how I am going to ‘do’ davebriggs.net. Instead of going for a graphics-heavy Dreamweaver approach, I’m going to do it in Linux, more or less hand coded, using Bluefish and The Gimp, and make it accessible and fast loading on as many browsers as I can test it in.

This approach, however, has its downside. I still can’t get my internet connection to work on Linux, so I have to do all my work, save it onto a floppy, then log into Windows to FTP it to the web host.

Why am I bothering? Because I think it’s important. The coding part of the process is far quicker and more controlled, using Bluefish, and the Gnome environment I work in makes it easy to test and plan. Not least because of the multiple desktops – I have Bluefish open in one, various browsers in various others, OpenOffice.org Writer in another, in which I keep my site plan updated, and one desktop has a terminal, where I can do any file management stuff. It’s simple, straightforward and gets everything done perfectly.

Because of this new design decision, it means that I can change the layout of this blog to suit the whole site. I’ll still keep it hosted at Blogspot, though, simply because it’s too easy not too!

My site / Firefox / Web design

Work is continuing on davebriggs.net – though it is going to take a while to complete as I seem to have a lot on at the moment. Still, the front page is nearing completion, the side bar of my frequently used sites is going to come in really handy!

On the right hand side I am going to have various ‘advertiser’ links, so adwords from Google, Amazon etc and advocacy links. At the moment I only have one of these, for the Firefox browser. I recommend this brilliant piece of software to everyone. It’s faster, has more features and more secure than IE, and it is free, too. One of the things that annoyed me about Mozilla, and Netscape before that, was that some of the rendering of the HTML left a little to be desired – a lot of this has been sorted out now in Firefox. For some reason, though, it doesn’t pick up the stylesheets for the Palimpsest home page! Strange, because my other sites which are built in exactly the same way seem to work fine…

I have completed the contact page on my current work-in-progress, which uses a simple PHP script to send the details through to an email address. The site is looking rather good, though, and my progress can be monitored at http://www.davebriggs.net/wip/elmcroft.

New Site

www.davebriggs.net has been registered and a basic template put in place. Not sure about the colours yet, they might be a bit too dark. I did loads of work on the plan last night so hopefully tonight I will be able to sit down at Dreamweaver and bash most of it out.

Still not sure what I am going to do about this blog. I would like to be able to have different topics that I could assign to posts on here, and those post then feed onto the relevant page of my main site, but that might be a bit ambitious for my limited abilities. I will put a post onto the PCPlus forum and see if anyone has anything suitable. Otherwise I may as well stick to Blogger, though I have been looking at www.livejournal.com as another possible system.