Get in touch with me Get a fresh perspective.

Introducing Earthly WordPress Theme

From March 3rd, 2010 | 0 Comments
Based on my first WordPress theme, Crispp, Earthly incorporates a color scheme designed for sites that require an eco-friendly or earthy theme.

Features

  • 100% Free
  • Consistent styling across all major browsers (even Internet Explorer 6!)
  • Fully widgetized. You can change the sidebar and footer content however you would like.
  • Separate administrative section in the WordPress dashboard gives you control over the links to the social networks in the header and the search box default value.
  • Built-in support for threaded comments.
  • Optimized for YouTube video embeds. Videos will be resized to fill in the width of the content section automatically.

Take a look for yourself!

Screenshot

Live Demo

Want to play around with it and see for yourself?

You can access a live demo of the site here: Live Demo

Download

You can download the latest version of Earthly here: Download Earthly

Furthermore

Are you using Earthly on your site? Please let me know in the comments! Also feel free to post questions or comments.

YouTube Resizer jQuery Plugin

From December 28th, 2009 | 9 Comments
The jQuery YouTube Resizer plugin automatically resizes embedded videos to fill up the entire content space. It expands the video if the content area is larger and contracts if it is smaller.

My first jQuery plugin is now available for download. After using the JavaScript framework for a couple of years, I started getting curious of what it takes to write a plugin for it. I was happy I finally got to read more of the developer documentation and look into more advanced jQuery implementations.

What does it do

The YouTube Embedded Video Resizer will automatically resize videos that you embed onto your page so that it actually looks like the video was designed to fill the space. If you just copy & paste the embed code that YouTube provides, you’ll often have a video that only partially fills your content space and looks out of place.

Demo & Download

Click here to check out the plugin for yourself: YouTube Embedded Video Resizer

Furthermore

There are use instructions provided on the demo page that demonstrate how to use the plugin on your own site.

Are you using it on your own site? Do you have any questions or feedback? Let me know in the comments.

Why do companies use noreply email addresses?

From December 21st, 2009 | 0 Comments
We all get them. When you sign up for a new account somewhere, you’re sent a welcome email. After you order something, you’re sent a receipt. Company newsletters are sent to advertise new services or products. But why do they all get sent from “noreply@company.com”?

Why do companies consistently use a from address of “noreply@…com” when sending out automated emails? Often inside the message, you’ll find something along the lines of this:

“Do not reply to this email. All replies go to an unmonitored mailbox.”

Instead, what if the emails came from a customer service associate? If you had a problem with your order, all you would have to do is hit reply and start typing. Your emails would be sent to a real person who could assist you. But instead of taking this more personalized approach, they come across as robots.

In my opinion, this is a big usability and marketing mistake. Companies should make it as easy as possible for their customers to engage them.

I just did a quick search through my inbox looking for emails coming from “noreply” and found just a few of the biggest offenders. Take a look at these:

Solution

Don’t use noreply email addresses. At the very least, have them sent to a distribution list where the right people in your organization can monitor the feedback. It can even be tied into a ticketing system to keep things organized. Whenever somebody replies, it will automatically create a ticket in your internal system so your team can keep track of feedback and respond accordingly.

What do you think? Leave a comment or let me know by sending a quick note to noreply@trevorfitzgerald.com. (Please note that is an unmonitored mailbox and emails will not be read.)

Introducing Crispp WordPress Theme

From December 15th, 2009 | 20 Comments
Crispp is a minimal theme with clean lines that lets your visitors focus on your content. It’s simple to integrate and use.

I just developed a WordPress theme that I would like to release into the wild. It’s been a while since I’ve released any WordPress code so I thought I’d get back into the swing of things.

I’ve named it Crispp. I wanted something that was simple, clean, & modern. I believe this theme fits the bill. It was inspired in part by the incredibly awesome theoatmeal.com.

Features

  • 100% Free
  • Consistent styling across all major browsers (even Internet Explorer 6!)
  • No images are used for the layout of the site. Everything can be changed by simply modifying the stylesheet.
  • Fully widgetized. You can change the sidebar and footer content however you would like.
  • Separate administrative section in the WordPress dashboard gives you control over the visual aspects of your site.
  • Introduction box on homepage can be customized to your own text.
  • Build-in support for threaded comments.
  • Optimized for YouTube video embeds. Videos will be resized to fill in the width of the content section automatically.
  • WordPress 2.9 compatible

Take a look for yourself!

Screenshots

The Crispp WordPress theme

The Crispp WordPress theme (shown with the light color scheme)

Homepage (shown with dark color scheme)

Homepage (shown with dark color scheme)

The intro box is fully customizable for your own content

The intro box is fully customizable for your own content

Blog post dates are offset to add visual appeal to the site.

Blog post dates are offset to add visual appeal to the site.

Threaded commenting is built in to the theme. Much focus was placed on comment styling and layout.

Threaded commenting is built in to the theme. Much focus was placed on comment styling and layout.

The comment form offers a visually appealing way for visitors to connect with you.

The comment form offers a visually appealing way for visitors to connect with you.

Live Demo

Want to play around with it and see for yourself?

You can access a live demo of the site here: Live Demo

Download

You can download the latest version of Crispp here: Download Crispp

Furthermore

