PhpGedView, SourceForge and the US Government

I originally installed PhpGedView back in 2007. It’s an open source and free web program for managing family trees and based on the universal Gedcom file format commonly used in many genealogical websites and applications. I’ve been using it on and off for several years very successfully – all credit to the open source programmers – with very few problems. However its been on my TODO list to upgrade since maybe 2008. I finally got around to updating it.

Screenshot of the webtrees homepage.

Continue reading “PhpGedView, SourceForge and the US Government”

TwentyTen wordpress child hacks

Having planned to do the work to combine my two previous blogs together, I thought I’d take the opportunity to upgrade to the very latest WordPress 3.0 version, which includes the all new default theme TwentyTen.

This is already a very nice theme – a much improvement over the last default. It’s also very easy to customise to your own preference, for instance you can change the background colour and add a picture to the background and change the header image all with a few clicks of the mouse. It also makes a very nice base theme.

Continue reading “TwentyTen wordpress child hacks”

CanvasZoom – HTML5 Canvas and code

You may have seen the program Zoomify, or similar programs like, OpenZoom and DeepZoom, which quickly display large resolution images on websites without large amounts of data being downloaded – only the part which is needed is downloaded. Most of these applications use some kind of plugin to work (e.g. Flash or Silverlight), so I wanted to see if we could create one without any plugin, using only the HTML5 standards.
Continue reading “CanvasZoom – HTML5 Canvas and code”

Facebook and the Money Transfer Scam (and deactiviation)

This morning I was caught up in Money Transfer scam involving a friends hacked account.

It works like this: First a cybercriminal hacks someones facebook account – unfortunately this can happen in many ways so I’m not going into details about this. Secondly they hang around on facebook chat until a friend connects then they make up some sob story. Quite quickly this will lead to some reason why you need to immediately wire over 150 (pounds, dollars, camels, whatever…).

What follows is the chat I had with someone pretending to be a friend of mine.

Continue reading “Facebook and the Money Transfer Scam (and deactiviation)”

CSS IE Media Query Hacks

I’m not a fan of CSS hacks, they are totally unstable and unpredictable pieces of code, usually built on top of another bug… but… unfortunately the way of the web has made it almost impossible to avoid them – I find myself facing a problem I can’t get around without one.

The problem here is CSS media queries and our old fiend Internet Explorer. Internet Explorer only understands the very basic media types such as: media=”screen” but fails to understand media queries like media=”screen and (min-device-width: 450px)”. When it doesn’t recognise this it simply ignores it – that means whole sections of styles are just ignored, and your pages will look completely different to how they are supposed to.

Continue reading “CSS IE Media Query Hacks”

WordPress – my new home

As you can see – assuming you are reading this on my blog – I’ve just moved over from blogger.com to my own space, notice the new web address: “http://blog.akademy.co.uk-tips” .

After having a quick look around I decided to go with WordPress, WordPress.org that is. WordPress.org is where you can download the very popular blogging PHP system and install it to your own website (WordPress.com is the website that hosts blogs for you for free).

I made the decision to switch becuase I wanted a bit more control over my blog and files than blogger could provide, and I wanted to be able to play with the back end too. I decided not to go down the line of creating one myself; usually I’d have put something together just to see how to do it – teaching myself as I went – but in this particular case, I’d have never had the time to make something I would have deemed stable enough for long term use. So WordPress.

All you need to install WordPress on your own website is PHP 4.3 or higher and MySql 4.0 or higher. Run through the installation guide you’ll get when you download all the files – it’s really quick and simple. I had my Blog installed in just about 10 minutes and most of that was uploading time.

Even better, I already had a couple of blogs on blogger.com but wanted to move them over. I thought this was going to be a bit of a nightmare but I was very wrong. I just gave WordPress the address and it downloaded everything automatically. Log in an Administrator and select Tools->Import->Blogger. Magic.

There’s also loads of themes and extensions for WordPress, which gives you a great deal of control over what you show and how you’d like it to be presented. You can really personalise it any way you’d like.

All in all I’ve been very impressed by WordPress. It’s simple to install, easy to extend, and a joy to use, and it’s used by millions everyday.

A few things to take into account if you are thinking of switching to your own host:

  • You’ll have to perform backups yourself: database and website.
  • You’ll have to upgrade the system yourself (although this is pretty striaght forward if you haven’t made any of your own changes.
  • Hosting your own webpages will usually cost a  fee.

If you are looking to host your won blog then WordPress is throughly recommended.

Blackbird javascript debugging with PHP

If you’re still using the javascript “alert()” function to output all of your debug information then take not: You need Blackbird!

Blackbird creates a little window to output all your javascript debugging information. When you need it, you can pop it up with a quick key press and all the output from your javascript programs is there.

You can put different types of information out to the window then filter the display to just show what you need. You have a choice of Information, Debug, Warning, Error or Profile. The first four just output text, but the last takes a label to start a timer, the next call with the same label outputs the time difference.

It’s really simple to install. Just include a little javascript and CSS file like this:

  1. <link type="text/css" rel="stylesheet" href="/PATH/TO/blackbird.css" media="screen">
  2. <script type="text/javascript" src="/PATH/TO/blackbird.js"></script>

Make sure the script tag is above any other javascript you might want to debug.

Now all you have to do is call one of the functions:

  1. // Output text marked as debug:
  2. log.debug( "I'm trying to debug this thing" );
  3. // Output text marked as information:
  4. log.info("Hello World!" );
  5. // Start a timer with label testFunc1
  6. log.profile("testFunc1");
  7. // Stop the timer and output time (You'd usually do something between the two profile calls)
  8. log.profile("testFunc1");

That’s all great and really useful. Most of the time however, you’ll not want to include the Blackbird code, so with a little bit of PHP magic you can choose, on the fly, when to include it. Place this code in your PHP file in the HEAD section of the resulting page:

  1. if( isset( $_GET["debugging"] ) )
  2. {
  3. echo <<<END
  4. <link type="text/css" rel="stylesheet" href="/PATH/TO/blackbird.css" media="screen">
  5. <script type="text/javascript" src="/PATH/TO/blackbird.js"></script>
  6. END;
  7. }
  8. else
  9. {
  10. echo <<<END
  11. <script type="text/javascript"><!-- <![CDATA[
  12. var log={toggle:function(){},move:function(){},resize:function(){},clear:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},profile:function(){}};// ]]>-->
  13. </script>
  14. END;
  15. }

So the simple idea here is that if you include “debugging” in your URL call then Blackbird code will be included, at all other times the log functions are set to empty so no code will be output. This allows you to leave the actual debug calls in your code, without them causing errors or being display.

Here’s how my page works with this:
With debug (don’t forget to press F2)
http://www.akademy.co.uk/index.php?debugging
And without:
http://www.akademy.co.uk/index.php

The javascript “alert()” function doesn’t even come close!

Check out Blackbird here: http://www.gscottolson.com/blackbirdjs/

Mars goes Google.

The beautiful Google Earth program has gone Martian. The planet Mars is now explorable in full 3D (not just an overlay).

See Olympus Mons rise above the distant horizon or fly down Valles Marines in a full 3D projection. You can even follow the landers progresses, and view some of the panaromic high resolution shots just as the rovers Spirit or Opportunity saw them.

This video from the official “unoffical” Google Earth blog clearly shows of some of the best features:

Just download Google Earth, click on the planet button in the toolbar and select Mars. Some informative pictures here too:
http://www.gearthblog.com/blog/archives/2009/02/google_earth_5_the_new_google_mars.html