Theme: iMobile for iphone and ipad

squisher

Joined: 2006-10-24
Posts: 4
Posted: Thu, 2011-06-16 20:49

Kudos to the author. A nice theme!

And just to confirm, it seems to work pretty well on my Android (v2.2). I only tested browsing of galleries though. It seems to sometimes not recognize my "touch" but overall very usable.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sat, 2011-06-18 14:07

I have just uploaded a new version of the imobile theme containing the most wanted "load more" feature.
Initially only a number of thumbnails is loaded to fill the screen (valid for iphone and ipad).
A load more button appears and the next chunk of thumbnails can be loaded until all are displayed.

 
James.OD

Joined: 2008-02-18
Posts: 11
Posted: Wed, 2011-06-22 03:37

great skin, but this doesn't work so well for me w/clean canvas theme. When I log in I see {"result":"success"} and the url is domain.com/gallery3/login/auth_ajax. If I reload the default url I can use the theme. Using an iPAD. Just me?

 
brentil
brentil's picture

Joined: 2007-04-11
Posts: 124
Posted: Wed, 2011-06-22 14:49

Installed the module into my Gallery 3.0.2 installation and I get the following.

Quote:
--- error: ErrorException [ 0 ]: Invalid argument supplied for foreach()
/htdocs/gallery/modules/themedispatcher/helpers/MY_theme.php [ 48 ]
#0 /htdocs/gallery/modules/themedispatcher/helpers/MY_theme.php(48): gallery_error_Core::error_handler()
#1 /htdocs/gallery/modules/gallery/helpers/gallery_event.php(27): theme::load_themes()
#2 /htdocs/gallery/modules/gallery/helpers/module.php(375): gallery_event_Core::gallery_ready('gallery_ready')
#3 /htdocs/gallery/modules/gallery/helpers/gallery.php(96): module_Core::event(Array)
#4 [internal function]: gallery_Core::ready(Array, Array)
#5 /htdocs/gallery/system/core/Event.php(208): call_user_func_array('system.ready')
#6 /htdocs/gallery/application/Bootstrap.php(58): Event_Core::run()
#7 /htdocs/gallery/index.php(102): require('/htdocs/...')
#8 {main}

The line in question is as follows;

Quote:
foreach( unserialize(module::get_var("themedispatcher", "useragents")) as $key => $val) {
if (stristr( request::user_agent("agent"), $key)) {
$dispatch = true;
}
}

It appears the installation of your module did not place the initial var setting or there's something else wrong code wise because it's breaking my Gallery in all places now.

-Brentil
ModuleUpdates module for Gallery 3

 
brentil
brentil's picture

Joined: 2007-04-11
Posts: 124
Posted: Wed, 2011-06-22 14:57

I had tried creating the entry itself but since it's an array stored in a table I did not have the format correct. I had to comment out lines 48 ~ 52 to get the website to work again. After it was working I could then configure the module to add a user agent which then built the correct var entry allowing me to uncomment the code and have the website work again.

You need to add the var initialization to your themedispatcher_installer.php script so that a base blank one exists on install.

-Brentil
ModuleUpdates module for Gallery 3

 
brentil
brentil's picture

Joined: 2007-04-11
Posts: 124
Posted: Wed, 2011-06-22 15:16

If you click Save for a Theme but leave the User-Agent field empty it puts a blank entry into the user agent array. The code I had to comment out before needed to be commented out again since it errors on blank user agent entries. Once I could get the website running again I could remove the blank entry and get the website working again and revert the code comments.

-Brentil
ModuleUpdates module for Gallery 3

 
lbarlow

Joined: 2011-06-29
Posts: 3
Posted: Wed, 2011-06-29 11:47

Hi, Great theme.

However, I have a problem when i login from an iphone/ipad. I get the message {"result"="Success"}.

Can you help?

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Wed, 2011-06-29 17:04

Have you configured the user-agent setting of the themedispatcher module as shown here http://codex.gallery2.org/Gallery3:Themes:iMobile?

 
lbarlow

Joined: 2011-06-29
Posts: 3
Posted: Fri, 2011-07-01 20:36

Hi, yes I have. It is showing the mobile theme, it's just the login which does as described above. Once I have Got the result=success message, I can navigate to my site and it is logged in. I also get a whole bunch of code come up when I enter incorrect login details. It works fine on non-mobile devices.

Thanks for your help,

Lbarlow

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Fri, 2011-07-01 21:07

Can you please paste the content of the logfile (in <gallery root>/var/log) when this happens.

 
lbarlow

Joined: 2011-06-29
Posts: 3
Posted: Fri, 2011-07-01 22:22

It doesn't seem to create a log file?

When I input incorrect login detail I get:

{"result":"error","html":"<script type=\"text\/javascript\">\n $(\"#g-login-form\").ready(function() {\n $(\"#g-password-reset\").click(function() {\n $.ajax({\n url: \"\/index.php\/password\/reset\",\n success: function(data) {\n $(\"#g-login\").html(data);\n $(\"#ui-dialog-title-g-dialog\").html(\"Reset password\");\n $(\".submit\").addClass(\"g-button ui-state-default ui-corner-all\");\n $(\".submit\").gallery_hover_init();\n ajaxify_login_reset_form();\n\n \/\/ See comment about IE7 below\n setTimeout('$(\"#g-name\").focus()', 100);\n }\n });\n });\n\n \/\/ Setting the focus here doesn't work on IE7, perhaps because the field is\n \/\/ not ready yet? So set a timeout and do it the next time we're idle\n setTimeout('$(\"#g-username\").focus()', 100);\n });\n\n function ajaxify_login_reset_form() {\n $(\"#g-login form\").ajaxForm({\n dataType: \"json\",\n success: function(data) {\n if (data.form) {\n $(\"#g-login form\").replaceWith(data.form);\n ajaxify_login_reset_form();\n }\n if (data.result == \"success\") {\n $(\"#g-dialog\").dialog(\"close\");\n window.location.reload();\n }\n }\n });\n };\n<\/script>\n<div id=\"g-login\">\n <ul>\n <li id=\"g-login-form\">\n <form action=\"\/index.php\/login\/auth_ajax\" method=\"post\" id=\"g-login-form\" class=\"g-narrow\">\n<input type=\"hidden\" name=\"csrf\" value=\"851ccf223c34c87cf3ab977321ea2ecc\" \/><input type=\"hidden\" name=\"continue_url\" value=\"\" \/> <fieldset>\n <legend>Login<\/legend>\n <ul>\n <li class=\"g-error\">\n <label for=\"name\" >Username<\/label>\n <input type=\"text\" id=\"g-username\" name=\"name\" value=\"#######\" class=\"\" \/>\n <p class=\"g-message g-error\">\n Invalid name or password\n <\/p>\n <\/li>\n <li>\n <label for=\"password\" >Password<\/label>\n <input type=\"password\" id=\"g-password\" name=\"password\" value=\"#######\" class=\"\" \/>\n <\/li>\n <li>\n <input type=\"submit\" value=\"Login\" class=\"submit\" \/>\n <\/li>\n <\/ul>\n <\/fieldset>\n<\/form> <\/li>\n <li>\n <a href=\"#\" id=\"g-password-reset\" class=\"g-right g-text-small\">Forgot your password?<\/a>\n <\/li>\n <\/ul>\n<\/div>\n"}

And when I enter the right details I get the original post.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sat, 2011-07-02 13:40

Are you working on the latest g3 version?
If you don't see a logfile in var/log, then there is probably something else wrong.

 
zingerbb

Joined: 2011-07-02
Posts: 5
Posted: Wed, 2011-07-06 15:38

Great! Is there any way to add a "view full site" or "view non-mobile site" or something of that nature? I.e. some code that tricks the site into thinking it is being accessed from Safari or Firefox?

Updated to clarify... for those who wish to view the non-mobile site.

 
sebcool20

Joined: 2009-09-18
Posts: 41
Posted: Tue, 2011-07-05 21:41

