Theme: iMobile for iphone and ipad

dahamsta
dahamsta's picture

Joined: 2011-09-29
Posts: 4
Posted: Thu, 2012-03-01 13:15

Ah right, thanks.

 
petri
petri's picture

Joined: 2005-12-15
Posts: 253
Posted: Fri, 2012-03-02 02:06

Thank you Calleh

I have posted my Issue and will get back here in case of a solution.

------
Gallery 3 URL (test) = http://www.coquille.org/gallery3
Version: 3.0.2 (Coollanta)
Operating system: Linux 2.6.18-194.32.1.el5
Apache: Apache/2.2.3 (Red Hat)
PHP: 5.2.6
MySQL: 5.0.77
Server load: 1.31 1.58 1.53
Graphics toolkit: gd
-------

 
Krater
Krater's picture

Joined: 2012-01-28
Posts: 5
Posted: Tue, 2012-04-10 17:20

Hi
I would like the images to be at full resolution on the new iPad (2048x1536). Would it be possible for the next version?
In the meantime, where do I have to edit to do it myself?
Thnaks,

Krater

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Tue, 2012-04-10 19:44

Hi Krater,
look at the following of my recent posts http://gallery.menalto.com/node/101768?page=3#comment-388290.

 
gahaganweb

Joined: 2012-04-11
Posts: 2
Posted: Wed, 2012-04-11 17:40

This module really makes Gallery relevant in the mobile world so thanks for creating. I would like to be able to allow users to save/download an image to their iPhone/iPad. It seems the native Safari press and hold to Save and Image only works on a thumbnail but not on the image display page. I looked at the Photoswipe options page to see if there was any setting to allow this and I did not see any. Does anyone know if this is even possible with the way the image is rendered?

 
Krater
Krater's picture

Joined: 2012-01-28
Posts: 5
Posted: Thu, 2012-04-12 19:11
calleh wrote:
Hi Krater,
look at the following of my recent posts http://gallery.menalto.com/node/101768?page=3#comment-388290.

Hi
I've reviewed photoswipe options and it doesn't work.
The problem is that full size images are served from http://gallery_install/var/resizes/path_to _the_photo/name_of_the_photo.JPG?m=some_number, and those images are always 640x480, resized by the client to fullscreen.
It is the same resize used by the default theme (Wind) for the lo-res preview, but there when you click on the image you get the original one.
I've tried to change the size of the resized image in the theme options from 640 (default) to other values, but it doesn't work (for imobile or Wind).
Any ideas?
Regards,

Krater

 
Krater
Krater's picture

Joined: 2012-01-28
Posts: 5
Posted: Thu, 2012-04-12 19:15
gahaganweb wrote:
This module really makes Gallery relevant in the mobile world so thanks for creating. I would like to be able to allow users to save/download an image to their iPhone/iPad. It seems the native Safari press and hold to Save and Image only works on a thumbnail but not on the image display page. I looked at the Photoswipe options page to see if there was any setting to allow this and I did not see any. Does anyone know if this is even possible with the way the image is rendered?

+1

 
gahaganweb

Joined: 2012-04-11
Posts: 2
Posted: Sat, 2012-04-14 20:18

One way I found around this, while not elegant, is to set "Places a link in the theme footer to allow users to manually switch between target and default theme." in Theme Dispatcher...then you can switch to full site mode and from there you can Save Image. Would be nice to be able to do directly from the iMobile theme though.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sun, 2012-04-15 08:53

I'm looking into this, but I first need to understand, what actually prevents this.

 
michaelnyden

Joined: 2012-04-16
Posts: 27
Posted: Mon, 2012-04-16 20:30

Doesn't look like the pam module (ldap login) works on this theme, does anybody have any idea how to get it working? I'm guessing it is loading the original gallery login interface rather than the pam one like the site does on a regular browser on my pc.

 
bklynguy05

Joined: 2011-12-13
Posts: 3
Posted: Fri, 2012-04-20 03:13

