Hi!
I know the title sound strange but I didn't know how to describe exactly. Here's what I planed: I'm using the iphone-Theme by Jay Matz on my zenphoto installation. I'm also using videos on my gallery wich are only .mp4 Format. iPhone plays them fine but of course there is no Flash support on the iPhone I get the message "Flash installieren" (its german and means install Flash). It would be great if the output of the iphone theme would be something like: if it is an image -> show it ; if it is a .mp4 show a link to the orinal file.
I'm not sure if this is a plugin or a theme thing. Can someone help me with that?
Thanks in advance, lordcoffee
This is both as Zenphoto is not specifially made for mobile surfing. iPhones being bascially Macs have of course Quicktime on board to play .mp4 directly but most other systems probably not (don't know if Windows Media play them directly or Linux).
You would have to modify the theme. You could use this function to sort out video/audio files:
http://www.zenphoto.org/documentation/functions/_functions.php.html#functionisImageVideo
Then you have to get the suffix from the file name and display the full image link to directly play the image instead of the default image.
Hey cool, that sounds great but I'm sorry I have to say that I don't understand those arguments and parameters.
in the image.php of the iPhone theme there is the following line wich prints the custom sized image. As far as I understood I have to put there something which tells if its an video (.mp4) just print the url to this video instead of the image.
`
`
Am I right?
OK, I didn't know how to get those if else construct to work. But I've setup a ugly and not good coded workaround wich helped ;-)
Thanks for your help,
lordcoffee
PS: When I have a finished solution with the "if else" thing I'll post it here of course.
Hi!
A friend of me helped me with the code. I don't exactly know if this is the best solution but it works fine for me.
On my solution it is necessary to have iphone compatible video format only. I've choosen .mp4 because it's easy to convert (ffmpegx for mac or just quicktime). Your "normal" site view is using an flv-player which already supports .mp4 and in the iphone theme it checks if it is video or image. If it's an image it outputs another image like "click here to view video" with a link to the video. It works fine on my iPhone 3GS.
So here is the code:
`
">[img]path/to/your/placeholderimage.png[/img]
`
I've donated a beer to my friend ;-)
I've also uploaded the image.php file with the placeholder image as a .png and also .psd image. Get it here
Just overwrite the image.php in the iphone theme folder and put the video.png into the images folder inside the iphone theme. Thats all.
Greetings, lordcoffee