Some simple changes I've made to Pixelpost

August 31, 2006

The two things I cover below are only a very small part of the changes I've made to Pixelpost, the application I use to power my photoblog, but I figured I'd go ahead and write them out as I've received a few e-mails asking for help regarding them.

Prettifying the URI structure

Pixelpost's URIs are ugly. Take this address for example, which links to a photo of mine:

http://justinblanton.com/photos/index.php?showimage=44

While not entirely unintelligible, it certainly isn't pretty. I wanted something simpler. Something like this:

http://justinblanton.com/photos/44

It's actually pretty easy to get this sort of structure using htaccess rules, a process I've discussed quite extensively on this site over the years.

The first thing you are going to want to do is edit your .htaccess file, which you'll need to create if it doesn't already exist. Place it in the same directory as Pixelpost's index.php file. Add the following to it:

RewriteEngine on
RewriteRule ^gallery index.php?x=browse
RewriteRule ^([0-9]+)$ index.php?showimage=$1

As you'll notice, I only concern myself here with the individual picture pages and the thumbnailed archives page (which I just happen to call "gallery"). I don't account for comments, categories, ratings, or any other such thing here, because I don't use them on my site (I currently use a pop-up for comments so the URI structure is somewhat moot regarding them; see below). However, it should be fairly simple to recreate those rules by looking at the relevant URI and the rules I've shown above. Actually, some things might not be so straighforward, like when the URI uses two or more variables. If I ever start to use any of these I'll definitely work out the htaccess rules to simplify them and will write about how I did it here. If you've a specific question, please feel free to e-mail me.

After making those changes, you need to make another small change to the index.php file. Around line 85, you're going to want to change this line:

$showprefix = "./index.php?showimage=";

To this:

$showprefix = "./";

Further changes

If you want these modifications to be site-wide, you're going to have to make some other small changes to the index.php file. For example, to get your RSS feed to link to your posts using the new URI structure, you'll need to modify the link element of the feed.

Similarly, if you use a pop-up for comments, you'll want to change the <COMMENT_POPUP> tag to correspond to the new structure (somewhere around line 920). If you don't do this, then when someone hits the comment button, comments, and then closes the comment window, the address in the address bar, which they likely didn't take notice of to begin with, will be overwritten with the old URI structure. So, if they choose to link someone to the image, they'll link using the ugly structure. The end of the world? Of course not, but I like to be consistent.

Putting HTML back into the RSS feed

I'm not quite sure why, but Pixelpost removes all traces of HTML from the RSS feed. This was unacceptable as I link a lot and hated the fact that if someone wanted to follow the link they'd have to go to the image's page and click on the "info+comments" link where they could then click on the link they wanted. Nevermind the fact that they likely wouldn't know it was a link in the first place.

In any event, the fix is about as simple as they come. All you need to do is comment out a single line, somewhere around line 800:

$body = strip_tags( $body );

That's it. The feed should still validate just fine.

Animated tiger projected from moving car

August 29, 2006

Animated tiger projected from moving car. "At night projections from moving cars are shone on the buildings downtown. Each car projects a video of a wild animal. The animal's movements are programmed to correspond to the speed of the car: as the car moves, the animal runs along it speeding up and slowing down with the car, as the car stops, the animal stops also." There's a neat video of it in action.

Some general stats

August 29, 2006

I really like seeing this sort of thing on other people's sites and given that I've been asked about some of this stuff before I thought I'd post a few statistics here. The images below are from my Mint installation, which I've written about before.

Platform stats
Browser stats
Resolution stats

I'm so close

August 27, 2006

I think I'm about two heartbeats away from buying a Mac Pro. Anyone out there want to try and convince me I shouldn't?

The photoblog is up and running

August 25, 2006

Well, I've finally launched the photoblog and couldn't feel more relieved. Now I can get to posting pictures again instead of worrying about how I'm going to post them.

If you build it, they will come