in response to #2, where would I make these changes? Thanks in advance!

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Fri, 2012-04-20 12:55

@michaelnyden:
Try to change login/auth_html on line 43 in the views/page.html.php of the imobile theme to pam/auth_html

 
michaelnyden

Joined: 2012-04-16
Posts: 27
Posted: Fri, 2012-04-20 15:01

That's funny, I just did that yesterday and it worked, just didn't have time or get around to posting it here.

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Wed, 2012-04-25 08:46

Hello, the theme and dispatcher works fine in my case... but with Android->Firefox I cannot open the pictures. There is an overview for each album with all the albums, but there is no way to open and click the images. Is this a known issue or what I've made wrong? Sebastian

 
encoded_9

Joined: 2006-11-28
Posts: 10
Posted: Sun, 2012-04-29 10:52

Hello, I just came here.
"Theme dispatcher" and "Gallery iMobile" theme are exactly what I was looking for.
Does this "Theme dispatcher" module work on Gallery 2.3.1 with core 1.3.0.1 ?
I did exactly calleh wrote step by step.
However, "Theme dispatcher" did not be visible from site admin page...

I put my system information, here.

Quote:
Gallery URL = http://www.0110110.com/gallery2/main.php
Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 4.3.9 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 4.1.22, lock.system=flock
Toolkits = ArchiveUpload, Exif, Ffmpeg, Getid3, ImageMagick, SquareThumb, Thumbnail, Gd, Dcraw, NetPBM, LinkItemToolkit, jpegtran
Acceleration = none/3600, none/3600
Operating system = Linux localhost.localdomain 2.6.9-103.EL #1 Fri Dec 9 04:14:04 EST 2011 i686
Default theme = siriux
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20100101 Firefox/11.0
Rows in GalleryAccessMap table = 84
Rows in GalleryAccessSubscriberMap table = 61540
Rows in GalleryUser table = 6
Rows in GalleryItem table = 61443
Rows in GalleryAlbumItem table = 2300
Rows in GalleryCacheMap table = 0

Any suggestions and advices are very welcome.
Thanks in advance from Japan.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2012-04-29 13:03

Gallery3 themes are not compatible w/ Gallery2

-s

 
encoded_9

Joined: 2006-11-28
Posts: 10
Posted: Mon, 2012-04-30 02:04

O thanks suprsidr,
So, there's no optimized themes for gallery2 on iphone/ipad...

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Mon, 2012-04-30 13:45

@Rockbär: I neither have an Android phone nor firefox. There is probably a console in firefox. Can you check wether you see some messages there and paste them here. Then we might be able to figure out the problem. It is maybe related to a know problem in photoswipe https://github.com/codecomputerlove/PhotoSwipe/issues/215

@gahaganweb: I looked into this, but haven't found a solution to your question as there are touch controls over the main image. Maybe you can raise a feature request at photoswipe https://github.com/codecomputerlove/PhotoSwipe/issues?state=open

 
BentFranklin

Joined: 2012-04-24
Posts: 32
Posted: Sat, 2012-05-05 00:13

Thanks for this great improvement to Gallery. It works great on my Droid Bionic and Samsung Galaxy S II.

If I understand the way theme dispatcher works, it maintains a list of user agents and if a request matches, they get a chosen theme, usually mobile. What if instead it maintained an assoc list of (agent . theme)? That added flexibility could come in handy as more kinds of devices connect to the web.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sat, 2012-05-05 20:30

This is actually a good idea, I will put this on my list for the next version.

 
Rockbär
Rockbär's picture

Joined: 2012-04-22
Posts: 76
Posted: Sun, 2012-05-06 15:05

@calleh I couldn't find any function like a console, which I already know from the firefox-version for PC. I've test also Opera Mobile, I have to possibility to click on a thumb, but the sime with firefox, no picture will open. ONLY the internal internet-browser of android works without any problems :-/

 
gabes

Joined: 2007-07-02
Posts: 6
Posted: Mon, 2012-06-04 10:31

