Rob's Ramblings

Sunday, 29 April 2012

Updates? What are those?

It's been a while since I wrote something on here, but never fear, I've been busy. Most news about Tiddler is now appearing on her own blog now, which has had several updates since I last wrote on here. If anybody following this one is interested in her, best head over there.

Latest project is trying to get her actual website up to scratch. The simple holding page written in basic HTML was starting to feel insufficient, especially if she's going to be getting any more work. A brief sorté through the free web templates for some ideas came up with this which I thought looked good for a front page; slideshow of photos and a nice theme.

It's a pretty simple HTML page, a somewhat larger CSS file, four javascript libraries (one of which doesn't seem to be used) and a selection of images.

The images were simple enough to replace, no problem there, and running the files from the local disc worked fine. But uploading it to the website, it all fell apart, with the slide show not sliding, and all the images stacking on top of each other. Refreshing the page didn't change anything, but just selecting the URL and hitting enter worked fine. So it's something to do with not having the images available quickly ehough? The first access, or a reload, it's not got them, but re-accessing the page has them in browser cache. (And accessing locally is fine as it's got them immediately available.) It behaves the same in Opera, Chrome and Firefox.

Much messing about with pre-loading images gets me nowhere; sometimes it works, sometimes it doesn't, so I call up the "slidertron" script homepage for help. Nothing there but a download link, but I download the latest version anyway. This actually makes it worse, but it does comes with demo files, which do work, so I delve into the source code to find out why. Looking at the css, it's got the image sizes specified. The template files I downloaded don't have this. So I add them, and bingo, everything works. Do these people not check their templates in a live environment first?

Now the task is on to turn a flat html file into something that can actually be used as a template!! I'm not going to copy it and edit it individually for every page I want to create on the website. The code has parts that look like it's a snapshot of some dynamically created content (e.g. the menus have a style of "current" on one entry to highlight the current page) but it's going to take some work to turn it back into a dynamic site.

For the moment, the flat page is available on her website but I hope to get the dynamic version working shortly. Then I can start working on actual content. Work-in-progress is happening here if anybody fancies being nosey...

At the moment I'm trying to decide on the visible page structure - should I go for a simple /index.php?page=foo or a /pages/foo/ or a /p_foo layout... Good Practice and SEO recommendations seems to indicate not using the first version; second is prettier, but needs some playing with mod_rewrite to translate it into php calls, which them upsets relative links.. so I'm torn.

Anyway, as the saying goes, watch this space.

Labels: , ,