Theme: iMobile for iphone and ipad

Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Thu, 2011-09-08 15:13

Took a liberty to make some fixes to themedispatcher module

  • Fixed save logic in admin to prevent addition of empty user agent
  • Fixed enumerator when no UA has been specified
  • Module info adjusted to match latest standards

Edit: version pushed in the root (attachment removed here)

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Thu, 2011-09-08 14:46

Wow, finally it works for me. With calleh's version I was always getting Dang page after activating the module. Thanks Serge D!

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Thu, 2011-09-08 14:57

Thanks for your help Serge D.
I have updated my first post with your version.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Thu, 2011-09-08 15:13

@calleh: Thank you

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Thu, 2011-09-08 15:32

one more thing, I am getting blank grey screen on iPad when theme is enabled
is it expected?
there seems to be some errors in the code as I know that underlying platform does support iPad

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Thu, 2011-09-08 15:37

It does work on my ipad. Can you provide log output?

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Thu, 2011-09-08 15:56

2011-09-06 16:31:33 -07:00 --- error: Non-static method imobile_Core::itemlink() should not be called statically, assuming $this from incompatible context
#0 /gallery3/themes/imobile/views/album.html.php(69): gallery_error_Core::error_handler('/homepages/24/d...', Array)
#1 /gallery3/system/libraries/View.php(318): include('/homepages/24/d...')
#2 /gallery3/system/libraries/View.php(260): View_Core->load_view(false, false, false)
#3 /gallery3/modules/gallery/libraries/MY_View.php(75): View_Core->render()
#4 /gallery3/system/libraries/View.php(226): View->render()
#5 /gallery3/themes/imobile/views/page.html.php(88): View_Core->__toString('/homepages/24/d...', Array)
#6 /gallery3/system/libraries/View.php(318): include('/homepages/24/d...')
#7 /gallery3/system/libraries/View.php(260): View_Core->load_view(false, false, false)
#8 /gallery3/modules/gallery/libraries/MY_View.php(75): View_Core->render()
#9 /gallery3/system/libraries/View.php(226): View->render()
#10 /gallery3/modules/gallery/controllers/albums.php(77): View_Core->__toString(Object(Item_Model))
#11 /gallery3/modules/gallery/controllers/albums.php(22): Albums_Controller->show()
#12 [internal function]: Albums_Controller->index(Object(Albums_Controller), Array)
#13 /gallery3/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(NULL)
#14 [internal function]: Kohana_Core::instance(Array, Array)
#15 /gallery3/system/core/Event.php(208): call_user_func_array('system.execute')
#16 /gallery3/application/Bootstrap.php(67): Event_Core::run()
#17 /gallery3/index.php(102): require('/homepages/24/d...')

do you have strict error mode enabled?
you can do that by creating local.php in the gallery root and adding following code there

<?
error_reporting(-1);
ini_set("display_errors", true);
?>
 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Thu, 2011-09-08 16:27

In helpers\imobile.php please change line 22 to:

Quote:
public static function itemlink($item,$n) {

And tell if it fixed the problem.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Thu, 2011-09-08 19:11

yes, this seems to fix it
Thank you

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Thu, 2011-09-08 21:54

one suggestion - is there a way to turn off overlay caption for thumbs?
if not admin option, can you add advanced option to manage that?

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Fri, 2011-09-09 20:19

I'm not sure it makes sense to disable the overlay caption as it indicates an album compared to individual photos.
How else would you know it's an album?
But if you really want this, you can uncomment lines 204 - 206 in js/jaipho-main-src.js

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Sat, 2011-09-10 19:41

well, it is an option
right now, because thumbs are too small, caption overlay is taking half of the space
may be some other indicator for album vs photo
and I think option still ok
another thing. login does not work as it goes via ajax and theme does not work with it properly

PS: I did adjust css to remove text and add album icon (iPad)

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sat, 2011-09-10 22:05

What doesn't work with the login? It works on my site.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Sun, 2011-09-11 01:13

It did show raw response rather then in logged in mode
Some error unhandled?

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Tue, 2011-09-13 19:56

Can you please add the following to views/page.html.php.
Generate the login error and paste me the complete output.

Quote:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?= $page_subtype ?>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Tue, 2011-09-13 23:51

subtype is "album"

I am in root album on iPad
clicking login
getting white, not styled page for login
then raw result
problem is with popup for login screen not used?
I am on latest experimental drop

 
engineer

Joined: 2005-09-13
Posts: 84
Posted: Wed, 2011-09-14 04:49

The same problem described by @Serge. I use Android phone.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Wed, 2011-09-14 05:51

I now understand where the problem is. I will look for a solution.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Thu, 2011-09-15 13:42

I have uploaded a new version of the imobile theme, which fixes the login screen problem.

 
engineer

Joined: 2005-09-13
Posts: 84
Posted: Thu, 2011-09-15 15:15

@Calleh, thank you. The login screen works.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Thu, 2011-09-15 15:46

yes, it works
Thank you

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Thu, 2011-09-15 15:47

One suggestion, is it possible for theme or actually the switcher module to inject small on/off switch as it is done for similar WordPress module

ex: http://blog.dragonsoft.us - need to be viewed from mobile device

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Fri, 2011-09-16 13:33

Yep, I heard that requirement earlier. I will investigate how this might be possible.

 
dave8401

Joined: 2009-06-01
Posts: 129
Posted: Fri, 2011-09-16 15:33

Hi,
For me the login works only when I append .index.php. Has anyone experienced the same?
Update: Sorry, my bad. Killed my .htaccess file :). Works great now.

