July 27, 2009 | Posted in Freebies, PHP
There are already a couple PHP Flickr API classes out there, but they all seemed a bit over-complicated. Flickr has already done all the work for us, so why make it harder than it is. They've even got all the documentation, so if you ever need to know anything about it, just head over there.
Download Class
This class makes making a request to Flickr's API very simple. And it returns the results as a PHP object. It will even cache your requests so you aren't hitting Flickr as often, thus increasing the speed and performance of this script.
<?php
$api_key = 'your_flickr_api_key_here';
$flickr = new Flickr($api_key);
$params = array
(
'user_id' => 'your_flickr_user_nsid_here',
'extras' => 'url_m,url_sq',
'per_page' => 10,
);
$result = $flickr->call('people.getPublicPhotos', $params);
foreach ($result->photos->photo as $photo)
{
$p = $flickr->call('photos.getInfo', array('photo_id' => $photo->id));
echo '<h2>'.$photo->title.'</h2>';
echo '<a href="'.$photo->url_m.'"><img src="'.$photo->url_sq.'" alt="" /></a>';
echo nl2br($p->photo->description->_content);
}
// Example using chaining
$result = Flickr::factory($api_key)->call('people.getPublicPhotos', $params);
For a live demo, just check out my sidebar over on the right.
July 22, 2009 | Posted in CSS, Freebies, PHP
So I've been noticing quite a few articles lately about speeding up your website, and compressing static files and all that. It got me thinking, and I started to mess around with some ideas I had.
Now I know there are a lot of CSS compressors on the web today, but most of them involve copying and pasting your code into a textarea, and it giving you a compressed version that you have to upload to your server and reference in your HTML document. But what if you have 4 or 5 different style sheets that you are going to be editing quite a bit, and don't want to bother having to merge your code and compress it all the time.
June 23, 2009 | Posted in PHP
PHP Menu Builder is a new class I just finished that allows you to easily build out a navigational menu. It outputs as an unordered list, and allows for as many levels as you want.
You can add any HTML attributes to the main list, and sub-levels and active items are given classes according to their place in the list.
View Demo & Documentation
May 22, 2009 | Posted in Freebies

Here are some t-shirt templates that I created and have been using for display mock-ups and products on websites. They are all 300 dpi and about 2000 pixels square.
May 20, 2009 | Posted in Freebies, Graphic Design
I made these fonts probably about a year ago, and they were the first time I ever experimented with creating a font. They've been available since then on dafont.com (as well as many others), but I just want to share them on my blog now.

