views:

954

answers:

6

I have a friend who is need of a web page. He does interior construction, and would like to have a gallery of his work. I'll probably go for a php host, and was thinking about the best way to implement the image gallery for him. I came up with:

  • Use flickr to host the images. They can be tagged, added to sets, and I can use both the tag and set information to display "categories" for the gallery, as well as browsing. Flickr also has multi-upload tools so that a 20 photo job won't be a PITA to upload.
  • How to best get at the api? Is there a good PHP library for flickr integration? Should I roll my own?
  • API key - is this considered a commercial project? The web page is for his business, and he will be paying me to create the site...
  • Is flickr the wrong tool for the job? It seems like a pretty good solution in my head, but is there something I'm missing? I haven't used their APIs at all.

Thanks for any input!

+3  A: 

It sounds like a difficult way to do things - have you considered Gallery (No points on creativity for the name!).

Unless you're really wanting to save on bandwidth, I think you'd get much better results from installing some pre-built gallery.

Greg
A: 

If you have any interest in Ruby on Rails, there is a screencast here that shows how to create a site similar to what you are describing in RoR.

Jason Miesionczek
The prohibitive factor for me there will be the fact that I have never used ruby.
Chris Marasti-Georg
+3  A: 

The perfect solution for this kind of thing is Picasa (from Google ofcourse)

You get:

  • 1gb of free storage space on a Google Picasaweb account that already has a web interface with embeddable slideshows and stuff
  • A compete image browse and upoad program for the client side (namely Picasa) that's directly connected to the web albums. It's so user friendly that even your grandma can put her pictures online with that.
  • RSS feeds and an API from google.
  • there's a custom light-weight PHP api available

Need anyting else?


Note from Chris to others that may be looking for an answer: The API can be found here.

SchizoDuckie
picasa's client works awesome, i bet the web works just as well if its that popular. And you get a gig for free.... sweet!
Miles
What benefits does it have over flickr? I checked out the API and it looks very similar. Are there any php libraries to ease integration? I don't want to send visitors to picasaweb to view the images.
Chris Marasti-Georg
One other question - last I used Picasa (client), you couldn't tag photos. Has this changed?
Chris Marasti-Georg
You can both tag photos and add descriptions. Also, you do not have to send the user to picasaweb, just use the RSS feed to fetch the image URLS.
SchizoDuckie
http://cameronhinkle.com/blog/id/3696159074811309536 <-- php api here
SchizoDuckie
Cool, thanks, I'll look into it. I will have to check out the client again - last time I used it, it wasn't great with keeping local + web album in sync.
Chris Marasti-Georg
+1  A: 

I recently implemented a Flickr-based photo gallery for a client. Flickr was perfect for them for a lot of reasons. Gallery is an impressive open-source project, but its feature set (and complexity of administration) was overkill for what this client needed.

Check out the Flickr API, especially the section on building URLs, which will be necessary when building your web pages. Don't bother coding a PHP wrapper for the API's. phpFlickr has already done it, and it's a smart implementation.

Here's a helper function I wrote that made life a lot easier for the various pages that need to access Flicker:

function newFlickr()
{

     static $flickr = NULL;


     if($flickr != NULL)
     {
         return $flickr;
     }

     $flickr = new phpFlickr(api-key, secret);
     $flickr->setToken(token);
     $flickr->enableCache("db", "mysql://acct:pass@localhost/flickrcache");

     return $flickr;

}

The trick here is that all the crud you need to enter is stored in a central place in your code. Caching is key, so use it. And, if you need a phpFlickr object in multiple places for each request, you're only ctor'ing it once, which saves on init time.

Jim Nelson
+1  A: 

Having Read SchizoDuckie's post, I had a look at the picasa api for php, and found it a bit daunting to start with, however I found this sample code absolutely brilliant for getting started with some basic integration.

Samples for other languages also seem to be available - can't vouch for their usefullness, but suspect they will be good too.

Rob Y
+1  A: 

These might be of help. They are mootools scripts and run without any server-side coding necessary. Both integrate with Flickr.

VirtuosiMedia