As I briefly mentioned here, one of the main reasons I wanted to integrate the photoblog into my CMS was so that all of my weblog readers would be "forced" to see my photos too (something I've kind of been doing here for a while). However, because I've decided to use a completely separate system (and won't splice the feeds together), I have to ask you guys to follow me over there. So, if you're at all interested (and you better be!), please add the photoblog to your aggregator (see below).

Feed address

http://justinblanton.com/photos/syndicate

Rather receive updates through e-mail? I've got you covered.



Navigating the photoblog

Surprise, it's not complicated. As you can see, the site design is very similar to my current weblog design. It's very uncluttered and simple -- the photo is the focus. So, like most photoblogs, you'll notice that clicking on a photo takes you to the previous photo and that hovering over the current image gives you the title of the photo and a cue to click to get to the previous photo.

The "gallery" is simply a thumbnail archive of all the pictures.

If you'd like to see what I've said, if anything, about a particular photo (e.g., where it was shot, how it was processed, etc.), you'll want to click the "comments" link. This will give you a pop-up that includes both my thoughts on the picture and those of others who have viewed it. You read that right, I'm allowing comments on the photos (for the time being). So, by all means, share with me your thoughts.

Some things are still in flux

As mentioned above, I'm not sure how long the comments are going to last; as soon as they become more trouble than they're worth (e.g., spam, immature rants, volume, etc.), I'll likely disable them (as I've done on this weblog).

I'm thinking very seriously about changing the hover text so that instead of telling you just the photo's name, it would also show you whatever I've said about the image (as it stands now, you can see that information only when you click on the "comments" link for each each picture).

There's a good chance I'll eventually implement some JavaScript to kind of divide each photo in half so that the left side takes you to the previous photo and the right side takes you to the next photo.

There are a few other things that need to be fleshed out more fully, but they could very well become non-issues depending on the amount of traffic I eventually get. We'll see how it goes.

Have a look around and please let me know what you think. As usual, I'll likely write something up discussing the hacks I made to Pixelpost and why I made them, but I wouldn't expect this any time soon.

Yet another post about the photoblog

August 24, 2006

As I've discussed here a lot lately, I've been on the cusp of debuting a photoblog for a while now and am glad to say that the wait is almost over. After determining what would be needed to integrate (but still keep separate) such a thing within my current CMS and coming up with a process to get thumbnails how I wanted them, I still wasn't convinced that that was the way to go and have really been struggling with which route to take.

I've since decided that a separate "container" for the photos is really the only appropriate way to do this thing right and so I'm going use Pixelpost for the job. I've made this decision many times in the last few days only to second-guess myself at the last second, but this time it's final -- I'm launching the site tomorrow. It's funny, after all the consternation and time spent thinking about this, it seems so obvious to me as I write this post that using a separate system is the only way to go.

I know some of you couldn't care less about this debate I've been having with myself, but it's hard for me to move forward on something like this unless I know there is an escape route for the future. While I'm still a bit iffy about using Pixelpost, and will probably lose sleep thinking about how five years from now I might be struggling with a way to export the then no-longer-updated Pixelpost data into something else, I've decided to throw caution to the wind and run with it. I figure Pixelpost is the most popular photoblog software in the world and so someone1 will probably work out a way to export it into other things if and when such time comes that it's no longer maintained (even if that someone is me :).

It's all in my head

I apologize to those who wrote in (quite a few of you actually) asking me to do a full write-up on the integrated-into-WordPress solution I worked out. Though I've decided not to go in that direction, I have the whole thing mapped out in my head and am perfectly willing to help you out if you think you might want to give it a try. Hell, I may even write the whole thing out here anyway. We'll see. In any event, don't hesitate to send over questions if you have them.


  1. Indeed, as I mentioned about a month ago, the upcoming pixyBlog software will allow you to import from Pixelpost.   

Peppering Mint and filtering referrers

August 23, 2006

Lately I've had quite a few people ask me what Peppers I currently use with Mint and so I thought I'd rattle those off fairly quickly here.

Filtering images.google.* referrers

In my initial post about Mint I wrote the following:

There is no way to filter the RSS feed. In other words, there is no way to remove from it things that come up often, but in slightly different contexts (e.g., I get a ton of referrals from Google Images which I couldn't care less about). Yes, I know of the Referrer Filter Pepper, but it only filters the page view pane, not the RSS feed.

It turns out that this can be resolved rather easily by specifying, in the referrers section of the preferences page, those addresses you want Mint to ignore. The language above the text box is a little confusing and might make you think that the addresses added won't be filtered out of the RSS feed ("Don't show referrals from the following domains in the Newest Unique Referrers tab..."), but I can assure you they are.

Unfortunately, this filtering system doesn't support wildcards (e.g., images.google.*) and so you have to add each and every address you want to filter (e.g., images.google.cg, images.google.com.hk, etc.). Lucky for you, I've been generating a list of all the Google Images domains for quite a while now and am making this list available for download so that you don't have to do the same.

Simply copy/paste my list into the text box in the referrers section of the preferences page and click "Done." That's it. If you come across some domains that aren't in the list, please e-mail them to me.

Something tells me that Shaun will create an "on/off" option in future builds to control the referrers from Google Images (it's the only thing I filter for and I know a lot of other people are in the same boat; perhaps even Shaun), but until then, this method works like a charm.

Back in black

August 20, 2006

I'm back from the cruise and probably as tan as I've been since high school (when I was on a lake every day wakeboarding and whatnot). Still debating whether I want to do a full-length write-up on the experience or just get to all the tech stuff I want to talk about.

Just in case I don't get around to doing a longer post about the trip, I'm going to try to quickly and nonsensically rifle through some of the 'highlights' without too much thought.

  • Itinerary: left out of Ft. Lauderdale, then headed to Princess Cays in the Bahamas, Ocho Rios in Jamaica, Grand Cayman in the Cayman Islands, and Cozumel in Mexico.
  • While I had a great time and would probably do it again, it all felt a bit rushed when hopping from country to country.
  • I ate like a king and couldn't stop myself. It was kind of ridiculous. As ever, I didn't gain a pound.
  • Some of the ship activities were a bit too froufrou and snooty for my liking.
  • I feel somewhat heretical saying this, but I didn't miss the Internet as much as I thought I would, though once I stepped off the boat I was painfully thirsty for my data drip.
  • Airline officials can ask an entire plane full of people, with a straight face, for two volunteers to take a different flight because their collective body weight puts us over FAA regulations, and then expect us to feel comfortable at 35,000 feet knowing that rain water might be enough to bump us over the limit. I should note that this took over two hours to figure out. Yep, we sat on the tarmac for two hours while they debated whether the plane could keep us in the air. I'm telling you, the Flying Spaghetti Monster hates me.
  • Cruise lines don't employ funny comedians. I could have run circles around any of them. It was literally painful to watch.
  • Cruise lines do employ great jugglers.
  • Alcoholic drinks weren't as expensive as I had expected, and, ironically, I drank much less than I thought I would.
  • Due to the latest terrorist scare, if you buy a bottled beverage in an airport you now "surrender the cap at the time of purchase," lest you could pour out your orange juice and fill the bottle with the liquid you're currently somehow carrying without a bottle and which you already got past security. What a joke. Who's up for flying naked and buying new clothes on the other end? I'm afraid that's where all of this is headed.
  • I refuted my girlfriend's oft-made assertion that I'm a pessimist by stating that I'm a realist. She still didn't buy it, so I told her I'd meet her in the middle and dubbed myself a pessimistic realist.
  • There were 3700 passengers on our ship and the crew numbered over 1200. The massiveness of everything related to the ship cannot be overemphasized and I think I may write up a separate post wherein I discuss all the ship statistics I gathered over the week.
  • Every other person in Jamaica thought I was a drug addict and offered me everything under the sun. If they didn't think I was a drug addict they thought I needed a taxi. It was absolutely insane and all of the badgering and harassment actually made most of our time on the island pretty stressful.
  • I planned to get though the audiobooks of Charlie Wilson's War and Freakonomics, but it never happened; there was just too much to do on the ship and at the ports.
  • I didn't take as many pictures as I would have liked, but I think I got some pretty good stuff and can't wait to get it up here.
  • Everything everywhere was a bit too Americanized.
  • The stateroom stewards are magicians.
  • A homeless guy in Jamaica asked me to take his picture. I did, and gave him $5. He then spent the next five minutes digging through a plastic bag and eventually asked me to write his address down on a piece of paper so that I could send him guitar strings or something. The address as he gave it to me: Johnny Cool, Post Office, Ocho Rios, Jamaica.
  • It didn't matter how many times I went up and down the stairs of the "fiesta boat" I was on, as soon as I got near the top of the stairs the man selling t-shirts (who I passed at least 20 times) would simply say, "What size and how many?" He almost had me on his 33rd effort, but I just couldn't convince myself that I needed an "official" t-shirt to remind me of the boat.
  • I was probably in a bathing suit more than any other person on the ship.
  • Internet access on the ship worked great, but at $22/hr it was out of my anyone in their right mind's budget. It's almost laughable that they can get away with charging so much. I don't get it.
  • After going through the 9000+ posts that had built up in my aggregator over the last week+, I realized that I really didn't miss anything.
  • I learned that a lot serious art is sold on cruises (more than 300,000 pieces last year!). Went to a few art auctions and really enjoyed them, even though I had no intention of actually buying anything. OK, so the free champagne roped me into the first one, but I went to the others because I enjoyed them.
  • Despite the fact that I was on a cruise and having a good time, I still found it hard to relax. It's my lot in life I suppose.
  • It makes little difference where in the Caribbean you go -- the water is going to be beautiful and clear regardless.
  • Some people responded to the totally non-personal auto-response I setup for my e-mail as if I was writing them personally (even though the message clearly stated I was on a ship in the Caribbean).

Well, that ended up being longer than I would have liked. Anyway, if the longer post never comes, I'll try to give a few more details of the trip as they coincide with some of the shots I'll eventually post here.