DESIGNED DEVELOPED DELIVERED

Mob: 07760 392284edward@ee-web.co.uk

ee-web thinks... a bit

Go on, make my day ... leave a comment

A Developer’s Perspective – S2E Challenge @ the Houses of Parliament

December 14th, 2015 by Edward

cupola view

View through the ISS Cupola of Big Ben

On Wednesday 9th December I went to the Houses of Parliament for the very first time to witness an event planned to showcase some of the work that’s gone on for the ‘Space to Earth Challenge.’ Here’s a short article about a web developer’s perspective on this space project.

First a little background. I was approached to become the projects web developer – this means my main role is to build the website, based on the teams designs. So, if you like I am they techy geek. What is really exciting for me, is that often the developer is locked in a cupboard, and fed ‘pop tarts and coffee’ until the work is finished (only kidding). In this case I have been involved as part of a large, multidisciplinary team, got the chance to visit the European Astronaut Centre in Cologne, and even (deep breath) had the best part of a day teaching a small group of yr10/12 pupils who helped us gather some of the excellent resources on the website.

Visiting the Houses of Parliament was fun; being surrounded by all that history can’t be anything else really. But in a way that paled into relative insignificance.

group with space suit

Pupils, a cardboard Tim Peake, the real Lauren Steadmen and a Christmas Tree

There were too many adult speakers to mention – but highlights for me were:

  • David Morris MP, Chair of the All-Parliamentary Space Committee who hosted the special event,
  • Dr Jon Scott who spoke about the importance of exercise on the ISS to reduce bone loss and muscle atrophy.
  • Lauren Steadman, a Team GB Paralympic athlete, describe her triathlon training and how children could take up the Space to Earth Challenge.

For me though the young people stole the show. School children spoke with great enthusiasm about elements of the challenge, ranging from the different sports they had done to cover the distance to the ISS, through to working with some of the exotic materials used in space research. Their smiles and fascination shone through. Several students got to wear a space suit – how cool is that – and why do adults never get asked eh?

pupils demonstrating

Great presentations

It’s been really exciting seeing the project take shape. I have seen it go from an idea sketched out in a piece of A3,  though multiple stages of development and now we’re just 1 day away from Tim’s launch (as I write). Best of all those was seeing how the pupils and their teachers were using the work done by the S2E team, and being really  inspired about it. And I had a part, along with the team, in making that happen.

Makes all those hours in the cupboard worthwhile!

maths challenge

Maths Challenge in action

what's this then?

Wow – what’s going on here then?

graphics work

Graphics students present the designs for S2E posters

Image credit: Max Alexander/UK Space Agency

categories
tag

A WordPress ‘Google dog’s dinner’

November 30th, 2015 by Edward

dog eating dinner

Recently, there was a bit of a discussion on a local social network forum. Somebody had been using one of those ‘build your own site whilst mowing the garden’ type of services (now these can be good, but that’s another blog post). Getting back to this post the person in question was asking if they should move over to wordpress. Amongst the well thought out and well meaning contributions was something along the lines of ‘google loves wordpress‘.

On one, somewhat misleading level this is right. On several others of course it’s just that. Misleading.

  • It gives the impression that if you use wordpress you’ll rank high in google. This is wrong.
  • It gives the idea that using wordpress is the best bet for your website. This can be wrong too.
  • It suggests that wordpress and google have ‘something going on’ which is also wrong.
  • It suggests that wordpress might have some ‘magic formula’ that will ‘take care of your search engine needs for you.’ Guess what, this is wrong. Probably!

So, what’s right then

read more Read more…

categories
tag

Pupil Achievement Data Analysis System

November 24th, 2015 by Edward

This is SUCH a cool job, and so EXACTLY up my street. It ticks so many of my boxes  – so when I am working on this project i am a happy little programmer.

middleton assessment login

