Thursday 31 December 2009

New Years Eve

This morning I was working on the stitched Pano that I was adding control points to most of yesterday. I found that the images at different exposure levels were better aligned with each other now the pano had all the extra control points added around the Horizon on each image. But there were still plenty of stitching errors around the Horizon between one image and the next image to the left or right.

So I would guess that it would have taken me quite a bit less time to manually align each of the images at different exposure levels in Photoshop than it did adding the control points to get them aligned via PTGUI.

In the afternoon I wrote a blog post for my photography website about Non destructive dodging and burning in Photoshop and Capture NX. For part of the post I wanted a screen shot with the mouse cursor on it, but when I took a screenshot I found that the mouse cursor wasn't shown.

Doing some Googling, I found that Irfanview can do this, so I downloaded and installed Irfanview, and it does indeed let you take screenshots that include the mouse cursor.

In the evening I watched a couple of Power Rangers episodes with L, and Pom Poko with L and Mauser.

I noticed that in the pilot episode of Power Rangers, Kimberley said she didn't want to be a Power Ranger, then said 'Psyche!' but in the first episode (which is just a remake of the pilot episode), she says 'Not!'. Must admit, I don't remember people actually using 'Psyche!' to reverse the meaning of a sentence much, but people did use 'Not!' a lot.

Food
Breakfast: 2x Crumpets with Utterly Butterly and Honey; Cup o' Tea.
Lunch: Chicken, Mayonnaise, and Iceberg Lettuce Sandwich; Clementine; Small Slice of Home-made Mandarin Flan; Posh Chocolate Biscuit; Cup o' Tea; Chocolate Truffle.
Dinner: 2x posh sausages; Mashed Potato; Onion; Baked Beans; Mushrooms. Pudding was a Creamy Cherry Yoghurt, a Shortbread Finger, and a Dark Chocolate Digestive.

Wednesday 30 December 2009

Adding control points to a pano

This morning I processed a few more photos from the 3rd day of our holiday in Shropshire earlier this year, then got on to processing a pano from that day.

When I opened the stitched file in Photoshop, I found that as well as having problems around the horizon, the different images taken at different exposure levels didn't match up properly either. So I started adding manually adding control points around the Horizon for each image.

This was extremely boring, and took nearly all day. I also watched the Power Rangers Pilot episode with L, and the Springwatch Christmas Special with L, Clare, Brian, and G-Dad.

The weather was overcast all day and rained quite a bit.

Food
Breakfast: Lemon Marmalade Toast Sandwich; Cup o' Tea.
Lunch: Mouldy Cheese, Brie, Chilli Salsa Dip, and Iceberg Lettuce Sandwich; Clementine; Home-made Blueberry Muffin; Posh Chocolate Biscuit; Cup o' Tea.
Dinner: Slice of Beef Pie; Parsnips; Mixed Veg; Potatoes. Pudding was a slice of Home-made Mandarin Flan with Cold Custard. Coffee; Chocolate Truffle.

Tuesday 29 December 2009

Playing with HDR

Today I was mainly playing with different HDR programs, not to actually create a HDR image, but rather to tonemap and add contrast to an existing image LDRthat was quite flat, and lacking in contrast.

I also read and watched a few HDR tutorials as well. Probably the most well known HDR photographer is Trey Ratcliff (Stuck in Customs) who has a HDR tutorial on his blog. After reading that tutorial, I read an article he wrote for Smashing Magazine: 10 Easy Steps To Advanced Photography Skills, and I was surprised that the majority of the comments were 'anti-HDR'.

Quite a few comments also said they thought the images posted as part of the article were rubbish as well, e.g.
I’m done with crappy HDR… like most of the photos “featured” in this article
Personally, I thought most of the images were great, much better than I could do. A couple were a bit over saturated for my liking (Times Square, and the one hanging in the Smithsonian), and one had visible halos (the Icelandic Horse), but I still thought they were good photos.

Maybe fans of HDR are in the minority, or maybe it's just not something that Web Designers like. (Actually it seems weird for Smashing Magazine to have a photography article, maybe they just liked it because it's in a list format).

In Trey's HDR Tutorial, he mentioned that he uses Noiseware Professional to remove noise produced by the HDR tonemapping process. So I did some searching to try and find what the best Noise reduction software is (currently I don't use any). A dpreview forum thread with some comparisons is here: Noise removal software?, and looking at the results there, and reading and looking at images from other sources, it seems that Nik Dfine or Topaz Denoise do the best job.

After lunch I watched Der Golem with Mauser and L, which seemed like an anti Jewish film, but apparently it was written by a Jew. Anyway, it was quite good.

In the evening me, Moccle, and L watched 'It came from outer space', which was a bit boring really.

The weather was overcast all day, in the evening it rained, then about 9pm the rain turned to snow. Yep, that's right, it was the day the rain turned to snow. Oh wait...

Food
Breakfast: Strawberry Jam Toast Sandwich; Cup o' Tea.
Lunch: Mature Cheddar Cheese, Brie, Mouldy Cheese, Iceberg Lettuce, Watercress, and Chilli Salsa Dip Sandwich; Clementine; Scone with marg, cream, and Strawberry Jam; Cup o' Tea.
Dinner: Lasagne; Potato; Carrots; Green Beans; Ground Black Pepper. Pudding was home-made Mini Doughnuts (made in Clare's Doughnut Maker she got for Christmas), with sauce made from: Posh Dark Chocolate; Fudge; Cream; Golden Syrup; Milk; Sugar. Coffee.

Monday 28 December 2009

Hmmm

This morning I processed a few more photos from the 3rd day of our Shropshire Holiday, back in July. I also watched some tutorials on processing images in Photoshop, as I found my photos were looking a bit flat and boring.

In the afternoon and a bit of the evening I watched the 1943 German film Münchhausen.

The weather today was a mixture of sun and cloud, the sun was quite as it was setting, shining through some thin cloud, but the cloud didn't get lit up at all after the sun had set.

Food
Breakfast: Bowl of Choco Moons Cereal; Cup o' Tea.
Lunch: Beef with Mustard, Iceberg Lettuce, and Watercress sandwich; Crackers with Mouldy Cheese; Clementine; Apple; Red Grape; 2x Posh Chocolate Biscuits; Cup o' Tea; Chocolate Truffle.
Dinner: 1½ Sausage Rolls; Baked Beans; Mashed Potato; Ground Black Pepper. Pudding was a couple of slices of Jam Swiss Roll with Tinned Pineapple Chunks and Custard. Cup o' Tea.

Sunday 27 December 2009

Watching Films

This morning we went to Church as normal.

In the afternoon I watched Ivan's Childhood with Mauser. I also tried to find out what the correct way to thank people for favs is on devinatArt, since there isn't a 'reply' option for favs your images receive. I couldn't actually find any info any where on what the correct etiquette is, but by looking at other people's accounts it seems the correct thing to do is just leave a message on the other person's profile, thanking them for the fav.

So I replied to the fav's I'd had on my images I've uploaded so far (not that many really), saying
Thanks for the :+fav: on <a href="url/to/image">Image title</a>
That way the person can tell what image it was that I'm thanking them for faving, and there is also the possibility that other people looking at that person's profile may click the link through to your image.

I think that also the link may boost SEO for the page you're linking to (so long as you're linking to a page inside deviantArt, and not an external site).

In the evening I watched Powaqqatsi with Mauser and L.

Food
Strawberry Jam Toast Sandwich; Cup o' Tea.
Dinner: 2 Turkey, Chilli Salsa Dip, Iceberg Lettuce, Cucumber, and Cheese Fajita wraps. Pudding was a bit of Ben & Jerry's Cookie Dough Ice cream, and some Christmas Pudding with Cream. Coffee; Chocolate Truffle.
Tea: ½ Packet of Chilli flavour Doritos; Mature Cheddar Cheese Sandwich; Moudly Cheese on a Cracker; A few Red Grapes; Clementine; Cup o' Tea; Posh Chocolate Biscuit.

Saturday 26 December 2009

Consolidating Pog Folders

This morning I installed some Windows Updates, then did some work on another pano (just a partial pano this time). I also read about problems with paypal and Google Checkout.

In the afternoon I moved some of my Pogs around so they used up less folders. I also used up some of my new Pog (Slide) Pockets that I got for Christmas, and so managed to fit in some large pockets that I couldn't fit in the folders before.

When I'd done that I had a spare shelf, so I put my National Trust magazines on there (previously they were on the floor). But to do this I had to find some of the cardboard magazine holder things, so I spent a while looking for them in my bedroom first, and then in the garage (where I did find them eventually).

