• with a website that will stand the test of time
  • welcome to 18a productions web design
  • we'll help you grow
  • and stand out from the crowd

Archive for February, 2008

Feb 28

Facebook on the Decline

Thursday, February 28th, 2008

I was just reading on the fantastic mashable.com how the readership of Facebook has apparently dipped over the past month or so, although some are putting this dip in user numbers down to ’seasonal’ factors.

There’s no denying the impact Facebook has had over here in the UK, everyone’s been talking about it over the past 6 months, but I think the recent ‘blip’ on their way to world domination is probably just the natural re-adjustment that always happens after a boom. People have just got bored and moved on… All those little apps which were fun to begin with are now just annoying, and you’ve added pretty much every friend you ever knew… Now what!? Play silly games with them? I used to login every day, but I have to admit it’s more like once every couple of weeks now.

Facebook’s not going away, and it’s great for sharing pictures and keeping in touch with people. If the folks in charge can keep a lid on the app spam, not loose the usefulness of the site and keep it ‘relevant’, then I’m sure we’ll all be logging in again soon.

Meanwhile I’m off to checkout my new twitter account… :)

Feb 26

MocBook Air

Tuesday, February 26th, 2008

MocBook Air

The MocBook Air fits perfectly on any design conscious persons desk. The Air weighs an astonishing 0.0kg and it’s sleek design gives it the illusion of being so thin it’s invisible to the naked eye. It fits so well into the background you won’t even notice it’s there.

The powerful ‘coupling’ technology of the Air means that it can fully utilise the screen, hard drive, DVD drive, memory, keyboard and mouse of any computer in the vicinity.

Well the MocBook Air might not exist, but the MacBook Air certainly does and it doesn’t come cheap either! I like the way they seem to be charging more and more for progressively less… I particularly like the way they advertise how it can use the DVD drive of your existing computer… Lol… Whatever next!

It does look nice though :)

Feb 25

Social Bookmark Shopping.. What!?

Monday, February 25th, 2008

Hands up who’s heard of social bookmarking. I expect most people reading this article will have. The concept has been around for an Internet ‘eternity’ now. I thought everyone in the Facebook generation would be familiar with the idea, but I was speaking to a friend of mine yesterday, happily telling them about NBS and explaining how we’ve incorporated a ’social bookmark’ scoring system that’s a bit like ‘Digg for shopping’, and they were like “Dig what!?…”.

Sometimes I think we in the Internet business are in danger of losing touch with the vast majority of people that actually use the Internet… Our target audience… We get caught up in our own little worlds of digging, backing and blogging and forget what it’s all about in the first place.

And if you’re involved in the more technical aspects of website building like I am, you’re in even more danger of getting removed from reality as you have to compete with the ever changing platform on which you’re developing. (ajax, jQuery, browser standards, APIs, blah blah blah).

So just remember, when building a site don’t lose touch with the original purpose. Get an opinion from anyone willing to offer one. If someone says, “don’t ask me I’m hopeless on the Internet”, that’s exactly who you should be asking. If you can persuade them you’ve got a great idea, then everyone else should be a piece of cake.

Feb 22

Facebook Style Image Grabber

Friday, February 22nd, 2008

I love the way Facebook works; there are so many subtly clever gizmos that just make the whole experience that little bit smoother and pleasant. One feature I particularly like is the image grabber. For those that don’t know, if you enter a URL while writing a private message in Facebook, the site cleverly goes off to the URL and grabs all the images it can find for you. You can then select the image you want to include alongside your message. It’s a really sweet use of Ajax; subtle and very effective. This gave me the idea to develop a similar tool for use with our social shopping site. You can see the script in action here. It’s a simplified version of the code in production, but it works ok as a demo. (and please excuse the repeat of this paragraph on the demon page).

Feb 19

How to Generate an Image Captcha

Tuesday, February 19th, 2008

Everyone hates spammers, how they sleep at night I don’t know… Maybe they are so rich they can afford to buy those special space age mattresses that mold to fit your shape, or machines that imitate the sound of the ocean! (OK I got that from a film). But one tried and tested way of reducing your websites chance of being the victim of spam is to protect all your forms with an image captcha. The big sites like Yahoo have been using image captcha’s for years, but the idea of generating an image simply by writing code may be a little daunting for some. It was for me, until I actually sat down and gave it a go… Surprisingly it’s very easy, and I’ll show you how to create a basic image captcha in this article.

