Archive for the ‘General’ Category

Stage 1 Complete – Temporary Design

Thursday, January 7th, 2010

OK I have changed the header to make it clear what this blog is going to be used for shortly. I will next be creating a page for my client list and also some example work I’ve done in the past. I will be on the lookout for a decent wordpress gallery too :)

Google Analytics New Version Released – 7th November 2008

Friday, November 7th, 2008

OK so google have released an updated version of Analytics, different layout and few new features!

You can now see from your summary page a summary of key data. Including a thumbs up or down image to indicate whether or not you have gone up or down in traffic. Pretty handy!!

Login to your control panel and let me know your views!!

Google Car Spotted on M60 Motorway recording 360 footage

Wednesday, November 5th, 2008

I saw the google maps vehicle driving along the motorway with a 5ft pillar on the roof with what looked like a 360 camera on the top! I can only assume that they are recording the ground level mapping of the uk in video format which is pretty crazy :)

Does anyone know more about this or have you seen it?!

Comments appreciated!!

How To Convert your website to use multiple languages for foreign visitors

Tuesday, November 4th, 2008

So you have an old website or even a current one and you not have the need for several languages because of the traffic your getting. There are many ways of doing this and im giving a fairly simplistic method (simple is not a bad thing in this case). I will be doing this tutorial in a few programming languages but i will first show you in PHP as its my favourite :)

PHP METHOD

I will break this down into a few stages for you. Im going to assume that you have some header text you need to be multi lingual and the navigation links (but this is really irrelevant as you can use this method wherever you need). This is designed for the static content on your pages (i will cover a similar method for DB driven content as soon as someone requests it or i get chance!)

Breakdown of Tasks

  1. create languages folder in your web root (or wherever you want on your web server)
  2. create english.php file within that for starters
  3. create definitions within that file, one for each static piece of text
  4. create index.php and create drop down language selector
  5. include the correct language file dependant on the selected language (stored in session data)
  6. substitute your static bits of text with the relevant definition call
  7. Enjoy your multi language website :)

OK lets get started…

1. create languages folder in your web root (or wherever you want on your web server)

OK im going to recommend creating a new folder in your website root called languages. This will be used to hold all your language definition files.

 

2. create english.php definition file

I’m using English as my example but name this after one of the languages you require and create the blank file called english.php in the languages folder.

 

3. create definitions within that file, one for each static piece of text

Edit the new language files in your editor of choice and add the following code (use your own names to define areas on your site you get the idea) 

<?php
define
(“agHeader”“Hello im a title”, true);
define(“agNavigationLink”“Hello im a link”true);
?>

 save the file. Now make a copy of this file in the same folder and call it for example “polish.php” and keep the definition names the same THIS IS CRUCIAL. Change the values though to the new language see below for a polish example!

<?php
define
(“agHeader”“Czesc jestem tytuł”, true);

define(“agNavigationLink”“Czesc jestem hyperłączność”true);
?>

 4. create index.php and create drop down language selector

Create a new index.php file outside of the language folder and within it we need to have a drop down list to select the language we require. Once this is selected we also need to store the language so that when we navigate away from the page the settings are remember. For this we will use sessions.

My Dropdown box code is like this: 

<form action=”<?php echo $_SERVER['PHP_SELF']; ?>” method=”post”>
    <select name=”language”>
        <option value=”english”<?php if($_SESSION['language']==”english”){ echo ” selected=selected”; } ?>>English</option>
        <option value=”polish”<?php if($_SESSION['language']==”polish”){ echo ” selected=selected”; } ?>>Polish</option>
    </select>
    <input type=”submit” value=”Change” name=”submit” />
</form>

this will submit to itself when a language is selected and as you can see, it will automatically start at the current language using a quick check on the SESSION variable we are going to use.

 

5. include the correct language file dependant on the selected language

At the very top of the file i have started the session and done a couple of things. First check if the language has been posted via the form, if it has then it will be stored in a session variable. The next thing that is done is using the session data the language definition is included using a switch statement and not the form data directly for security reasons. We also use the PHP5 filter_input() function to be safe when setting the session data.

This is the code:

<?php
session_start();
if(isset($_POST['language'])){
 $_SESSION['language']= filter_input(INPUT_POST, ‘language’, FILTER_SANITIZE_SPECIAL_CHARS); //filter the posted data just for security
}

switch ($_SESSION['language']) {
 case “polish”:
  include(“languages/polish.php”);
  break;
 default:
  include(“languages/english.php”);
}

?>

6. substitute your static bits of text with the relevant definition call

Last step where you want your text to appear you simple echo out your definitions like so

<?php echo agHeader; ?>

7. Complete!

Thats it!! Below i’ve given a link to the example files and an online demo.

If you do download the example please comment and give feedback as i want to make my blog’s as useful as possible for everyone. If you need any more info or help just ask! I always have time for people if you are keen to learn :)

 Please comment on the article and if you like it link back to me and digg it! 

All feedback welcome, thank you

 

If you would like to download a basic example then please do so here

If you would like to view the online demo go here

 

ITIL and PRINCE2 – What they are for and the differences

Monday, November 3rd, 2008

I was looking around the other day for information on ITIL. I was told “It’s taking over from PRINCE2″ This is totally misleading. So i thought id do this post to clear things up

 
Information Technology Library (ITIL)  is about the Management of IT services , Incident management, Error Control, Configuration management , Change Management, and post implementations review ),  it is a framework that defines a standard practise for providing IT services support and delivery.

PRINCE 2 is a Project management methodology. it is a standard method for managing a project from project initiation, scope management, time management, quality, procurement, communication, risk  management to the closing of the project,  It has standard procedures,  specific forms, to accomplish the project activities.

So basically ITIL and PRINCE 2 are not the same thing but i would advise everyone who wants to further their career in the IT sector to get them both under their belt.

 
Credit to: http://www.nairaland.com to whom i got most of the information

Check Out My Giraffe Mug Collection!! Worth a Digg? Go On!

Wednesday, October 22nd, 2008

I don’t know why but from about the age of 15 i thought that giraffes were really cool and i started being bought little giraffe soft toys and they are positioned in various cubby holes around the house. I thought id put a picture on here to show the world!!

anyone else end up getting bought loads of themed gifts because they mentioned they liked them once?!

I do love being bought them now though, it fantastic!!

Giraffe Mugs!!

Google Mini .xsl stylesheet to transform and style your results into xhtml

Wednesday, September 17th, 2008

I have created a .xsl file to format google mini’s output into xhtml , if anyone wants a copy of this file then comment on here and i will email it to you immediately, i will turn this into a full tutorial on google mini when i get chance!

Andi

I Just Got A CBR600-F!

Sunday, July 27th, 2008

After a couple of years without a motorbike i finally managed to gather the funds to get myself a bike once again! Still liking confidence as its my first sports bike (had two Bandit 600’s before) but enjoying it all the same. Think ill give it a spin tommorrow as ive taken a day off work :)

Yer Baby!

 

 

Wow I finally got a blog!

Tuesday, June 17th, 2008

It only took me 23years but i’ve got myself a blog at last!

Expect to see me writing about my experiences and mainly Web Development posts, Motorbike adventures and my current gig’s and musical oppinions…

Catch you soon..

Andi G