Thanks,
David

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sat, 2011-09-17 14:57

I just uploaded a new version of the themedispatcher module and the imobile theme.
They now support switching from the mobile to the default theme - and vice versa.
You can enable this setting in the admin settings of the themedispatcher module.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Sat, 2011-09-17 19:19

it works!
one suggestion, could you make link to use default font it rather small at the moment

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sat, 2011-09-17 19:42

you can adapt the css file in the css directory of the themedispatcher module.

 
rebootme

Joined: 2011-09-19
Posts: 1
Posted: Mon, 2011-09-19 03:29

Works great on Windows Phone 7 devices. Just add "Windows Phone" as a user agent.

Thanks for this great module and theme!

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Tue, 2011-09-20 05:35

I was creating home screen shortcut for the site
Theme uses default iPad icon "G"
In latest g3 release this icon can be now managed/replaced via general theme's setting
Can your theme be sensitive to that as well?

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Tue, 2011-09-20 18:48

Good point, I will consider it in the next release.

 
dahamsta
dahamsta's picture

Joined: 2011-09-29
Posts: 4
Posted: Thu, 2011-09-29 14:47

Just wanted to add a note of thanks for this theme, incredibly useful. If I had one request it would be that the URL follow the photo so I could copy and paste it, but I accept that it's difficult with AJAX. Anyway, thanks again.

 
devons

Joined: 2011-05-31
Posts: 2
Posted: Fri, 2011-09-30 01:29

This is cool. I just tried on my iPad it works pretty good!

 
tonycelestino

Joined: 2011-10-01
Posts: 2
Posted: Sat, 2011-10-01 22:01

Hi. This is a wonderful feature for this great tool. Thank you for making this available. I have two suggestions.

1. Making a search field for the user to look for a specific gallery.
2. Maybe integrate this with the photoswipe "engine", its much smoother than jaipho.

Thank you and keep up the good work.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sun, 2011-10-02 20:23

I just uploaded a new version of the theme which updates the to the latest jaipho version 0.55. This version has a "sticky finger" effect when sliding images.
The g3 theme icon is now configurable via the general theme settings.

Regarding photoswipe. I initially started with a jquery based slideshow js library which worked with a small number of images bit crashed mobile safari with larger image collections.
I will have a look at photoswipe but also photoswip does not contain video support and would need a lot of customisation until it would work. So it's not that easy a requires some time...

 
Nickp

Joined: 2008-11-18
Posts: 10
Posted: Wed, 2011-10-12 13:28

Hello, Great work on this, by the way. It loads fast which was the bane of my gallery over 3g so it's very useful as-is.

Just a couple of questions.

my site, for reference, is 1peluffo.com

1. What's the login for? i see no change in access whether i'm logged in or not. I don't have any user albums, etc. but there's no access to comments or the like.
2. Is there a way to modify the theme to display a banner/logo and an email link or do i need to go into the html/css?
3. Same thing for thumbnail size and slide duration.

I'm testing on ipad and droid (user agent works with "droid" as parameter).

Thanks for a very useful theme.

Nick

 
Jonreynolds

Joined: 2008-03-09
Posts: 96
Posted: Fri, 2011-10-14 20:02

Hi,

Loving the theme... but I am experiencing viewing problems on an Android device (HTC Desire). When viewing a photo, I do not get the arrows to proceed to the next photo and only the top half of my screen is getting used. The bottom half of the screen is just grey and the photo itself is badly cropped/hanging off the screen.

