The fertile playground of a WordPress developer
Phishing Attempt (Halifax Bank)

The following is an email I received from Halifax Bank, which points to a bogus web address. This was pretty obvious to spot, since I don’t have a Halifax Bank account in the first place. In the interest of getting phishermen out into the light, here is the body of the email:

Dear valued Halifax client,

Recently there have been a large number of identity theft attempts targeting Halifax Bank customers.

In order to safeguard your account we require that you confirm your banking details. This process is mandatory.

You may do so by clicking on the below link to log into our network.

(This link has been neutered) https://www.halifax-online.co.uk/_mem_bin/formslogin.asp?source=halifaxcouk

Failure to do so may result in temporary cessation of your account services pending submission.

Thank you for your prompt attention to this matter and your co-operation in helping us maintain the integrity of our customers accounts.

Please do not reply to this e-mail. (c) 2007 Halifax Bank, Inc.

The preceding IS A SPOOF!! Do not be fooled. The above link actually points to http://016f991.netsolhost.com/index.html

One Additional Note on “Lose the W”

One point I did not mention on the other blog, which is definitely an SEO advantage of using the “sans w” address redirect:

Generally, your Pages Per Visit covers your entire website, but when ranking which pages get hit the most, once again www.yostuff.com is different than yostuff.com.  Since Google Webmaster Tools allows you to set a Preferred Domain, it is logical to assume that the form of the domain that the Googlebot crawls is important to how it ranks pages.  In fact, the above-linked blog post more or less spells this out exactly.

So, get out there, set your preferred domain and make sure your server points users in the right direction.  As most of us who’ve been doing this a while can attest, it’s the little things that count.

Liberal Bloggers Unite! Lose the “W” (all three of them)!

Note: this has been cross-posted to dragonflyeye.net for the sake of informing my hippie bloggin’ buddies.
OK, so that’s just a humorous side-effect, but funny, nonetheless. . .

Anywho, I’m pretty exited about my latest little tweak to this here website, and I thought I’d share. A very wise personage who runs a site called Corz.org has a fantastic tutorial on the mod_rewrite Apache directive which has been something of a bible to me in the last few months as I endevoured to create the latest version of DFE.

Foremost among his/her tutorials of interest is the two-part examination of the mod_rewrite Apache directive. If you don’t know what that is, you’re not alone. Despite it’s anonymity, it is responsible for the “clean urls” look of WordPress and other modern blog software, where instead of nasty-looking “http://www.somewhere.com/index?file=25%category=stuff%otherthings=things“-style URLs, you get “http://www.somewhere.com/stuff/things/this_is_an_article.”

But that’s long leagues from all that it can do, as you will discover if you read that tutorial. One thing you can do with it, and what I’ve just done, is to use it to redirect reader’s browser from “http://www.yourblog.com” to “http://yourblog.com; regardless of what specific page they request, they will always be directed to a page that does not have the “www.” The directive looks like this:

# Begin rewrite rule: nix the www
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^www\.yostuff\.com [nc]
rewriterule ^(.*)$ http://yostuff.com/$1 [r=301,nc]
# End domain rewrite rule

If you wish to incorporate this directive into your site, you simply add it to the .htaccess file on the root of your WordPress blog (and if that’s not the root of your domain, which it isn’t in my case, you’d also need to add it to the root directory). I’ll get more into how it works below, but first to answer an obvious question:

Why would you do a thing like this, you ask? Well, there are a number of reasons. For one, the URL without the superfluous “www” just plain looks nicer and is less bulky. Better yet, this directive will encourage people to use the “sans w” version by visually associating the site with the cleaner URL without annoying people who either chose to use the older style or followed an old link in the older style.

But the biggest reason, for me, was that I needed to assure myself that the host portion of the domain name was always consistent for the sake of implementing AJAX and JavaScript code. Strange as it may seem, even though “www.dragonflyeye.net” and “dragonflyeye.net” are functionally equivalent addresses to users, they are not the same thing to the browser or to JavaScript. One points to a domain and the other points to a specific host on the domain (the server labeled “www”). Technically, those address variations could potentially refer two different hosts altogether.

JavaScript’s “sandbox” security rules prevent code downloaded from one host to execute code on another host. If a user is on “www.dragonflyeye.net” and clicks on an AJAX-enabled link that points to “dragonflyeye.net,” they’re going to get an error message instead of what I intended because they are unknowingly violating that rule.

That’s just bad. Not only bad, but embarrasing as well. But by using this directive, I avoid all that mush. Now, I can confidently code for dragonflyeye.net without worrying that someone might have come to the wrong (but still technically right) address. Even if they have, they will be directed to the correct address.

WordPress users take note: in order to change this directive in your .htaccess file and have it work right, you’re also going to need to change the URL of your site (so that it doesn’t have the “www”) in the “Options” section of your WordPress Admin site. Not to worry: once this is done, you won’t have any problem with older links to your site. That’s the whole point!!

Readability, Usability and Blogs

LifeHack.org turns in a great roundup of tips on keeping readers and making a blog usable. The basics? Keep it readable:

Six Improvements to Your Blog - lifehack.org

Format Your Text- Take the extra time to write “pretty” posts, such as it were. Make it so that people can read what you’re typing, and do your best to keep the tone communicative, and not too dense. Translation: big fat paragraphs of dense text usually don’t make for “friendly” blog reading. (Look at David Byrne’s journal. Great stuff, but soooooooo long.) And get friendly with things like bulleted lists, shorter and longer paragraphs, use of bold, etc. But not too much. It’s a condiment.

