Images
Regular readers of the MJBlog, (i.e. me), might remember the rather hastily developed 'add an image' function that featured in an earlier entry. The method of browsing for an image, clicking a thumbnail to see a larger image and then selecting one to automatically generate a copy of the image together with code to serve it is all rather fine. However, the final part of the process still needs to be developed - uploading the images to the server in the first place.
[ Mar 03 2005, 17:14 ]
Let's do that right now
1. Decide on a page to hold the 'upload a master image' form.
In this case I've decided to make a copy of my image gallery and put it in a password protected area - we don't want public access to the image upload function.
2. Create an image upload form with handling functions
Quite simple. All you need to know to do this is available on the PHP online manual. The imagecopyresampled function is the good bit.
In fact we don't need any of the image handling functions at all in this case as all that's needed is the move_uploaded_file() function - but I'll leave the links above anyway as they're very useful if you haven't played with image function yet.
3. OK. I've now got a simple form and a simple script that checks to see that a file with the same name as the one I'm uploading doesn't already exist and moves it to the right location if there isn't one. Time to test it.
4. Next step of course, after having taken a picture of some leave out of the window, is to echo out some debug info to see why the image is appearing.
Time to go
It's just about working now - the components are in place and the viewer script is working, Just time to see if I can add the leaves image now and get out of here. If I connect in the pub I'll spell-check there. Here goes...

leaves.jpg
Ta da!
The sizing is wrong, but that won't take much to fix.
Some time later...
A central core image management system will be rather useful. Not essential, or I would have sorted this out years ago, but handy. There are a few projects in development that can immediately use the code that's been played with today. One of tehm is a site that needs more content and I've been asked to manage the process so I can be my own guinea pig. This project is also my next post loquine glupe seo experiment.
Kaymed
Kaymed is a brand of bed that - less well know than some and seemingly less targeted by online bed shops and spammy portals. BLTBeds a website design, built and recently published by MJB Data has been rather successful and the site's owners are keen to improve the site's performance. So now the optimisation process begins. It's a pretty straightforward and Google-friendly strategy - publish some relevant, (preferably original), content. OK so I haven't published anything new about Kaymed yet, but I have added a paragraph about Gainsborough and Windsor. Not much to get excited about, I know, but we're now back to the whole reason why I've been playing with the image widget - I'd like to add new pages to BLTBeds including images. And now I can... more tomorrow.