Hi all,
first of all a very happy new year to all!
I've been playing around for some time to achieve the following: Like with the Fotorama plugin or the stripped-galleria theme I would like to have a list of thumbs below a picture for easy navigation.
I'm currently using elegant theme + fotorama (still trying got customize stripped to my needs). But if I could achieve thumbs below pictures without the fotorama overhead I would be happy to do so!
Any pointers on where to look for possible solutions? Or even better: anything out of the box available that I only missed so far?
Thanks,
Thomas
Piwigo version: 2.7.4
PHP version: 5.6.15
MySQL version: 5.5.46-0+deb7u1-log
Piwigo URL: http://bilder.feuster.com
Offline
Have to answer myself here :-)
I have managed to get stripped-galleria theme running (its not compatible with gthumb+...) but have run into the following issue:
Only the first 15 thumbnails are shown for each category. I have verified that the html code only contains entries for 15 thumbs, so its not an issue of the galeria js code.
Is there any place there the number of $thumbnails passed to thumbnails.tpl could be limited for a theme? Pointers welcome!
Thanks,
Thomas
Offline
And another attempt to achieve this...
My current idea would be to add thumbnails info for each picture using the 'picture_pictures_data' trigger:
add_event_handler('picture_pictures_data', 'add_thumbnails_to_picture_data');
function add_thumbnails_to_picture_data($picture)
{
//add thumbnail info for category
return $picture;
}
But I'm not sure how to do that best? I had a look at category_default.inc.php on how to query for all pictures but that looks rather complex - and probably not very fast if done for each picture...
Any tip on how to do that efficiently?
Thanks,
Thomas
Offline
To whom it may concern :-)
Progress so far on this:
- added thumbnails to picture page in my own event handler for loc_end_picture (code copied from category_default.inc.php)
- added thumbnails below picture in extended picture.tpl (code copied from thumbnails.tpl)
- some css and javascript to beautify things a bit
And the result can be seen e.g.: http://www.feuster.com/piwigo/picture.p … tegory/714
Open points for which I could need some tips:
- Depending on landscape or portrait pic the row of thumbnails jump up and down. i would like to avoid that by giving "theImageAndInfos" the maximum height for the chosen derivative. How could this be achieved?
- Is there any way to avoid copying parts of category_default.inc.php and thumbnails.tpl manually into my local files?
Offline
impressive
Great work
I suggest you post in a pastebin/zip or better as theme or tool in http://piwigo.org/ext/ so I could see better the whole pciture and help you for smarty/php/css coding
Offline
Thanks!
Can't upload zip with extract of the three files I have modified here - let me see where to put them...
Once complete & once I understand how to do it best, I could try to convert it into a themen - but I think there is still some way to go before that :-)
Last edited by TheDoc (2016-04-04 22:23:28)
Offline
Managed to place things here:
https://github.com/ThomasDaheim/piwigo- … turethumbs
Offline
Thank you! It helped :)
Offline
TheDoc wrote:
Managed to place things here:
https://github.com/ThomasDaheim/piwigo- … turethumbs
Thanks a LOT for this, Thomas.
I borrowed your add_event_handler function and used it to create a child theme for Bootstrap Default, using a slick carousel for the thumbnails. This way it's fully responsive, lazy loads the carousel content on demand (so, works with hundrets of pictures in an album)
Code here: https://github.com/tkuther/piwigo-bootstrap-lightroom
Gruß,
Thomas
Offline
Looks great! Maybe I should think of switching themes too :-)
Offline