Skip to content

Support Jaipho

Jaipho beta is a free script and we hope that you enjoy using it. If you do, here is a way that you can show us that you appreciate the hard work that we've done for you!





Porting Jaipho to iPad

April 19, 2010 by Tole

In last few weeks, there were few inquiries through contact form, regarding the porting Jaipho to work with iPad. Well, I plan to publish iPad release, but I'm heavily loaded with obligations so it will take me at few months to over it.

If you cant wait next release, here is the guide for doing it yourself. I haven't tried it, so there is no demo. Anyway, I think that the basic adaptation shouldn't be so hard.

Sizes

When one works javascript application for Safari, main difference between iPhone and iPad is screen size. So, if you want that Jaipho works on iPad, only thing you have to do is change sizes&positions of gallery elements.
In Jaipho, sizes are defined (hard coded) in css and on two paces in javascript application logic.

css:
- height of tool bars, top positions, min-width, min-height, width of slides
- just go through file and replace it one by one

js:
- JphSlider_Slider.prototype._GetSlideWidth() method gets the width of single slide (including space between slides)
- for iphone was 320+20 or 480+20 in landscape mode
- the space between (20) is defined in css selector "#slider-container .space"
- change this values according to iPad
- In private method JphUtil_OrientationManager.prototype._CheckOrientation() change the hardcoded value of screen width 320, to 768

After this you should have yourself a basic iPad optimized javascript image gallery working.
Only problem is that it is again hard coded, so you'll have to have two installations of it. One for iPhone and separate for iPad.

Running the iPhone and iPad at once

Again easiest solution. Create 2 css files, and by determining the user-agent header, pick one which you'll include.
Hard coded sizes that are used in javascript part, you can replace with some constants defined in user agent test block.
User agent testing block can be done both in php and javascript.

update: iPad support is standard since Jaipho 0.54 and Pipho 1.02. Read more at http://www.jaipho.com/content/ipad-version-released

Comments

iPad version

August 9, 2010 by Paul Chevallier (not verified), 2 years 44 weeks ago
Comment id: 234

The above 'fix' does not work on iPad.
Yes, it makes pictures larger, but in slideshow it slides only halfway (not to the next picture but in between) and the bottom navbar is too low..

Just wait for the official iPad version!

PS: I hope it comes quick!! ;)

ipad

April 30, 2010 by marco (not verified), 3 years 7 weeks ago
Comment id: 142

Hi ! I fix the css and the js for ipad. It works great! Thanks Marco
If you want to check is here: http://www.pantanta.com/Archivio.zip