First I've got to say that your theme is just wonderful and easy to use! Thanks a lot for it!

I've got a few questions concerning the theme and module.
I was just asking myself about what happens to other modules when the user gets switched to the mobile theme, particularly about the Google Analytics module, will those users using the mobile theme still have their visits accounted by analytics? Or will they be gone from my stats?
Also, would there be a way to integrate mobile ads into the theme? Just asking, it's not that much important!

Thanks again for your work!

 
P-J

Joined: 2011-07-08
Posts: 3
Posted: Fri, 2011-07-08 19:23

Calleh,

I may be new on the forum, but I've been using Gallery since version 1.3 and I have always enjoyed to see it become better and better.
Thanks for designing such a Theme, I'm impressed by the way it looks and I think it's great to have such wonderfull people contributing to the project.

On my server your theme works well, with one possible exception, it doesn't show any photo's in the root dir broodbakker.com
Other sub-folders do work well, like broodbakker.com/index.php/NY or broodbakker.com/index.php/Asia

Any ideas as to what could be the cause?

for the record, I'm using:
- Gallery 3.02
- Apache 2.2.17-1ub
- MySQL 5.1.54-1ub
- PHP 5.3.5-1ub
On Ubuntu 11.04

All thoughts are appreciated.

Kind regards and thanks in advance,
P-J

 
shecter
shecter's picture

Joined: 2006-12-30
Posts: 130
Posted: Wed, 2011-07-13 04:46

I set up this module and setup an android user agent. when i go to my site, i get the logon page in a nice mobile mode, but then I can only see a strange background and now thumbs of albums. I'm using a Motorola droid with the dolphin mini browser. here's some screen shop:

My setup: http://screencast.com/t/po09XfA8, and theme: http://screencast.com/t/c23X3oaouf.

Here's a screen cap from my phone: http://screencast.com/t/1dyU2lW7

 
lightxx

Joined: 2010-12-02
Posts: 28
Posted: Wed, 2011-07-13 06:02

awesome theme!!!

thank you so much for your work buddy!!!

 
Jonreynolds

Joined: 2008-03-09
Posts: 96
Posted: Wed, 2011-07-13 14:22

Hi,

When I try and login from my Android device, after submitting my user/pass I get prompted to download something and cannot proceed.

I have to then hit back and refresh to see the gallery in a logged in state.

----

To embed videos that the mobile browser can see (html5) what format should my videos be in?

Thanks

Jon Reynolds
www.jcrdevelopments.com

 
engineer

Joined: 2005-09-13
Posts: 84
Posted: Thu, 2011-07-14 01:37

After test it several times, I find the HTML Purify module conflicts with the theme. If I disable HTML Purify module, my Android phone can show gallery3 correctly.

 
shecter
shecter's picture

Joined: 2006-12-30
Posts: 130
Posted: Thu, 2011-07-14 03:31

I found the same thing. turned off HTML Purify and now it works on my Android phone.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Thu, 2011-07-14 08:21

@engineer & shecter thanks for investigating. I will have a look what the conflict might be and how to resolve, so that the two work together.

P-J wrote:
On my server your theme works well, with one possible exception, it doesn't show any photo's in the root dir broodbakker.com
Other sub-folders do work well, like broodbakker.com/index.php/NY or broodbakker.com/index.php/Asia
P-J

Can you check whether this is also because of the purify module?
If not can you pls provide the output of your current logfile in <gallery root>/var/logs/

This is valid for all. If you encounter a problem, please enable debugging http://codex.gallery2.org/Gallery3:FAQ#How_do_I_see_debug_information.3F and paste the output of your logfile. Otherwise investigations are a bit difficult.

 
P-J

Joined: 2011-07-08
Posts: 3
Posted: Wed, 2011-07-20 18:30

Calleh,

I apologize for the slow response, unfortunately I have not installed the HTML purify module, so nothing left to disable.

I've enabled logging as you advised and this is the output:

cat 2011-07-20.log.php

Quote:
<?php defined('SYSPATH') or die('No direct script access.'); ?>

