Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

Allow subfolders_only_once with show_subdirs_first = true
https://www.tinywebgallery.com/forum/viewtopic.php?f=3&t=2499
Page 1 of 1

Author:  blackhole [ 30. Mar 2010, 14:34 ]
Post subject:  Allow subfolders_only_once with show_subdirs_first = true

If you set $show_subdirs_first = true and $subfolders_only_once = true all is fine. Setting $show_subdirs_first = false and $subfolders_only_once = true the latter is ignored.

inc/index.inc.php 319-328:
Code:
  if ($show_subdirs_first) {
      if ($subfolders_only_once && $twg_offset == 0 ) {
      ceil(show_folders($path, $twg_foffset, $twg_offset, $twg_album) * 1.4);
    } else if (!$subfolders_only_once)  {
      $minus_rows = ceil(show_folders($path, $twg_foffset, $twg_offset, $twg_album) * 1.4);
    }
    if ($minus_rows >= $thumbnails_y) {
         $minus_rows = $thumbnails_y -1;
      }
   }


Request:
Allow $show_subdirs_first = false and $subfolders_only_once = true.

TWG Version 1.8

Author:  TinyWebGallery [ 30. Mar 2010, 20:18 ]
Post subject: 

I have added this to my local build. I'm investigating a issue with ie and ssl and download. When this is solved I make a small update...

If you want to test please send me an e-mail...

- Michael.

Author:  blackhole [ 31. Mar 2010, 12:58 ]
Post subject: 

I found another oddity in this context.

Settings are
$show_subdirs_first = true
$subfolders_only_once = true
$autodetect_maximum_thumbnails = true
Using a gallery with lets say p.e. 100 pics and one subfolder.

$autodetect_maximum_thumbnails = true advertises to prevent scrollbars by reducing the amount of images on thumbnail pages, but this only works on the second page and beyond. One the first page (with the subfolder shown) the calculation fails.

Quote:
If you want to test please send me an e-mail.
Ok, thanks for the offer!

Author:  TinyWebGallery [ 31. Mar 2010, 13:39 ]
Post subject: 

Right.

I have written this in the documentation of $subfolders_only_once too.
This is done because otherwise offsets and paging have to be reimplemented only for this first page.

- Michael

Author:  blackhole [ 31. Mar 2010, 13:49 ]
Post subject: 

From the config.php:
Quote:
but otherwise the whole secrion of the pager has to be completely rewritten and this will be done in 1.8 but not in 1.7 anymore.


Ok, so it's your intention to fix this in the 1.8 branch. :-)

Misunderstanding, my bad, sorry! I thought you implemented this fix already in the first release on the 1.8 branch.

Author:  TinyWebGallery [ 31. Mar 2010, 14:17 ]
Post subject: 

No - it's still on the todo for 1.8.x (3 more releases are already full with new stuff).

- Michael

Author:  blackhole [ 31. Mar 2010, 14:22 ]
Post subject: 

Quote:
3 more releases are already full with new stuff
Sounds good! Thanks for the great work! :-)

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/