Wordpress.com Stats Plugin

You may or may not know that I use the Wordpress blogging software for all my blogging needs. I really cannot say enough about the Wordpress team and their blogging tool, not to mention the Askimet comment spam blocking tool. I would recommend Wordpress to anyone looking to start blogging.

One of the nice features of Wordpress is the openness of it and the plugins that are freely available. I have been looking for a good stats plugin for Wordpress since I started using it. The one that I started using a few months ago no longer works with the latest Wordpress version, 2.3.

I also use the Wordpress.com platform for blogging, and the other day I was asking the question, why isn’t the Wordpress.com stats software available for the non-hosted Wordpress software. Since they already have the code, it seems like it would be easy to include in the standalone version of Wordpress.

It turns out that it is available. After doing a little searching, I found the Wordpress.com Stats plugin which looks like exactly what I asked for. I must say I am ecstatic over this. How often do you ask for something like that only to find it so soon? Anyway, I haven’t tested it yet, so I don’t know how well it works yet. But, if it works just like Wordpress.com, it should be the only stats plugin that I need.

Update: It is not showing any stats as of yet. However, a quick look at the FAQ shows me that you need the tag <?php wp_footer(); ?> in your footer.php file. I have added that tag and hope to start seeing stats soon it is working.


Downgrading Web Page Layouts for IE6

Lately, I have found that it is easier to allow a page to display differently in IE 6 than it is to make that page display the same way in IE6 as it does in other browsers. Think about it. Let’s say you have 4 browsers. Your page looks the same in 3 of the browsers, but in one of the browsers, it doesn’t quite look like it should. You could choose to spend extra time to find a work around to make it display the same across all 4 browsers. You could even go so far as changing the layout of your page. Or you could simply allow it to display differently in that one browser, and move on to the next project.

If someone has a problem with it, the solution is simple. Upgrade. Or change browsers. It makes sense, and it pisses me off I didn’t start doing it sooner.

Now before people go and get all upset, I am not advocating designing your site to purposely look bad or crappy in IE6, just different. For example, say you have a div with a transparent PNG as a background. IE6 lacks support for transparent PNGs, thus requires a work around hack to display a transparent PNG as a background. You could implement the work around hack. Or you could just set the background as a solid color in an IE6 only stylesheet using conditional comments. The solid color background won’t look as good as the transparent PNG, but it works fine. Someone using a browser that supports transparent PNGs will have a better experience, but it still works.

Finally, I know that we all have clients, and our clients drive most, if not all, of the work that we do. If a client wants it to look a certain way in a certain browser, then sometimes that’s just the way it is. But I bet if you tried reasoning with your client using the above argument, you just might persuade them to see things your way.

Update: I forgot to add that making things display differently in IE usually requires the use of an IE only stylesheet with conditional comments.


Browser Version Market Share for September 2007

I have been looking for a source for stats on browser marketshare, and what do you know, I’ve found it. There is a site called Market Share that apparently publishes this information on a monthly basis. So now I have some concrete information to go on. In fact you can see September 2007 browser stats here. Here is a snippet of info.

Microsoft Internet Explorer 6.0 - 42.75%
Microsoft Internet Explorer 7.0 - 34.60%
Firefox 2.0 - 13.57%
Safari 41 - 3.91%

As you can see, IE7 is still second to IE6 with Firefox coming in far behind in third. So if you ever doubt that you need to check your work in IE6, it is still the most used browser out there.

Update - 10/16/07: Microsoft is issuing an automatic update today that will install IE 7. We should be able to see the effects of this if we watch the browser stats in the next few months.


I Can’t Get Mod_Python and Django Working on my Mac

For those that don’t know, Mac OS X includes a lot of open source software by default, including, for the purposes of this post, Apache and Python. The included Apache is 1.3 and Python is 2.35 in Mac OS 10.4, to be specific. Both, however, are out of date. This shouldn’t be a problem, but I cannot get mod_python working on Mac OS 10.4 with Apache 1.3 and Python 2.35. The current version of mod_python that is compatible with Apache 1.3 is 2.7.11.

After spending quite awhile trying to get mod_python to work on my Mac, I have concluded that it will not. It is possible that I am doing something wrong. I think that if I upgraded Apache and Python, it would be possible, but I really don’t want to override the default systems on my Mac.

