Mobile phone theme offered automatically ?

Pinguin

Joined: 2005-09-27
Posts: 210
Posted: Thu, 2013-02-14 23:31

I know there is Xotof, but I think this is not what I am looking for. Is it correct, the Xotof can be used only by users of a Gallery account and not by everyone for viewing photos?

I am searching something, that works like this,

When the Gallery (G3) thinks, that the gallery is viewed by a mobile phone or tablet, it asks if it should change to the mobile version and offers a different theme than for a desktop pc, similar like a lot of other websites do. So there is no need to install an app on the mobile phone, because it works with the browser.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2013-02-15 00:29
 
Pinguin

Joined: 2005-09-27
Posts: 210
Posted: Fri, 2013-02-15 21:06

Thanks for this. Are there other themes for a mobile phone too?

I would prefer a few modifications:
non-square previews or cropping both sides to create a square preview
own resolution for previews and "larger view" (not the largest resolution)

themedispatcher should recognize a "big resolution", which should be configurable. A tablet with 1280x or more doesn't need a mobile theme.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2013-02-15 21:57
Quote:
Are there other themes for a mobile phone too?

Not that I'm aware of. It would be a good starting point to develop a new theme with the modifications you desire.
I've never used the theme so don't know if there is setting for what you want or not.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2013-02-15 22:09

My RESTful gallery3 uses resizes/fullsize depending on device width. And is very touch/swipe friendly.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Mon, 2013-09-09 10:51

Nice theme "suprsidr". I try to use it on http://www.seibella.ro/poze/m/
Any idea what should i look for to make it works?

Thanks

-My Gallery-
http://www.seibella.ro/poze

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Mon, 2013-09-09 12:51

* url: url to our G2 REST interface your/gallery2/source.php is url to rest.php or to main.php???

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2013-09-09 15:36

looks like url: 'http://www.seibella.ro/poze/rest.php' is working fine.

try rest.php line ~636:
return $urlGenerator->generateUrl(array('view'=>'core.DownloadItem', 'itemId'=>$item->getId(), 'serialNumber'=>$item->getSerialNumber()), array('forceFullUrl'=>true, 'forceSessionId'=>true, 'htmlEntities'=>true));
to:
return $urlGenerator->generateUrl(array('view'=>'core.DownloadItem', 'itemId'=>$item->getId(), 'serialNumber'=>$item->getSerialNumber()), array('forceFullUrl'=>true, 'forceSessionId'=>true, 'htmlEntities'=>false));

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2013-09-09 15:38

might need to make sure 'htmlEntities'=>false for thumbUrl as well line ~595

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Mon, 2013-09-09 18:55

Soo fast - it works.
Thanks
One suggestion if you agree.
Album title appears on mouse over - good for desktop but useless for mobile I think.
How can i put title on top/bottom of album thumbnail

-My Gallery-
http://www.seibella.ro/poze

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Mon, 2013-09-09 19:44

It looks that I can browse gallery from Iphone but I cannot view pictures.

http://iphone4simulator.com/
http://www.seibella.ro/poze/m/

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2013-09-09 23:26

it has been a long time since I wrote this script.
Mine is working w/ 'htmlEntities'=>false for thumbUrl but true for view(line 636)

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Tue, 2013-09-10 15:19

It works well on mobile,
But:
On desktop are showed all images without watermark, full size, hidden albums, albums with passwords ....

-My Gallery-
http://www.seibella.ro/poze

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Fri, 2013-09-13 18:31

Are you sure you putted your live code for download? Please check. it looks nice on your site.

Quote:
On desktop are showed all images without watermark, full size, hidden albums, albums with passwords ....

This is only when you are logged in as administrator.....
With no user it is not working on desktop

I put "false" on both lines; 595,636. No other changes.
http://www.seibella.ro/poze/m

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2013-09-13 18:47

I don't see the full images on desktop as I don't have permissions.

I never tested w/ a gallery that had view restrictions.
I suppose you would want to show the resize if the fullsize was restricted.

rest.php line ~830:

if (!$userId) {
    list($ret, $userId) = GalleryCoreApi::getAnonymousUserId();
}

to:

if (!$userId) {
    list($ret, $userId) = GalleryCoreApi::getAnonymousUserId();
    $_REQUEST['g2_maxImageHeight']) == $_REQUEST['g2_maxImageHeight'] = 960
}

where 960 is the largest side of the resize you want anonymous users to see.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Fri, 2013-09-13 20:01

Not works - nothing show now

suprsidr wrote:
I don't see the full images on desktop as I don't have permissions.

I never tested w/ a gallery that had view restrictions.
I suppose you would want to show the resize if the fullsize was restricted.