Middleton is a small school offering specialist care. They have been using a great program, based around Excel to store all their assessment data, and produce a variety of specialist reports for a range of audience – teachers, parents, governors, Ofsted and so on. However, support for this program is no longer available, and whilst it still works its becoming less and less future proof.

read more Read more…

categories
tag

Pagination and Removing Categories in WordPress

October 13th, 2015 by Edward

Quite often I need to create a new WordPress query – but this can mess up the pagination – so that if you press to go to previous posts it shows the same darn posts again.

Thankfully, it’s relatively easy to solve.

I find that I nearly always need to exclude categories from my query so I am adding that in as well.

Here’s the standard code from index.php file int he 2013 template:

<?php if ( have_posts() ) : ?>
<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>

Nothing out of the ordinary there of course.

Firstly we need to add this line:

$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;

$paged is set to the current page that we are looking at – so for example if you are display post 11-20 then its likely that this is page 2 if you have the number of posts per page set to 10.

Next we create a new wordpress query in array format:

$query = new WP_Query( array( 
    'posts_per_page' => 10, 
    'cat'=>-145, 
    'paged'=>$paged 
) ); 
?>

we create a new WP_Query object called $query

  • set the number of posts_per_page to 10 in this case
  • set the categories variable to not show cat id =145 – done by setting the minus sign
  • and set the paged variable to the $paged we set up before
  • And hopefully that’s it.

categories
tag

Buzzing Bees make a …

October 3rd, 2015 by Edward

Recently I have been working with the hugely talented Lydia Thornley on a new website for Sarah and Dale at Bermondsey Street Bees.
dale at Bermondsey Street Bees

One of the great things about this project was the sense of intricate planning that went into the site. Not that I don’t always plan, but for this job NO deadline or project milestone was moved, let alone missed. It was such a pleasure to have all the content when I asked for it. You know how it is with some clients – ‘Please create a timeline’ and within the first week things are slipping… To quote Douglas Adams –

I love deadlines. I love the sound the make as they go whooshing past

read more Read more…

categories
tag

Memory limit in wordpress – solving on cPanel

February 11th, 2015 by Edward

Recently whilst installing some plugins/templates for WP I came across this error whilst trying to access the wp-admin for a wordpress install.

Fatal error: Allowed memory size of 41943040 bytes exhausted ....

We are on a shared server, so changing settings directly was not going to be a solution

By creating the famous phpinfo() file I saw that the memory_limit = 32M

Sometime later…
… I hit upon this:

Create a php.ini file in the home directory and add in this line -with whatever memory_limit you want

memory_limit = 128M;

That’s good, except that it only works for the folder within which the php.ini file was sitting – we need to make it so that every folder would (as it were) carries out this command – this is called making it ‘recursive’ and is done in the .htaccess file.

Where’s my .htaccess file eh?
Now, wordpress doesn’t create the .htaccess file until you set the permalinks – something it took me a good 15 minutes of surfing around to discover. Here was a problem. I needed to get into the backend of WP but it was unavailable due to the memory limit! What to do?
read more Read more…

tag
categories
tag

ee-web a TOP Contributor

January 23rd, 2015 by Edward

Recently I have been working on how I run my business – well, I guess we business owners are always doing that aren’t we?

I posted a question on a linkedin forum – with a mere 28,000 odd members.

Imagine my surprise when this post got LOTS of feedback – so much in fact that I became a TOP Contributor – and here’s a screen shot to prove it.
ee-web is a top contributor on LinkedIn

categories
tag

Adding FB like box code to wordpress

October 29th, 2014 by Edward

The standard answer out there seems to be ‘use a plugin’ – but I wanted to do it from scratch. The fb code for the like-box says something like ‘put this code as close as possible to the <body> tag – but again the advice I found seem to have that ‘it will work anywhere in the page’ type of attitude – and I am sure they are right, but I wanted to follow the FB instructions.

After some digging around with thematic I found out that this can be hooked like this:

add_action('thematic_before','fb_like_box_setup',5);

– I guess you could use a different index number…