Hi, after update to last version of imobile, i have some problems with fullscreen mode when showing pictures of my iphone.

In fact when i'am on an album who have enough pictures to take more place that the iphone screen (when showing in thumbnails mode), fullscreen is then ok when i show pictures.
But when my album dont have enough picture and i click on one of them the fullscreen mode is displayed but the adress bar is there and i can hide it.

Any solution ? workaround ? thanks.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Mon, 2012-06-04 19:21

@gabes: I can't really reproduce the problem you are mentioning. What device are you using? Have you cleaned your browsers cache?

 
salamich

Joined: 2012-08-11
Posts: 7
Posted: Tue, 2013-01-15 10:10
Quote:
The problem is that full size images are served from http://gallery_install/var/resizes/path_to _the_photo/name_of_the_photo.JPG?m=some_number, and those images are always 640x480, resized by the client to fullscreen.
It is the same resize used by the default theme (Wind) for the lo-res preview, but there when you click on the image you get the original one.
I've tried to change the size of the resized image in the theme options from 640 (default) to other values, but it doesn't work (for imobile or Wind).

You have to rebuild the images after changing the resize-dimensions. Setting it to 2048 does work fine for iMobile, but it screws up the default theme.

A quick hack would be to let iMobile load the full image instead, you can do that by changing the file themes/imobile/helpers/imobile.php from:

Quote:
...
$arguments = array();
$arguments[] = "{ url: ";
if ($item->is_album()) {
$arguments[] = "'".$item->url()."'";
} else {
if ($item->is_movie()) {
$arguments[] = "'".$item->file_url()."'";
} else {
$arguments[] = "'".$item->resize_url()."'";
}
}
...

to

Quote:
...
$arguments = array();
$arguments[] = "{ url: ";
if ($item->is_album()) {
$arguments[] = "'".$item->url()."'";
} else {
$arguments[] = "'".$item->file_url()."'";
}
...

This might not be a good idea if you are using huge images or a slow link, but you'll get the image quality the new iPad screen deserves.

 
mamachan

Joined: 2012-07-17
Posts: 1
Posted: Thu, 2012-08-16 15:44
calleh wrote:
I fixed the issue with the slideshow start and uploaded a new version.

calleh

The newer version works great :) It is compatible with the latest iOS

 
makobe

Joined: 2012-08-23
Posts: 1
Posted: Thu, 2012-08-23 19:34

hi at all,

sorry for my broken english. i speak fluently german, but my english is poor.. ;)
ive installed in the standard theme the main thme to "imobile"
now is the problem that i cant access the admin panel to make it backwards..
icant access anything from gallery eccept the existing pictures in the main album..
do you have any tips to make it work again?

like standard resetting or something else..?

 
bmc205

Joined: 2012-09-02
Posts: 8
Posted: Sun, 2012-09-02 12:17

This looks like a great feature...thanks for taking the time to create it! One problem I am having though. The download link for Theme Dispatcher on GitHub leads to a "File was not found" error. Is there an alternative source for Theme Dispatcher? Or does anyone have a copy they could send me?

Thanks!

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sun, 2012-09-02 12:50

Hi bmc205,

thanks for the info, I just fixed the github download - should work now.

 
paul4maccarni

Joined: 2012-09-04
Posts: 6
Posted: Tue, 2012-09-04 11:22

Any clue how to submit advertisements po-pups on iMobile theme.

 
shadlaws

Joined: 2012-03-14
Posts: 183
Posted: Sun, 2012-09-30 13:13

Hey gang,

I'm having issues with the override function and the login page... namely that the two really don't seem to work together.

- go to login page, hit "full version", returns to mobile site
- complete login, get to main site, change to "full version", logout, stays in full version, hit "mobile version", returns to full version

Also, sometimes it gets stuck in a redirect loop when I use the override during login, that somehow gets fixed if I just hit reload in the browser.

Anybody have any thoughts? It's find of a bummer since the "register" link for the new user registration module doesn't appear on the mobile site, making it hard for new people on mobile devices to be able to sign up...

