Hiding download links is pure stupidity

Written by niemi - Posted on May 4, 2008 at 9:24 pm

Not that many years ago, usability expert Jacob Nielsen recommended that links should be blue. No negotiation, just make that link blue. In 2006 Nielsen recently decided to pull back that guide line as “today’s users have seen links in many other colors”.

It doesn’t matter if a download link (or any other link) is blue, green or orange. It does however matter that the link, whether it’s text or an image, stands clearly out from other page elements.

It’s incredible how often you see sites offering downloads in one form or another, yet the download links seem to be invisible to the naked eye. It’s not that the the download link you’re looking for isn’t there, it’s just that someone didn’t realize how important it is to put it on top of the visual hierarchy.

Obvious download links like this big red button are too rare. Much too often you have to scan a page several times to find it.

Even though users have gotten used to scrolling, putting important items such as a download link beneath the fold, can’t be categorized as anything else than stupid. It’s like putting the eject button on your DVD-player on it’s backside. Sure enough, most people will find out where it is eventually, but why make it harder than absolutely necessary?

Read make that download link vissible!

1 Comment

WordPress 2.5 Shortcodes

Written by aaroncampbell - Posted on April 22, 2008 at 10:36 am

Warning: Shortcodes are affected by Trac ticket 6444, which should be applied to WordPress 2.5.1.

First I touched on the topic in my first impressions of WordPress 2.5. Then I whined a little about the tickets relating to them, and eventually I released my Google Maps Plugin that uses them. In the end, WordPress’s new shortcodes are really nice.

What are they?

First of all, a shortcode called “mycode” can look like any of these:
[mycode]
[mycode foo="bar" id="123" color="red" something="data"]
[mycode]Some Content[/mycode]
[mycode]<p><a href="http://example.com/">HTML Content</a></p>[/mycode]
[mycode]Content [another-shotcode] more content[/mycode]
[mycode foo="bar" id="123"]Some Content[/mycode]

As you can see, shortcodes allow a user to put a code into a post or page, and a plugin can then easily handle those codes. They can be nested, contain content (including HTML), attributes, etc.

How can I use them?

First of all, you need to add your shortcode:
add_shortcode('mycode', 'yourFunction');
Your function should take two arguments and return the content that you want to replace the shortcode with. The first argument will be an associative array of attributes (keys will be the attribute names, and the value will be the corresponding attribute value), and the second will be the content between the tags.

To handle default attributes, you can use shortcode_atts($defaultsArray, $attributesArray):

function yourFunction ($attr, $content) {
    $attr = shortcode_atts(array('foo' => 'bar', 'id' => '','color' => 'blue'), $attr);
    return '<h2>Attributes</h2><pre>' . print_r($attr, true) . '</pre><h2>content</h2>' . $content;
}

That’s it! That’s why they are so great, it takes next to nothing to handle! However, maybe you’re thinking about a relatively complex way to use these, and you want to take it to the next level.

The Next Level

Maybe you’re worried that you’re users won’t grasp the intricacies of your shortcodes, or will be plagued by typos. It’s a valid concern. For example, I don’t want to assume that my users will be able to create a Google map by flawlessly entering:
[googleMap width="100%" height="400" name="Aero Rental - Phoenix" directions_to="true" directions_from="true"]3432 W. Clarendon, 85017[/googleMap]

The solution is to create a way for your users to generate the shortcodes and have them sent to the editor, but where to start? First, you need to add a meta box to the writing/editing pages (these are the dropdown boxes below the editor, such as Tags, Categories, etc). To do this, create a function that you will use to display the form used to generate your shortcode. Then you need to hook into the admin_menu action, and use it to create the metaboxes.

View the complete solution to complex shortcodes in WordPress 2.5.

No Comments

A Great Little Script for Affiliate Marketers

Written by Karen - Posted on April 18, 2008 at 5:10 am

There are, unfortunately, some dishonest people who will either hijack or try to bypass your affiliate links while you work your tail off wondering why you are not getting any sales. I’ve found the best solution to stop that from happening.

There are many services on the net offering shorter links, etc., but to me they don’t seem as professional as this script I found recently called simply Free Link Cloaker. Not only will this script mask your affiliate links, but it uses a friendly keyword format such as http://yourdomain.com/recommends/keyword
Nice!

Another added feature is that the script keeps track of the number of clicks your cloaked link gets, so you will know which affiliate products are converting for you.

It does require a MySQL database and it uses PHP rather than Javascript, making it a much more stable link cloaker than others you may find in your searches. It is easy to set up, taking only minutes, but you can get support if needed and upgrades for life. I find this little script to be an invaluable resource for every affiliate marketer, or for anyone who just wants shorter URLs.

1 Comment