Matt's Blog

Archive for May, 2007

DisAllow Indexing for “Random Post” Links

Thursday, May 31st, 2007

For those of you who use Matt Mullenweg‘s Random Redirect Plugin, this post will be useful for you.

If you’re not familiar with the Plugin, it will redirect you to a random post when you visit /?random.

I was searching Google with the top search terms to my Blog, and I noticed that for one of them, Google had the URL of the result as http://mattsblog.ca/
?random
. Which isn’t exactly going to be helpful, since the person who clicks on that result is probably not going to get the same Post that Google had gotten when they crawled the page.

So, how do you prevent this from happening? Simple, you tell bots not to index /?random. You can just add this to your robots.txt file:

User-Agent: *
Disallow: /?random

That’ll tell all the Bots that crawl your site (or, at least, the ones that follow the robots.txt standard) not to index /?random. Or, if you don’t want to do that, you can just add the following to your link for the Random Redirect:

rel="nofollow"

Now, hopefully those links to http://mattsblog.ca/?random will disappear out of search engines fairly quickly. :D

Oh, and by the way, you can get a Random Post by clicking here.

Displaying Your Top 10 Posts

Sunday, May 27th, 2007

If you use WordPress, you have probably wondered if you can display your Top 10 Most Popular Posts before. Well, you can do just that by installing a Plugin that will record the number of hits an Article has. Then, uploading a simple PHP file that you can download for free.

The Plugin is WP-PostViews. The Plugin is free and is released under the GNU General Public License. So, simply install that Plugin by downloading it, extracting it and uploading it to /wp-content/plugins/.

Now this is where my script comes in. Okay, it isn’t totally my script. It’s a modified version of the Script BlueFur released for this same purpose. Except, I cleaned it up a bit and made it so it used WordPress functions, so it’s more “WP-Friendly” you could say. So, you can download my script here. The script is licensed under the GNU General Public License. Now, all you have to do is download that file (or copy and paste it into a new file) and name it something like topposts.php, or anything really, as long as it ends in .php, and not .txt. You may need to change the following lines, depending on where your WordPress installation is installed and where you put the script:

require_once('wp-config.php');
require_once('wp-includes/wp-db.php');

Then, upload the script. If you don’t want it to be a Top 10, you can change the value of $limit to something like 5 to have a Top 5.

You can see my Top 10 Posts here.

Get it? Got it? Good.

Enjoy. :D

Feed Icon

Sunday, May 27th, 2007

Feed IconThe Feed icon seen in Internet Explorer and FireFox is pretty much the standard Feed Icon now-a-days. It is an internationally-known icon to represent a Feed. The great thing about it is, it doesn’t just represent one kind of Feed Protocol, it represents the idea of a Feed in general. It is also less confusing to less-technical users than text or icons that say things like “XML”, “RSS” and “ATOM”.

But, where can you get a large copy of this image? Sure, you could do a screenshot of the icon in your browser, but what if you want a bigger version of the icon (like the one in my Sidebar)? Well, FeedIcons.Com provides the Icon in multiple formats. These formats include Al, EPS, SVG, PSD, PDF, PNG, JPG and GIF. So, you can edit and resize the image to your liking.

Mozilla originally made the icon for FireFox. Later, Microsoft decided to use the icon in Internet Explorer and Outlook. It was then pretty much considered the standard Feed Icon. The icon is free for you to do whatever you like with it. Mozilla does have some guidelines for it, but they aren’t legally binding.

By the way, you can subscribe to my Feed here.

1234Pens and FutureShop

Tuesday, May 22nd, 2007

You’re probably wondering about the title, what do 1234Pens and FutureShop have in common? One does promotional pens, one sells electronics. No connection, right? Wrong.

You ever notice how some websites look like one another? Well, I went to 1234Pens’ site today (for no particular reason, I was just bored), and I noticed that I had seen that layout before. It’s the exact same as FutureShop’s. There’s a few size differences between the layouts, but otherwise they’re the same.

The code isn’t the same though. So, what reasons are there? Same designer? Not likely. 1234Pens ripped of FutureShop’s design? Well, that’s certainly the most likely reason. It’s okay to take an idea or two from a site, but not the whole design, and not the colours and what makes the design the design, or what makes the site the site. Can’t people come up with their own designs anymore?

1234Pens
FutureShop

WordPress 2.2 Released

Saturday, May 19th, 2007

WordPress 2.2 has been released! WP2.2 includes some sweet new features, such as Widgets.

I know, I know, this is old news… But I usually post about WP releases after I upgrade to them. I’ll be upgrading to 2.2 when I make a new Theme for this blog. Or, I might just improve some things on this theme… We’ll see.┬áThen, I’ll be rethinking all of the categories, renaming them, adding some, removing some, etc. Then, I’ll be going through all the posts and putting them in the proper categories.

So, go upgrade to WP2.2. :P