2011-07-20 20:05:10 +02:00 --- error: ErrorException [ 0 ]: Undefined index: first
/usr/share/gallery3/modules/navcarousel/controllers/navcarousel.php [ 29 ]
#0 /usr/share/gallery3/modules/navcarousel/controllers/navcarousel.php(29): gallery_error_Core::error_handler(8, 'Undefined index...', '/usr/share/gall...', 29, Array)
#1 [internal function]: Navcarousel_Controller->item('5403')
#2 /usr/share/gallery3/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Navcarousel_Controller), Array)
#3 [internal function]: Kohana_Core::instance(NULL)
#4 /usr/share/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array)
#5 /usr/share/gallery3/application/Bootstrap.php(67): Event_Core::run('system.execute')
#6 /usr/share/gallery3/index.php(102): require('/usr/share/gall...')
#7 {main}

I have disabled the navigation carousel module.. but it hasn't solved the problem.
Is there any other debugging info that I can get you ?

P-J

 
P-J

Joined: 2011-07-08
Posts: 3
Posted: Wed, 2011-07-20 21:29

Gentlemen,

I managed to narrow down on the problem:

As the problem only occurred while viewing the site root I decided to make a new sub-album and to move all my other sub-albums one level down into the new one. Suddenly I was able to see the site root, containing that single sub-album I just created, but I wasn't able to browse into the nested sub-albums anymore.

Apparently one of the sub-albums I just moved was preventing me from viewing the contents of the album where it was nested.

I then moved some albums back to the site root, and checked if I could still see the contents of the root, all went well and I decided to move back more. Finally I noticed that there was one sub-album in particular that caused the failure.

This specific sub-album also had several nested albums, I started moving them too until I ended up with the one sub-album that was the cause of the problems. I created another album using a different name, moved the pics to there, and deleted the original album.... Renamed the new album to match the old name, and all problems were gone.

Unfortunately I haven't been able to find the reason why this specific album was causing problems, and I have also (foolishly) deleted it, so no possibility to reproduce the problem.

I believe it must have been a legacy issue...
Mind that in the last few years upgraded from gallery 1.3 to 1.5, moved my entire database to another server, re-setup and migrated twice... Then last year upgraded to Gallery 2, and finally now last month upgraded to Gallery 3. I'm not a MySQL wizard, but I'm amazed that I haven't lost any content in the mean time, also I have no clue what other legacy issues could still plague my DB. Therefore I like to believe the problem I experienced is not mainstream, and most unlikely to repeat itself with others.

I will off-course keep you in the loop if I see it again.
Thanks for all the good work..

I can really start to enjoy your extremely cool module now !!!
P-J

 
benstrawn

Joined: 2011-07-21
Posts: 1
Posted: Thu, 2011-07-21 20:05

Is there a way to include a tag search field with the imobile theme?
It would be super great! Otherwise great simple theme thanks!

 
Wabin

Joined: 2009-07-04
Posts: 44
Posted: Sun, 2011-07-24 23:20

The theme looks beautiful. Thanks! I second the request to go back to the regular (non-mobile) theme, tho I don't know how it would be possible. Sometimes, people may want to view the regular site on their phones or tablets. I can see myself wanting full access to the site when out & about to give someone access to certain folders.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Wed, 2011-07-27 13:53

@benstrawn Currently this capability does not exist, but I'll consider this for further development.
@Wabin I saw this request earlier and it might not be that easy to implement. I will need to think about how this could be achieved.

 
Ice74

Joined: 2007-06-20
Posts: 4
Posted: Thu, 2011-07-28 08:09

Hi,
I've the same problem than lbarlow. At login, the result is {"result":"sucess"}.

Did you find a solution ?

Thanks for this theme.

Laurent

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Thu, 2011-07-28 12:44

I can't really reproduce this error. Do you get the same mesages as lbarlow in your logfile when you enable debugging?
Can you disable some modules, to see whether there is a dependency?

 
patjp

Joined: 2011-08-04
Posts: 2
Posted: Thu, 2011-08-04 04:31