Surprised no one else with an Android phone has mentioned this yet (or have they?).

Thanks

Jon Reynolds
www.jcrdevelopments.com

 
dahamsta
dahamsta's picture

Joined: 2011-09-29
Posts: 4
Posted: Sat, 2011-10-15 02:13

No problem with the Desire here. Tap the screen to bring up the arrows, tap it again to hide them. No cropping on my handset.

The grey bar at the bottom of the screen is odd though.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sat, 2011-10-15 06:34

@Nick:
1) If you don't use access control on your album, than the login is for nothing. But if you have protected areas, than this is what it's used for.
2) There's currently no banner/email link configuration option in the theme. But you can certainly edit album.php or page.php in order todo so.
3) For thumbnailsize it's a bit trickier, as I center the image based on a specific thumb size. If you wan to change this, than you ould in css and in the helper/imoble.php

btw I have almost completed the photoswipe integration. only video support is not yet properly working. so you can expect an update soon.

 
Nickp

Joined: 2008-11-18
Posts: 10
Posted: Sat, 2011-10-15 13:45

Thanks Calleh! That will help.
By the way, I'm testing on an HTC Evo shift and the full screen images render fine. The only issue I see is that if you try to pinch/enlarge, the photo resizes erratically and the photo title and nav buttons enlarge as well.

Thanks again,

Nickp

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sat, 2011-10-15 14:33

Yep, I know. That's fixed in the next version based on photoswipe.

 
windracer

Joined: 2007-03-05
Posts: 113
Posted: Fri, 2011-10-21 16:37

I've run into a few minor problems with this theme:

1. Sometimes, an album will load blank with no thumbnails and I don't see any errors in my apache or gallery logs.
2. I've noticed some thumbnails are the wrong orientation, I guess if they're not rotated properly the theme won't auto-rotate?

Also, any chance the Search box could be added to the theme?

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sat, 2011-10-22 18:47

@windracer
1) I haven't heard of such a situation yet. but you can probably check the generated html, whether you see references to all of your thumbs. I will release a new version soon, you should test with that.
2) right, the does not auto-rotate

 
stimpy

Joined: 2010-07-19
Posts: 13
Posted: Wed, 2011-10-26 08:40

Hi there!

First of all: Great work! I'ld LOVE to use this! But unfortunately I'm using the HTML Purifier Module.. :(
I need this module, so disabling is no option.. :(

Will there be a fix for this problem someday?

PS: It'ld be fine for me if you just disable html purifier and replace it by a strip_tags(), when imobile is active...

 
windracer

Joined: 2007-03-05
Posts: 113
Posted: Wed, 2011-10-26 13:14
calleh wrote:
@windracer
1) I haven't heard of such a situation yet. but you can probably check the generated html, whether you see references to all of your thumbs. I will release a new version soon, you should test with that

I compared the source for an album that worked and one that didn't load any thumbs and except for the name of the album, the code looked exactly the same. I see all of my images listed in the script, but the page loads empty (except for the footer at the bottom). Same thing in AtomicBrowser and Safari ... really strange.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Wed, 2011-10-26 18:54

I have just uploaded a new version of the themedispatcher module and the imobile theme - now based on PhotoSwipe.
I have also included support for the search module.

@stimpy: I have tested the theme with the purifier module and had no issues with it. So please test with this version.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Wed, 2011-10-26 20:16

great release, thank you
few questions:

can album page resemble more layout like in this video http://vimeo.com/24124859 ?
On iPad, thumbs are too small

 
windracer

Joined: 2007-03-05
Posts: 113
Posted: Wed, 2011-10-26 23:12

Thanks for the addition of search, it's great!

I still have the occasional blank page album loads, though, on v2.0. Guess I need to dig into it more and see if I can figure out what's going on.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Thu, 2011-10-27 07:22

@Serge D: You are free to change the layout in the imobile.css file to suite your needs. You can also change the iPad thumbnail size there.
If you change the thumbnail size in the css you also need to adjust the regarding settings in helpers/imobile.php to have the thumbnails centered properly.

 
Serge D
Serge D's picture

Joined: 2009-06-11
Posts: 2466
Posted: Thu, 2011-10-27 17:03

I know I can do that
my only concern is that iPhone size is used on bigger iPad screen...

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Thu, 2011-10-27 18:07

No, its not. There is a separate sizing for the iPad at the bottom of the css file. Same in the mentioned php file.