rest.php line ~830:

if (!$userId) {
    list($ret, $userId) = GalleryCoreApi::getAnonymousUserId();
}

to:

if (!$userId) {
    list($ret, $userId) = GalleryCoreApi::getAnonymousUserId();
    $_REQUEST['g2_maxImageHeight']) == $_REQUEST['g2_maxImageHeight'] = 960
}

where 960 is the largest side of the resize you want anonymous users to see.

-s
________________________________
All New jQuery Minislideshow for G2/G3

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2013-09-13 21:52

sorry, this should be:
$_REQUEST['g2_maxImageHeight']) = $_REQUEST['g2_maxImageHeight'] = 960

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Sun, 2013-09-15 09:55

Nope - not helps. It is not appearing anything - even thumbnails.

-My Gallery-
http://www.seibella.ro/poze

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Sun, 2013-09-15 20:02

As I understand your script use resize/full pictures - display size dependent.
How can I set to use resize all the time?
In this case I'll have watermark on all pictures all the time?

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2013-09-15 23:02

I updated rest.php to server appropriate image.
http://www.flashyourweb.com/filemgmt/index.php?id=55

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Mon, 2013-09-16 07:07

Not show any tumbnail/picture...

http://www.seibella.ro/poze/m/

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2013-09-16 11:35

did you need to edit the init() function in rest.php? since your gallery is not located in /m

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Mon, 2013-09-16 11:43

No, I didn't until now.
What should I change?

I put directly rest.php in http://www.seibella.ro/poze and I changed this url in http://www.seibella.ro/poze/m/index.html

Thanks alot for your help

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2013-09-16 17:35

/m/index.html this does not point to rest.php

        (function($){
            $('#gallery').g2rest({
                url: 'http://www.seibella.ro/poze/m//rest.php', <- wrong!
                code: 'code',
                initial: 7,
                max_items_per_page: 20
            });
        })(window.jQuery)

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Mon, 2013-09-16 17:51

wawww Sorry
Changed to: url: 'http://www.seibella.ro/poze/rest.php',
Still problems with thumnails.

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2013-09-16 18:05

the issue is the last album must be restricted. As the last thumb won't load.

Again, I never planned for these restrictions. I'll have to work on it tonight.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Mon, 2013-09-16 18:50

Last album was deleted. I dont know where did it appear..
Maybe I created it from mistake with all this tests.
Looks it work.
Let's test.

Thanks again

-My Gallery-
http://www.seibella.ro/poze

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Mon, 2013-10-07 17:41

Hi,
Back with my http://www.seibella.ro/poze/m :(
It looks different on different devices. Only on desktop it works well

See this:
http://www.seibella.ro/poze/m/#33497

1. HTC ONE: 1920/1080:
CHROME:not working swipe - press arrows, not showing vertical pictures.
Default Android Browser: works well.

2. Desktop: works well in IE and Chrome

3. http://iphone4simulator.com/ I think it shows thumbnails for vertical pics. No wattermark for them.

4. Ipad1 : works ok

5. Laptop with 800x600 (I changed rez): not showing horizontal pics

I'm having 1 resized version but I tested also with 2 resized versions (800 and 1280)
My feeling is that it works different on different hardware native resolutions....

-My Gallery-
http://www.seibella.ro/poze

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Thu, 2013-10-10 19:00

Hi,
No suggestion to try?

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2013-10-11 00:16

this requires my personal time. I may have some to spare this weekend.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Fri, 2013-10-25 19:42

Hi,
I just made a test for "
PhotoSwipe has also been designed to run stand-alone and can be easily integrated into your non jQuery / jQuery mobile websites:
http://www.photoswipe.com/latest/examples/01-default.html

It not works well on Chrome for HTC ONE - it looks same problems like in yous script. Maybe this helps...

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2013-11-23 18:50

This seems to be an issue on Android 4 Chrome.
Add this in a script tag on your page:
document.body.addEventListener('touchstart', function(){});
or in jQuery:
$(document).on('touchstart', 'body', function(){});
working here http://testr.suprsidr.com/m/

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Tue, 2013-11-26 08:43

Thanks - looks well now.
Any idea if I can set to have permanently name of albums over thumbnails like on mouse over on desktop view?
Any chance to have nice URL?
:)

Thanks

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2013-11-26 15:26
Quote:
Any idea if I can set to have permanently name of albums over thumbnails like on mouse over on desktop view?

I see you've switched to G2.

in g2.rest.2.0.js line: 172 just append a <p /> to the <li />:
.append($('<p />').text(item.entity.title).css({'text-align': 'center', 'text-transform': 'capitalize', 'font-weight': 'bold'}))

