2010 Ames, IA Flood Map

David Runneals put together a nice map with lots of info about the flooding in Ames, IA.

I managed to take quite a few photos around Ames and Nevada, you can find them in this set on Flickr. There are currently four panoramas that do a pretty good job of showing how much water there was on the East side of Ames.

The Ames Tribune has a PDF with some really cool aerial shots, it’s worth checking out.

How To: WordPress 3.0 Multi-site Blog Directory

I’ve been using this WordPress page template lately for creating a directory page. The directory page lists every blog on a WordPress 3.0 multi-site setup and includes the author name, author bio, number of posts, last updated time, and gravatar. One thing it DOES NOT include is recent posts. I will get around to adding that in a few weeks. It also lists the 5 most recent posts for each blog.

I like using the 1kb css grid system for laying pages out, so you can see what I use for css in the zip file. If you want to roll with that setup, you can just copy and paste the contents of css.css into the style.css file for your theme. And move sign.png into the images/ folder for your theme. You’ll also want to do something with the blog-directory.php file.

blog-directory.php is a custom page template for Twenty Ten. If you’re using the Twenty Ten theme, you can just drop blog-directory.php into the “twentyten” theme folder and be done. If you’re using another theme you’ll need to open blog-directory.php and copy everything between <!– start blog directory –> and <!– end blog directory –> and paste it into a custom template for your theme.

If you’re not familiar with custom page templates in WordPress, you can read about them here.

Download blog-directory.zip

How To: Make Ubuntu Recognize All Drives During Install

Ubuntu 10.04 Install Missing Hard DriveWhen Ubuntu 9.10 Karmic Koala came out, I did an upgrade on one of my machines instead of doing a fresh install. I decided it was time to do a fresh install after Ubuntu 10.04 Lucid Lynx came out.

I backed up all of my important files and some configuration files to a second drive, /dev/sdb. My previous Ubuntu install was installed on /dev/sda1 and I used the sdb drive for photos and videos.

When the installation got to the point of configuring partitions, I was a little bummed to see that my first drive, /dev/sda, wasn’t included in the list of drives and partitions. This machine needed a fresh install badly, so I posted on the Ubuntu Forums to see if anyone knew of a fix.

After a few days of no replies, gregmo posted and offered a solution. He suggested running the command below while running the live cd, prior to installing. This removes dmraid from the system running off the live cd.

sudo apt-get remove dmraid

After removing the dmraid package, I fired up the installer and was able to install to /dev/sda1 just fine. For some reason, removing the dmraid package allowed the partition manager to see /dev/sda.

Twitter: Embed Tweets in Your Blog or Website

Today I discovered Blackbird Pie, by way of a post on Noscope.

Blackbird Pie is a tool provided by the Twitter Media team that allows you to embed tweets directly in your blog posts or any website really. Here’s a good description of Blackbird Pie from a post at media.twitter.com:

The origin of the script is both self- and user-centered. Mostly, we just think it’s a pain to take screen grabs of tweets. But of course we also think it’s a much better user experience to have @-mentions, hashtags and the account itself all linked and clickable.


