Daily Archives: Sunday, 8th Apr 2012

It had to be done

I spotted this t-shirt at Segedunum and knew I had to have it, if only to provide amusement for my dearest and kindest friends who would never dream of making any rude remarks about my age. Of course, when I say “would never dream”, I’m guessing that this wouldn’t feature in their dreams, as they’d be far too busy mocking me in their waking hours. Anyway, here it is:

Or so I'm told

Or so I'm told

Camera: Canon EOS 5D Mark III
Aperture: ƒ/4
Shutter speed: 1/25s
Focal length: 97mm
ISO: 6400

What? Another new look?

Yes, it seemed like the right time for it, somehow. Losing it  is now using the Graphene theme. I’ve stayed with the single column layout, which lets me insert bigger pictures, but I’ve reverted to having a graphic for the header.

Unlike other themes I’ve used lately, I haven’t needed to use a child theme this time. All the custom CSS I need to use is pasted into a box provided for that purpose, and all the clever stuff I used to put in function.php now lives in a plugin.

Let me know if you experience any oddness other than the usual kind caused by my content.

Weight and Stuff Report – 8 April 2012

Up a wee bit more today. And it’s been another dull, grey slightly damp day, so I didn’t get round to going anywhere. I have been doing some website tweaking, though, and I may have some more of that to report later.

Today’s picture is a view from the scary alien tower at Segedunum. Once, this was a thriving shipyard. Now, the shipbuilders have gone, and all that can be seen is a less than healthy looking old ship.

On the Tyne

On the Tyne

Camera: Canon EOS 5D Mark III
Aperture: ƒ/14
Shutter speed: 1/80s
Focal length: 60mm
ISO: 200

Segedunum Silliness

Segedunum is conveniently close to Wallsend Metro station[1], and quite apart from prominent signs telling visitors which way to go, there are some other special features. This is one of a set of pictures of the local area slightly altered to make any lingering Romans feel at home:

Segedunum Shop

Segedunum Shop

Camera: iPhone 4S
Aperture: ƒ/2.4
Shutter speed: 1/120s
Focal length: 4.28mm
ISO: 64

Or perhaps you’d like to catch the bus? Note the registration number!

Segedunum Bus

Segedunum Bus

Camera: iPhone 4S
Aperture: ƒ/2.4
Shutter speed: 1/120s
Focal length: 4.28mm
ISO: 64

And finally, how about this platform sign?

Segedunum Silliness

Segedunum Silliness

Camera: iPhone 4S
Aperture: ƒ/2.4
Shutter speed: 1/140s
Focal length: 4.28mm
ISO: 64

All good fun!

[1] Any suggestion that the Romans built their fort there for that reason will be giggled at

The case of the floating videos

You might have noticed that I’ve had a bit of an issue lately with floating videos. Err, hold on, I’ll clarify that a bit. You have noticed that when I’ve inserted a YouTube or other video in a post, it’s shoved itself over to the left, and any text after the video was squidged alongside it, rather like this:

Floaty

Now quite apart from looking untidy, it makes the text a bit hard to read. I’m pretty sure this didn’t happen before, so I suspected some change in how videos are inserted. I use the WordPress automagic method rather than any shortcodes or plugins – I just paste in the URL of the video, and WordPress does the rest.

Well, having tried to get round this by inserting

<br>

tags, and finding that the visual editor did its usual friendly job of eating them, I did a bit of digging. Looking at the source of a page revealed that the video was in an iframe. That led me to look at my CSS, to remind myself what I was doing with those. Well, you might recall that I used to insert Amazon product details in those blocks with price details. Those were indeed iframes, and I had this bit of CSS to make them line up on the left of the text:


iframe {
 float: left;
 margin-right: 5px;
 }

My first thought was to set up a more specific bit of CSS for the YouTube iframes, which seemed to have a convenient class:


iframe.youtube-player {
 float:none;
 margin: 5px, auto;
 }

This would cancel the left alignment, and center the video. Much better. Then I realised that as I’d replaced all the Amazon iframes with images, maybe I didn’t need a specific tag just for YouTube after all.

So, I changed the CSS to this:


iframe {
 margin: 5px, auto;
 }

So now videos appear more like this:

Unfloaty

If I ever need more specific iframe styling, I can add it later, but for now this is all I need.

EXIF data in WordPress

You might have noticed that I’ve been talking more about the technical details of some of my photographs lately. I had a thought a while ago that it would be nice to be able to include the relevant details either automagically, or at least with as little effort as possible, and so I did some searching.

As WordPress saves the EXIF[1] data when images are uploaded, and makes it available for inserting into posts, this shouldn’t be too hard, I thought.

And indeed, there are several plugins which attempt to do that, but getting one that would play nicely with my other plugins proved to be more of a challenge. After trying a few which didn’t work for me at all, I eventually found Thesography by Krysten Symonds. This is nicely flexible – while it’s been written to work automagically for the well-known Thesis theme, it works perfectly well with a shortcode for any other theme.

There are options for formatting how it inserts the data – the default is an unordered list, which is probably what most people will want, and you can select which data you want to insert from a good selection of fields. The only one that I’d like to see that isn’t available so far is “Lens”, but otherwise it does the job.

The current version lists the values in a particular order that didn’t really work for me. This may be turned into a setting in a future version, but it was a simple task to cut and paste the relevant (and clearly marked) blocks of code into the order I wanted.

I then set up some CSS in my child theme to make the data display in a bar rather than as a list. This looks neater to me, and takes up less vertical space, so people who don’t want to know about that kind of thing can more easily ignore it.

Anyway, here’s an example of what you can expect to see from now on[2]. This is the sinister tower at Segedunum. While it does give an excellent view of the site, and indeed along the Tyne, it does look like it’s been placed there by our alien overlords.  :dizzy:

Segedunum Tower

Segedunum Tower

Camera: Canon EOS 5D Mark III
Aperture: ƒ/11
Shutter speed: 1/250s
Focal length: 70mm
ISO: 200

After inserting the image in the usual way, I use a Textexpander snippet to insert this bit of code: [exif id="" show="camera,aperture,iso,shutter,focus"]

I find using a tool like Textexpander makes this kind of thing a lot easier, but you can type the whole thing by hand if you prefer. You’ll notice that there are two ” marks after “id” – that’s where I need to insert the unique id of the image, so the relevant data can be extracted from the database. If there is only one image in the post, the plugin will default to getting the data for that, so you may be able to omit that part. I’m keeping it in for consistency, if nothing else. Have a look at the plugin documentation for the values to use for “show”.

To get the image id, all I have to do is click on the inserted image and look at the status line at the botom of the edit box:

Image ID

In this case, the id is 21028, and that’s what I type between the quotes in the shortcode: [exif id="21028" show="camera,aperture,iso,shutter,focus"]

Which will output this:

Camera: Canon EOS 5D Mark III
Aperture: ƒ/11
Shutter speed: 1/250s
Focal length: 70mm
ISO: 200

How that appears is entirely up to the user. I’ve gone for a look which fits in with the current overall appearance of the site.

Nice plugin, if you’re at all interested in showing off the gory technical details of your photographs, it’s well worth a try.

[1] If you don’t know, or care, what that is, bear with me, it gets more interesting later