Everything I code is in PHP, so if you are looking for any other way of generating a captcha I’m afraid I can’t help you, although I suspect the principles are pretty much the same. In summary the basic requirements for this to work are:
a) You need to be able to use sessions
b) You need to have the gd library installed in your version of PHP. You can check to see if it is enabled by using the phpinfo() function. I’ve found that most recent installations of PHP seem to have it setup by default, so you should be ok on both counts.

In summary this is how it works:
i) You generate a random code
ii) You store this random code in the users session
iii) You also generate an image using PHP and display a distorted version of this code in the image.
iv) You ask the user to enter what they see in the captcha.
v) On the form submission you check to see if they entered what you already have stored in the session. If the two codes match then you have a human, if they don’t they you either have a very frustrated user or a bot, either way they get an error message and asked to try again.

See I told you it was simple! All that’s left for me to do it provide you with a little actual code to work on.

The Code - verification.php

This is the all important file that does all your work for you. It generates your code, saves it in the session and generates your image.

<?PHP

// Start the session for the user
session_start();

// Generate the verification number and store in the session
$verification_code = array();

// Create an image with 4 characters
for($i=0; $i<4; $i++) {
if(rand(0,1) == 1) {
$verification_code[] = chr(rand(97,122)); // Choose any lowercase letter in the range a-z
} else {
$verification_code[] = chr(rand(49,57)); // Choose any number in the range 1-9
}
}

// Save the code in the session
$_SESSION[’verification’] = md5(implode(”", $verification_code));

// Now we create the verification image itself
// We have 4 different background images which we’ll use to create the images
// You can create these in the graphics program of your choice.
// We then randomly select one of these images to use as the background for our image captcha
$image = imagecreatefromjpeg(”/path/to/background/images/background_”.rand(1,4).”.jpg”);
$text_colour = imagecolorallocate($image, 255, 255, 255);

// Add text to the verification image
$x_offset = 16;
foreach($verification_code as $chr) {
imagettftext($image, (22+(rand(-4, 4))), rand(-20, 20), $x_offset, (31+(rand(-5, 5))), $text_colour, ‘/path/to/fonts/trebuc.ttf’, $chr);
$x_offset += 22;
}

// Make sure the page isn’t cached and set the content type to image/jpeg
header(”Expires:Mon, 01 Jan 2002 05:00:00 GMT”);
header(”Last-Modified:”.date(”D, d M Y H:i:s”).” GMT”);
header(”Cache-Control:no-store,no-cache,must-revalidate”);
header(”Cache-Control:post-check=0,pre-check=0″,false);
header(”Pragma:no-cache”);
header(’Content-type:image/jpeg’);

// Finally we can send our response back to the user and free any memory associated with image
imagejpeg($image,null,100);
imagedestroy($image);

?>

Now to use your image captcha simply include it within an image tag within a form as follows.

<form method=”post”>
<input type=”text” class=”text” name=”verification” id=”verification” />
<img src=”verification.php” alt=”please enter the text you see in this image” />
<input type=”submit” name=”submit_button” id=”submit_button” />
</form>

Now when you submit the form the last check is to make sure the code entered in the form is the same as the code saved in the session that appears in the image captcha. As we md5 hashed the value in the session we need to compare like for like.

<?PHP

$error = array();

if (md5($_POST[’verification’]) != $_SESSION[’verification’]) {
$error[] = “Please re-enter the verification image. NB. All letters are capitals.”;
}

?>

Troubleshooting

The main gotchas I’ve found in the past were missing font files; you’ll need to download the .ttf file for whichever font you choose to use. These are available on the Internet (or even on your computer most likely). Just remember to upload them to your server and provide the path to them when calling the imagettftext() function. If PHP can’t find the font file you won’t see the image at all.

So there you have it, pretty simple really and a great bit of code to include in your web forms to help stop those pesky spam bots. You can see the code in action here.

Feb 18

Give your site an MOT

Monday, February 18th, 2008

We often have clients asking us to check out their site and see if there are any bits we’d suggest improving or changing, so I thought I’d just list my quick top things to check out for and make sure your site has. This is far from exhaustive so please feel free to add more at the bottom.

1. Do you have title tags on your pages? - Missing these out is a classic mistake and they’re definitely worth including. Make them relevant and on topic and unique for each page.
2. Do you have loads of JavaScript or CSS code at the top of your page? - It’s best to split your CSS and JavaScript out into separate .js and .css files. This might sound a bit technical but having this stuff bulking up the top of your code doesn’t help with your SEO.
3. Add alt tags to your images - This is vital if you want to get your site passed the HTML validators, but also very handy for ranking in image searches, for example Google images.
4. Are you *still* using tables? - That’s very 2005 :) It’s all CSS layouts these days. If you want to employ someone to code you a new site make sure they are using CSS based layouts.
5. Have you got an XML sitemap? - There are loads of tools out there for creating XML sitemaps and it may be worth creating one.

Nothing too strenuous there :) If you think of anything then please let me know and I’ll add it to a revised list.

Feb 15

Checking your site on Safari

Friday, February 15th, 2008

There’s an increasing number of Mac users who are impossible to ignore. I may even become one myself at some point as they do look pretty nice! If like me you’ve always coded websites on a PC in the past you might have been forgiven for ‘over-looking’ the small percentage
of people who use Macs. But this is all changing! Some say, “Once a Mac user, always a Mac user” and the new converts are changing sides in vast numbers. It used to be just music moguls and designers who used a Mac, but now even a few of my more ‘techy’ friends have started buying Macs.

Geek chic, where style, performance and function all come together in perfect harmony. So where does this leave the web designer? Well if you can afford it then I suggest you buy a Mac, install Safari and test away. For those that can’t afford the hefty
price tag, then check out browsrcamp.com where you can see what your site looks like on a Mac running Safari.

Feb 15

What are you listening to right now?

Friday, February 15th, 2008

If, like me, you get bored of the same old songs being played over and over again on commercial radio, or find Chris Moyles just a little bit too loud on the more delicate of mornings. Then you might have trawled the Internet looking for good and original radio stations. So I thought I’d post links to a couple of stations I think are particularly cool.

The first is a station I discovered many years ago while still at uni. If you like hiphop, free-styling, James Brown, funk or any combination of the above then check out wefunkradio.com; some kind of student based station from Montreal, Canada. Not to everyones taste I realise and I got a bit of abuse from the folks at existem when I played this in the office.

My second suggestion is radiomagnetic.com. Slightly closer to home, based somewhere up north where the sun only shines for half the year but people are that little bit friendlier (possibly because they have to huddle together to keep warm). I love this station, and it’s a great alternative to your average commercial radio noise. Great music to code by as well!

If anyone out there in the aether would like to contribute with some alternatives I love variety; it being the spice of life and all that.

Cheers and happy listening!

Feb 12

Stuck for Inspiration?

Tuesday, February 12th, 2008

The Internet is just so big, sometimes it’s hard to know where to start when you are looking for inspiration or new ideas. Google is an obvious place, but only if you know what you’re looking for. It’s a great tool for locating information, but what if you just want to browse and learn something interesting but you’re not quite sure what… Well that’s where sites like Digg.com come in. If you don’t know what you’re looking for until you find it then social bookmarking sites can give you an up to date buzz, news and articles to inspire. There are plenty of other sources of inspiration of course, here’s my top list.

1. Social bookmarking sites, digg.com, technorati et al.
2. Forums - Can be a great place to meet new people, discuss topics or get help. However they are often full of rubbish and finding genuinely useful information can be a mission. There are nuggets of information there if you have the time to find them.
3. Blogs - I love reading people’s blogs and keep meaning to make a list of blogs I like when I find them, but I all too often forget. If you find a good blog you can often get far better constructed thoughts and articles.
4. News sites - I occassionally read the bbc website, also the register has up to date articles.
5. Stumble Upon - You could group this together with the social bookmarking sites above, but I actually think it’s a little different, and really very clever!
6. Facebook - A great way to waste time… Enough said :)
7. Read a newspaper - Ok it’s not online, but I think that’s a good thing. Unplug for a while, put your feet up with a coffee and chill.

Any ideas please let me know!

Feb 03

WrongWrite.com

Sunday, February 3rd, 2008

18a have recently acquired the site wrongwrite.com - “part education, part therapy. We uncover grammatical and spelling errors on commercial signage and advertising, and share it with our loyal readers”.

So hop over and check it out - and keep us in mind next time you see a shocking typo or atrocious grammatical error from those who should know better! ;)

www.wrongwrite.com