ZenPhoto and iPhone Theme

So I wanted to create a photo gallery website. After trying a few other photo gallery softwares, ZenPhoto seemed to be the most beautiful, simple and robust of them all. After the site is up and running, I went on to select a theme for the site. The one I like most is from Stopdesign, and it showed the galleries, albums and photos beautifully. So far so good, I thought, and I wanted to browse the site from my iPhone.

Well, Safari browser, being Safari, rendered the pages quite well. However, two problems remained.

  1. It did not look as good on the small iPhone screen.
  2. I had a few flash videos; and of course, they did not play on iPhone

Looking for a theme customized for iPhone, I found the ZenPhoto iPhone theme. After installation though, the theme refused to work, since the theme was for a previous version of ZenPhoto, and some of the APIs had changed since this theme was released.

Back to the drawing board, I did a few modifications on the theme to make it compatible to the current version of ZenPhoto, and tried to contact the original creator of the theme. I never got any reply. However, a number of ZenPhoto users saw my comment and contacted me for the updated theme since they were facing the same problems as I did. I was happy to share the updated theme. But there were a few other changes I did that was not part of the theme, and therefore I could not share those with the theme files. So I thought to write a post where I speak about about the changes, and also where I can share the theme so that everybody can get a chance to use this nice iPhone theme. Read on for the details.

Note: There are two cases where I change the core ZenPhoto files; zp-core/functions.php and zp-core/zp-extensions/class-video.php. Before you use the updated files, please make a backup copy of the original files so that, if anything goes wrong, you can revert back to the original files.

First and foremost, here is the link to the theme files. It can be extracted to the themes folder within the zenphoto root folder. A little bit more work is required to make the theme work on iPhone/iPod touch. I did these changes in the functions.php file within the zp-core folder under zenphoto root folder. Here is the updated file, which can be saved as functions.php within the zp-core folder for the changes to take effect. This will use the iPhone theme when the site is opened from iPhone (using Safari or Opera Mini), but the regular ZenPhoto theme for any other platform/browser.

The other change I did was for making sure we use the flv video (or any other video that uses the flash player) when the site is opened in a computer, but the mp4 version when opened in iPhone (Safari or Opera Mini) or iPad. This is a little more involved, so please follow the steps carefully if you want to include this update. Note that for this you will need your regular flv file and a still image for preview as usual, but in addition you will need an mp4 file with the same name. There are many softwares, including free ones, that can convert various video files to mp4.

  1. The php file to update is zp-core/zp-extensions/class-video.php. The updated file can be downloaded here. Change the extension to php before using.
  2. The mp4 files should be placed in the folder mp4 under the ZenPhoto root folder. The files should have the same name as the regular video files in albums, but the extension should be mp4. Note that in my implementation this is a single folder for mp4 videos of all albums, so the file name of every mp4 file needs to be unique.
  3. The mp4 file, when opened in iPhone/iPod touch or iPad, will take the still image as placed in the respective album folder. No need to create separate still image for the mp4 videos.

Lastly, I wanted to make another small change to make sure when looking at the album, the video files are distinguishable from images. For that I put a small clapperboard icon on the top left corner of the video thumbnails. This is also included in the iPhone theme, so it will automatically show video files with the video icon. No extra work is needed in your part for this to take effect.

PS. Here’s a beautiful site that uses the ZenPhoto iPhone theme: http://bilder.abrocker.de. (The owner of this site had contacted me for using the ZenPhoto iPhone theme. I really liked the site, hence linking it here. Link to my own ZenPhoto site is at the top of this page – look for Photo Gallery)

UPDATE: Jay Matz is back with updates to the ZenPhoto iPhone theme. I have updated the download link to reflect the updated theme, which means the updated theme can be downloaded either from the google code page or from the link above.

30 thoughts on “ZenPhoto and iPhone Theme

  1. acrylian

    I just saw this accidentally. I suggest to post a link on our forum so Zenphoto users know about these further mods.

    I also have added an extra link on the theme’s page to your post so it does not get lost.

    Reply
    1. admin

      Thanks for your comment. About your question, do we really need a theme specially for iPad? Normal themes meant for desktops work fine on iPad in my experience. However, we do need to have H.264 video format for iPad, and that needs a little tweaking (as mentioned in the article).

      I am currently working on a plug-in to minimize changes to the core ZenPhoto files. But these changes need ZenPhoto 1.3, which should be released in near future.

      Reply
  2. Martin Show

    I have recently started using the blogengine.net and I having some problems here? in your blog you stated that we need to enable write permissions on the App_Data folder…unfortunately I don’t understand how to enable it.

    Reply
    1. admin

      @Martin Show: I don’t think it’s in my articles, this article is only about ZenPhoto. Are you sure you are asking the right person?

      Reply
  3. unthinkable lyrics

    Hey this is a great story. I’m going to email this to my friends. I stumbled on this while googling for some downloads, I’ll be sure to visit regularly. thanks for sharing.

    Reply
  4. Owen Karsten

    J.K Rowling is probably one of the most amazing writers in modern times. Her Harry Potter series has been responsible for so many young people starting to read books because they want to, not because they have to.

    Reply
  5. Donna Ricksen

    Compared with other FLV players, Any FLV Player has another important function – Create web videos with an embedded player which may be played directly online. It integrates web video component which enables you to post video files aimed at your web or BLOG such as posting videos to MySpace with only some clicks. You can use the “Publish for Web” feature to easily integrate any video to your website. http://playerflv.net

    Reply
  6. nkj

    Compared with other FLV players, Any FLV Player has another important function – Create web videos with an embedded player which may be played directly online. It integrates web video component which enables you to post video files aimed at your web or BLOG such as posting videos to MySpace with only some clicks. You can use the “Publish for Web” feature to easily integrate any video to your website.

    Reply
  7. Mi Kaloudis

    I am constantly in search of somebody to alternative articles and reviews with, I’m a undergraduate and possess a blog here on our campus website. The topic of your web log and writting design and style would likely go great in a few of my category’s, tell me in case you are up for this.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *