Updates to iPhone theme

I grabbed the iphone theme:
http://code.google.com/p/zenphotoiphone/

and had a few problems and made some fixes. I don't do a lot of web programming and am not sure how to feed this back to the theme author, so I'll post the changes here:

1. album.php is using a deprecated function getnumsubalbum()
change line 112 from:
$anumber = getNumSubalbums();
to:
$anumber = getNumAlbums();

2. Edited image.php to use html5 video tag for video. Note if you encode your mp4 video for iphone, then the same files will work well for flowplayer on the desktop and Safari on iPhone.
start at line 49:
if (!isImagePhoto($_zp_current_image)) {
?>
<video controls="controls"> <source src="<?php echo getFullImageURL(); ?>" type="video/mp4"> </source> </video>
<?php
} else {
$ls = isLandscape();
printCustomSizedImage(getImageTitle(), null, $ls?604:453, null, null, null, null, null, null, $ls?photoImg_l:photoImg_p);
}
?>

The theme now works with jpg, iPhone compatible MP4 videos and also mp3 files.

I'm going to test these changes on Android 2.2 as well. I think it should work.

Comments

Sign In or Register to comment.