A coders playground.

Archive for the ‘General’ Category


Creating an Effective call to action

May 1, 2010 Author: jaybaron | Filed under: General, Web Design

Having an effective call to action is an important part of any professional website design. There is obviously a goal to every website whether that is getting emails for your newsletter or getting someone to download an item. Making sure you have an effective call to action is essential to the success of your website.

How then do you lay the round work for an effective call to action. Here are some simple techniques that if implemented will surely help your conversion rate.

Create Urgency:

Probably the most important aspect of any call to action is urgency. If there is no urgency your customer will not do the designated action as there is no immediate need.

So how do we create urgency? There are numerous ways to do this some of them include phrases such as “act now” or “try today for free”. Make sure the action creates urgency and makes them take immediate action. Which is better “sign up” or “sign up now”.

Positioning and Consistency:

Make sure your call to action is positioned properly. Ideally you want it towards the top of the page and make it one of the first things that your clients see every time. Generally, most visitors eyes start on the left side of the screen. In addition, make your call to action consistent it should be in the same position, same color, and same button on every page.

Create a Win-Win situation:

Of course you want to benefit, but make sure that the visitor will benefit as well. Making it a win-win situation will just result in a higher conversion rate don’t forget about your customers.

Don’t forget about everyone else:

Although your ultimate goal is to convert users don’t forget about your non-converting customers. Don’t make your call to action get in the way of the information on your website. It is important to make sure that the user experience is still pleasant as a whole. The more information you provide the more trust the user will put in you and will ultimately result in a conversion.

I’m Back! Follow Me

Apr 21, 2010 Author: jaybaron | Filed under: General

I have not posted in awhile but I’m back and plan on posting again. Please follow me on twitter and as I add new articles and posts I will let you all know! Twitter

Mod_Rewrite and PHP Tutorial

Dec 30, 2009 Author: Jamie | Filed under: General

I have been playing around with Apaches mod_rewrite on my other site http://www.2big2send.com and i must admit its a whole lot easier than i first thought..

Here is a quick guide for most general use:

Create a new file in your main directory (public_html for cPanel or httpdocs for plesk – not sure about other ones) called .htaccess (Dont forget the ‘.’ dot before the name – you may already have one of these file, thats ok, just edit it and follow the guide below.

RewriteEngine On
# Check if the file or directory actually exists – if it does we dont want to redirect
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Pass the rewritten URL onto index.php with a $_GET['url'] parameter
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]

What the above Apache code does is firstly check the actual URL and ensure that is it not a file or directory, that actually exists.
Then it passes the request onto index.php for handling

Here is the index.php code with the handler

   function handleRequest($urlString) {
        $url = array();
        // Split apart the URL String on the forward slashes.
        $url = explode(‘/’, $urlString);

        switch($url[0]) {
            case ‘home’:
                include_once(‘home.php’);
                break;
            case ‘news’:
                include_once(‘news.php’);
                break;
            default:
                include_once(‘home.php’);
                break;
        }
    }

    $incommingURL = (isset($_GET[‘url’]) ? $_GET[‘url’] : );
    handleRequest($incommingURL);

So… The handleRequest function takes in the URL GET parameter we setup in the .htaccess file.
We split that apart on the forward slashes so it can be easily expanded.
I have assumes that the first part of the URL will be the base page; so for example: http://www.domain.com/home will cause the home.php page to be included.
If the URL was  http://www.domain.com/news/page-1 then the news.php page would be included, and then you would do some processing on the news.php page to handle the /page-1 part of the URL ($url[1]).

Here is the part you are most interested in – the

Mod_Rewrite and PHP Demo

and

Mod_Rewrite.zip Download

There are a few Gotchas that I found; the main one being that you must edit your httpd.conf file, you will find a <Directory /> part where AllowOverride None is listed – you MUST change this part to AllowOverride All or mod_rewrite will not work.
There are others – but i will have to answer them as you come across them as i cant remember off the top of my head.

Twitter – Ask Me Your Programing Questions

Feb 25, 2009 Author: Jamie | Filed under: General

Hi Everyone!

Its been aaaaaggggggeeeeeessssss since i posted anything up here, i’ve been up to my eyes with work and other things!

I noticed that alot of you are asking questions that could be answered and shared to the Entire Twitter Community! So i setup a Twitter Feed – feel free to ask me your programming questions http://twitter.com/nodstrum

Mona Lisa in 80ms

Aug 29, 2008 Author: Jamie | Filed under: General