so the line would look like:
).append($('<p />').text(item.entity.title).css({'text-align': 'center', 'text-transform': 'capitalize', 'font-weight': 'bold'}))

this would require you to minimize the script into g2.rest.2.0.min.js or reference g2.rest.2.0.js in your page instead.

Quote:
Any chance to have nice URL?

it would be difficult as the content is ajax driven.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Tue, 2013-11-26 19:33

I used G2 all the time
Mmm - /code/g2.rest.2.0.js line: 172 not look like yours... maybe in other file??

I'm using this kit:
http://www.flashyourweb.com/filemgmt/index.php?id=55

-My Gallery-
http://www.seibella.ro/poze

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Tue, 2014-01-07 14:08

Hi Suprsidr - any chance to recheck where should I change in G2 script to have permanently name of Albums above the thumbnails?

Thanks

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2014-01-07 14:18

line 172 should currently look like:
)
and you want it to look like:
).append($('<p />').text(item.entity.title).css({'text-align': 'center', 'text-transform': 'capitalize', 'font-weight': 'bold'}))

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Tue, 2014-01-07 15:05

Ok,

Can you help me more on: "this would require you to minimize the script into g2.rest.2.0.min.js or reference g2.rest.2.0.js in your page instead."

Thanks again

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2014-01-07 15:12

currently you are using:
<script src="code/g2.rest.2.0.min.js"></script>
you will need to use:
<script src="code/g2.rest.2.0.js"></script>
instead.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Tue, 2014-01-07 15:28

It works.
But, titles are bellow thumbnails and have same alignment problems.
I love original desktop view style with titles above bottom thumbnails on mouse over.
Can do this permanently?

Thanks again for your help

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2014-01-07 15:47

you may want to give the <p /> a min-height:

#ajax-gallery p {
    min-height: 40px;
}

also if you want it above use prepend instead of append. But I don't think it will look good.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Tue, 2014-01-07 16:20

Wich file?

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2014-01-07 19:37
#ajax-gallery p {
    min-height: 40px;
}

is CSS so it would go into code/g2.rest.css

and instead of using append:
).append($('<p />').text(item.entity.title).css({'text-align': 'center', 'text-transform': 'capitalize', 'font-weight': 'bold'}))
use prepend instead:
).prepend($('<p />').text(item.entity.title).css({'text-align': 'center', 'text-transform': 'capitalize', 'font-weight': 'bold'}))

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Tue, 2014-01-07 20:28

How can I put titles like mouse over on desktop browser permanently?
It looks very well with titles over thumbnails..

-My Gallery-
http://www.seibella.ro/poze

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Thu, 2014-01-09 12:18

Hi,
I'm having again problems with Chrome for HTC One & Nexus 7 (2)
http://seibella.ro/poze/m/#42158
Any hint?

Thanks

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2014-01-09 13:24
Quote:
I'm having again problems with Chrome for HTC One & Nexus 7 (2)
http://seibella.ro/poze/m/#42158
Any hint?

No, does mine still work for you?
http://testr.suprsidr.com/m/

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Thu, 2014-01-09 19:45

It is dependent of screen resolution:
On HTC One makes problems with both browsers - not seeing vertical pictures in Chrome+Internet - same problems with a Galaxy S2 Plus.
On Nexus 7 (2) not seeing horizontal pictures - tested with Chrome and Dolphin Browser
Tested on: http://www.seibella.ro/poze/m/#42158
I'm seeing first pictures (IMG_0212.JPG) only in HTC one (both browsers) and second one ( IMG_0211.JPG) only on Nexus.
I'm seeing your album on both devices.. It looks like it depends about screen resolution and pictures resize also...

-My Gallery-
http://www.seibella.ro/poze

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2014-01-09 19:42

this script decides which resize to query for based on screen size.
Do you have various resizes built? Do they have everybody-view-all permissions?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Thu, 2014-01-09 19:48

I have only one resize versions (800/800)

Everybody [core] View resized version(s)

I need to keep watermark for pictures.

-My Gallery-
http://www.seibella.ro/poze

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Thu, 2014-01-09 19:59

I made some tests with multiple resolutions and "view all versions" on; http://seibella.ro/poze/m/#29956
Htc One: works all pics in both browsers
Nexus 7(2): not showing vertical pics.

HTC has: 1920/1080
Nexus has 1920/1200

-My Gallery-
http://www.seibella.ro/poze

 
lukedan

Joined: 2010-07-27
Posts: 52
Posted: Sun, 2014-01-12 19:24

It looks there are problems when viewing device have higher horizontal resolution than resized pictures ....
-My Gallery-
http://www.seibella.ro/poze