All that aside, you don’t need mod_python to be able to run Django locally on the Mac. So I went through the process to install Django. Once that was done I tested it, and it tells me it is installed. But, once I try to run the Django tutorial, it fails.

I have tried this on 2 different Macs, and it failed on both of them. So I have given up until someone can point out what I did wrong or what I need to do to fix it. Even though the Mac has Python on it, for some reason neither mod_python or Django will run on it.


Microsoft is Pushing IE7 Downloads

I keep a copy of IE6 installed for testing purposes. When I fired up IE6 this morning, it took me to this page for IE7, basically prompting me to upgrade to IE7. It seems that Microsoft is trying harder to get users of IE6 to upgrade to IE7. Ask and you shall receive.

The other day Microsoft had this to say about IE7.

Almost a year ago, we released Internet Explorer 7 for Windows XP. Since then, IE7 is well on its way to becoming the most used browser in the world…

I guess they weren’t satisfied. It appears they decided to take matters into their own hands and give IE7 a little extra push. Good for them.

Update - 10/16/07: Microsoft is issuing an automatic update today that will install IE 7. So hopfeully, you have it set so it does not automatically download and install automatic updates. If you don’t want IE7 on your machine, be sure not to run this update.


301 Redirects

I recently took two blogs and combined them into one domain, kempwire.com. In order to do that, I needed to find out how to do 301 redirects to redirect all traffic and links that were currently going to those domains to the new domain. 301 redirects are permanent redirects. According to Google, you need to use 301 redirects to let them know that your domain is moved. In addition, all links that were counted towards your old domain will be counted towards the new one. I also wanted to take out the www of this domain so that all traffic goes to kempwire.com.

I have done 301 redirects before but I needed examples of code to use to do exactly what I wanted to do. Fortunately, I didn’t have to look too hard. SEOmoz has an excellent guide on how to do 301 redirects on Apache. This guide is right on because it tells you exactly what to do and it covers all the bases, including the no-www redirect.

I got it done, and so far, everything is working perfectly. I still need a few more days of analytics tracking to make sure it is working correctly. I had to give the shout out though to SEOmoz for doing such a great post on this. Great job guys!


CSS Support in IE7

If you ever wanted to know how support for CSS improved in IE7, this post is for you. Apparently in August 2006, before IE7 was released, Microsoft posted these details on the IE Blog. The post details all the bugs that were fixed, added support for W3C specifications and features added for CSS 2.1. I always wanted to know this, and this is the first time I have seen it.

They go on to talk about how fixing support for CSS will cause a lot of the hacks that worked before to break in IE7. This page details specifically which workarounds that previously worked in IE6 will not work in IE7.

I believe IE7 has now been out for over a year. I admit I am impressed with Microsoft’s support for CSS in IE7. It is worlds ahead of IE6. However, the adoption rate that I have seen for IE7 over IE6 is still very slow. In addition, how long will it take for Microsoft to release IE8? Five more years? By that time, IE7 will be outdated as IE6 was. Unfortunately, as many inroads as Firefox has made into browser market share, we are still living in a Microsoft world. Maybe by releasing Safari 3 on Windows, Apple will be the one to change that. It is still in beta as of this writing, though.


How to Restart Apache Locally on Mac OS X

Working with PHP and Apache locally on my Mac, I found myself needing to know how to restart Apache. The method I normally use did not work because for some reason etc/init.d does not exist or could not be found. So I found another command that worked. Simply run the following.

sudo apachectl graceful

graceful reloads the configuration files and gracefully restarts. Any current connections are allowed to complete. That’s it! You just restarted Apache. Easy huh?


Installing GD Graphics Library on Mac OS X

Recently, I needed to install the GD Graphics Library locally on my Mac. GD is an open source code library for the dynamic creation of images by programmers. GD creates PNG, JPEG and GIF images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve web site development.

I searched through a lot of tutorials, and found that most of them are out of date and/or incomplete. In spite of this, I finally managed to figure it out. However, I took notes on everything I did so that someone else needing to do this will find this helpful and won’t have to struggle with it as much as I did.