In the evening I was trying to edit my Music database so I could add some new CDs to it that I got for my birthday and Christmas. The database was a .accdb file, which I think was created by Microsoft Access 2007, but since I'd reformatted Vista, I didn't have MS Access installed. I'm pretty sure I don't actually have a copy of Office 2007 (so I'm not sure how I had Access installed before), so I tried to find a way of editing the database without MS Access.

The first thing I tried was MDB Viewer Plus, however, at first it just gave an error when I tried to open the .accdb file. It could open a .mdb file okay though. After installing the 2007 Office System Driver: Data Connectivity Components, I could then open .accdb files in MDB Viewer Plus.

I had trouble editing the table in MDB Viewer Plus, so I thought I'd see if I could open the database in Open Office. I didn't have Open Office installed, so I installed it. After installing it, I found that Open Office Base could connect to the Access .accdb database and read data from it, but it wouldn't let you edit or add any records.

Then I found the Tutorial Open Office Base (database) Tutorials - Importing data, so I followed that (using MDB Viewer Plus to export the tables from the Access .accdb database to XLS format), and got my tables imported into OpenOffice Base. I created a View that displayed the Table in the same way as Access did (i.e. Columns referencing the ids of values stored in a different table display the value from the referenced table instead of the id), but then found that I couldn't add records through the View.

So I'm not sure what to do now, as I don't really want to be adding records where I have to manually look up the id for the value in a different table that I want to reference.

The weather today was a mixture of sun and cloud. There was a visible sunset, which was quite nice with the sun shining through some thin cloud about half an hour before the sun actually set, then the cloud dissipated, and I didn't think the actual sunset was that pretty.

Food
Breakfast: Bowl of Choco Moons; Cup o' Tea.
Lunch: Mature Cheddar Cheese with Watercress Sandwich made with Bakery Bread; Crust of Bakery Bread with Honey; A few Red Grapes; Clementine; Cup o' Tea.
Tea: 2x Duck Spring Rolls; Piece of Sausage Roll; 2x Cheese Straws; Tortilla Chips with melted cheese and Spicy dip stuff; Mince Pie; White Wine.

Friday 25 December 2009

Christmas Day

I didn't get much sleep last night, although I went to bed about 11pm, I didn't get to sleep until after Brian had got back from the Midnight service, so maybe 1am. Then I woke up about 4.30am and it took me ages to get back to sleep again.

I got up about 8.30am, and only had time to have a wash etc. and breakfast, then had to leave immediately to go to Church. The Christmas Service is shared between the Methodist, Baptist, and whatever the other Church type is (not C of E or Catholic). This year the service was at the Methodist Church, which meant it was much more packed than normal since we had people from the two other Churches there.

On the way to and back from Church, the pavements were still quite icy (compacted snow), but weren't actually that slippy, and it was melting quite a bit.

After the service when we got home I made a cup of tea (since I hadn't had time to make a drink before we had to leave for Church), and checked my spleenmail. I started cutting out some Christmas Pogs in Photoshop, then it was dinner time.

After dinner I finished cutting out the Christmas Pogs in Photoshop, then updated the Pog website.

I needed to reply to a message on the Nginx mailing list, but couldn't remember how to do it. I looked back through my blog posts, and found the one where I mentioned replying to a mailing list before, but unfortunately I hadn't put any information on how to do it. Very annoying as I'm sure I remember writing down all the details and copying the various URLs of the websites that I used to work out how to do it.

Anyway, I re-found one of the resources I used before in working out how to reply to a threaded mailing list message: Threading: Message-ID, References, In-Reply-To. Luckily I didn't need to re-find how to add the References and In-Reply-To headers to Thunderbird, as they were already there.

When I had to reply to a threaded mailing list message before, the References and In-Reply-To headers didn't exist in Thunderbird, so I had to add them. I thought that since I had re-installed Vista, I would have to add them again, but obviously not. I would guess that Thunderbird 3 includes these headers by default, when Thunderbird 2 didn't. Either that, or the settings were backed up (and restored) along with the messages and mail accounts.

I did some more work on the pano I was working on yesterday (I noticed a couple of stitching errors that I didn't spot yesterday). Then I was wondering how best to setup a site config for the panos website, so after thinking about it for quite a while, I posted to TWS to try and get some advice.

The weather was mainly cloudy today, though it ended up with a pretty bald sky at sunset.

Food
Breakfast: Bowl of Choco Moons.
Dinner: Roast Chicken; Roast Parsnips; Potato Wedges; Potato; 2x Chipolata Sausages; Carrots; Stuffing; Gravy; Sprouts. Pudding was Christmas Pudding with Custard and Cream. Cup o' Tea.
Tea: Some Walkers Sensations Sweet Thai Chilli flavour Crisps; Slice of Christmas Cake; Cup o' Tea.

Thursday 24 December 2009

Processing 1 pano

This morning I carried on adding control points near the Horizon to the images in PTGUI for the pano I started work on yesterday.

Then Lad said that I should wrap up my Christmas presents for everyone, so I did that. I started by doing McRad's pressie, which was my old bag, and I thought it would be good to wrap it up so that it was obvious what the present was. After doing that, I wrapped up the other presents in the same way, so it took quite a long time (as they mostly weren't boxed shaped).

Unfortunately Shaz's present and L's main present haven't arrived yet, so they won't get any present from me until after Christmas. Wrapping up the presents that I did have took me all morning.

After lunch I carried on working on the pano, and also checked my email. I went in the garden with Lad and Mauser as well, and we smashed the ice on the pond, which was about 2 inches thick (the ice and snow has been melting over the last couple of days).

Th rest of the day I was working on the pano, despite adding all those control points near the horizon, the images still didn't stitch together to create a correct horizon, so there was quite a bit of masking, copying, and warping to do.

I also went on the pinternet a bit, reading about processing panos etc. to try and find the best workflow. I found a photoshop plugin for patching the nadir, but for some reason it wouldn't 'reverse' the nadir patch back to equicrectangular - it just made the layer become empty. So I had to copy merged on the patched cube face, and then 'reverse' that back to equirectangular, and that worked okay.

I also looked for advice on whether to use cube faces or equirectangular for final output. Apparently you should use cube faces as it means each one can be loaded separately (reducing the time before the viewer sees an image load), and FPP converts equirectangular files to cube faces internally, so better to just give it cube faces. Hans Nyberg said that he is now using QTVR files with Flash.

Food
Breakfast: Strawberry Jam Toast Sandwich; Cup o' Tea.
Lunch: Cheese on Toast; Sweet & Crunchy Salad; Apple; Banana; Chocolate Muffin; Cup o' Tea.
Dinner: Slice of Home-made Pizza; Chips; Peas; Salt; Ground Black Pepper. Pudding was Glazed Lebkuchen. Coffee.

Wednesday 23 December 2009

Sorting/adding metadata to photos

This morning and this afternoon I sorted some caterpillar photos, and uploaded a few to my website and Flickr etc. I also listened to some more photographer interviews on Frederick Van's blog.

In the afternoon I also helped Clare move the old large table from the garage into the kitchen. It was quite difficult to fit it through the doorways.

In the evening I watched a couple of episodes of Uylsses with L, and did a backup.

I listened to another couple of photographer interviews on Frederick Van's blog, and also started work processing the third day's photos from the Shropshire holiday in July.

The first set of photos I needed to process were a handheld bracketed pano. Unfortunately PTGUI didn't put any control points around the Horizon, so I spent ages manually adding in control points around the Horizon (since I'm dealing with bracketed images it takes about 3x as long as it would for a non bracketed pano). I did a few photos, but then got bored and sleepy, so went to bed.

The weather today was sunny in the morning, then in the afternoon fog rolled in, then in the evening it rained.

Food
Breakfast: Chocolate cereal bar; Cranberry cereal bar; cup o' tea.
Lunch: Peppered ham with sweet & crunchy salad sandwich; Clementine; Slice of Tiramisu; Caramel Rocky; Cup o' tea.
Dinner: Piece of Shepherd's pie; mixed veg; ground black pepper; tomato ketchup. Pudding was a slice of Blackforest Gateaux. Coffee; Piece of Sainsbury's Truffle Chocolate; Piece of Sainsbury's Mint Creme Chocolate; Chocolate Truffle.
Supper: Dark Chocolate digestive; cup o' tea.

Tuesday 22 December 2009

Processing and sorting photos

In the morning I tried re-processing one of the photos that I'd taken and processed yesterday with Photomatix, as I wasn't very happy with how the photos I'd taken yesterday looked. Unfortunately, the photo still came out pretty much the same as using my normal exposure blending method.

I did try a few different tone mapping/exposure fusion methods in Photomatix, but they were all pretty similar (probably because I tweaked the settings for each method to try and get a relatively natural looking result).

In the afternoon I went on the internet a bit and also sorted through some photos of Poplar Hawk moth caterpillars.

In the evening I watched an episode of The Equalizer, and then watched 2 episodes of Uylsses with L.

The weather started overcast, then the clouds gradually dispersed in the afternoon, ending with a cloudless sunset.

Food
Breakfast: Bowl of chocolate crunch oat cereal; cup o' tea.
Lunch: Bowl of vegetable flavour instant soup; slice of toast; banana; clementine; mince pie; cup o' tea.
Dinner: Slice of ham quiche; potatoes; peas; sweetcorn. Pudding was a large choc chip chocolate muffin. Coffee.

Monday 21 December 2009

Geo-coding and processing photos.

This morning I set Robogeo off geocoding the third day's photos from the Holiday in Shropshire back in July. While Robogeo was hogging the PC doing the geocoding I went out for a walk and took a few photos, just in the fields near the house.

When I got back in about 10.30am Robogeo was about half way through the photos, so I listened to some interviews with photographers on Federick Van's website.

In the afternoon I processed the photos that I'd taken in the morning.

In the evening I finished processing the photos I'd taken in the morning, watched 2 episodes of Uylsses with L, and looked at some Uylsses fan-art on deviant art with L.

Food
Breakfast: Strawberry jam toast sandwich; cup o' tea.
Lunch: Peppered ham with Sweet & Crunchy salad sandwich; Packet of Barbecue flavour crisps; 2x Clementines; Slice of Tiramisu; cup o' tea.
Dinner: Slice of Chicken Pie; Green Beans; Carrots; Parsnips; Gravy. Pudding was a slice of Black Forest Gateaux. Coffee; White Chocolate Truffle.

Sunday 20 December 2009

Installing programs

This morning I went to Church with L and Moccle. There was actually less snow on the ground than than there was yesterday (so evidently some had melted overnight), but it was still quite icy and slippy in places.

After Church I went on my comp and carried on installing programs that I use. I also started cutting out some pogs in Photoshop.

In the afternoon there was a sunset, but it was kind of boring as there wasn't any clouds. I couldn't go out anyway as I had to look after Grandad. The sky did go a nice orange-purple gradient after sunset though.

After tea I finished cutting out Pogs in Photoshop, uploaded them to the website, and created the pages for them.

On eBay I was watching a Simga 300-800mm/5.6 for Nikon mount, which ending up going for £2550 + £40 P&P, which is strange since it was previously listed for £2500 and didn't get any bids. While I would have liked to purchase this lens, there's really not a lot of point as I don't have the time to go out somewhere with the lens (like Rutland) where it would be useful. So while £2500 seems like a good price, it would be a waste of money for me since I wouldn't actually use it (at least probably not for at least a year until I get my current photo backlog cleared).

After that I sorted a couple of photos.

The weather was sunny all day.

Food
Breakfast: Bowl of Chocolate Crunch Oat Cereal; Cup o' Tea.
Dinner: Nasi Goreng; Noodles; Slice of Posh Sausage; Bread Roll with Margarine. Pudding was a slice of Mandarin Cheesecake. Coffee.
Tea: Grated Mature Cheddar Cheese with Sweet & Crunchy Salad Sandwich; 2x Mandarins; Slice of home-made Strawberry Jam Victoria Sponge Cake; Cup o' Tea.

Saturday 19 December 2009

Re-installing Vista

Today I looked to see how much an upgrade to Windows 7 was, and the cheapest was about £60-80, so too expensive to make it worth the upgrade from Vista.

My Vista installation has become quite buggy, with not allowing me to move, copy or delete certain folders using Windows Explorer, and also Windows Explorer would crash if I right clicked on said folder. I was coming across this problem reasonably often, and was having to use the command prompt to move, copy or delete the folders, which is quite a bit slower than using windows explorer.

So since Windows 7 was too expensive considering it offers little advantage over Vista (from what I've read it's less resource hungry, faster at some tasks, and slower at others), I decided to just re-install Vista.

Before I did this I backed up all the important stuff, (which took ages), then while I went out for an afternoon walk I left Vista to install itself (after formatting the partition where it was installed).

On my walk, I just went up Lubenham hill to try and get a photo of the snowy path going down the hill and the sunset. Unfortunately, as I was leaving the house, I could see a large bank of cloud was blowing towards the sun. I thought I might as well go out anyway, as the sun might find some holes in the cloud and send dwn some nice beams, or the cloud might blow over and get lit up underneath by the sun.

Unfortunately, neither of those things happened, so I just waited on top of the hill for quite a while seeing if anything was going to happen, until I eventually decided to cut my losses and come back home.

In the evening I installed the drivers for the PC, and then some updates for Vista, which took ages. To install Adobe CS4, I needed Vista SP1 installed. Weirdly, the Windows Update didn't show this as an available update (it only had IE8), so I had to manually download the installation package from the Microsoft website.

While all the installing and downloading was going on I watched a couple of films with Mauser - The Battle of Algiers (which was really good) and Ballad of a Soldier (which was quite good).

The weather was sunny all day (until sunset). I the evening it snowed lightly for about 30 minutes.

Food
Breakfast: Tangerine marmalade toast sandwich; cup o' tea.
Lunch: Mature cheddar cheese with Italian style salad sandwich; 2x tangerines; caramel Rocky; cup o' tea.
Dinner: 2x posh sausages; mashed potato; baked beans. Pudding was 2x hot mice pies with spleenvap. Coffee.

Friday 18 December 2009

Not much

Despite the weather reports suggesting heavy snow overnight, I woke up to find there hadn't been any snow. But then about 10 minutes later I looked outside and it was snowing.

I read part of the Photoshelter SEO Cookbook, which said you shouldn't
Use the same caption for every image from the same set of images.
This was what I am doing at the moment, so I thought I should try and vary my descriptions a bit, so I spent quite a while editing some of the descriptions for my Silver Y Moth photos.

I also edited a couple of Silver Y Photos.

About 3pm I went out for a walk as the sky was looking like it might have a reasonable sunset. By the time I got out the door though, it looked like a solid grey sky. I thought I might as well carry on going though in case the clouds change again (though it didn't look likely), and even if the clouds didn't change at least I could see if where I was going would be a good place to take a photo if the weather is better a different day.

So I just went up Lubenham Hill. I did slip over once on a bit a road where the cars had compacted the snow, making it very slippy. It was also a bit slippy coming down the Hill even though no-one else had been down the footpath (and this is the footpath through the field). It did look quite nice though, so hopefully the weather will be nicer (and the snow will stay) another day (though it might get busy there if people decide to go sledging).

I created a quick video using photos of a Silver Y drinking honey, signed up to some video sites, and then uploaded it. I also uploaded the Silver y photos I processed today to the website and wrote a blog post about the Silver y for the photo website.

In the evening I also watched a couple of episodes of Uylesses and some Yoshielectron videos with L.

The weather was snowy most of the morning and in the afternoon until about 2.00pm, varying in the amount of snow falling. The snow settled initially, then didn't seem to get any deeper during the morning. In the afternoon it did seem to get a bit deeper, I would estimate a couple of centimetres.

Apparently Shaz said that they had about 6 inches of snow in Sussex yesterday evening.

Food
Breakfast: Tangerine marmalade toast sandwich; cup o' tea.
Lunch: 2x Cheese on toasts; Sweet & Crunchy Salad; 2x Clementines; Caramel Rocky; Cup o' Tea.
Dinner: Breaded Fish Portion; Peas; Potatoes; Ground Black Pepper; Salt. Pudding was Rice Pudding with Strawberry Conserve (Jam). Coffee; 3x pieces of Sainsbury's Mint Creme Chocolate; 1x piece of Sainsbury's Truffle Chocolate.
Supper: Dark Chocolate Digestive; Shortbread Finger; Cup o' Tea.

Thursday 17 December 2009

Trying to fix corrupted JPEGs

This morning I did some more work on my photo website (fixing bugs I hadn't noticed before).

In the afternoon I needed to get an image to upload the photo website that wouldn't have latin category names, and wouldn't be in a category that already existed on the website. Looking through my photo folder to try and find something suitable, I found quite a few corrupt JPEGs.

So I spent quite a bit of the afternoon looking for programs to fix corrupt JPEGs and trying them out. Most of them didn't work at all, the best program I found was Paint Shop Pro 6, which could open a couple of the images, but the images were useless - just a load of green colour. So it seems those images are lost (obviously the same images on the backups are corrupted as well).

What you would need really is some sort of program that can scan a drive for corrupted files. Then what you could do is to run the program before you backup, and if you find any corrupted files, restore the working files from the backup before you go ahead and do the backup (which would otherwise write the corrupted files over the good files on the backup, what must have happened in my case).

In the evening I watched 'Mother' with Moccle and L.

The weather was sunny to start, then occasional snow showers. The snow did a settle a bit, but then the sun came out for a bit and melted it.

Food
Breakfast: Strawberry Jam Toast Sandwich; Cup o' Tea.
Lunch: Mature Cheddar Cheese Sandwich; 2x Clementines; Cup o' Tea.
Dinner: Slice of Pepperoni Pizza; Slice of Spinach Pizza; Chips; Salt; Ground Black Pepper. Pudding was a Yoghurt, Dark Chocolate Digestive, and a Shortbread Finger. Coffee; 3x pieces of Sainsbury's Truffle Chocolate; 1x piece of Sainsbury's Mint Creme Chocolate.

Wednesday 16 December 2009

Uploading one photo

This morning I checked my email and read a bit of the Stack Overflow blog. Then I researched the Silver Y Moth so I could write a description for my Silver Y photos and also get the taxonomical hierarchy correct.

The rest of the day I spent uploading the image to various photo sites and updating my profile on them. Since I didn't know how to add links in descriptions for each site and didn't know how to update my Facebook page, it took me wuite a long time.

I also watched 2 episodes of Ulysses with L, a Yoshi Electron video with Moccle and L, and 'The end of St. Petersburg' with Moccle.

The weather was overcast all day and it rained a bit.

Food
Breakfast: Tangerine marmalade toast sandwich; Cup o' Tea.
Lunch: Mature cheddar cheese with Italian style salad sandwich; packet of Prawn Cocktail flavour crisps; Clementine; Slice of Cinnamon & sultana loaf (like malt loaf); cup o' tea.
Dinner: Spaghetti; Carbonarra sauce; bacon; mixed veg; ground black pepper. Pudding was a slice of home-made fruit & nut cake. Coffee.
Supper: Home-made double choc chip cookie.

Tuesday 15 December 2009

Not a lot

This morning I was doing some work on my photo website, trying to do something simple - make a div move up and to the right slightly of another div when the viewport is large, and make it move underneath the other div when the viewport is small. e.g.
<div id="left"></div><div id="right"></div>


In FF this is very easy to do with js, to move the right div up you give the left div absolute positioning, then to move the right div to the right (so it doesn't overlap the left div), give it a margin or padding equal to the left div width.

Then to make the right div move below the left div when the viewport is small, you just change the above properties back to 'auto'.

But in IE6 the left div just disappears when absolutely positioned. And even if you can get it to appear, it appears inside the right div, rather than where it should be. Weird. IE7 isn't quite as broken, but still broken.

So I had to make the script do one thing for IE6 & 7, and a different thing for all other browsers.

Next I found that in Safari, if you moved the right div down, then moved it up again, it would stay the same size as it was when it was down the page (i.e. 100% of the page width). While the right div didn't have 100% width set, it had lots of content, so it would automatically expand to the page width. But when the right div was then moved up again, it would stay the same size, rather than wrapping its content to fit into the space available (as it does normally). This of course resulted in the content going off the right hand side of the page and creating a horizontal scrollbar.

So I had to manually get the right div to wrap its content based on the space available.

There was also a third problem - in K-Meleon and Opera when the left div was given absolute positioning it would move upwards also, overlapping the div above it. The fix for this was to get the offsetTop of the left div before changing its position to absolute, and then getting the offsetTop again when the position had been set to absolute.

Then I could set a top margin equal to the difference between the 2 values, thus pushing the left div back down to where it should be.

Looking at the temperature on the front of my PC case, it seemed that it was actually running hotter today (after removing all the excess thermal compound and cleaning all the dust out from the fans yesterday). So I guess my scheme didn't work too well. Of course, the case temperature sensor being hotter doesn't mean for sure that the CPU is actually running hotter, but it probably is.

In the afternoon I went to bed for a couple of hours as I had a bad headache.

After dinner I watched an episode of Uylesses with L. I did some more website stuff, then watched Moccle complete Paper Mario.

The weather was overcast all day.

Food
Breakfast: Bowl of Choco Moons Cereal; 2x Paracetamol; Cup o' Tea.
Lunch: Bowl of vegetable fake cup a soup; 1½ slices of Toast; Clementine; Banana; Rocky; 2x Paracetamol; Cup o' Tea.
Dinner: Shepherd's pie; grated mature cheddar cheese; mixed veg; ground black pepper. Pudding was an apple pie with custard. Coffee; 3x pieces of Sainsbury's Mint Creme Chocolate.
Supper: Home-made Double Choc chip cookie.

Monday 14 December 2009

Cleaning out my PC

This morning I was doing some work on my website, trying to make some changes as suggested by some TWS users.

In the afternoon I took my PC apart and started cleaning off the thermal compound from the CPU and CPU fan.

When I made the PC, I had followed the instructions with the Thermal Compound, which had said to put a thin film spread over the processor/fan bottom. So I had tried to do this, but the Thermal Compound was so rubbish at spreading, that to get an even layer spread over the bottom of the fan (where it attaches to the CPU), I had put on quite a bit more Thermal Compound than was needed (though of course I didn't realise it at the time).

So my CPU currently had all Thermal Compound squidged out the sides between the top of the CPU and where it attached to the fan.

After dinner I finished cleaning up the Thermal Compound from the CPU and CPU Fan, using Floppy disk cleaning fluid (Isopropyl Alcohol) and tissues. It took quite a long time. When that was done I put some Thermal Compund on the CPU again, but only a couple of lines (I asked Moccle how much to put on since he makes PCs for his job).

I was glad that when I started the PC up again, it did actually work, since due to the state of the Thermal Compound being squidged out all on the top of the CPU, I had had to take it out of the Motherboard and hold it for quite a while while trying to clean all the Thermal Compound off from it.

Also in the evening I watched a couple of episodes of Uylsses with L, and did some more website work.

Food
Breakfast: Bowl of Choco Moons Cereal; Cup o' Tea.
Lunch: 2x Cheese-on-toasts; Italian Style Salad; Cherry Tomatoes; Apple; Rocky; Cup o' Tea.
Dinner: Mashed Potato; Slice of Ham Quiche; Peas. Pudding was a large German Ginger Biscuit. Coffee; 2x pieces of Sainsbury's Truffle Chocolate; 3x pieces of Sainsbury's Mint Creme Chocolate.
Supper: Home-made Double Chocolate Chip Cookie; Cup o' Tea.

Sunday 13 December 2009

Not much

This morning I got Grandad breakfast, then we went to Church. After Church I read Moose Peterson's blog for a bit, then it was dinner time.

After dinner I finished catching up on Moose Peterson's blog, and also caught up on Andy Rouse's blog and The Luminous Landscape. I updated my Pog website and watched 'The Lone Wolf & Cub' with Moccle, which was a bit like the later Zatoichi films, though I didn't think it was as good.

It was similar to Zatoichi though in that as Zatoichi has a cane that turns into a sword, the Lone Wolf had a pram where parts come off and turn into a throwing knife and one of those long sticks with a blade at the end.

The article I wrote on Exposure Blending for my photo website is totally long, so I wondered if I should cut it up into parts/pages, as this is what quite a few websites seem to do with long articles. However, after reading Pagination is evil, and the comments on Article pagination... good or bad?, I think I'll stick with one long article.

I did some work on my photo website, trying to get the page for changing/replacing a photo working, which took the rest of the afternoon and part of the evening.

Also in the evening I watched a couple of episodes of Uylesees with L and made a couple of other quick changes to my photo website then posted a mock-up with the changes to the Web Squeeze to see if people thought it looked better.

The weather today was a mixture of cloud and sun, and there was a nice sunset. In the evening it looked like it was raining.

Food
Breakfast: Bowl of Choco moons cereal; cup o' tea.
Dinner: Chicken curry; mixed veg; sultanas; rice. Pudding was Waffle with golden syrup and ice cream. Cup o' tea.
Tea: Ham with Italian style salad sandwich made with fresh bread-maker-made bread; crust of fresh bread-maker-made bread with honey; Clementine; Rocky; Cup o' tea.

Saturday 12 December 2009

Installing updates and cutting out pogs

This morning when I switched on windows, it said it wanted to look for solutions to some problems. So I said 'OK', and it then had 512 (or some similar amount) of errors it reported to MS. When it was finished it brought up a screen with a list of possible solutions.

Because installing the suggested updates might have meant a system restart, I couldn't just install the first solution suggested, as when the system had restarted the screen of solutions wouldn't appear again, and so I wouldn't know what the other solutions were. So I had to click on each solution and read the instructions/download the appropriate update without installing it.

When I'd got all the necessary updates downloaded (for some reason MS pointed me to Nvidia FX graphics drivers when I don't have an FX card, so I manually navigated to the correct Nvidia drivers for my graphics card), I could now install them.

I started by doing a normal Windows Update, which required a restart. Then the Nvidia Graphics card drivers, which also required a restart. Next was a MS .NET framework update - this wouldn't install as it said I didn't have the required version of the .NET framework installed. So I don't know why MS wanted me to install it if it won't install.

Then I had to update Flash, the instructions from MS said that I needed to uninstall Flash then install it again. I thought this was a bit strange, as normally you just update your existing installation with most programs (or at least the installer will uninstall your current version automatically before installing the latest version).

So I did some googling to check that MS's advice was correct, and it seems that it is correct. I found this article that gives a good guide on how to upgrade flash: Time to update the Flash player. Here's how. After uninstalling Flash I had to restart again, and then I ran the Secunia online scanner recommended in the article about how to upgrade Flash.

The scanner didn't find any Flash remnants on my system, but did say I needed to upgrade real player, Adobe Reader, and about 4-6 versions of Java. After about 40 minutes it seemed the online scanner had crashed (it was stuck on one file for about 20 minutes or more). So I closed the scanner and upgraded Real Player and Adobe Reader.

When it came to Java, I did some googling, but didn't find much helpful. The answers I read said that you can uninstall older versions of Java through Add/Remove programs, but didn't give any indication of how you tell what versions of Java are the old ones and which one is the new name (the Java entries in Add/Remove programs had a few different names and version numbers, and none of them related to the naming format of the latest Java version according to the Java website.

So I just tried to uninstall all of them, then I would start anew. I followed the uninstall instructions at How do I uninstall Java on my Windows computer ?. Some of the java entries wouldn't uninstall from add/remove programs, so I used the Windows Installer Clean up Utility as suggested in the article to remove them.

I restarted my PC, and ran the Secunia online scanner again, and it still found that I had old versions of java installed. So I just removed the folders it said where the old java versions were installed (Windows Explorer wouldn't let me delete them so I had to use the command line to get rid of them).

I restarted my PC yet again and ran the Secunia online scanner again, and it now reported that it didn't find any insecure programs installed. Yay!

The rest of the day I was cutting out pogs in photoshop (and trying to look up the names of Power Rangers monsters so I give the images SEO friendly filenames). I also watched a couple of episodes of Uylesees with L, and 'White Heat' (which I'd actually already seen before) with Moccle.

The weather was a mixture of clouds and sun all day and there was a decent sunset.

Food
Breakfast: Bowl of choco moons cereal; cup o' tea.
Lunch: Mustard ham with Italian style salad sandwich; clementine; slice of cheapo sultana cake; Rocky; cup o' tea.
Dinner: 2x posh sausages; mashed potato; 2x mushrooms; baked beans. Pudding was fresh pineapple with butterscotch whip. Coffee; 2x pieces of Sainsbury's Truffle Chocolate; piece of Sainsbury's mint creme chocolate.
Supper: Shortbread finger; home-made double choc chip cookie; cup o' tea.

Friday 11 December 2009

Photo website ready for launch maybe?

Today I was checking my photo website in various browsers again. In the morning I fixed my Wordpress comments reply js, which wasn't working properly.

In the afternoon I thought the website was all finished (I keep thinking that), but then kept finding bugs that I hadn't noticed before (or when I fixed one bug it would create another one). Eventually it looked like everything was working okay, so I posted to the Web Squeeze to get some feedback on the site.

In the evening I worked on a logo for xoogu.

The weather started off foggy, with the fog gradually clearing during the morning, and the rest of the day was just overcast.

Food
Breakfast: Tangerine marmalade toast sandwich; cup o' tea.
Lunch: Mature cheddar cheese sandwich; Apple; Caramel Rocky; Cup o' tea.
Dinner: 2x Home-made lamb burgers; potato; peas; mint sauce. Pudding was a couple of pieces of fresh pineapple and a piece of Home-made Chocolate cereal & biscuit cake. Coffee.

Thursday 10 December 2009

Websiting

This morning I was trying to get a photo of myself to use on the about page of my website, but taking a photo of yourself is quite hard (unless you want a myspace style self potrait). I started off using the Canon 450D with 100mm/2.8 macro in manual focus mode, but found that the framing was too tight to fit my whole head in the image, and I didn't have any room to put more space between the camera and me.

So after that I tried the D200 with 50mm/1.4 AF-D. After much time and many test shots I found I reasonable setup - the camera in single shot AF mode on a tripod, connected to the PC with some camera control software. Then I sat on a stool in front of the camera with the (wireless) mouse, and could just see on the computer monitor the button to click to autofocus the camera and take a photo.

I had to do it this way instead of using a remote release cable as my release cable is too short for me to sit far away enough from the camera.

After finally getting a reasonable photo I updated my photo website's about page with the new photo, and also tried to fix some other problems with the site in my 'to do' list.

One of the problems on my 'to do' list was that the iframe that the google custom search engine results for the site were displayed in had a very tall height in Webkit and Presto based browsers. Googling for this, I found the following article: I'm having problems with the iframe that displays my CSE results; what can I do?, which says
The results iframe should automatically resize to fit your results; if it doesn't, you'll notice an empty space below the results. Most often, this occurs because you're A) working locally or B) using Safari or Opera, browsers in which resize does not yet work.


I thought I would try and do a quick test in Safari/Chrome to see if the reason that the frame resizing doesn't work in Webkit and Presto was down to laziness or an actual problem with those browsers. I tried using the javascript console to access the contents of the iframe, but when I did I got the following error
Unsafe JavaScript attempt to access frame with URL http://www.google.co.uk/cse?cx=partner-pub-1468119066513718%3A2cmt3w-hn5b&cof=FORID%3A10&ie=UTF-8&q=piglets&sa=Search+Whole+Site&ad=w9&num=10&rurl=http%3A%2F%2Fwww.photosite.com%2Fsearch.xhtml%3Fcx%3Dpartner-pub-1468119066513718%253A2cmt3w-hn5b%26cof%3DFORID%253A10%26ie%3DUTF-8%26q%3Dpiglets%26sa%3DSearch%2BWhole%2BSite from frame with URL http://www.photosite.com/search.xhtml?cx=partner-pub-1468119066513718%3A2cmt3w-hn5b&cof=FORID%3A10&ie=UTF-8&q=piglets&sa=Search+Whole+Site. Domains, protocols and ports must match.

Googling for 'Unsafe JavaScript attempt to access frame with URL', I found lots of reports of this error, but no solutions. So I guess it is a problem that Google and I can't fix.

I spent most of the afternoon trying to get Wordpress nested comments so that when you clicked 'reply' in a nested comment that had a small width (due to small viewport), the comment would expand its width to accommodate the comment reply form (normally the form inputs overflow the small comment box).

I got it working in FF, Safari, Chrome, K-Meleon, IE8 with the following CSS:
.commentlist li{
list-style: none;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
padding: 5px 15px;
margin-bottom: 10px;
float: left;
min-width: 100%;
}
.children{
margin-right: 30px;
}

K-Meleon

IE6 automatically expands the comments to fit the form in anyway, and since it doesn't understand min-width, needed the above changes removing to get it back to its natural state:
.commentlist li{
float: none;
}
.children{
margin-right: 0;
}

IE7 seemed to give the lis 100% min-width of the main div container that contained the post and comments, instead of taking the width from their parent element. I tried adding position: relative to the lis, but I still got the same problem.

IE7

This problem meant that any comment containing nested comments would be much larger than 'normal' comments, because its width would be 100% of the parent plus the padding and margins applied to its children comments. Not what I wanted, and I couldn't see any way to fix it either.

Opera also seemed to have something strange going on (or maybe all the other browsers are strange). Each li was being indented from the right slightly more than the last one.
Opera 10 without box-sizing: border-box

The fix was to add box-sizing: border-box to commentlist li, but this now broke the comment layout in other browsers. I tried looking for an Opera specific CSS hack, but couldn't find any, then when I noticed that Arora didn't print the comments how I wanted either, I decided that it might be easy to try with js instead, especially since the comment reply form appearing inside a comment when you click to reply to a comment requires js anyway.

Arora

In the evening I was working on trying to make the comments expand to fit the comment form using js. I got it working in Firefox, but when I tested it in IE8 it wasn't working. I found first that IE8 was evaluating a nodeName of an unordered list as UL, whereas I was checking if the nodeName was ul, so to fix it I changed my code to check if the nodeName.toLowerCase() was equal to ul.

After changing that I now I got an error in the jQuery code. Unfortunately the IE debugger wouldn't let me add breakpoints (it kept saying that the point where I wanted to set a debug point hadn't been loaded yet, even though the page (and so the scripts) had finished loading.

So I gave up on IE8 for the moment and tried it in Safari and Chrome, but it still wasn't working properly - only the comment containing the comment form would be expanded to fit the form in, any parent comments of that comment would stay small and unexpanded.

Doing some debugging, I found that according to Chrome the comments (lis) had large negative right margins on them. As I was calculating the min-width for the parent comment from the width of its child plus padding and margins, this is what was causing the problem. So removing the negative margin from the calculation meant the script would now work in Webkit.

I then tried IE7, and found what was probably causing the error in IE8 - I was parseInting the margin and padding properties, and if these were set to auto, it would return NaN. So I was trying to set the min-width of the li to something like 490 + NaN, which obviously doesn't work (well, at least in IE).

So I changed my code so that rather than trying to add the various padding and margin values together with the child comment width, I would just add the one padding value that I knew was indenting the comment. But this didn't work, doing some debugging I found that in IE7 the indent was caused by a margin rather than a padding.

I guess that's because I didn't have any padding or margins set in the CSS, so IE must use a margin to indent list items, while other browsers must padding. So I probably could have set margin/padding values in the CSS, but instead I changed my js to use the padding, or otherwise the margin, and it now seems to be working okay.

The weather was sunny all day. At sunset the sun set behind some thinnish clouds, but it wasn't much to look at really - just a relatively small orange glow around where the sun was, and nothing really to see after the sun had set. In the evening it got a bit foggy.

Food
Breakfast: Apricot Jam Toast Sandwich; Cup o' Tea.
Lunch: 1½ cheese on toasts; Clementine; Caramel Rocky; cup o' tea.
Dinner: Slice of Chicken pie; Potato; Swede; Mixed veg; Ground black pepper; Gravy. Pudding was a slice of Chocolate cereal crunch cake. Coffee.
Supper: Cup o' tea; Home-made double choc chip cookie.

Wednesday 9 December 2009

Cutting out pogs

This morning I decided my Pog website needed updating since it hadn't had any updates for over a week, so I started cutting out some pogs in photoshop to upload to it.

Also, someone came to give Grandad a wash, and wash his hair, so I had to explain to them what was needed and do some washing up and clean up the sink so they could wash his hair in the kitchen.

For the afternoon I was still cutting out Pogs, then when I'd finished I uploaded them all to the website (which took ages), and added the new pages for them to the website. While I was waiting for the images to upload I checked dpreview and my email.

After dinner I played New Super Mario Bros Wii with Moccle and L, and we finally collected all the hint coins. But it didn't seem to give any special bonus. When L went on the hint movies, he found there was still some movies that we haven't unlocked yet.

The weather was sunny to start, but by about 10.30am had clouded over and was overcast. The rest of the day was mainly cloudy, with the sun shining through thinner parts of cloud occaisonally. The sun set behind thick cloud, but about 20 minutes, or maybe more, after setting, a section of the sky/cloud was lit up a nice purple colour. In the evening it rained.

Food
Breakfast: Strawberry Conserve Toast Sandwich; Cup o' Tea.
Lunch: Edammer sandwich; Clementine; Home-made choc chip cookie; cup o' tea.
Dinner: Breaded fish portion; potato; peas; salt; ground black pepper. Pudding was plum crumble with ice cream. Coffee.

Tuesday 8 December 2009

This blog unlocked!!!

This morning I was testing my photo website in different browsers. One problem I came across was that text in <code> blocks was being rendered quite differently across browsers.

At first I came across this article: Firefox Code font too small?, which contains a fix, but involves changing a setting in the browser, so it's not something you can do from the website end.

Then I read Some new CSS features in Firefox 3, which has an example of how you can use the font-size-adjust property in Firefox to equalize the size of text inside a <code> block. It worked well to get the <code> text to display about the same size (and not tiny) in Firefox, K-Meleon, IE6-7, Konqueror, Arora, and Opera, but the text was still tiny in Conkeror, Safari 4 and Chrome 3.

Then I read this article How to Size Text in CSS, which says the problem is with monospaced fonts, and suggests sizing text in px for browsers other than IE to alleviate the problem. The article does say that in the latest version of Safari (at the time the article was written, back in November 2007), doesn't have the problem with sizing monospaced fonts, but clearly the current version (and Chrome) do, so I can only assume that they backtracked on whatever change they had made to 'fix' it.

I checked if blogger had unlocked my account yet, and finally, they had! I noticed that my last post I made on the day the blog was locked, only half of it had been saved. I think that my blog must have been locked while I was partway through writing it, and so only saved the bit that I'd written before it got locked. Annoying that the autosave function built into Blogger didn't indicate there was anything wrong though.

Now I had access to my blog I thought I had better back it up, as I didn't want to risk loosing all my blog posts that I've written so far. Luckily, it turns out that backing up your blog is quite simple.

I wrote this blog post so far, then after lunch I carried on going through the local copy of my photo website and trying to fix a couple of things I noticed. I also spent quite a bit of time trying to access the APC stats page for my websites, but it worked once, and then would just time out whenever I tried to access it.

Trying to see if anyone else had this problem, I didn't find anything, but did read that APC doesn't share the cache between PHP processes if you're using fastCGI (like me), and apparently X-Cache does. So I added changing from APC to X-Cache to my list of things to do.

In the evening I updated the copy of the website on the web server, then went through that on all the different browsers again, just to make sure there weren't any problems that weren't on the local copy of the website.

I played on New Super Mario Bros Wii with Moccle and L for a bit, then was going to post a link to my photo website on the WebSqueeze to get some feedback, but decided that there were some pretty obvious things that needed work, so I should change those first before asking for feedback. Then I'll be more likely to get feedback on things I've missed instead of problems I already know about.

I added a favicon for the site, which I created in Illustrator, then after unsucessfully trying to use the icobundle command line program (I think maybe it doesn't work in Windows), I found a website that can convert images into .ico files suitable for favicons.

And I changed the way my image thumbnails were being displayed as with my current method they were getting messed up if you change the font-size. I used the method suggested at: Centering (horizontally and vertically) an image in a box.

The weather was sunny to start, but by about 11.30am had clouded over and was overcast. The rest of the day was overcast, and in the evening it rained.

Food
Breakfast: Strawberry Conserve Toast Sandwich; Cup o' Tea.
Lunch: Bowl of vegetable & chicken flavour fake cup a soup; slice of toast; a cherry plum tomato; Clementine; Home-made choc chip cookie; cup o' tea.
Dinner: Spaghetti Bolognese; Tomato Ketchup; Ground Black Pepper; Italian Grated Hard Cheese (Parmesan style). Pudding was Tinned Mandarin Segments with Coffe Custard and a couple of home-made Double Chocolate Chip Cookies. Coffee.
Supper: Home-made Double Chocolate Chip Cookie; Cup o' Tea.

Monday 7 December 2009

Writing photo website blog posts

This morning and this afternoon I was updating my blog posts for my photo website. I wrote two new posts about the Harborough Hoards and History day to give an example of the non-tutorial style posts I am likely to make. I also wrote a 'welcome to my new blog' post as well.

In the evening I played on New Super Mario Bros Wii with Moccle and L for quite a bit, and then tried to test my photo website on various browsers again (but this time testing the copy on the web server rather than my local copy). Unfortunately Arora kept crashing (it didn't like the HTTP Basic auth I think), and there also seemed to be lots of problems that I had somehow missed when I checked the local copy of the site, which meant constantly changing files then having to upload them to the server and refresh the page again.

I didn't finish checking the site, so I think when I do it again tomorrow, I'll start by checking the local copy of the site again, then when that's okay, upload all the changed files (yet again), and do a quick check of the server copy.

The weather was overcast all day and it rained most of the afternoon and a bit of the evening.

Food
Breakfast: Bowl of maple & pecan oat crunch cereal; cup o' tea.
Lunch: 2x Cheese on toasts; a few cherry plum tomatoes; Clementine; Home-made choc chip cookie; cup o' tea.
Dinner: Savoury Pancake; Baked beans with sausages; Jacket Potato; Grated mature cheddar cheese; Ground black pepper. Pudding was tinned tropical fruit with a trifle sponge and custard. Coffee; 2x pieces Sainsbury's Mint Chocolate.

Sunday 6 December 2009

Uploading photos to website

This morning I updated the files on the web server for my photo website, and while they were uploading I read the Luminous Landscape (p)review of the Leica S2.

After church I started uploading photos to my photo website and finished reading the Luminous Landscape (p)review of the Leica S2.

After dinner I carried on uploading photos to my photo website and reading various photo websites while waiting for each image to upload (which took quite a while since I am uploading the full size JPEGs saved at maximum quality). After a while I realised there was a couple of problems - the images I was uploading had been set to Rights Managed Licensing, when actually I couldn't license them because I didn't have model releases. And secondly, I was inserting paragraphs into the post processing info before it went into the database, which I didn't want to do because the nl2para function I'm using seems a bit flaky (so better to use it at page render time where any updates to it will reflect in future page views).

After fixing that, I carried on uploading photos. I had one photo where after uploading it I got a blank page (well actually an xml parsing error, but it looked like it was due to a blank page). I tried googling to see if I could find out what the problem was, and found a couple of articles that suggest it might be a problem with PHP Memory settings: Blank page on large image upload and GD, php memory limit, blank page, undeletable item. However, both of those pages (and other pages I read) are to do with the GD PHP extension, but I'm using the Imagick extension.

Refreshing the page where I had the problem (so the information was sent to the server again) made the image upload successfully (and it didn't appear twice on the website). I didn't have any trouble with any of the other uploads except one where the internet disconnected partway through an upload (which got me the same blank page error).

I played on New Super Mario Bros Wii with Moccle and L quite a bit in the afternoon as well.

In the evening I played on New Super Mario Bros Wii with Moccle and L a bit more, and also watched the original Stargate film on blu-ray with them.

After that I was reading about how badly coded Wordpress is and how you really should use a caching pplugin with it. I already have the db-cache reloaded plugin installed (and use APC for PHP opcode caching). Because lots of people recommended wp-super cache or just wp-cache, I had a look at them and tried to find out if wp-super-cache works with db cache reloaded.

I found a few people asking about this with no answers, and a few people who said they did work together, and no people who said they didn't work together. But then I remembered that I wanted to use the Amazon Machine tags plugin with the geo plugin so it will serve Amazon ads based on the user's location. But I didn't see how this could work if you're using a caching plugin that generates static pages - the page would be cached with the ad set to the location of wherever the user who loaded the page first was located.

I did a search to see if this was a problem and if there was any way to get around it, but just found one post that didn't seem to mention it at all - I guess they weren't serving amazon ads based on the user's location. So I think for now I will stick to db cache reloaded.

The weather was rainy first thing in the morning, then it cleared up and was sunny most of the day. There was a bit of a sunset, but most of the time the sun was hidden behind clouds.

Food
Breakfast: Bowl of maple & pecan oat crunch cereal; cup o' tea.
Dinner: Chilli con carne; Rice; Grated mature cheddar cheese; Tortilla chips with cheese. Pudding was a Sainsbury's vanilla & jam mini roll
thingy with custard. Cup o' tea.
Tea: ½ edam cheese sandwich; ½ ham sandwich; scone with utterly butterly, raspberry jam, and whipped cream; clementine; cup o' tea.
Supper: Home-made double choc chip cookie; cup o' tea.

Saturday 5 December 2009

Christmas shopping

This morning I did some Christmas shopping, both online and in real shops. I also played on New Super Mario Bros Wii with Moccle and L a bit.

After lunch I played on New Super Mario Bros Wii with Moccle and L a bit more, then went on the pinternet to try and think of things that I wanted for Christmas. One thing that I would quite like is something that can hold a flash underneath and above the camera, and keep the flashes in the same place when you change the camera orientation. RRS has something called the Camera Rotation Device, which looks like it would do this, but it costs about $800. I was looking for something costing less than $80, but couldn't find anything similar to RRS' CRD.

I also had a look at filter holders for the Nikon 14-24mm/2.8 lens, as it is similar to a fisheye in that it can't accept filters, and I thought maybe a filter holder would be similar to a flash mount ring. I found two sites with examples of filter holders for the Nikon 14-24mm/2.8 lens on an FX (full frame) sensor camera: Cokin X-Pro Filter Rig - Mark II - Nikon 14-24mm and The FX Sponge Filter Holder 5000.

We (me, Moccle, and L) finished watching the Stephen Chow film 'King of Beggars' that we were watching yesterday, then I did a bit more website work. I found that there were a few things broken with the minified CSS. Since when I make any changes to the CSS in the future, it will be to the non-minified CSS, and then I'll minify it to upload it to the website, I didn't want to be stuck correcting the same problems whenever I minify the CSS. So I tried a different CSS minifying service, CSS Drive CSS Compressor instead of csscompressor.com.

csscompressor.com does a better job of compressing CSS because it groups together CSS declarations that are the same, e.g. If I had
p {
font-size: 1.2em;
}
.med{
font-size: 1.2em;
}
csscompressor.com would change this into:
p,.med{font-size:1.2em}
But the problem with this is that csscompressor.com doesn't recognise things like -moz-inline-stack, which it just discards, and so you can end up getting declarations grouped together that shouldn't be, and also have the proprietary declarations removed.

In the evening I uploaded all the files to the website again, and watched 'Brighton Rock' and 'The Fly' with Moccle, both of which were quite good.

I also changed my nginx config to disable gzip for IE 1-6. This is because apparently IE has a bug with caching and gzip, see for example: IE6 gzip bug: solved using ISAPI_Rewrite and HTML pages only partially appear, HTML pages do not appear at all, or the network stops responding.

The weather was sunny in the morning then overcast in the afternoon, and rainy in the evening.

Food
Breakfast: Bowl of crunchy nut cornflakes; cup o' tea.
Lunch: Ham sandwich made with fresh bakery bread; ½ Honey sandwich made with fresh bakery bread; Banana; Chocolate digestive bar; cup o' tea.
Dinner: Small Mozarella Pizza; Peas; Chips; Ground black pepper. Pudding was a small home-made sultana sponge cake with custard.

Friday 4 December 2009

Wordpressing

This morning I looked up what 'trackbacks' and 'pingbacks' were. I tried doing a pingback on my blog by linking to one post from another post, and it worked.

The pingback appeared like a normal comment on the blogpost though, so I wanted to change it to make it more obvious it was a pingback rather than a comment. I did some googling, but all the articles seemed to be about separating pingbacks/trackbacks from comments completely - I didn't want to do this as I still wanted pingbacks and trackbacks to appear with the other comments, but to have a different appearance.

Then I found there was a wordpress function called comment_type, which echoes out the type of comment. Unfortunately I couldn't see anything on the Wordpress codex on how to get the comment type rather than just print it. But googling for 'Wordpress get comment type' revealed that there is indeed a get_comment_type() function, that returns the comment type rather than just printing it.

I had quite a bad headache, so I went to bed from about 10am until lunchtime, then went to bed again after lunch.

After I'd been in bed quite a while I started to feel a bit better (I think a couple of Ibuprofen with a meal, then going to bed for a couple of hours is the best way to get rid of a bad headache).

I went back on my comp to do some more work on my photo website blog. I wondered if there was a way of getting a gravatar to appear on pingbacks. It seems there is, though you can't make other's gravatars appear on your blog, you can make your appear on others: making your gravatar work with pingbacks, though I must admit I haven't actually tried it yet.

I also tried installing a few more browsers - Flock, Amaya, and Conkeror. Flock is a social/lifestream style browser, based on Gecko. Amaya is the W3C browser, which it seems is designed for editing pages rather than browsing (at least I couldn't work out how to get links in a page to work), and Conkeror is another Gecko based browser, but it doesn't have buttons, menus etc. and you navigate using the keyboard.

In Flock it has a Feed icon near the address bar, but for my blog it wasn't highlighted like it should be. The Feed icon showed up in Firefox okay though. I had a look at Moose Peterson's blog, (which did highlight the Feed icon in Flock), and saw that he had an atom feed as well as an RSS feed. So I tried adding an atom feed to my site, but it still highlight the Feed icon in Flock.

I couldn't see any other differences in the feed links between my blog and Moose Petersons, and googling about feeds not showing in Flock just brought up reports of problems where all feeds weren't showing up, rather than just for one site.

I checked my email, and had had an email from Sitepoint offering 'The Web Site Revenue Maximizer Kit' + 'Online Marketing Inside Out PDF' + '31 Days To Build A Better Blog', total value $226.95 according to the website, but $99 today. I tried to find some reviews of 'The Web Site Revenue Maximizer Kit', but only found 2 reviews by independent people. One said it was worth the money (and that was at $200), but the other (which wasn't a review of the Kit, but rather the free chapters) said it wasn't worth it as all the info is available free on ProBlogger.net.

So I looked on ProBlogger.net, and found that the guy who runs it, Darren Rowse's (who the Sitepoint "31 Days To Build A Better Blog' book is by) blog that isn't about blogging is about photography. So I had a look at that, and it was quite interesting. It wasn't as blatantly affiliate links as Roy Barker's profitable photography website/blog though, and I thought the articles were much better than the ones Roy has as well.

After dinner I played on New Super Mario Bros Wii quite a bit with Moccle and L, watched part of a Stephen Chow Kung fu film with Moccle and L, and minimized the CSS and js that I hadn't already minimized for my photo website.

I now need to test the website in all browsers again in case minimizing the css/js has messed anything up (actually I already found one thing it's broken). But it's after 10pm, and that will take quite a while, so I'll do that tomorrow.

The weather was sunny in the morning then overcast in the afternoon, and rainy in the evening.

Food
Breakfast: Grapefruit marmalade toast sandwich; mug of honey & lemon drink.
Lunch: Ham sandwich; Satsuma; cup o' tea.
Dinner: Battered fish portion; potatoes; baked beans; ground black pepper. Pudding was 2x large home-made double chocolate cookies. Coffee.

Thursday 3 December 2009

Trying to get a screenshot of a digital camera menu

This morning I was trying to update an article for my photo website blog, to illustrate it with some images. First I had to try and find an image that illustrated a point I was making in the article.

When I'd done that, I needed to add metadata to the image so I could upload it to the website.

The first problem was that I wasn't sure if the photo was taken in Leicestershire or Northamptonshire (it was taken in Great Bowden). The image was geo-coded, but on Google Maps and Google Earth, it doesn't show the county boundaries so you can't tell what county the photo was taken in.

So I did some googling and found Historic Counties of England Google Earth Overlay. Using this in Google Earth, I had to highlight the Leciestershire outline, and then I could see the image was taken in Leciestershire.

Next I was writing the description for the image, which was of a family walking through a field. I have seen lots of things promoting walking, so thought of writing in the description that the UK government was promoting walking.

However, when googling the only thing about the UK government and walking was a report from 2001 urging the government to adopt a national strategy on walking.

Doing some more searching I found walkengland.org.uk, which says that a few government departments promote walking. So for my description, I just put that various organisations were promoting walking to tackle the rising level of obesity in the UK.

After getting the metadata for the image sorted, I uploaded it to my website, but there were a few error messages on the upload page.

After lunch I fixed the code in the upload page that was causing the errors, then took a few photos of the bracketing button on my D200.

When I'd done that I wanted to try and get a photo of the camera menu on my 450D where it had the AEB settings. Taking a photo of the menu didn't look very good on the camera that I took the photo with's LCD.

I tried googling to see how to get a capture of a camera's menu, but couldn't find anything relevant - it was all screen capture software or camera remote control software. I had a look on Canon's UK website 450D Press Resources to see if they had images of the menus you could use, but while they had quite a few images, they didn't have any of the settings menus. Also, I didn't know what the license/usage terms for the images were.

I thought that maybe you do it through recording the video out output of the camera.

McRad had a USB video capture device, so I thought I might try and use that. First problem was that the device didn't install automatically, and the driver/software CD wasn't with the device. Looking through Rad's PC CDs I found the driver CD, so installed the drivers, but they were quite different to what it said in the leaflet that came with the device, and actually said they were TV capture drivers.

After installing the drivers from the CD, I plugged the device in and Windows installed it automatically. Unfortunately the cable that I had to connect the camera to the capture device was one of those RCA types with metal 'caps' around the jack, so it wouldn't plug into the camera properly. I wasn't sure how to actually see/record video using the capture device either.

I look through Rad's cables and my own cables to see if there were any suitable cables, but there weren't. They were all either Stereo or Mono cables, or had the 'cap' bits on them so they wouldn't plug into the camera properly.

So eventually I went and got the camera box out of the garage, and got the cable that came with the camera. I had now put the camera battery on charge though, as it was getting low, so I couldn't actually test it until the battery had finished recharging.

I checked the web squeeze, and then looked for some more images to illustrate my photo website blog post. After finding a suitable image, I had to save thumbnails of the different versions of it, and then add metadata to the main version of it.

For the description of the image, I wondered what percentage of the UK was farmland. Unfortunately google's results just seemed to be about farmland prices increasing or decreasing in percentage terms. Eventually I found an article: DEFRA doesn't know area of England's farmland that gave the total land area of England and the total farmland area of England, so I could work out the percentage of England that was farmland from that.

I also went on this blog and found that it was still locked, but it didn't say my review request for it to be unlocked was being processed any more. So I submitted another review request, and also posted to the blogger help forum.

My 450D battery had recharged, so I tried recording the 450D's video output on my PC using McRad's USB video capture device. The program I tried to use was 'AMCAP', a 'DirectShow Video Capture Sample' according to the 'About' dialog of the program. Unfortunately, it didn't seem to work, and just recorded a black screen.

I tried the camera with both PAL and NTSC modes, but still got the same result - a black recording.

I tried the camera and lead out on Moccle's TV to make sure it wasn't a problem with the camera, and the picture displayed very nicely on Moccle's TV.

When McRad came home I asked him how to use the video capture device, and he said he thought you could use Windows Movie Maker to record from it. I had a look on my PC, but it seems I must have uninstalled Windows Movie Maker.

McRad put his PC on, and tried a few programs on his PC to try and capture from a TV card he already had installed that accepted an RCA type jack as an input. Eventually he found one that showed the video output from the camera and also had a screenshot function to take a screenshot from the camera.

Unfortunately the quality of the screenshot is pretty rubbish compared to how the output looked on Moccle's TV. On the TV the image was clean, clear and crisp, but on the screenshot using Rad's PC it looked noisy, compressed, and soft. Still, when scaled down to 400px I think it looks quite good, and certainly better than taking a photo of the camera's LCD looked.

In the evening I checked my email, updated my photo website blog post a bit more, and tried re-processing one of my images I wanted to use in the blog post, though it didn't really come out much differt to how I'd processed it before.

The weather today was overcast all day and rained most of the day. There was a bit of a sunset - the sun dropped below a large cloud slightly, before being hidden behind another cloud below. It didn't seem to light up up the clouds at all except for a bit of silver/orange lining.

Food
Breakfast: Grapefruit marmalade toast sandwich; mug of honey & lemon drink.
Lunch: Ham sandwich; 2x Pancakes with lemon juice and sugar; cup o' tea.
Dinner: Piece of Chicken & Ham pie; Swede; Potato; Peas; Ground black pepper. Pudding was spotted dick with custard.

Wednesday 2 December 2009

Cross browser website testing

This morning I was doing some more work on my photo website, testing it in various browsers.

Konqueror had a problem rendering an image that overflowed its container when the viewport was small - scrolling to the right to view the rest of the image, would just reveal the page background rather than the image - so it looked like the image was cut off at the edge of its container, rather than overflowing it. But sometimes the full image would appear, and sometimes bits of the image would appear in the scrolled area (as you scroll or resize the window). So it seems that was just Konqueror being buggy.

IE wasn't applying a negative text indent to the first line of some text (so it looks like the other lines are indented). Luckily, I'd already solved this previously, just forgotten to implement it.

Next I found that K-Meleon 1.5.3 (the latest version) wasn't display inline-block list items correctly. After some googling I found that it doesn't support inline-block, but there is a fix in the -moz-inline-block and -moz-inline-box CSS properties: display: inline-block and old Gecko. In my case I had a list containing an anchor in each list item. I found I had to apply -moz-inline-box to the list items, and -moz-inline-block to the anchors inside the list items for the list to display as an inline-block list.

I had a similar problem with a div containing inline-block anchors, which each contained a span and an image. In this case I just had to set -moz-inline-block on the anchors, and it now displayed the same as in other browsers.

I also found a tutorial which covers how to do a similar thing, even with inline-block items where the size varies: Cross-Browser Inline-Block

In Chrome and Safari (possibly other Webkit based browsers also) there was a sporadic problem with a div not being resized by javascript. As the problem was sporadic, I didn't really have a way of debugging it (I tried a few page refreshes with the javascript deugger open in Safari and a breakpoint set at the relevant point in the code, but the script worked correctly and resized the div whenever I was doing this).

After lunch I was trying to debug a problem with Google Chrome not resizing a Raphael svg object when the window was resized. The script was meant to remove the current Raphael object, and then add a new one whenever the page was resized, but what it seemed Chrome was doing was just adding another Raphael object, resulting in a very long div full of Raphael SVGs.

Debugging though, I found a different problem when using Chrome's debugger. It seemed that when I added a node to the page, the node would not be added, and it would also remove the node that it was meant to be inserted before.

I thought maybe it was an 'id' problem (can't have two nodes with the same id), as the node I was inserting was a clone of a child of the node I was inserting it before, but changing the id didn't make any difference.

This is what happened when I stepped through the javascript, using the console to check whether the node exists, and to change the copied node's id:
//JS
var cp = this.aboutTextOriginal.cloneNode(true);

//Console
document.getElementById('contentContainer').childNodes
NodeList
0: Text
1: HTMLImageElement
2: Text
3: HTMLDivElement
4: Text
constructorFunction: "undefined"
length: "undefined"
protoObject: Object
prototypeObject: "undefined"

//Console
cp.setAttribute('id', 'blahde')
undefined

//Console
cp.id
blahde

//JS
cp.insertBefore(p);

//Console
document.getElementById('contentContainer').childNodes
NodeList
0: Text
1: HTMLImageElement
2: Text
3: Text
constructorFunction: "undefined"
length: "undefined"
protoObject: Object
prototypeObject: "undefined"


Very strange!

To fix it, I removed 'p' before I inserted 'cp'. But now the script was just working as it was originally (i.e. filling the div up with Raphael SVGs when the page was resized). How it stopped working I don't know.

Google Chrome seems to be quite weird and unpredictable, especially its debugger. One time when I entered statements into the console, it would just echo out what I'd typed rather than actual value of what I'd typed e.g. if I wrote $(window).width() it would just say $(window).width(), rather than 764 or whatever the window width was.

That only happened once. Something that happened all the time though was that the script kept breaking where there wasn't any break points and even though there wasn't any errors causing the script the break there either.

I didn't have much luck trying to debug how the div was getting filled up with Rapahel SVGs in Google Chrome. First of all when stepping through the code in the Chrome javascript debugger, everything looked okay, but then it went to binding an event handler to the window.resize event, which is part of the init function that is only run by jQuery when the DOM is ready.

Adding an alert in before the window.resize function was set, made it so that Chrome no longer bound the window.resize event handler multiple times, even though it shouldn't have made any difference.

I also had a problem stepping through the code, in that the Chrome debugger was issuing an error saying that an object was null. Adding a break in before the line causing the error so I could check the object's value stopped the error, again it should not make any difference where you have breaks in the debugger as to how to code is evaluated.

And finally, running through the code step by step in Chrome's javascript debugger, multiple Raphael SVG objects were not created. But try it without the debugger on, and they are. So I couldn't debug what the problem was. ANNOYING!

I spent all afternoon trying to find out what was causing this problem in Chrome. I just checked if there are any Google Chrome updates available, and there aren't.

In the evening I played on New Super Mario Bros Wii with Moccle and L for a bit, and also did some more testing/fixing minor problems on my photo website.

The weather today was overcast all day and rained a bit in the afternoon.

Food
Breakfast: Grapefruit marmalade toast sandwich; mug of honey & lemon drink.
Lunch: Grated mature cheddar cheese and ground black pepper sandwich; a few cherry plum tomatoes; pear; home-made mince pie; Fox's Classic; cup o' tea.
Dinner: Beef burger in bun with grated mature cheddar cheese and Tomato ketchup; Bowl of cream of vegetable fake cup a soup. Pudding was home-made Lemon Meringue pie with cream. Coffee.

Tuesday 1 December 2009

Trying to get youtube videos/flash working in Wordpress posts

This morning I was doing some more work on my photo website.

First of all I wanted to test my theory about the problem with my slideshow javascript causing a stack overflow in IE, i.e. that the image onload function would fire it's parent function, which would then cause the image onload function to be run again, and so on, until all the images had loaded. This caused a build-up of functions running within functions until all the images had loaded, when the functions could return/exit. It's a bit hard to explain, but if you look at the code below, hopefully you can see the problem:
//function to load an image into cache
"loadImage" : function(i, data){

//Don't load the image if it's already loading
if(this.currentlyLoading === i)
{return;}

var img = new Image();
this.currentlyLoading = i;
img.onload = function(jj, i){
return function(){
//Store this image in the loaded images array
jj.images[i] = this;

//Delete it from the imagesToLoad array
delete jj.imagesToLoad[i];

//Load the next image
for(i in jj.imagesToLoad)
{
if(jj.imagesToLoad.hasOwnProperty(i)){
//This is the problem here - we're calling the same function
//that caused this function to run, and since this function won't
//return/exit until the below function has returned/exited,
//we have to wait until the last image is loaded, after which
//the functions will return in reverse order to the order they
//were called in
function(){jj.loadImage(i, jj.imagesToLoad[i]);
break;
}
}
}
}(this, i);
$(img).addClass('slideShowImg')
.css({"opacity" : 0})
.attr("alt", data.Headline)
.appendTo('#slideShowContainer');
img.src = STATIC2+'/Img/smallWebSize/'+data.filename;
alert(i);
},

So to test my theory, you can see I alerted the value of i at the bottom of the function. And in keeping with my theory, the values of i were alerted in the order from most to least, showing that the functions didn't start exit until the last image had been loaded, thus returning/exiting, so the 2nd to last function could return/exit, then the 3rd to last, etc. etc.

To fix this, I wrapped the call to load the image in a timeout, so this meant that the function could now finish, and the function to load the next image would be called separately:
//New
setTimeout(function(jj, i){ return function(){jj.loadImage(i, jj.imagesToLoad[i]);};}(jj, i), 25);
//Old
jj.loadImage(i, jj.imagesToLoad[i]);


After making this change, the page now worked fine in IE8, but when I tried it in IE6, I got a load of errors about data.Headline not being defined. I refreshed the page in case it was a cache problem, but still got the same problem.

So I fired up Visual Web Developer Express Edition, and started a debug session, then put some break points in the page to try and see where the data was getting lost. However, when I was checking the values of various variables, and stepping through the script manually, I didn't get any errors. I ran the page again without the break points, and now it worked fine. I guess that's IE for you.

I fixed some CSS problems with the blog in IE6, then noticed that the youtube video was just white (instead of the video). I figured this was probably something to do with using an XSL Stylesheet to produce the HTML for IE, and maybe invalid markup for embedding the video. I remembered that there was a problem with embedding Flash into XHTML pages, so I did some googling and came across How to correctly insert a Flash into XHTML. In the comments, there is also a link to a similar solution by Ian Hickson: Embedding flash without <embed>

After lunch I looked into implementing the correct XHTML compatible flash embedding code, but had quite a few problems.

The first was that HTML comments <!-- --> were being converted into &lt;!-- --&gt;. After lots of messing about, I eventually worked out that the Wordpress X-Valid plugin was causing this. To stop this behaviour, I had to comment out line 90 in xvalid.php
//add_filter('content_save_pre', array(&$this, 'filter_post'), 8);
I did try stopping this behaviour by adding
remove_filter('content_save_pre', array($xvalidator, 'filter_post'));
to my Theme's functions.php file (and also tried with the '8' as a third parameter), but this didn't seem to work - only commenting out the line in the actual plugin file would stop it from entity encoding HTML comments.

The second problem was that Wordpress was inserting an <object> into the code, thus breaking it. I fixed this by turning off 'WordPress should correct invalidly nested XHTML automatically' (Settings > Writing).

The third problem was that Wordpress was inserting <br/>s inside the object element where I had set the attributes of the object separated by line breaks. Also, Wordpress would sometimes insert <p> tags surrounding block level elements like divs, or sometimes insert an opening <p> tag in a random place. To fix this I had to add
remove_filter('the_content', 'wpautop');
to my functions.php file.

The fourth problem was that Wordpress was converting the -- bit of part of a conditional comment into a &#8212; em-dash entity. To fix this I had to add
remove_filter('the_content', 'wptexturize');
to my functions.php file.

After doing all that I finally had flash working in my Wordpress post.

I wrote most of this blog post, and then took Grandad on a walk round the block. Although it had been frosty this morning, there was virtually no wind, and so it was actually a lot warmer than it has been lately.

While I had got flash working on my Wordpress post, I hadn't actually changed it to display my youtube video, it was currently displaying a test flash animation from How to insert a Flash movie in (X)HTML valid way Example. But when I changed the parameters and attributes to the correct ones for my youtube video, I found that while it would work in most browsers, in IE6 and 8 (worked okay in IE7), I was just getting the white screen again instead of the video.

So I put back the code for embedding flash to how it was originally, and then changed the parameters one by one until it broke in IE. I found that it didn't break until I changed the video url to point at the youtube video.

After some thinking, I realised that probably the problem was that Youtube requires a higher flash version than was installed on the IE6 and IE8 virtual machines. This would also explain why it worked okay in IE7, since I run that from my main Vista installation rather than an XP Virtual Machine. To test this, I went on Youtube on one of IE Virtual machines, and I got a message saying that I needed javascript enabled or to upgrade my flash plugin.

So I knew that I needed to set a higher minimum Flash version to be required, but I wasn't sure how to do this. I could see that the IE <object> had an attribute like
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
But I wasn't sure what version of Flash youtube requires and also what the codebase url should be for later versions of Flash.

After doing some googling I found that apparently youtube requires Flash 8, and I tried just changing the end of the codebase url to 8,0,0,0. Now on the IE virtual machines I would get a prompt to install the latest version of Flash. I found that when I clicked to cancel the install, the ending part of the conditional comment for IE was shown on the page. This was because I had changed the comment structure from the code on How to correctly insert a Flash into XHTML. Changing the code back to what was suggested there fixed the problem with the end tag of the IE Conditional Comment being shown when the installed version of flash doesn't meet the minimum requirements and the user chooses not to install the latest version.

I also tried out the Smart Youtube plugin for Wordpress. This inserts the youtube video using valid XHTML, however in my IE virtual machines, it wasn't prompting me to upgrade Flash, and just had an empty box.

I checked my email, then was wondering that since IE uses the codebase attribute to tell what version of Flash is required, how do Firefox et al know what version of Flash is needed? Doing some more Googling, I cam across a comparison of various different ways to embed a Flash youtube video in a page. Looking at the different methods shown there, it seems the answer is that Firefox etc. can't tell what version of Flash is needed. There is a pluginurl parameter for firefox, but it doesn't contain the version number in the url.

Next I modified the smartYouTube Wordpress plugin to use the embed code format from How to correctly insert a Flash into XHTML. I commented out line 523 of smartyoutube.php, and then added in the new code:
   if ($valid=="off")

$yte_tag = '<!-- Smart Youtube --><span class="youtube"><object width="'.$width.'" height="'.$height.'"><param name="movie" value="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'" type="application/x-shockwave-flash" allowfullscreen="true" width="'.$width.'" height="'.$height.'" ></embed><param name="wmode" value="transparent" /></object></span>';

else{

//$yte_tag = '<!-- Smart Youtube --><span class="youtube"><object type="application/x-shockwave-flash" width="'.$width.'" height="'.$height.'" data="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'"><param name="movie" value="'.htmlspecialchars('http://www.youtube.com/v/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time.'" /><param name="allowFullScreen" value="true" /><param name="wmode" value="transparent" /></object></span>';

$movieURL = htmlspecialchars('http://www.youtube.com/v/'.$file.'&rel='.$disp_rel.'&color1='.$CustomColors[$disp_color][0].'&color2='.$CustomColors[$disp_color][1].'&border='.$disp_border.'&fs=1&hl=en&autoplay='.$autoplay.$disp_info.$disp_ann.'&showsearch='.$disp_search, ENT_QUOTES).$high.$time;

$yte_tag = '

<!-- Smart Youtube -->

<span class="youtube">

<!--[if !IE]> -->

<object type="application/x-shockwave-flash" data="'.$movieURL.'" width="'.$width.'" height="'.$height.'">

<!-- <![endif]-->

<!--[if IE]>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"

width="'.$width.'" height="'.$height.'">

<param name="movie" value="'.$movieURL.'" />

<!--><!--dgx-->

<param name="allowFullScreen" value="true" />

<param name="allowscriptaccess" value="always" />

<param name="pluginURL" value="http://get.adobe.com/flashplayer/" />

<param name="wmode" value="transparent" />

<p>You need the <a href="http://get.adobe.com/flashplayer/">Adobe Flash Player plugin</a> installed to view this video.</p>

</object>

<!-- <![endif]-->

</span>';

}
After doing that I found that when I put a video in fullscreen mode on either of the IE Virtual Machines, the video wouldn't play. I checked Youtube.com, and the videos on the actual youtube site had the same problem.

Doing some googling I found YouTube Won't Work in Full Screen, which explains how to fix it - you right click on the flash video, choose 'Settings', then untick 'Enable hardware acceleration' on the first tab. Unfortunately, as this is a client side issue, there's not a lot you can do to fix it from the website end (as far as I'm aware), other than displaying a message saying how if the video doesn't play full screen, here's how to fix it.

After dinner I played on New Super Mario Bros Wii with Moccle and L a bit, then did some more work on my photo site blog. First I found my search page page was a 404. After fixing that, I found the format of the page wasn't in keeping with the rest of the blog. After fixing that, I found that it wasn't actually displaying the excerpt of the post in the search results. I did quite a bit of googling to try and find why it wasn't showing the real excerpt, but rather some excerpt it had created itself, but couldn't find anything.

Then I tried putting the_excerpt() into the page to see what that would give (I was previously using a filtered version of get_the_excerpt(), and I found that the_excerpt() was printing the same excerpt (i.e. not the actual excerpt saved with the post), but it was highlighting the search term in bold. So obviously it was the search plugin that was creating this excerpt. Now I could see the search term highlighted in bold (it wasn't using my filtered version of get_the_excerpt(), it made sense. So I changed the page to use the_excerpt().

I tested my raphael js page in Konqueror with the non-minified version of raphael, and found that why it didn't work with Konqueror was because Raphael couldn't tell that Konqueror supported svg, so it assumed that it supported VML instead. Doing some googling to see how to check if a browser supports SVG. Unfortunately, the suggested methods I found were what Raphael already used, so it seems there isn't a way of detecting that Konqueror supports SVG.

The weather today was nice and sunny all day, and we also had our first frost of this Autumn/Winter this morning. At sunset the sun started setting behind hazy cloud, but when it got near the horizon the cloud was quite thick, so there wasn't a visible sunset. In the evening it rained.

Food
Breakfast: Grapefruit marmalade toast sandwich; mug of honey & lemon drink.
Lunch: Grated mature cheddar cheese sandwich; a couple of cherry plum tomatoes; clementine; slice of home-made flapjack; cup o' tea.
Dinner: Toad in the hole; mustard; gravy; green beans; potato; Cauliflower. Pudding was 2x home-made mince pies with cream. Coffee.