Twitter Question of the Week

Published on Jan 23, 2009   //  Polls

This week on twitter I asked, do you monitor your site up time? If so how?

Here is what was said…

HostDemon @bluefur Though 3rd party software that provide monitoring services and mobile apps for SMS messaging among others
Yurechko @bluefur When I ran a small hosting company I used http://www.justuptime.com/ – currently, my host does email notifications
danudey @bluefur Pingdom. It’s all kinds of win.
DanAndJennifer @bluefur we Absolutely monitor uptime – Pingdom is by far the best tool we’ve used. it catches ANY little glitches (the search engines do)

So how do you monitor your site?

In The Sphere: Success and Optimism

Published on Jan 23, 2009   //  In the Sphere
Off

A blog post roundup about success and optimism would seem incomplete without at least a brief mention of the new United States president. Well, we’re going to keep politics and business a little separate here, but we wish Barack Obama all the best for the remainder of his new administration. The world needs some optimism.

Shawn Knight is a little confused. Taking a look at a few different industries, he finds that the numbers don’t add up. The media is telling us that are amidst one of the worst recessions in over a century, but how are Apple and Nintendo able to post such great revenue figures for 2008? These are entertainment companies, after all, and not necessities.

Coach Stan of the Thinkreferrals Blog Network recently picked up a copy of Outliers by Malcolm Gladwell. In this book, Gladwell investigates the phenomenon of highly successful people of how they lie outside of the norm. From Tiger Woods to Bill Gates, did these guys have unfair advantages over the rest of us? Maybe you don’t want to be normal.

Tyler Cruz has been working on a little pet project for the last little while and he’s almost ready to launch it into the stratosphere. In his explanation of Publisher Challenge, he tells us that we will be able to participate in a series of affiliate challenges with real-time stat tracking, unique usernames, and all sorts of other cool features. The best part? The great prizes, of course!

Free Money Finance always has its eyes on your wallet. Don’t worry. That’s a good thing, because FMF is looking out for you! For example, did you know that you may be able to pay for a Costco membership by eating free samples? If you skip a regular paid meal and just eat the free samples, the annual membership can pay for itself!

Jason Landals is a bit of a hockey nut, but he’s not a Canucks guy. Being from Edmonton, he’s a big fan of the Oilers. As such, he was thrilled to attend Glenn Anderson Night at Rexall Place. They retired his #9 and the event was attended by such legendary Oilers as Wayne Gretzky and Mark Messier. That was possibly the one of the most incredible teams in NHL history.

BlueFur Twitter Contest

Published on Jan 22, 2009   //  Contest

35288_lWould you like a laptop?

Our first ever twitter contest kicks off with a bang in 2009. We are offering a brand new Acer Aspire AS6530. This laptop is a great machine with lots of muscle and a 16 inch monitor. If your like me and always doing computing on the go you will come to love your laptop more then your desktop.

How do I enter?
To enter you need to do the following…

  1. Follow me on Twitter
  2. Tweet the following message…
    Just entered to win the BlueFur laptop contest. You can win by following @bluefur and retweet. http://tinyurl.ca/?K8PENBH9

The winner will be announced at the end of February or if I hit 10,000 followers. Which ever comes first.

Good luck to all those that enter and happy tweeting.

Moving Beyond SSH: Installing a Web Server

Published on Jan 22, 2009   //  Development
Off

Moving Beyond SSH

This week we’ll actually be moving onto installing some software to run our server. This series will go over setting up a basic LAMP stack, which includes Linux, Apache, MySQL and PHP. Today we’ll be going over installing Apache. We will be compiling this software from source instead of using an automated installer such as yum. We’re doing it this way because compiling from source gives you more customizability and it is a great learning experience for managing your server.

Okay, start out be logging into your server and changing your directory to /. Now, we need to start out be downloading Apache to our web server. First head on over to Apache’s download page and copy the URI for the .tar.gz UNIX Source download under the latest version of Apache 2.2. Now, in your SSH client:

wget URL_TO_APACHE_DOWNLOAD

Replace URL_TO_APACHE_DOWNLOAD with the URL you got on the download page. Now, we need to extract the contents of the archive that gets downloaded:

gzip -d httpd-NN.tar.gz
tar xvf httpd-NN.tar

Replace NN with the version of the download (eg. 2.2.11). Now, change your working directory to the exatracted directory (again replacing NN with the version of the download):

cd httpd-NN

Now, we need to configure Apache to install with the modules we want installed. Here’s what I would start out with:

./configure --enable-so --enable-rewrite --enable-deflate

Which will allow Apache to work with modules (instead of having everything be complied into its core), install mod_rewrite and install mod_deflate. The full list of available configure options are available here. You can append more options to the line above. If you want to be able to enable and disable any of those options in Apache’s configuration file, you can append =shared to the end of the option (with no space before). This command may take a few minutes to execute.

Next, we get the configuration options prepared to be installed:

make

This may also take a couple of minutes. Now, we can actually install Apache, which we do by running this command:

make install

Assuming you haven’t encountered any errors, Apache should now be installed. We can start it by running this command:

/usr/local/apache2/bin/apachectl -k start