I have to admit I am pretty green when it comes to using command line and installing open source code on my computer. I have learned a lot though and I really enjoy it. I have found that the Mac is a great open source programming environment. Many programmers are figuring this out, and I believe you will continue to see more programmers coming to the Mac platform.

Anyway, these instructions, as straightforward as they are, still assume you know the basics of how to install and run open source code on your computer. If you don’t, you need to go read more and then come back here. Now, let’s begin.

The first thing you need to do is download the packages you will need. Here is the commands you will use for the most current versions of these packages as of this posting.

curl -O http://www.zlib.net/zlib-1.2.3.tar.gz
curl -O http://superb-east.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.20.tar.gz
curl -O ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz
curl -O http://www.libgd.org/releases/gd-2.0.35.tar.gz

Download these packages to a directory on your hard drive. The next thing you need to do is unpack these directories. Running this command will unpack all the directories you just downloaded.

ls *gz | xargs -n 1 tar zxvf

First, we will install zlib by running the commands below.

cd zlib-1.2.3
./configure --shared
make
sudo make install

Next, install libpng by running the commands below.

cd ../libpng-1.2.20
cp scripts/makefile.darwin Makefile

Open up Makefile in your favorite text editor and edit the file to read as follows.

# Where the zlib library and include files are located
ZLIBLIB=/usr/local/lib
ZLIBINC=/usr/local/include
#ZLIBLIB=../zlib
#ZLIBINC=../zlib

Then finish the install.

make
sudo make install

Test this by running the following code.

export srcdir=.
./test-pngtest.sh

Next install libjpeg.

cd ../jpeg-6b/
ln -s `which glibtool` ./libtool
export MACOSX_DEPLOYMENT_TARGET=10.4
./configure --enable-shared
make
sudo make install

Now install freetype2.

cd ../freetype-2.3.5

Open include/freetype/config/ftoption.h in your favorite editor and uncomment line 461 to read as follows.

#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER

Then complete the install.

./configure
make
sudo make install

Finally install GD.

cd ../gd-2.0.35
ln -s `which glibtool` ./libtool
./configure

The report looked like this when I did it.

Support for PNG library: yes
Support for JPEG library: yes
Support for Freetype 2.x library: yes
Support for Fontconfig library: no
Support for Xpm library: no
Support for pthreads: yes

Then finish the install.

make
sudo make install

You can test it with the following code.

./gdtest test/gdtest.png
open test/*.jpg

To add support for Fontconfig, run this command.

export GDFONTPATH=$HOME/Library/Fonts:/Library/Fonts:/System/Library/Fonts

To complete the installation, you need to recomple PHP with all the libraries you just installed. Here is how I did it.

./configure \
--with-zlib-dir=/usr/local/lib \
--with-jpeg-dir=/usr/local/lib \
--with-png-dir=/usr/local/lib \
--with-gd \
--with-mysql=/usr/local/mysql \
--with-apxs

make
sudo make install

Now you should have PHP with GDLIB installed. That’s it. You’re done! Now, on to your next project!


Recent Site Launches - 10/5/07

We have launched several sites this year that I worked on. I didn’t design these, but I built all of them. I haven’t been linking to any of them or added any of them to my portfolio yet. I’m sure will get around to updating my portfolio again soon. Hopefully. Anyway, check them out and leave feedback if you are so inclined.

  1. Blount Chamber
  2. Blount EDB
  3. East Tennessee Graphics
  4. NTRCI
  5. SC Capital
  6. East Tennessee Economic Development Agency
  7. Wagner, Myers & Sanger
  8. Hallsdale Powell Utility District
  9. Gatlinburg Dept. of Tourism

Update: I moved this to a permanent page here. You can now go there to see the running list of site launches.


« Previous Entries | Next Entries »

Most Popular Posts

Pages

Links

Twitter Updates

  • Sometimes the end justifies the mean. 8 hrs ago
  • @matt97 Saw it in front of Quantum of Solace this weekend. Also, the new Watchmen trailer is amazing. 3 days ago
  • Bailing out the auto industry will probably help as much as bailing out the financial industry, which is to say not at all. Let's not do it. 3 days ago
  • More updates...

Profiles