Sunday, December 09, 2007

embedd a flickr slideshow set to allow good control of display order

I always seem to struggle with embedding flickr photos into my web pages and I'm not sure why really. If you want a lot of control of the order your photos will display, you should create a flickr set and put the photos in there and order them.

Then you'll need to use your flickr user id number (see and the set id number for your photos (shown in the URL when you view the set).

Then replace the user_id and set_id in the following bit of code, showing my Impington Swimming Club set.

<iframe align=\"center\" src=\"
&set_id=72157594394097360\" frameBorder=\"0\" width=\"500\" height=\"500\" scrolling=\"no\"></iframe><br/><small>Created with <a href=\"\" title=\"flickrSLiDR\">flickrSLiDR</a>.</small>

Created with flickrSLiDR.

Sunday, December 02, 2007

Aardvark Maps - An easy way to add pushpins to Google Maps

Aardvark Map - a simple tool for building a map for your website with a few pushpins on it. A bit like this...

Wednesday, November 21, 2007

Putting code into a blogger post

It can be a bit of a faff to put code onto a blogger post. I have just found a nifty utility to convert it into the right format to make it easy.

Check out

This adds the escape characters you need to put code onto a blog. You can put the results between <pre></pre> tags.

How to hide your email address from spammers if you have to put it on the internet

When you put an email address on the internet, computer programs called 'spam robots' will find it by trawling over all the web pages they can find. Over the years these 'spam robots' have become more sophisticated but they can be thwarted to some degree. There are various ways to thwart them, one of which is to make your email address into an image which has no code equivalent that can be read by the programs. This is a bit nasty from an accessibility perspective - how do people with disabilities access this information?

Another way to do it is to assemble the email address with a snippet of javascript. Whilst a computer program could interpret this ('parse it'), it probably won't bother since there are plenty of other email addresses out there which are not protected at all and they may as well sell Viagra to those people.

Here is how my email address is protected. You will see how it appears at the end bottom of my website,

The code looks like this. It's a little more complicated looking than I would like because I have had to ensure that it is still valid XHTML. The comments in the code reference the sources of information I used in coming up with this.

You should note that this is NOT a foolproof way of ensuring you don't get spam but it should reduce the amount you get.

<!-- This Javascript hides an email address from spam robots -->
<!-- See The JavaScript Source!! -->
<!-- I got this to validate following advice from here -->

<!--The 'noscript' tag provides alternative contact info for people with Javascript switched off-->