Are you using Crispp on your site? Please let me know in the comments! Also feel free to post questions or comments.

Creating a Twitter Cache with PHP

From December 1st, 2009 | 0 Comments
Speed up your website page loads by caching your Twitter API requests for your visitors.

Recently I have started to take notice of the page load times of my website. I’m always interested in ways I can optimize my site to load faster and run more efficiently. I ran some performance tests in an effort to identify any sluggish items.

To my surprise, the Twitter API code was one of them. In the footer of my website, I have a section that pulls all of my latest Twitter posts and displays them. This is accomplished via an external javascript file supplied by Twitter that you include on your website.

The download time is actually quite fast from Twitter’s servers. My best time was 145ms. But unfortunately there are no caching headers sent to the browser for that file. So every time a new page is requested, your visitor has to download your Twitter posts again. This seems like an awful waste of bandwidth for something I don’t update that frequently. Add in the fact that each Twitter account is limited to 150 API requests per hour, and it’s obvious to see the benefit that caching can provide.

How it Works

Your Twitter post data will get saved to a temporary cache file. This cache will have a lifetime of 10 minutes. If it’s ever more than 10 minutes old when it’s requested, fresh data will be downloaded and it will be updated. It’s all quite seamless and behaves just like the original Twitter code, just more efficient for the browser.

The PHP File

It’s really simple. To get started, let’s make a new file called twitter.php.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
 
// Create a new file that will act as our cache for your Twitter feed
// File permissions must be set to 777
$cacheFile = 'twitterCache.txt';
 
// Specify the URL of the file you want to cache
// You probably only have to change 'fitztrev' & '3' (the number of items to return)
$twitterUrl = 'http://twitter.com/statuses/user_timeline/fitztrev.json?callback=twitterCallback2&count=3';
 
/* *** */
 
// Get the last modified time of the cache file
$lastModified = filemtime($cacheFile);
// If it's been more than 10 minutes, let's update the cache
if ( !filesize($cacheFile) || time() - $lastModified > 600 ) {
  // Update cache
  if ( $tweets = file_get_contents($twitterUrl) ) {
    file_put_contents($cacheFile, $tweets);
  }
}
 
// Let's gzip it
ob_start('ob_gzhandler');
 
// Set the last modified and expired headers so the browser caches it, too
header('Last-Modified: ' . gmstrftime('%a, %d %b %Y %H:%M:%S GMT', $lastModified));
header('Expires: ' . gmstrftime('%a, %d %b %Y %H:%M:%S GMT', $lastModified + 600));
 
// It's a JSON file
header('Content-type: application/json');
 
// Return the contents of the cache
include $cacheFile;
 
?>

You might notice you also have to create a file called twitterCache.txt (with writable permissions) to save the Twitter response. It can be just a blank file.

Then in our HTML, we include a Twitter widget with a minor modification.

Our HTML (Before)

The original HTML code would have looked like this:

<ul id="twitter_update_list">
  <li>&nbsp;</li>
</ul>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/fitztrev.json?callback=twitterCallback2&amp;count=3"></script>

Our HTML (After)

Our new HTML looks like this:

<ul id="twitter_update_list">
  <li>&nbsp;</li>
</ul>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="/twitter.php"></script>

Notice the link to the twitter.php that we just created.

Finished!

So there we have it. A simple, effective way to remove an unnecessary download and decrease page load times across your site.

Do you have any questions or suggestions for improvement? Let me know in the comments.

How to Remove Trailing Slashes in Nginx

From May 24th, 2009 | 2 Comments

I just discovered this rewrite rule that will remove all trailing slashes from URLs in Nginx. With the rule in place, you can force all requests for http://example.com/about/ to use http://example.com/about.

rewrite ^/(.*)/$ /$1 permanent;

WordPress Prevents Directory Listing of Plugins

From April 15th, 2009 | 0 Comments

Empty index.php for plugins directory

via #8699 (Empty index.php for plugins dir) – WordPress Trac.

Good to see this is now part of WordPress.  I always did it manually for my sites.

Post to Twitter Using the Command Line

From April 14th, 2009 | 1 Comments

If you want to post to Twitter using the linux command line, you can use this little bash script:

#!/bin/bash
 
username=YourUsernameHere
password=YourPasswordHere
 
curl -u $username:$password -d status="$1" http://twitter.com/statuses/update.xml

Add it to a file called “twitter” in the ~/bin directory of your home directory.

You may have to refresh your bash profile by running one of these commands:

. ~/.profile
. ~/.bash_profile

Enjoy!

Bookmarks for Monday, March 30th

From March 30th, 2009 | 1 Comments

Bookmarks for Saturday, February 28th

From February 28th, 2009 | 0 Comments
Twitter

Twitter Updates

  •  

You should follow me on Twitter here.

RSS

From The Blog

03Mar

Introducing Earthly WordPress Theme

Based on my first WordPress theme, Crispp, Earthly incorporates a color scheme designed for sites that require an eco-friendly or earthy theme. Features 100% Free Consistent styling across all major …

Continue Reading…

28Dec

YouTube Resizer jQuery Plugin

The jQuery YouTube Resizer plugin automatically resizes embedded videos to fill up the entire content space. It expands the video if the content area is larger and contracts if it is smaller. My first…

Continue Reading…