The author of this post is spot-on in this article. Even if you think you’ve got it down, it never hurts to read the above article. You might find something you hadn’t considered. I like that he points out the need for short paragraphs, for example. Generally, large paragraphs that are well-written can easily be divided up a bit, since one thought should naturally lead to the next, anyway. But smart people tend to forget that their readers need logical breaks in the stream of consciousness, especially people used to writing in intellectual or academic circles.

On this level and so many more bulleted out for you in the above-linked post, some of the big blogs out there do more harm than good. Take the Daily Kos as one example. How many different ways to they violate LifeHack’s relatively simple rules of readability? Counting can make your head spin. In fact, I never go to Daily Koz ~ and I don’t care how much it affects my political blog not to be involved here ~ because the whole freakin’ page makes my eyes bug out of my head.

And because pages like this are so hard to read, other bloggers of like mind often emulate the unreadability and assume that this makes them hip. Some blogs made it big early and thus continue despite their readability shortcomings, others bull-dog their popularity with active and persistent SEO tactics, but for the rest of us, making the page readable is quite possibly the most essential component of achieving popularity.

So in the interest of furthering the usability discussion, allow me to add a few bullet points of my own using Kos as a “do not” example:

  1. Lines draw the eye, use them wisely: (I could write a whole blog on this, and maybe I just might) When creating borders around elements, be aware that the simple introduction of a solid line naturally draws the eye to follow where it leads. If you look at DailyKos, you can count at least twenty lines making up just the top three inches of the page. Moreover, they’re high-contrast lines separating orange and white and some of them are at 45 degree angles, besides. Holy crap! Keep borders to a minimum, and where you use them, try to see where they lead the user’s attention. It might lead them to move on.
  2. Sidebars are content, too!: When I read web pages, I like to be able to glance at the sidebars and see if there’s anything worth checking out elsewhere. So do other people, and that’s what sidebars are there for: to entice users towards increased Page-Per-Visit (PPV) or ad revenue. But in order to achieve this, the sidebar should flow naturally from the main content. When you look at DKos, it is impossible to see how the two right columns relate to the left. In fact, it almost looks as if you’re looking at three different web pages in frames. In Kos’s case, I would largely blame the use of ad content in the centre column for this “Islands in the Stream,” effect.
  3. Contrast is powerful stuff: I alluded to this in bullet #1, but I’ll state it explicitly here. Contrast is a powerful tool of usability, and thus you need to use it carefully. Kos looks like a creamsicle might in the midst of a bad acid trip. Once again, holy crap! They’re beating you over the head with the white and orange. Far better would be to use related or complimentary colors that blend into a whole while adding a small bit of contrast for the sake of drawing the eye and adding visual flavour.

That’s about all I’ve got at the moment. The big thing is to leave your page alone, walk away and have a beer, then go back and take another look. Or ask your friends to look, you’re probably always bugging them to, anyway. Get a fresh perspective on what you’ve got and think in terms of what you would think as a stranger to the website.

On a side-note, while I can’t prove it conclusively, I have a hunch that too much visual separation is probably not too good for SEO, either. Google has put a lot of effort forth in recent years to increase it’s search bots’ sensitivity to “readability” rules. That makes sense because things that aren’t readable on a webpage are more likely to be “Black-Hat” SEO tactics, and anyway, they’re not going to be terribly useful to the reader.

I also suspect, on this readability level, that keeping paragraphs short and focused is probably also good for SEO. That’s because a short, focused article is going to have a high density of related words that Google will see as an important article, but it is unlikely to have the same word repeated too many times, which will trip Google’s BS monitor.

Technorati Tags: , , ,

powered by performancing firefox

Creating Global Link Writing Functions

Oh, the drudge-work of webdesign. The repetition.

If you’re like me, you got into PCs back in the day because you found ways to make repetitious tasks go away when you used them. But sometimes in web design, there seems no way to avoid drudge work.

Ah! But then again, there’s always something. Whilst creating the newest version of my production site, DragonFlyEye.Net, I got sick to death of creating links. This was particularly true because of the way the page is put together: it’s using “clean” URLs, so creating a link to an article requires putting together a bunch of variables to make them look like directories to the browser.

The solution I came up with was a global function that created my links for me. All I had to do was pass it the needed variables, which are always conveniently held in arrays, anyway. I took the extra step (because, in my case, it was easier) of having the link-writing function write the whole anchor, including the bracketed content between the anchor tags.

Another advantage of using a global function to complete this task is that your links always come out consistently. If you want your domain to always be mydomain.com instead of www.mydomain.com, you can be sure that this happens when only one function is responsible for creating links.

For those of you who are not familiar with what I mean by “global function,” I mean that when I create a website, there are a few included files you can almost guarantee: a database incude file, a configuration include file and a functions include file. The configuration file contains all the usernames and passwords required to access special features (such as the database) of the site along with information such as mail servers and such. The database file includes only those functions which query the database, and again, this is for the sake of consistency and making sure that any problem querying the database can be tracked down to one location.

The functions file includes a list of functions which I find helpful where ever I am in the site, so I don’t have to constantly be copying the same function to each of those pages.  In my case, those functions include one to draw the correct number and selection of navigation buttons at the top of each page, a function to dynamically fill in sidebar content and a function that calls my DuckSoup Technorati API.  Of course, there is also a function that creates links for me.

I hope that this little blurb helps someone think in terms of compartmentalizing their code as I have done and avoiding unnecessary repetition!  Happy coding!

« Previous Page

Bad Behavior has blocked 49 access attempts in the last 7 days.