<script type=\"text/javascript\">
var user = \"carl.myhill\";
var site = \"\";
document.write(\"<a href=\\\"mailto:\" + user + \"@\" + site + \"\\\" accesskey=\\\"9\\\" \\>\" + user + \"@\" + site + \"<\\/a> <em>[9]</em> \"); //]]>-->

<p><em>Contact carl.myhill at</em></p>

NOTE: This bit of code also activates accesskey 9 for your email address. This is the standard (in the UK government at least) accesskey for 'feedback' and allows users to hit Alt+9 to send you an email instead of needing to navigate to the link.

Thursday, November 15, 2007

Test your web design in different browsers - Browsershots

Test your web design in different browsers - Browsershots

What a GREAT tool for testing how your website looks in multiple different browsers. Inspired!!!! looks good too but is expensive, this one is free!

This post was extremely helpful...

Wednesday, November 14, 2007

base href and named anchors

This is just a rough note for now. I have always wanted to use the base href tag. With this you can have structure like this...


Well, normally the root you are working with is maindomain but if you want to temporarily have your bikeshop project sitting in some sub folders you can and you can specify the base ref to acheive it, like this...


<base href="">

And now any sub folders can be set up with relative links and will all look at the baseref. SWEET

One thing is not sweet. When you are in this file...
...and you jump to a named hyperlink within that document, you jump to the base href instead. Which is a complete pain.

After many hours of surfing it seems that good old PHP has an easy answer for us...

<p class="skiplink"><a class="skiplink" href="<?php echo $_SERVER['REQUEST_URI']; ?>#top" accesskey="2" >Skip over navigation</a></p>

This server request returns the actual URL of the document and sticks it into the page, so, your named hyperlink within the page is more fully qualified.

This probably makes no sense but it is very handy to me to write it down right now!

Wednesday, February 07, 2007

Decent & Free Usability Tool -

This is worth a look.

Free Web usability tool - (ZDNet, 5 Jan 2007) - "The Web Communications
Division in the U.S. Department of Health and Human Services’ Office of
the Assistant Secretary for Public Affairs, in collaboration with "many
federal agencies," offers a comprehensive, easy-to-use,
no-cost, online how-to guide for developing usable and useful Websites."

Source: UPA MONTHLY - FEBRUARY 2007 - The monthly newsletter of the Usability Professionals' Association

Tuesday, January 30, 2007

Lesson 13: How to put blogger content on your webpage or How to set up a webpage that people can simply edit using blogger

I distinctly remember spending a full 12 hours trying to figure this out only for my friend Paul Warwicker to give me the key to this in about a minute. Sadly I didn't record the detailed steps but perhaps this outline will be helpful. If not, please let me know and I'll update this.

First create a account and a new blog

The first thing you need to do is to create a blog with First you will need to create an account. The second step is to name your blog. Before you finish this, click the 'Advanced Blog Setup' option, since you will be hosting your blog content somewhere else (in your own web space)

In the advanced setup you can add your websites FTP details, FTP path you want to use and the name of the file you want blogger to create and send there for you (in this case I've asked for it to be called 'blog_content.html'.

I am a big fan of looking at lots of examples. I fabricated the one above but the following settings are the ones we use on our swimming club website, the first page of which is powered by blogger content.

After you have finished with this page you will be asked to choose a template. You will not be using it really so just pick anything (such as 'son of moto' in green) and then you are done.

Invite the people you want to be able to edit the blogger served webpage

The next thing you may want to do is decide who you will allow to edit the blog. Go into the Blog 'Settings' tab and choose 'Permissions' and then 'Add Authors' to enter the email addresses of people who you would like to edit the blog.

The people you invite will get an email like the one below. They will need to sign up for a google account in order to post to the blog but google accounts are GREAT! Not a hassle.

Explore formatting options - how many posts do you want to show on the webpage?

You may now like to explore other 'formatting' options from the settings page. Depending on how active your page becomes you may need to tune this a bit to decide how many entries you want to post to your webpage. Here are the settings we currently use on the Impington Swimming Club website.

Inserting your blogger file into your webpage using a PHP Include

Now you need to edit your webpage HTML to read in this new file blogger is going to send (via FTP) to your webspace. Again, here is an example from the Impington Swimming Club website. This is pretty simple stuff though it uses 1 line of PHP.

You will notice that the 'Main' content of the webpage is kept within a <div> block (that's not really important here). You'll see a heading <h2> and then 1 line of PHP. Look carefully at the syntax of that line, it's easy to make a mistake if you are unfamiliar with PHP. The most important thing to notice here is that the PHP Include Path may look different than you are used to when refering to different web pages on your webspace (I think they call this 'fully resolved' but I'm afraid I don't remember all of the nuances of this but I think my webspace provider 34sp helped me out with it).

When this works, what happens is that the line of the PHP include will be replaced with the actual contents of the file from blogger, which in the impington example is called, "blogger_whats_on.html". Here's a snippet of our what that current file looks like. It's just a snippet of clean HTML produced by blogger. Heading tags and everything else will adopt the style you already have set up for your website, perhaps in your CSS file.

So, that's that.

Editing the webpage via the blogger interface

When your prospective webpage editors want to change the blogger served content of your webpage they simply go into blogger and blog away. To control the order of the posts editors may like to play around with the posting dates. It's not very elegant but it's pretty simple. Here's what the editing interface looks like...

If people want to add photos to their blogger posts, they can do this in the usual way (see some of the 'lessons' below).

Feedback please

OK, this 'lesson' has been written largely from memory. Please do let me know if you have any trouble making sense of it.