Archive for February, 2007

Two Books Every Blogger Should Read

There are two books every blogger should read, and I reveal them to you soon in this post below.

I know what you’re thinking, and the answer is no: these aren’t books that talk about the secrets to making lots of money blogging or the optimal way to place AdSense ads on your blog.

These are older books whose first edition was written well before the age of the Internet. They are, however, still very relevant to every blogger, as blogging is all about writing and connecting to your reader through words.

As you might have already guessed these are books about writing: On Writing Well and The Elements of Style.

On Writing Well

On Writing Well, written by William K. Zinsser, should be required reading for all serious bloggers, as it will help you with your writing no matter what audience you target.

Zinsser makes a strong argument for writers to cut out clutter, and he provides classic examples of how clutter confuses the reader. My favorite examples are ones from the political arena that are written to confuse the general population than to mean anything.

The advice in this book is directly applicable to the blogging community, as it’s best to remove clutter from your posts. There are, after all, plenty of other feeds the reader could be reading.

The Elements of Style

The other book that should be in every blogger’s list of required reading should be The Elements of Style. Originally written by William Strunk, Jr. for his students, The Elements of Style was prepared for public consumption by one of his students, E.B. White.

The Elements of Style will help you make everything you write mean something. The author stresses that “every word tell”, and this book will help you get more out of every word you write (or give you the right words to help you along the way).

Cost

Combined these books will cost you a whopping $20.12 plus shipping at Amazon, so there’s no reason not to have these books in your library.

Once you’ve read these books it’s a good idea to have them handy as a reference or re-read them from time to time. The advice is classic and will help make all your posts as great as this one*.

Get these books and use them. Your readers will thank you for it.

*Disclaimer: It’s been awhile since I’ve actually read these books, so I can’t guarantee this post is as good as it could be. You be the judge.

Tags: , , ,

Building SAJAX Applications with Wordpress

The Simple AJAX Toolkit, or SAJAX for short, is a library you can use to quickly build AJAX applications in PHP, Perl, ASP, and many other languages.

Using SAJAX with Wordpress can be tricky, because if you don’t initialize SAJAX or handle client requests at the correct time you’ll break Wordpress, your SAJAX applications, or both, and this guide will help keep you from doing both.

If you haven’t done so already, you should strongly consider integrating a custom PHP library into Wordpress. This isn’t a prerequisite, but it allows you to easily integrate your own SAJAX functions into Wordpress.

Integrating SAJAX Initialization into Wordpress

To use SAJAX with Wordpress without a custom PHP library you’ll need to edit wp-config.php, but to use SAJAX with Wordpress with a custom PHP library you’ll need to edit lib/LIB.php.

The instructions below apply to both variations, but if you’re editing wp-config.php make sure you place your SAJAX code right before the ending ?> line.

  1. Include the SAJAX library with include("Sajax.php"); and initialize the SAJAX library with sajax_init();
  2. After initializing SAJAX you’ll want to include your SAJAX functions with the appropriate sajax_export() declarations.
  3. Once you’ve exported all of your SAJAX functions add sajax_handle_client_request(); to handle all SAJAX requests before they’re passed to Wordpress. If Wordpress tries to handle the request it’ll have no idea what to do and your SAJAX application won’t work!

Once you’ve got SAJAX integrated into Wordpress you’ll need to edit your template so that you can use the JavaScript SAJAX provides.

To do this you’ll need to add the following code to the template file(s) you wish to use SAJAX in:

<script type="text/javascript">
<?php sajax_show_javascript(); ?>
</script>

If you want to use SAJAX in every page of your site then consider placing this in header.php.

Using the steps above you can now start calling the SAJAX JavaScript functions to dynamically interact with your web server and update the page’s content.

More Information

For more information about SAJAX visit the official SAJAX website where the SAJAX FAQ should get you started.

If you’re building web applications you now have no reason to miss out on the interactivity AJAX provides you, as SAJAX and Wordpress make building AJAX applications a snap.

Tags: , , ,

Pop-under Ads: Why Do Publishers Still Use Them?

Pop-under ads, an advertising method I thought had all but died out, seem to be making a comeback on a few websites I frequent.

These aren’t renegade websites selling cheap Viagra or offering online roulette, either. They’re high-traffic sites like ESPN.com and others like it.

It’s these advertisements that fueled the creation of the pop-up blocker, and they surely helped fuel the adoption of the Mozilla family of web browsers.

Even with pop-up blockers these advertisements are becoming a more prevalent part of my web browsing experience. Publishers place pop-under advertisement code in their pages so that a pop-under ad is created when a user clicks a link on the page (or in some cases anywhere on the page), thus circumventing the pop-up blocker, as it appears the browser requested the new window.

Large advertising networks like Undertone and Tribal Fusion offer a pop-under service, and some publishers are reaping the benefits of this annoying method of advertising.

One publisher that is profiting from pop-unders and loving it is MySanAntonio.com. See this quote from Undertone’s testimonial page:

We have a long-standing partnership with Undertone Networks. As our top pop-under partner, Undertone provides us with reliable revenue every month that helps our bottom line. We enjoy the top advertisers Undertone brings to our website and the exceptional customer service they provide.