iPhone Dalek

Aug 19, 2008 Author: Jamie | Filed under: Apple, General, Humor

iPhone Telescope or Cleverly Disguised Dalek

Found on Engadget

You can buy one here http://mobile.brando.com.hk/prod_detail.php?prod_id=03534

Pink box testing

Aug 13, 2008 Author: Jamie | Filed under: General

From: http://neilbowers.wordpress.com/2008/08/11/pink-box-testing/

Pink box testing

Some years ago I was in a job where I needed to bring in a lot of software contractors in a short space of time. As a result I ended up dealing with a good number of IT contracting agencies. To help the process I wrote very specific job / task descriptions, and sent these to all agencies.

Generally I would receive agency-specific CVs, where they had reformatted the candidate’s CV, and in places tweaked the content. Over time it became clear that some agencies certainly did a lot more than reformatting, adding things they thought I wanted to see. This was really annoying, as the fabrication would reveal itself at some point in the process, sometimes after wasting time on a candidate.

We needed a software tester, and while writing the task description I decided to see how far the agencies would go. The descriptions all had a section listing required skills and experience, and another listing desirables. In the required section I listed “Pink box testing experience”. There’s no such thing as Pink box testing – I made it up to see if I received any CVs with pink box testing listed.

Sure enough, a week or so after putting out the description, I received a CV for a software tester. He clearly had a lot of relevant experience, but the agency had added pink box testing as one of his strengths. It was fun ringing up the agent and explaining that he’d been caught in my trap, and listening to him trying to weasel his way out.

Retro [PIC]

Aug 1, 2008 Author: Jamie | Filed under: General

When was the last time you saw one of these?!

read more | digg story

This will mess with your head!

Jul 21, 2008 Author: Jamie | Filed under: General

Ever had a good look at the FedEx Logo?? I guarantee you won’t see it the same again after mousing over the logo below.

Put your mouse over the logo below.

FedEx Logo

See the Arrow?? Now enjoy haveing your eyes always trying to focus on it in the future.

Sorry :)

Jamie.

Shorthand PHP IF/ELSE Statements = much shorter code!

Feb 14, 2008 Author: Jamie | Filed under: Code, General, PHP

You may or may not have heard of shorthand if/else statements, but they do exist, and trust me they make things SO much more ordered in your code when used in the right way.

This is the Shorthand version – below this, if you cannot work it out for yourself is a nice description.

    // Will print out ‘i am male’ if $myGender is ‘male’ and vice-versa.
    echo ($myGender == ‘male’ ? ‘i am male’ : ‘I am female’);

Description of how this actually works
We all (i would hope) know the normal way of writing if/else statements (here is a recap just incase)

$myVar = true;
if($myVar) {
    echo ‘My Var is TRUE!’;
} else {
    echo ‘My Var is FALSE’;
}

That sort of statement is great for in the body of your code, but when want a dynamic selector within your HTML code, it gets very messy.

EG:

if($myGender == ‘male’) {
    // Gender is MALE.
    $maleOpt = ’selected’;
    $femaleOpt = ;
} else {
    // Gender is FEMALE.
    $maleOpt = ;
    $femaleOpt = ’selected’;
}
<select name="gender"><
option value="female" <?= $femaleOpt; ?>>Female</option>
<option value="male" <?= $maleOpt; ?>>Male</option>
</select>
 

Now – that is alot to write and will make your HTML form look a total mess, this is where the shorthand comes in. It allows us to write the same thing inline

Look:

<select name="gender">
<option value="female" <?= ($myGender == ‘female’ ? ’selected’ : ”); ?>>Female</option>
<option value="male" <?= ($myGender == ‘male’ ? ’selected’ : ”); ?>>Male</option>
</select>
 

As you can see – there is a huge difference in the amount of code – and if Wordpress formatted it nicely – it would look loads better!

And the all important Explanation!

// This will echo selected to the screen if $myGender is male.
echo ($myGender = ‘male’ ? ‘ selected’ : );
 

So – $myGender is the variable we are checking, in this case we are checking to see if $myGender == ‘male’

The questionmark (?) seperates the ‘answers’.

The first ‘answer’ is what is set/displayed when the query is true, the second is if the query is false.

This is the equilivent to :

if($myGender == ‘male’) {
    echo ’selected’;
} else {
    echo ;
}

Hope that helps some of you out!

Categories


Archives


Links


Statistics

View blog authority

Meta

Advertising


Recent Comments