First thanks for this great theme! Is there a limit to the number of pictures I can display? I have some albums with 400+ pictures but consistently I can display picture 117 fully and on the next picture 2/3s is shown. All the pictures after that are not displayed.
I doubled the memory allocated to php and increased script processing times on my server but this had no effect. I also thought it might be a memory issue on my iPad so I set the user agent to Firefox on the laptop to iPhone but still the maximum I could display was 118 pictures.
Obviously the answer is sub-albums ...

 
OC2PS
OC2PS's picture

Joined: 2010-09-08
Posts: 428
Posted: Thu, 2011-08-04 16:49

Any experiences with other mobile user agents, esp. Android, Nokia (I am thinking 5800) and Opera Mini?

SoosKriszta
Csillamvilag.com

Bodypainting, Facepainting, Glitter, Henna
HennaLap.com

 
patjp

Joined: 2011-08-04
Posts: 2
Posted: Sun, 2011-08-07 07:48

Nope. I only have iOS devices.

 
brentil
brentil's picture

Joined: 2007-04-11
Posts: 124
Posted: Sun, 2011-08-07 15:46
sooskriszta wrote:
Any experiences with other mobile user agents, esp. Android, Nokia (I am thinking 5800) and Opera Mini?

I use it for Android devices with no issues at all. The only thing you need to do correctly is find the right agent strings but there's plenty of good resources online for that.

-Brentil
ModuleUpdates module for Gallery 3

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Wed, 2011-08-10 18:10

Once I activated the module, I was unable to access my gallery anymore, including the admin section. This error was recorded in the log file:

2011-08-10 20:46:09 +03:00 --- error: ErrorException [ 0 ]: Invalid argument supplied for foreach()
/home/****/public_html/gallery/modules/themedispatcher/helpers/MY_theme.php [ 48 ]
#0 /home/****/public_html/gallery/modules/themedispatcher/helpers/MY_theme.php(48): gallery_error_Core::error_handler()
#1 /home/****/public_html/gallery/modules/gallery/helpers/gallery_event.php(27): theme::load_themes()
#2 /home/****/public_html/gallery/modules/gallery/helpers/module.php(375): gallery_event_Core::gallery_ready('gallery_ready')
#3 /home/****/public_html/gallery/modules/gallery/helpers/gallery.php(96): module_Core::event(Array)
#4 /home/****/public_html/gallery/system/core/Event.php(208): gallery_Core::ready(Array, Array)
#5 /home/****/public_html/gallery/application/Bootstrap.php(58): Event_Core::run('system.ready')
#6 /home/****/public_html/gallery/index.php(102): require('/home/****/pub...')
#7 {main}
2011-08-10 20:49:22 +03:00 --- error: File not found: admin/themedispatcher

To get my gallery back, I had to deactivate the module updating the DB directly. I've used phpMyAdmin. However, a message at the top asking me to configure the module is still being shown even that the module was deactivated.

I am using GIT build#82.

 
brentil
brentil's picture

Joined: 2007-04-11
Posts: 124
Posted: Wed, 2011-08-10 18:47

The very last line of that sounds like the error itself. Make sure themedispatcher\controllers\admin_themedispatcher.php got uploaded succesfully as that's the file it is saying doesn't exist.

-Brentil
ModuleUpdates module for Gallery 3

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Wed, 2011-08-10 19:36
brentil wrote:
The very last line of that sounds like the error itself. Make sure themedispatcher\controllers\admin_themedispatcher.php got uploaded succesfully as that's the file it is saying doesn't exist.

It's already there. I've just tried to upload the folder using FTP, since in the first time I downloaded it and unzipped it using the shell. No difference though...

By the way, I see this error in the dang page that is being shown everywhere when activating the module:

Fatal error: Method Block::__toString() must not throw an exception in /home/****/public_html/gallery/modules/gallery/views/error_admin.html.php on line 307
 
Wabin

Joined: 2009-07-04
Posts: 44
Posted: Fri, 2011-08-12 08:04
Quote:
I use it for Android devices with no issues at all. The only thing you need to do correctly is find the right agent strings but there's plenty of good resources online for that.