Thanks!

Take care,
Shad

 
keyvangh

Joined: 2012-11-10
Posts: 1
Posted: Sat, 2012-11-10 03:27

@calleh: Hi, I have installed and put together almost all the pieces in gallery 3 to have the iMobile activated on all devices including iPad, iPod, android and windows phone.
The problem is with "windows phone" browser and the links(thumbnails) in the albums for individual photos are not clickable/touchable.
So basically you can not drilldown to the picture to be able to swipe and view the rest of the pictures. could you please help?
Am I missing something obvious in configuration or it is a bug?

Thanks

 
deanshavit

Joined: 2012-09-28
Posts: 23
Posted: Sat, 2012-11-10 06:19

@calleh: heaping on the praise with everyone else! iMobile rocks! But I'm surprised no one else has mentioned that the "share" feature on the iPhone creates a link that isn't valid - it contains the photoswipe URL and cannot be loaded outside of the current session. The only way I've found to share a photo is by taking a screen shot with my iPhone and sharing it then - but the "play" and "back" buttons show - is there some way we can have those disappear after a couple of seconds and then reappear after a touch?

 
jancolle

Joined: 2012-11-10
Posts: 1
Posted: Sat, 2012-11-10 14:07

Thanks for a very nice theme. It works perfectly with pictures.

One thing I cannot get working is Video on iOS devices, when using authentication. If I upload a video to an album where user login is not required it works. But if the album is restricted to only registered users, the movie doesn't play.

Everything is fine when i play the movie from my PC (flowplayer).

Any Ideas how to fix this would be great.

Thanks

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2012-11-10 15:09

IOS does not support flash(flowplayer)

It will only play .h264/AAC MP4 movies via the HTML5 <video /> tag.

I did a comprehensive state of <video /> here.

I also did a video format experiment w/ G3 here.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sun, 2012-11-11 05:40

@keyvangh: have you tested the samples on the photoswipe wbsite? From whatvI understand there are some likitations on windows phone.

@jancolle: i had the same issue and if I remember correctly this was because of the cookie security settings. I have currently no access to my machine, but try to reduce some of the cookie parameters like user-agent, etc.

 
roy2363
roy2363's picture

Joined: 2012-11-18
Posts: 3
Posted: Sun, 2012-11-18 00:58

Do you know the script to insert the photo-option? would be super!

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Mon, 2012-11-19 14:42

what do you mean - what "photo option"?

 
frhar

Joined: 2007-08-28
Posts: 2
Posted: Mon, 2012-11-19 23:30

HI!

When I go to my gallery with my iPhone the login page shows up as it should. When I try to log in the browser point to my internal IP instead of my external web address.

If I change the theme in the theme dispatcher to Wind everything works as it should.

Any ideas of what is wrong?

/Fredrik

 
coax

Joined: 2012-11-23
Posts: 16
Posted: Fri, 2012-11-23 07:42

ADSENSE into iMobile theme.

Can anyone help me to get google adsense running with iMobile theme (when used as redirect theme for mobile user agents).

I have tried inserting google adsense code in multiple locations (experimenting) in the page.html.php page for the theme without success.

Would really appreciate it if anyone can help me get it running on the mobile theme/device. Runs find on desktop http://www.scubadivesite.com.au/pictures/ using clear canvas theme but same site viewed on mobiles with iMobile does not work (or more the point I can't get it to work).

Cheers,
Coax.

 
coax

Joined: 2012-11-23
Posts: 16
Posted: Fri, 2012-11-23 08:29

Hi All,

Well I mucked around (experimented) and got it working. Had to edit some of the code in album.html.php (added google adsense code). All good and I'm happy now!

Cheers,
Coax.

 
morganfeldon@gm...
morganfeldon@gmail.com's picture

Joined: 2009-06-22
Posts: 31
Posted: Thu, 2012-11-29 13:21

I've updated the codex with some rudimentary notes about Android and WM7.

 
micks80