Now to the main point of this post: Why are publishers still using these types of advertisements? They go against web usability, they offer no functional value to the visitor, and they get in the way of the visitor more than any other type of advertisement.

If, however, you’re the manager of a large corporate website you see the $$ signs and overlook the fact that it makes your users unhappy. You’re only concerned about the website’s bottom line (you don’t want to lose your job, after all).

Most of these large sites aren’t going to lose visitors as the result of using pop-unders because of the unique content they provide, and advertisers must see some benefit from the ads or they wouldn’t pay for them.

I’ve got no special analytics to help my cause here, mostly because it’s not really something you can measure.

You can’t measure the affect a pop-under has on your entire business, because it’s not something clear cut like a click-through ratio.

It’s like a shipping company with a bad truck driver. If I don’t call the 1-800-bad-driver number to report how much the trucker’s bad driving causes me to despise their shipping company then I simply vow never to use the service and hope they notice.

Now equate this to pop-unders. I’ll never use Vonage. I’ll never take a class at Southern Wesleyan. I associate Vonage and Southern Wesleyan with annoyance, but I can’t easily tell them this, so I simply vow to never use their services.

I wonder if these practices affect a business’ bottom line, and I wonder if they even know or care.

They’ve got a click-through ratio to backup their ad spending, something that will surely impress the boss, but is it hurting them as a company?

We may never know, but I’d like to hear your thoughts. Do you vow to never use a service because of annoying pop-unders? Do you think these businesses care more about you or their fancy stats?

Tags: , , , , , ,

Integrating a Custom PHP Library into Wordpress

Ever since starting my first Wordpress blog in December 2005 I’ve come to appreciate what Wordpress brings to the table right out of the box.

From then to now I’ve started using Wordpress with websites where blogging is simply an added benefit; the main focus of the websites is something other than a blog.

As a one man show, Wordpress can be invaluable for creating websites that aren’t blog-centric.

You could always create your own repository of reusable website code and templates, but Wordpress gives you so much more: a broad user base that finds and quickly patches bugs, useful 3rd party plugins that you don’t have to develop yourself, and a plethora of themes that you can use to help get your website running (especially if you’re not a color guy like myself).

There is, however, one component you’ll need to build yourself when you want to use Wordpress for a website with dynamic content: a custom PHP library.

Integrating Your Own PHP Library into Wordpress

Integrating a custom PHP library into Wordpress can be done in three simple steps:

  1. Create a lib directory in the Wordpress root directory.
  2. Create a PHP script called LIB.php in the lib directory created in the first step.
  3. Modify wp-config.php and add the line include(”lib/LIB.php”); at the end of the file (before the ending ?> line).

The custom PHP library is now integrated into Wordpress, and you can now start building your custom PHP scripts and include them in the lib/LIB.php file.

Once you’ve built your library of functions you can add them into your Wordpress templates so that they show up on your site.

Other Reasons for Creating a Custom PHP Library

Other than managing dynamic data, you’ll also want to create a custom PHP library if you want to override any default Wordpress functions.

For example: one site I have overrides the get_the_title() and the_permalink() functions to do as I please.

Note that you’ll need to make sure you comment out the existing functions inside of the appropriate files located in the wp-includes directory.

Why Not Build a Plugin Instead?

Wordpress has a feature rich plugin interface, but if you’ve already got a custom PHP library then it’s much easier to integrate it into Wordpress using the methodology above.

Also, if you want to use your custom PHP library with more than just Wordpress (for performing background data parsing, for example) then using this method will give you the ability to perform this type of functionality with ease.

The only drawback to using this method is that you can’t easily attach menus to the Wordpress Site Admin interface as far as I can tell (although I’ve never tried), but I don’t have a need for this functionality, so it’s not a big deal for me (and hopefully not you, too).

Hopefully you find this guide useful when building your next Wordpress based website that’s more than just a plain old blog.

Tags: , , ,

MyBlogLog Tracks Ad Clicks: Does This Matter?

MyBlogLog has come under fire during recent weeks due to numerous hacks and exploits found with their software, and now another issue is being raised by popular blogger ShoeMoney in regards to MyBlogLog tracking ad clicks.

At first glance this appears to be another black eye for MyBlogLog–or is it? MyBlogLog has a pro service in which you can pay to get real time stats about your site, and one of these stats is user clicks.

This service leads me to why I feel this is an overreaction by the general blogging community: bloggers want their hands on as many statistics as possible, and advertisement clicks are one of these high priority statistics. MyBlogLog is simply serving this need.

Conspiracy theorists, however, argue that MyBlogLog can take the advertisement statistics and use them for their own evil plans. This conspiracy theory is further increased due to the fact that MyBlogLog is owned by Yahoo!, whose YPN service is a direct competitor to Google’s AdSense.

With that said, it seems like now it’s in MyBlogLog’s best interests to give users the option to turn off advertisement tracking if they so please. I’ve got no problem with them tracking my data, but all conspiracy theories can be put to rest with them giving users this option.

For more details about the ad tracking see ShoeMoney’s post: MyBlogLog Tracks Your Visitors Ad Clicks.

Tags: , , , , ,