Any advice on where to look? I tried a Google search, but I have no idea what I'm reading on the various pages that came up. What I'd like to do is set the site to a mobile version for anyone who accesses it via a smartphone, but leave it in the regular version for anyone who accesses it on a pad.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Fri, 2011-08-12 09:00

This site lists a lot of user agent strings http://www.zytrax.com/tech/web/browser_ids.htm
The themedispatcher module does a search on the whole transferred user agent string for all values you configuered in themedispatcher.

 
sebcool20

Joined: 2009-09-18
Posts: 41
Posted: Sat, 2011-08-13 18:10

First I've got to say that your theme is just wonderful and easy to use! Thanks a lot for it!

I've got a few questions concerning the theme and module.
I figured out that using iMobile scrapped the google analytics I had to get stats from my visitors... Most of my mobile traffic has disapeared from my stats... Do any of you think there would be a way to bring the analytics code into the mobile theme?
Also, would there be a way to integrate mobile ads into the theme? Just asking, it's not that much important!

Thanks again for your work!

 
iluv4u2c
iluv4u2c's picture

Joined: 2003-03-15
Posts: 92
Posted: Sun, 2011-08-14 14:45

Sprint EVO 4G and iPod Touch wifi

Worked great. I am using gallery 3.0.3 (branch 3.0.x, build 41)

I disabled it because most of the traffic comes from a browser and I didn't want to lose momentum using imoble only.

Thanks for all your work and maybe in the future I will do a gallery exclusive to this theme.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sun, 2011-08-14 16:10
Quote:
exclusive to this theme

There is no need to use imobile only. This is the reason for the themedispatcher module.
A normal browser will see your "normal" theme and all mobile browsers configured in the themedispatcher module will see the imobile theme.

@sebcool20
Bringing google analytics back should be very simple, I just need to test. Mobile ads might be a bit more dev effort.

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Sun, 2011-08-14 16:15

@calleh Any clue why do I get that error when activating themedispatcher module?

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Sun, 2011-08-14 16:18

What error?

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Sun, 2011-08-14 16:30
 
sebcool20

Joined: 2009-09-18
Posts: 41
Posted: Sun, 2011-08-14 16:34

@calleh Thanks for looking into bringing Analytics back, it will be greatly apreciated if it works! Mobile ads was just a ramdom question so don't spend time on it just for me!

Thanks again!

 
Wabin

Joined: 2009-07-04
Posts: 44
Posted: Tue, 2011-08-16 04:24

When I go directly to a photo page via a link (like if a link is posted on Facebook) on my iPhone, it just loads the picture. There are no menus or anyway to get back to the rest of the site.

 
calleh

Joined: 2011-03-28
Posts: 90
Posted: Wed, 2011-08-17 17:43

I have just uploaded a new version.
@sebcool20: the google analytics module should work now
@wabin: A back link will now be shown if directly reach a photo or movie.
@patjp: I have an album with over 200 pictures which loads without any problems.

 
Kadina

Joined: 2006-04-26
Posts: 31
Posted: Thu, 2011-08-18 02:25

Thanks for this great mobile theme! It works great on my android smartphone, but not on my husband's blackberry. His phone is not a touch screen, so while the theme loads properly he can not navigate the albums and photos. Would it be possible to add support for mouse clicks on items/links to allow navigation on phones without touch screens?

Thanks!

 
woup

Joined: 2010-01-24
Posts: 2
Posted: Thu, 2011-08-18 17:35

Great Theme ! Thanks for this.

two suggestions :
- a "full screen" button to automatically zoom
- something to download the picture with "downloadfullsize" module

Cheers,

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Fri, 2011-08-19 18:46

Hi calleh, I still have the same problem with the new version.

 
shadow12

Joined: 2011-08-29
Posts: 2
Posted: Mon, 2011-08-29 04:35

Hi calleh, thanks a lot for your great module/theme. I have one question. Theme dispatcher setting came out only once after it's first installation, how can I re-configure it? I could not find a way.

thanks a lot!