A Single Article

Read it, comment, and share it with your friends

Success: photoblog integration

Posted February 18 in Design.

I successfully managed to integrate an external photoblog with this site. It’s like using Flickr, only better. Here’s why:

  • I prefer hosting all my content on my own server. I don’t like going to joeshmoe.com and waiting for content to load from Flickr, Del.icio.us, Google Analytics, etc. etc. Wherever I can use a self-hosted alternative, I’ll do it.
  • I can host a lot of pictures without ever having to pay anything.
  • My photoblog is not as slow as a Flickr photostream.
  • As long as this site is working, my photoblog is working too.
  • I’m officially a photoblogger.

The actual implementation wasn’t simple, but definitely worth the trouble. The setup goes something like this:

  1. I set up a photoblog at photos.christianmontoya.com. It uses Wordpress 2.0 (which has a pretty bad interface, unfortunately). I modified this site’s template to work there, and it wasn’t too hard to integrate. I also had to hack the Wordpress functions to create 200 by 150 pixel thumbnails… nevermind that this used to be the default in Wordpress 1.5. I still heart Wordpress though.
  2. I modified the display of posts so that it would just output thumbnails. Just a couple ereg_replace lines, no big deal. The way the entries work is that the full image is posted in the actual post content and the thumbnail is posted in the excerpt. The categories are then used to organize the pictures into “galleries.”
  3. I modified the RSS feed output to display excerpts with links in the RSS “description” tag… this was also difficult.
  4. The next step was to find a “display-RSS-feed” plugin that would return HTML and actually allow me to modify it easily. I tried a few that were total garbage, in that they either didn’t work or wouldn’t output HTML, but then I found RSS Import and my problems were solved. I heart RSS Import.
  5. The last and final thing to do was simply to modify the code of the RSS Import plugin so that it would output the content, and only the content (called “description” in RSS). This wasn’t hard at all, though I do have a hacked plugin now that’s useless for anything else.

In the end I have a photoblog of my own plus a photostream, and there’s no waiting for slow external servers to handle the requests. I’m happy with the whole thing and when I am done with all the details I’ll probably put the package together and offer it to the Wordpress community under a Creative Commons license. Until then, watch this space for details.


Get a Trackback link

3 Comments

Responses to my article
  1. Albert February 20, 2006

    Two thumbs up for self-hosted content. =) I completely agree with your policy of owning every served-up bit yourself. Too bad my photos.pm crashed and burned due to coding bugs. Another day, another day…

  2. karmatosed February 21, 2006

    Yep, nice integration again. However, personally I toyed with this idea and came up on the flickr option. For me I really liked the community, but your opinions are valid - just proves that everyone has their own preference.

  3. C Montoya February 21, 2006

    Yep, I’m missing out on the Flickr community but I get to be in the photoblogger community… one for the other I guess. What’s really important to me is that Flickr only shows your latest 200 photos, and has a limit to how much you can upload per month for free accounts… with my own photoblog I don’t have the first restriction and technically don’t have the second either :)

Leave a comment

Share your thoughts with the world

You can use Markdown, or you can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Please keep comments respectful and on topic.

This form is guarded by Akismet, so don't waste your time trying to submit spam. It won't work. Ever.





Stay on top of new updates at this site: Subscribe to the Feed!