YouTube Integration if anyone interested

Hi All,
I managed to integrate Youtube feeds into Zenphoto.
Have a look at my site
http://www.scgfc.com.au/zenphoto/zenphoto/

I used the Youtube API's together with a small amount of code to do this.
It is based off the default theme.
Download from http://www.scgfc.com.au/zenphoto/zenphoto/themes/youtube2.rar

Once the theme is installed all you need to do is add a Gallery Title to the array in the config file (example below) and that gallery will be automatically transformed to display all videos from the corresponding Youtube channel (it uses the gallery title as the youtube channel so it must be identical).

I have made small changes to album.php and added 5 files which all start with youtube_feed, such as youtube_feed_config.php and youtube_feed_functions.php. you will need to change or delete line 15 from album.php as this imports the custom banner from my site.

config array example: $you_tube = array ('GranvilleGoPro','TheFishingShow','blackfin15');

That's all there is to it.
Oh by the way. Part of the code is browser detection and if the gallery is being viewed on an iphone, ipad or ipod, the video is transferred to the youtube app rather than viewed in the standard modal popup window.

I'm sure in the hands of someone with more talent than myself this could be made into a plugin. Feel free to do what you like with the code. Just thought I would share. I don't have time to help anyone with integration but I am happy to answer simple questions.

Comments

  • Very interesting I will check it out for myself. Thanks for the post.
  • acrylian Administrator, Developer
    I hope this little trick here that does not require any special code at all and it is even theme independend is known as well: http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#38

    That is what we use on our screenshots section. You just have to copy the standard Youtube embeed code and that's it. It works of course also with playlist embeed code (and any other service besides Youtube that provides embeed code). Main benefit is that you can treat them like "normal" gallery items with Zenphoto sorting, rating, comments etc.

    Of course that way does not display the description and such. Anyway, nice idea. A theme independent plugin would like be the best (don't have time for that as well...). I will post on our news section so maybe some one takes that over.
  • Thanks acrylian, I wasn't aware of that feature. It wouldn't have been suitable for the site I'm working at the moment due to the fact that they wanted to stick with Youtube but I'll keep it in mind for future project

    One of the reasons why I considered it the right approach was because internet services are becoming so popular on devices such as TV's etc. This would allow the videos to be available on devices that don't have a dedicated web browser, and wouldn't require managing a second video gallery or chewing up large amounts of server space.

    That being said I consider Zenphoto the best web image gallery available (free or paid). I would love to get more involved when my work load isn't so hectic.
  • acrylian Administrator, Developer
    Thanks, glad you like it. We try hard to make it the best gallery focussed website cms. We will await your further contributions later then...;-)
  • I love that... I was surprised to see how nicely the videos integrated into the application. Great Job! I'll definitely keep this in mind if we decide to add videos to our portfolio.
  • The What Fault?

    http://www.icm-es.com.br/fotos/videos/2012/

    not run

    "inicializing..."

    Login
    users_facebook
    facebook092012

    Plugin class-textobject enable.
  • acrylian Administrator, Developer
    What did you put into the text file?
  • In text file included "incorpored" youtube.

    <iframe width="560" height="315" src="http://www.youtube.com/embed/6CiWvGVfnCA" frameborder="0" allowfullscreen></iframe>
  • acrylian Administrator, Developer
    Now I see. you are using the third party zpGalleriffic theme. That theme is not complatible with this or any normal video players because it uses Javascript.
  • Is it still not possible to incorporate YouTube video into a gallery that uses the zpGalleriffic theme?

    I'm using zpArdoise theme which makes use of zpGalleriffic. I have fine video using "jplayer" but I would like to experiment with YouTube since it has better streaming of HD than my own server.
  • acrylian Administrator, Developer
    Did you try the textobject trick noted aboce on our troubleshooting?
  • Now I see. you are using the third party zpGalleriffic theme. That theme is not complatible with this or any normal video players because it uses Javascript.

    I saw your post above & thought it was not possible, but if there is a chance I will give it a shot.
  • acrylian Administrator, Developer
    The text object trick just loads a text file with the standard embeed code which is an iframe generally so it might work since none of the video player plugins is involved. But I have not tried it with that theme.
  • I enabled the class-textobject plugin and used the YouTube embed code in a txt file but the galleriific image container wont show the YouTube video, it just shows the rotating loading.gif from galleriffic, but thats it.

    Colorbox is able to show YouTube video so it must be in the galleriffic handling.
  • acrylian Administrator, Developer
    Probably that is so. Seems galleriffic is more or less dead since it has not been updated since 2009:
    http://code.google.com/p/galleriffic/source/browse/#svn/trunk/example
  • That is unfortunate. Great gallery. I'd like to find a clean, dark theme like zpArdoise, that does not use galleriffic.
  • acrylian Administrator, Developer
    Well, I fear there is none. At least the zpGalleriffic theme had an option to not use that (if I recall right). Otherwise you should make your own..;)
Sign In or Register to comment.