Mob: 07760

ee-web thinks... a bit

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

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…


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, 
) ); 

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.


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…


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…


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


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:


– 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); = id;
  js.src = "//";
  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); = id;
  js.src = "//";
  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 ”



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)

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.


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.

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.


Using the snippet/template function in tinymce

May 10th, 2014 by Edward

In Tinymce extended there is a cool feature that enables you to press a button and insert a pile of code.

As yet I haven’t been able to find how to do this without a core override… but maybe that’s not such a big deal —
Each of the additional snippets is a separate html file that lives in


It comes set up with a couple of simple examples – layout1.html and snippet1.html.
I just created a new one – quickbio.html in this case which had this piece of code in that was going to be used over and over:

<div class="quickbio">
<img src="images/fct/bio-pic-placeholder.jpg" />
<p> Dr Bob<br />Springfield University</p>
<p>I am outside the div</p>

Now you have to tell tinymce about the existence of this new file – so it needs registering:

This is done in plugins/editors/tinymce/tinymce.php – I’d take a backup of this just in case…

Around line 459 find:

$templates = "templates: [
{title: 'Layout', description: 'HTMLLayout', url:'" . JUri::root() . "media/editors/tinymce/templates/layout1.html'},
{title: 'Simple snippet', description: 'Simple HTML snippet', url:'" . JUri::root() . "media/editors/tinymce/templates/snippet1.html'}

This registers the two existing little templates. So its pretty straight forward to add your new one

{title: 'Simple bio', description: 'Use for a photo, with small piece of text under', url:'" . JUri::root() . "media/editors/tinymce/templates/quickbio.html'}

in my case, you just need to be careful with your commas – last one doesn’t need one.

So the final code looks thusly:

$templates = "templates: [
{title: 'Layout', description: 'HTMLLayout', url:'" . JUri::root() . "media/editors/tinymce/templates/layout1.html'},
{title: 'Simple snippet', description: 'Simple HTML snippet', url:'" . JUri::root() . "media/editors/tinymce/templates/snippet1.html'},
{title: 'Simple bio', description: 'Use for a photo, with small piece of text under', url:'" . JUri::root() . "media/editors/tinymce/templates/quickbio.html'}				

I found that in order to make this appear as an option for the editor in the joomla backend I had to clear the cache – a simple close and open of the article/module wasn’t enough.

So clear that cache, and bob’s once again the proverbial uncle. Snippets of code at the press of the ‘template’ button.


Add border in bootstrap 2 – ‘the learning how to do it’ way

May 6th, 2014 by Edward


Its bootstrap 2 for joomla at the moment.

Bootstraps lovely 12 column grid – goes to the edges – which is fine if your inner content doesn’t need a boarder to the wrapper image/colour like this:
shows border that we want to create

It took me a LOT of posting and experimenting to be able to create this within the bootstrap grid

Firstly you have to add an additional wrapper around. In the above this is 24px left and right. You need number that totals a multiple of 12 to make the maths work due to the 12 columns.

If you just add this padding then a 2+8+2 wont fit- obviously if we have added padding, we have reduced the overall space available so the grids need to be narrower – but how much?

You then dig around in the bootstrap-responsive.css file to find the widths of the various spans. For example above 1200px width span8=770px and span2=170px.

So, looking at the span8 first – it was 770px. It represents 8/12 of the total width which we have reduced by 24+24 or 48. So we need to reduce the width of the span8 b7 48*8/12 = 32px. So in your css (not bootstrap-responsive.css), withing the appropriate media query add something like .extraPadding .span 8 {width:738px;}

For span2 the sun becomes 48*2/12 = 8px, so its new width becomes 162px;

Since you wisely chose a padding that was a multiple of 12 this will work out for all the grids – eg span7 reduces by 28px.

You then have to go through all the grids wyou want to use, in all the css.

Now this works, but it is a pain. I suspect it would be better to use the generator feature with bootstrap that I guess would sort this all out for you (although I don’t know, because I am wanting to learn how it works rather than have it all on a plate for me!)

It also needs to be pointed out that I have done this for the non-fluid responsive grid, but I would guess the same would work though you’d need to use percentages rather than widths.