You should now be able to head over to the IP address of your server and see your server… serving! Alright, now since we’ll be controlling Apache quite a bit when managing our server, let’s make its command a little shorter.

cd /bin
ln -s /usr/local/apache2/bin/apachectl apachectl

Which will allow up to control Apache in this shortened form:

apachectl -k start

Conclusion

Because I want to keep these guides short, so as to not overload people with all this new information all at once, we’ll be discussing Apache’s configuration file in a later article.

Marketing 101: Twitter Followers

Published on Jan 22, 2009   //  Marketing Tips

When Twitter was first rising in popularity, the majority of the people on the microblogging service represented themselves as individuals. Such is the case with Michael and Matt, for instance. More recently, there is a huge surge of Twitter accounts that are business entities. The BlueFur account falls somewhere in between.

Creating a Twitter account for your company or business can be a great way to reach a new audience (Obama did it) and a great way to interact with your customers and associates. Whether you sell physical products or you just want to send traffic toward your blog, Twitter can be an effective tool for your business.

The key, of course, is to get people to follow your Twitter account in the first place. I find far too many corporate Twitter accounts are little more than news feeds. They pump out links to the latest press releases or product announcements and that’s it. There is no interaction and no following back. This is not how you attract interest.

If you are going to start a Twitter account for your business (or if you have already), there are a few basic things that you’ll want to keep in mind. First, follow other users when they follow you. This helps grow the sense of community. Second, actually reply and speak directly to other Twitter users when they comment or ask you questions. This shows that there is a real person behind the Twitter account. Third, ensure that not every tweet is simply a link to another press release. Short, casual updates are appropriate and useful as well.

Do you have any advice for corporate Twitter users? What would you do to get more followers?

WordPress Development: Filters

Published on Jan 21, 2009   //  Development, WordPress
Off

WordPress Development

Today we’ll be talking about the filters part of the WordPress Plugin API. As we’ve gone over before, filters are used to manipulate data either before it’s sent to the database or before it’s sent to the browser.

The concept behind filters is relatively simple, during certain points before data is sent to the database or browser, WordPress checks to see if there are any hooks that want to first handle the data. If it finds a hook, it’ll pass off the data to that hook, and wait for it to be returned before sending the data on its way.

Hooking into one of these filters is fairly simple, first need to determine what we want to filter and how we want to filter it. So, for an example, say we want to replace the word foo with the word bar in the content of the post, before the post is sent to the browser. After we’ve done that, we need to find the appropriate filter for where we want to hook in our plugin. You can determine which filter you need to use from the Filter Reference in WordPress’ documentation. For this example, the filter we will be using is called the_content. You should now find the reference to this filter in WordPress’ source code (you’ll want to find some software that allows you to search through code). I found the reference to the_content in wp-includes/post-formatting.php on line 164. Let’s take a look at that line:

[code='php']$content = apply_filters('the_content', $content);[/code]

apply_filters is where WordPress sets up the hook. The first parameter is the name of the filter, and the second parameter is the data it’s passing to you. You’ll need to look above that line to determine what the content actually is that it’s passing you. Okay, so, we have now determined that the filter is only passing us 1 parameter, and that the parameter is the content of the post.

Now, we need to create a function that will filter the provided parameter and replace all instances of foo with bar. Let’s look at what that function might look like:

[code='php']function filter_foo_bar( $content ) {
$content = str_replace( 'foo', 'bar', $content );
return $content;
}[/code]

First of all, your function name must be unique. To prevent function name collisions with other plugins, it is recommended that you prepend your initials to your function name. Second, notice that the function accepts a parameter. We determined the number of parameter the hook was passing us when we looked at the filter in the context of the source code of WordPress. Within the function, we filter the content. In this example, we’re using the PHP function str_replace to replace all instances of foo with bar. Once we’re all done with the filtering, we need to return the content, so that WordPress can send it along its way.

Okay, now we need to tell WordPress where to hook this function into. We will use the WordPress function add_filter for this. We can add this either above or below our function that we created above.

[code='php']add_filter( 'the_content', 'filter_foo_bar' );[/code]

So, the first parameter of add_filter is the name of the filter. The second parameter is the name of our function that will filter the content (the function name needs to be enclosed in quotes and not have () appended to it). If your function accepts more than one parameter, you should add a third parameter to add_filter you need to first add a third parameter, the priority (just use the default of 10) and then you add a fourth parameter, which is the number of parameters your function can accept (the default is 1).

Now, I have put this all into a WordPress plugin, which you can view here.

As you can see, we have the plugin headers and we also have the license notice at the top of the plugin. If you had actually read the GNU General Public License (:P), you would know that this notice is required to be in your file (and that you’re also required to distribute a copy of the license with the download of your program. Because this is such a short plugin, I would just put it under public domain because the license is larger than the entire plugin.

Conclusion

So, we have now gone over one of the parts of the WordPress Plugin API, filters. As you may have noticed, a strong grip on the PHP development language is necessary for developing WordPress plugins, so I am writing these articles assuming that you’re already proficient in PHP.

Page 4 of 13« First...23456...10...Last »