Theme: iMobile for iphone and ipad
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
Hi, I put together an iphone, ipad theme based on fotorama http://www.fotorama.io/. Installation: Current Issues: You can download the latest versions either from this forum post of from the github repository:
|
||||||||
jetkins
Joined: 2008-05-13
Posts: 31 |
![]() |
|||||||
Wow, I came here tonight to ask if there was any likelihood of a mobile theme any time soon, and discovered that you've already done it! Great work; I look forward to further updates if you manage to iron out the couple of wrinkles you mention. Thanks! |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
I fixed the issue with the slideshow start and uploaded a new version. calleh |
||||||||
jetkins
Joined: 2008-05-13
Posts: 31 |
![]() |
|||||||
calleh wrote:
I fixed the issue with the slideshow start and uploaded a new version. Works great. Thanks. |
||||||||
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
|||||||
I was lucky enough to get a iPad for my birthday and am using it right now to test this out. This is cool. Good job and thanks for the codex page as well. Dave |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
When I understan your comment correctly, then you just have to tap the photo in slideshow mode and the menu with the back button reappears. |
||||||||
tempg
Joined: 2005-12-17
Posts: 1857 |
![]() |
|||||||
calleh wrote:
* I actually don't like to change files of existing themes (as described above), but I haven't found a way how to identify the user-agent and change the current theme before the theme is initialized. I can't get the file to unzip properly on this computer, so I haven't seen the contents. (I'll try on another computer later.) But I'm thinking that you could possibly have the code inserted into a module. The module would then add the code to the views files dynamically (similar to the way code is inserted by the nobots module and the custom header module, but without the need for the admin interface). |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
Hi tempg, thanks for this idea, I will investigate whether this might be an option, but what I saw so far is that it might not help, as I need to completely replace the page and album view based on the user-agent accessing the site. The two modules you mention do insert something to the default template, they do not replace them completely. |
||||||||
tempg
Joined: 2005-12-17
Posts: 1857 |
![]() |
|||||||
@calleh: I see. (I still haven't looked at the files yet.) I read "add the content of the <gallery root>/themes/<your theme>/views/page.html.php.inc file at the beginning of the <gallery root>/themes/<your theme>/views/page.html.php file of your current theme" to mean that you just needed to add some content via an inc file. |
||||||||
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
|||||||
This is on my list of things to add to ask at the meetup. Dave |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
Thanks for that Dave. tempg's input gave me an idea where to look and I'm currently drafting a generic module which basically replaces the load_themes function in the theme.php helper and which would allow to load a specific theme based on a defined user-agent. But maybe there are some more elegant ways of doing this... |
||||||||
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
|||||||
We will fix this issue for the next version of G3.02 Dave |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
Not sure how this would solve the problem. In the meantime I have developed (thanks to tempg who opended my mind) the "Theme dispatcher" module (attached to the first post) which allows to configure different user agents. In case a visitor is using such a configured user agent a configured theme is used instead of the standard theme. |
||||||||
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
|||||||
Adding page_top will allow the module to add content to the page top before the head and body tags. This will allow a theme to detect user agent and then do what they want from that point. Your way works as well. Dave |
||||||||
erlis
Joined: 2004-01-16
Posts: 205 |
![]() |
|||||||
Wow this really looks great!! Would be cool to integrate it with my .Pear theme (http://code.google.com/p/pear4gallery/) a theme for G2 (but I think I'll start the porting process for G3 soon) that mimics the mobile.me gallery from apple. Demo of my G2 theme can be fund at: http://erlandssson.nu/~fer/gallery2/main.php |
||||||||
wensted
Joined: 2011-04-30
Posts: 5 |
![]() |
|||||||
This is just what I have been looking for! I installed the Themedispatcher module & iMobile theme, but I get only "plain" looking picture galleries when I login to my Gallery3 site. Themedispatcher module is activated & user agents defined. Iphone user agent is recognized ok, but pages have no iphone-style layout, just plain images. Gallery3 is running on XAMPP 1.7.3a and still on version 3.0. I see no errors in apache logs when accessing the gallery. Am I missing something? Thanks for developing this great theme! |
||||||||
IanWorthington
Joined: 2007-01-12
Posts: 18 |
![]() |
|||||||
I had to uncompress it on the pc, add the .tar extension to the included file, uncompress that, and finally recompress the directory it produced. Then I could upload it and uncompress on the server. Bit of a performance, but it worked. i |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
wensted wrote:
I installed the Themedispatcher module & iMobile theme, but I get only "plain" looking picture galleries when I login to my Gallery3 site. ! Are you logging on using an iphone or ipad? |
||||||||
wensted
Joined: 2011-04-30
Posts: 5 |
![]() |
|||||||
I'm using iphone to access the gallery. I upgraded Gallery software to version 3.0.1, and it works now great! I upgraded also XAMPP to 1.7.4, but Gallery upgrade seem to fix things for me. Thanks for support. |
||||||||
wensted
Joined: 2011-04-30
Posts: 5 |
![]() |
|||||||
One more question |
||||||||
erlis
Joined: 2004-01-16
Posts: 205 |
![]() |
|||||||
wensted wrote:
One more question Have you tried http://codex.gallery2.org/Gallery3:Modules:square_thumbs |
||||||||
wensted
Joined: 2011-04-30
Posts: 5 |
![]() |
|||||||
Thanks for the tip, I tested it, but using square thumbs module I guess I would get square/cropped thumbs also for my normal theme (not iMobile). I'd like to see cropped thumbs with correct aspect ratio in iPhone etc, and "normal" not cropped thumbs when viewed in web browser. |
||||||||
mrf00rk
![]()
Joined: 2005-06-02
Posts: 158 |
![]() |
|||||||
Worked like a champ! Even I could install this! :D Edit: And maaaybe some tags/latest update/most viewed at the bottom! ;) |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
wensted wrote:
I'd like to see cropped thumbs with correct aspect ratio in iPhone etc, and "normal" not cropped thumbs when viewed in web browser. I'm currently fixing the safari crash situation and I'm also looking at real square thumbs. I'll keep you posted. |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
I have corrected the safari crashes by using a different js framework for the theme. I have attached the latest version to the first post of this thread. |
||||||||
pfranken
Joined: 2011-05-06
Posts: 1 |
![]() |
|||||||
Is it just me or ??? ... the imobile-vxx.zip file only contains a directory 'imobile' ... and no files ???? |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
No, it wasn't you - it was me. Seems my last zip didn't work. |
||||||||
kellsie
Joined: 2008-04-21
Posts: 3 |
![]() |
|||||||
Looks like the imobile-v0.5.zip is good but the themedispatcher_v1.0.tgz file is corrupted. I downloaded it from two different computers with different browsers with the same result when trying to unpack it. Would it be possible to get the themedispatcher_v1.0.tgz file uploaded again? |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
Ok, ok I have converted the tgz to a zip, now everyboy should be able to unzip |
||||||||
Armani2
Joined: 2007-05-09
Posts: 263 |
![]() |
|||||||
This is a great feature, works like a charm! I was wondering what would have to be done to get it to make the photos larger and smaller again with a pinch on the iPhone? |
||||||||
wensted
Joined: 2011-04-30
Posts: 5 |
![]() |
|||||||
Hello! Thanks Calleh, now it looks great! |
||||||||
chotgor1
Joined: 2005-01-15
Posts: 2 |
![]() |
|||||||
I have gallery2 embedded into phpbb, so I can't upgrade to g3 immediately yet. any way to make this theme work on gallery2? |
||||||||
h_s
Joined: 2009-06-26
Posts: 43 |
![]() |
|||||||
Very nice theme. Works very well. Thank you for developing and sharing this!!! One small issue: Kind regards, h_s |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
Quote:
the link results in an error page Can you share the regarding error logged in <galleryhome>/var/logs/ |
||||||||
h_s
Joined: 2009-06-26
Posts: 43 |
![]() |
|||||||
I hope this is the corresponding error msg.: Quote:
2011-05-18 14:23:54 -07:00 --- error: Kohana_Exception [ 42 ]: The requested views, photo.html, could not be found |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
I have just uploaded a new version, which Quote:
One small issue: |
||||||||
h_s
Joined: 2009-06-26
Posts: 43 |
![]() |
|||||||
Thank you very much! Kind regards h_s |
||||||||
jetkins
Joined: 2008-05-13
Posts: 31 |
![]() |
|||||||
FYI, I noticed the other day that when a friend browsed my gallery from his Android phone, he got the regular site instead of the iMobile theme. Might this theme also be offered to Android browsers? |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
Sure, but I have not tested the theme on android as I have no device available. |
||||||||
cmisip
Joined: 2011-02-20
Posts: 22 |
![]() |
|||||||
I am getting this error. Fatal error: Method Block::__toString() must not throw an exception in /usr/share/gallery3/modules/gallery/views/error_admin.html.php on line 178 Any ideas? Thanks Chris |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
When are you getting this error? |
||||||||
cmisip
Joined: 2011-02-20
Posts: 22 |
![]() |
|||||||
The error occurs immediately when I try to access my gallery installation. Here is the output of the gallery log file. Chris |
||||||||
gpo
Joined: 2008-05-05
Posts: 68 |
![]() |
|||||||
@calleh The google adsense module doesn't work with this and in chrome browser [pc] the theme is grey and in FF4 its white. How do I add comments & share photo [addthis] plugin, add photo to album option! Check the latest update from Jaipho for Smoother scroll on Jaipho |
||||||||
gpo
Joined: 2008-05-05
Posts: 68 |
![]() |
|||||||
@Sunite your still using the normal theme and also how do I get my setting to work like comments ,adsense etc under imobile |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
@cmisip Have you configured the user-agent setting of the themedispatcher module as shown here http://codex.gallery2.org/Gallery3:Themes:iMobile? @sunite A quick solution for your large number of albums would be, if you would place them in a number of sub-albums. A more sophisticated solution would be to enhance the theme with paginator support, which I haven't yet, but you are happy to provide input. To the pinch an zoom feature: You need to tap the picture once and then you can zoom using two fingers, like you zoom all other things on an iphone. A one-finger swipe triggers the move to the next slide. How would you zoom with only one finger? There might be an occasion where one picture stays, which goes away if you swipe over it. If you find a way to prevent this, I am open for suggestions. @gpo Each browser sends a user-agent string to the webserver he is accessing. This user agent string contains beside a number of things also the platform it runs on. The purpose of the themedispatcher module is to select a different theme in case a specific user-agent string is found. In our case we configure themedispatcher to select the imobile theme in case the user-agent string contains iphone or ipad, only in those cases you would see the imobile theme. When you try to access the same site with a firefox, chrome, etc from a pc / mac you would of course see the "normal" theme - unless you fake the user-agent string of that browser. The imobile theme is only made to be accessed from mobile devices like iphones, ipads, androids, etc. |
||||||||
Jonreynolds
Joined: 2008-03-09
Posts: 96 |
![]() |
|||||||
Superb! Absolutely Superb! edit: Thanks Jon Reynolds |
||||||||
Badd
Joined: 2011-06-02
Posts: 8 |
![]() |
|||||||
That's because iPhone/iPod Touch & iPad doesn't support flash... |
||||||||
Jonreynolds
Joined: 2008-03-09
Posts: 96 |
![]() |
|||||||
Badd wrote:
That's because iPhone/iPod Touch & iPad doesn't support flash... OK, but I am viewing on a Android device. Anyway I can make it work? Thanks Jon Reynolds |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
The videos are embedded using the html5 video tag. So your video must be in a format that is supported by your browser, than it works. |
||||||||
Badd
Joined: 2011-06-02
Posts: 8 |
![]() |
|||||||
@calleh @sunite And i think iv found a solution: http://net.tutsplus.com/tutorials/javascript-ajax/create-a-twitter-like-load-more-widget/ Its a load more widget that helps you load more when clicked. I haven't got round to reading it fully, but i think its possible to use it in iMobile. Thanks |
||||||||
calleh
Joined: 2011-03-28
Posts: 90 |
![]() |
|||||||
This sounds like a good idea. I will have a look into this. But don't expect this to be done in the next few days.... |
||||||||