Adding to the ‘thematic_before’ hook places the code directly after the body tag. Cool!

Now I created the function ‘fb_like_box_setup and pasted in the fb code. But this threw all sorts of errors – the code needs echoing out, and in the end, after good old stackoverflow, I came up with this:

function fb_like_box_setup(){       
 $fbData='   <div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "facebook-jssdk"));</script>';

echo $fbData;
}

In effect put the whole lot into avariable, and echo that.
But there’s more

the original fb code is like this:

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

notice that in the line


}(document, 'script', 'facebook-jssdk'));</script>

the ‘ have been replaced with ” – single with double. So the problem is to do with ‘ and ”

Sorted!

categories
tag

Unhooking Funtions in wordpress

August 28th, 2014 by Edward

I had a design for wordpress that had no footer – except two coloured, full-width bars. I could have just copied footer.php in the childtheme and commented out the thematic_footer() call around line 30.

But, that’s no good really – well it works, but I wanted to do by removing (unhooking) actions from the do call. So, searching through the whole thematic template I found there – (on different lines of course)

do_action('thematic_footer');
add_action('thematic_footer', 'thematic_subsidiaries', 10);
add_action('thematic_footer', 'thematic_siteinfoopen', 20);
add_action('thematic_footer', 'thematic_siteinfo', 30);
add_action('thematic_footer', 'thematic_siteinfoclose', 40);

So, best thing to do then is to unhook these functions that are added to the thematic_footer and add my own new on.

So, off to functions.php within my child template to add this:

		//remove all the inbuilt footer stuff.
		remove_action('thematic_footer', 'thematic_subsidiaries', 10);
		remove_action('thematic_footer', 'thematic_siteinfoopen', 20);
		remove_action('thematic_footer', 'thematic_siteinfo', 30);
		remove_action('thematic_footer', 'thematic_siteinfoclose', 40);

would seem the obvious thing to do – but ah ah! It wont work – got to make sure things happen at the right time. So we need to add the removes to the init function. So I created a function called ‘fobhs_add_and_remove’, added it to init and then declared the function – and now it works!

add_action( 'init' , 'fobhs_add_and_remove' , 15 );

function fobhs_add_and_remove() {
        add_action('thematic_header', 'fobhs_add_header',2);
		//remove all the inbuilt footer stuff.
		remove_action('thematic_footer', 'thematic_subsidiaries', 10);
		remove_action('thematic_footer', 'thematic_siteinfoopen', 20);
		remove_action('thematic_footer', 'thematic_siteinfo', 30);
		remove_action('thematic_footer', 'thematic_siteinfoclose', 40);
		// add the simple footer supplied - not shown below
		add_action('thematic_footer','fobhs_footer', 50);
}

Now it works! Next step to create the function ‘fobhs_footer’ and to add in the what’s required to create the bars.

categories
tag

Difference between alt and title tags for an image

July 16th, 2014 by Edward

I keep forgetting this, and about once a month end up looking up – so here’s a post, primarily for my memory!

ALT (or Alternative Text) – describes the image in the page, displays if img fails to load (but not in all browsers???). It should be brief and descriptive. For some reason Joomla calls this the image description (which I suppose it is really!) This tag was introduced for visually impaired users and without it you will be penalized in SEO terms.

TITLE – describes the image, a bit like alt- providing ‘additional’ info about the image in a pop up animation on hover (but not in all browsers). Seems its used primarily when an image links to other content, describing where the link is going, but is optional for img. If missed out some browsers display the alt on hover.

Example:
If you are doing a page about Lyme Regis and have Lyme Regis in the title and a cool picture of the cobb and sea you might just do this

<img src="i.jpg" alt="Lymne Regis" />

but it wouldn’t be great because it doesn’t’ tell the ‘visually impaired user’ anything. Much better to do

<img src="i.jpg" alt="View of the Cobb and sea at Lyme regis " />

Leave a space at the end of the alt description “xxx xxx ” – good for screen readers.

categories
tag