[extension by JanisV] Fotorama
Real full-screen slideshow replacement for default slideshow or picture view.
Fotorama is a simple, stunning, powerful jQuery gallery. Licensed under the MIT. ***
Last edited by JanisV (2014-09-18 16:13:03)
Offline
the display is really awesome
plg noticed a bug :
http://piwigo.us/beta/trunk/picture.php?/27/category/5
the navigation thumbnails are empty, but there are 6 images in the album "food"
that's because you always clear variables in Fotorama_end_page_header even if we are not in slideshow view
and I would suggest some improvements :
- don't compute all images URL, in loc_end_picture, if we are in a category with thousands images it will be very expensive (in PHP and network transfer)
instead, you can make AJAX request on the API which will returns you the URL of the next image (and other info, see bellow)
this way you only transmit an array on ids to your javascript, thus tremendously reduce the size of the transferred HTML
- update the page title and window title (using data returned by the API)
- update the image counter (easy one)
- use the browser history API in order to change the current URL and push states to the browser history, allowing a user the get the actual URL for the current picture and navigates with the "Back" button
Offline
my suggestions will require some complex changes in Fotorama JS if it does not allow this kind of process by default
also see http://fotorama.io/customize/hash/
it's not what I add in mind and it's not compatible with Piwigo core URL but it's better than nothing
Offline
basically I would write my own controller which performs timing, AJAX requests, title updates, history updates, etc.
and use the Fotorama API for main display
http://fotorama.io/customize/api/ (fotorama.push and fotorama.show)
Offline
@mistic if you want to go that way, there is http://jetpack.me/support/carousel/ too as picture page replacement
Offline
Thanks for reply!
Clearing variables in Fotorama_end_page_header will be fixed immediately. I was really wondered that navigation thumbnails are empty (and it give a some other trubles).
Other improvements also in my plans, but I'm don't know PHP and will be happy if you guys help me or implement something like that in the core.
Offline
In my idea there is actually less PHP (only transmit $page['items'] to the template) but much more Javascript
Offline
Hi,
interessant thread !
i am trying to make a similar plugin but starting from scratch in jquery.
when i was making some tests, i saw that a big number of pictures in an album could be a problem as most of this kind of jquery plugins are working with a list of urls in html codes.
With piwigo, it's easy to get all ids of the pictures album then get what you want with id.
Mistic, you said :"you can make AJAX request on the API which will returns you the URL of the next image"
Can you explain a little bit more ?
I wonder if it is possible to make an array in jquery with this structure :
index 1 -> picture id -> picture url ->picture page ->current rank
index 2 -> picture id -> picture url ->picture page ->next rank
when displaying slideshow, starting from index1, we're showing picture, on click, we're going to picture page, if we don't click, we're calling infos for index 2, next rank becomes current rank etc
@+ ;)
barbichou wrote:
Mistic, you said :"you can make AJAX request on the API which will returns you the URL of the next image"
Can you explain a little bit more ?
in your javascript you only have the content of $page['items'] (it's already sorted)
and you perform requests on ws.php?format=json&method=pwg.images.getInfo&image_id=###### to get the file URL
nothing more
Offline
ok thank you.
i will test this method.
@+ ;)
Fotorama is awesome - I love it!! This is the best slideshow ever and it works great on desktop and mobile devices. Superb!!
One question: Can you please explain the difference between the 4 options "How to fit an image"
contain
cover
scaledown
none
Maybe I'm a little bit stupid today, but I don't get the different right now ...
Thanks
Offline
You can read description on Fotorama web-site: http://fotorama.io/customize/fit/
Offline
Hello,
I just wan't to ask for a feature, and a question.
Feature request : is that possible to add an option on the admin panel to display or not a caption containing the title, and the images descriptions, like the exemple on the fotorama website ?
Question : here is an example : http://leo-serre.legtux.org/Piwigo/inde … ategory/3, why the fotorama plugin is allways in fullscreen and doesn't works on slideshow and not on the image view (like in the example on the second message here) ?
Thanks a lot for that :)
Léo
Offline
Hello Janis !
Your plug-in is just awesome !
I've got a suggestion :
Would it be possible to add meta data (at least "title") in a box somewhere ?
Thanks
Billboule
Offline
I saw some demo of this great plugin, it's impressive, thus I installed it, but no luck. No picture is shown after clicking "slideshow" no matter what combination of configuration to the plugin. My config. is:
Piwigo: 2.6.2
Theme: Luciano Amodio
Installed Plugins: Embedded Videos + Fotorama + LocalFiles Editor + Perso Footer
LocalFiles Editor only changed config.inc.php by adding below:
$conf['question mark in urls'] = false;
$conf['php extension in urls'] = false;
$conf['category url style'] = 'id-name';
$conf['picutre_url_style'] = 'file';
Can anyone generously give me some idea why the plugin doesn't work in my environment? Thanks in advance!