This is my 6000th tweet. Oh, and Blackbird Pie (http://bit.ly/9WG6vd) is cool!less than a minute ago via CoTweet


The tweet above is an example of what Blackbird Pie does, definately much better than having to take a screenshot and post the tweet that way. All you have to do is provide the URL to the tweet and Blackbird Pie will spit out code for you to post in your blog or website. Now you can actually link directly to the tweet and the tweets author, and have the tweets content visible to search engines, something not possible with screenshots alone. Hashtags and @ mentions are also linked.

It’s a neat tool, sure to be of use to folks who like to embed tweets in their site. Blackbird Pie is a way better option for embedding tweets compared to simply taking screenshots of tweets.

How To: Build a Tag Cloud with PHP, MySQL, and CSS

Tag clouds are everywhere. They are a popular way to show the weight (read: popularity) of tags, categories, or any words really. I needed to build a tag cloud for a project at work to display categories and show how many questions were contained inside each category. Categories with more questions would need a larger font, and categories with fewer questions would need smaller fonts. I came across this post from Steve Thomas titled How to make a tag cloud in PHP, MySQL and CSS.

Steve’s code is exactly what I was looking for. I made a few modifications to his code and wrapped it all into a custom PHP function, which you can see below.

Download The Code

The function returns an array that contains each category name, the CSS class that should be applied to the given category, and the category ID for linking to the page showing only questions in that category.

<?php
function tagCloud($maximum=0) {
	$cats = array(); // create empty array

	$query = mysql_query("SELECT categories.catDesc, categories.catId, COUNT( questions.id ) AS totalQuestions FROM questions, categories WHERE questions.categoryId = categories.catId GROUP BY categories.catId;");
	while ($row = mysql_fetch_array($query)) {
		$cat = $row['catDesc'];
		$counter = $row['totalQuestions'];
		$catid = $row['catID'];

		// update $maximum if this term is more popular than the previous terms
		if ($counter> $maximum) $maximum = $counter;

		$percent = floor(($counter / $maximum) * 100);
		if ($percent <20) {
			$class = 'smallest';
		}
		elseif ($percent>= 20 and $percent <40) {
			$class = 'small';
		}
		elseif ($percent>= 40 and $percent <60) {
			$class = 'medium';
		}
		elseif ($percent>= 60 and $percent <80) {
			$class = 'large';
		}
		else {
			$class = 'largest';
		}
		$cats[] = array('term' => $cat, 'class' => $class, 'catid' => $catid);

	}
	return $cats;
}
?>

You’ll also need some CSS to style your tag cloud. This CSS is pretty much identical to what Steve published, I only made some minor changes to font sizes.

#tagcloud {
    width: 300px;
    background:#FFFFCC;
    color:#0066FF;
    padding: 10px;
    border: 1px solid #FFE7B6;
    text-align:center;
}

#tagcloud a:link, #tagcloud a:visited {
    text-decoration:none;
}

#tagcloud a:hover, #tagcloud a:active {
    text-decoration: underline;
    color: #000;
}

#tagcloud span {
    padding: 4px;
}

.smallest {
    font-size: 10px;
}

.small {
    font-size: 12px;
}

.medium {
    font-size:14px;
}

.large {
    font-size:16px;
}

.largest {
    font-size:18px;
}

To use the function, do something like this:

<div id="tagcloud">
<?php
$tagCloud = tagCloud();
foreach ($tagCloud as $t) {
	$cat = $t['term'];
	$class = $t['class'];
	$catid = $t['catid'];
	print "<a href=\"category.php?id=$catid\">$cat</a>";
}
?>
</div>

I am still testing this code, but so far it seems to do exactly what I need it to do. If you experience trouble with the code or if it doesn’t act as expected, please let me know in the comments. If you’ve got ideas on how to improve the function, I’d love to hear your thoughts as well!

WordPress 2.9.2

WordPress 2.9.2 was released earlier today. You can download it here. This fixes a problem that allows users that are logged in to view trash posts authored by other users.

Thomas Mackenzie alerted us to a problem where logged in users can peek at trashed posts belonging to other authors. If you have untrusted users signed up on your blog and sensitive posts in the trash, you should upgrade to 2.9.2. As always, you can visit the Tools->Upgrade menu to upgrade.

Thomas Mackenzie goes into much greater detail about the problem on his site. Check his site out for more info on why the 2.9.2 release was necessary.



Phoenix SEO - search engine optimization - SEO Company India - Quick Diets
Hawaii Interior Design - Compare The Market - Security Gates
Phoenix Internet Marketing - Miami Web Design - Web Design - SEO India - Scrap Gold
Industrial and Commercial Roofing - Steel Beam London and RSJ Beams - SEO Services