Joined: 2012-04-22
Posts: 71
Posted: Sat, 2012-12-01 19:20

First of all thanks for the awesome theme, this has to be one of the best gallery3 mod. For some reason, it's not working on HTC One X (Android device). I have tried on Android emulator and it worked but not on the actual device. I have all the proper user-agent strings, so not sure what is required to make it working on Android.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sun, 2012-12-02 13:02

@micks80 : can you elaborate on what is not working on your HTC? Is the theme not loaded, the sllideshow not starting...

 
micks80

Joined: 2012-04-22
Posts: 71
Posted: Sun, 2012-12-02 18:32

Hi Calleh,
Basically on HTC, it does not recognizes the iMobile theme and opens the normal full site using Wind theme. We will send you a PM with more info as well.

For others, we have extended this theme and created a very simple android app out of it in a few hours. If you want to create one, check this link -
http://developer.android.com/guide/webapps/webview.html

Basically we are opening the URL using webview inside the android app.

Cheers
Mick

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sun, 2012-12-02 20:35

Micks80: if the imobile theme isn't loaded, than your useragent string is not correct. Have you debugged your useragent string?

 
morganfeldon@gm...
morganfeldon@gmail.com's picture

Joined: 2009-06-22
Posts: 31
Posted: Sun, 2012-12-02 21:16

I found that mobile safari will tackle some Android but not all. I hesitated to add "android" cause that tags all the tablets too.

 
Ray64

Joined: 2011-05-24
Posts: 6
Posted: Thu, 2013-01-03 17:11

Thanks for the great theme and module.

To handle a wider range of tablets how about using min-device-width in your css with a class to control thumbnail image size?

  .thumbnail .portrait
  {
        width: 123px;
  }

  .thumbnail .landscape
  {
        height: 123px;
  }

Also, I found that the gradient background did not extend to the bottom of the page on an Android tablet until I added the following to the css.

html {
    min-height: 100%;
}
 
Ray64

Joined: 2011-05-24
Posts: 6
Posted: Fri, 2013-01-04 02:55

Chrome shows warnings in the JavaScript console for the meta viewport line in page.html.php. Changing it seemed to improve zoom behavior on Android.

http://alxgbsn.co.uk/2011/11/23/make-sure-to-use-correct-meta-viewport-syntax/

 
cipc

Joined: 2009-12-17
Posts: 8
Posted: Sat, 2013-01-12 22:58

Hi there all,

I'm using the iMobile Theme and the dispatcher for more than a year know and finding it great.

While with photos everythings works just fine, with movies I've noticed a faulty behaviour:
- If the video is within a public album, it shows fine, whether your are loged in or not - normal behaviour,
- if the video is within a private album, available only to register users, it cannot be played on any iDevice, even wehen I am loged in - faulty behaviour.

Any help or workauround for this would be much appreciated.

Thanks!

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sun, 2013-01-13 12:56

@cipc: The video support behaviour you are recognizing for private albums is not so much caused by the iMobile theme but more by the general gallery3 session security. The iOS video player uses a different user agent than the browser. The users sessions is per default bound beside other factors to the user agent of the user. If you remove that binding than video support for private albums on iOS works.
You can achieve this by reducing the session parameters to validate e.g. only 'expiration' in modules/gallery/config/session.php. It might also be necessary to remove the user agent binding from the cookie salt by creating the following file:
modules/gallery/helpers/MY_cookie.php

Quote:
<?php defined('SYSPATH') OR die('No direct access allowed.');
class cookie extends cookie_Core {

/**
* Generates a salt string for a cookie based on the name and value without reference to user_agent.
*
* @param string $name name of cookie
* @param string $value value of cookie
* @return string sha1 hash
*/
static function salt($name, $value)
{
// Cookie salt.
$salt = Kohana::config('cookie.salt');

return sha1($name.$value.$salt);
}

} // End cookie

Please keep in mind that by doing do, you reduce the level of security of your site!