Announcement

  •  » Miscellaneous
  •  » Calendar by date or creation shows all folders in Page Banner.

#1 2021-02-09 04:50:48

AfroUSA
Member
UK
2021-02-09
12

Calendar by date or creation shows all folders in Page Banner.

Hello,

When displaying photos in Calendar View by posted or creation date, I have all my 1389 folders showing on my Page Banner.
Is there a way to disable this mess?

    Piwigo 11.3.0 with 40357 photos, 1389 folders
    Operating system: FreeBSD
    PHP: 7.3.26 (Show info) [2021-02-09 03:41:37]
    MySQL: 5.5.5-10.5.8-MariaDB [2021-02-09 03:41:37]
    Graphics Library: External ImageMagick 7.0.10-24

I have Bootstrap Darkroom theme, Version: 2.4.4

https://i.imgur.com/kicVfiNm.png https://i.imgur.com/ZSpfiD2m.png

Last edited by AfroUSA (2021-02-09 04:51:45)


Regards, Thomas
____________________________________________________________
HP MicroServer Gen8 - Xeon 1220L V2 - 16GB ECC - TrueNAS - redx24TB
Raspberry Pi 5 - Cortex-A76 - 8GB RAM - Pi OS 64bit - SSD M.2 256GB

Offline

 

#2 2021-02-09 12:27:29

TOnin
Member
1970-01-01
106

Re: Calendar by date or creation shows all folders in Page Banner.

With piwigo 11 comes a new menu, but some themes are not ready. Hence, they uses the template from default theme to handle this new menu. The problem is the layout gets broken.

The quick answer, is to give an empty template for that menu in (piwigo)/themes/bootstrap_darkroom/template/ with an empty file menubar_related_categories.tpl (empty means text file with no text inside). This way, this new menu will be like disabled.

A longer answer would be to translate default template menubar_related_categories.tpl to bootstrap_darkroom theme. Or to contribute to the theme source code.

Offline

 

#3 2021-02-09 12:50:19

AfroUSA
Member
UK
2021-02-09
12

Re: Calendar by date or creation shows all folders in Page Banner.

Thank you so much, this is exactly what I was looking for. Will spend some time tonight to fix this issue.
Have a nice day :)

Update:
Empty menu_related_categories.tpl resolved all issues, no more thousands sub-folders and scrolling down the page to see the pictures ;)

Update 2:
Actually make this file empty, solve all issues! Now I have my Album with menu, where I can see all folders with number of images in this folder on the top right side, before Discover and Login.
Like here:
https://i.imgur.com/aJJt6wal.jpg

Last edited by AfroUSA (2021-02-10 17:59:34)


Regards, Thomas
____________________________________________________________
HP MicroServer Gen8 - Xeon 1220L V2 - 16GB ECC - TrueNAS - redx24TB
Raspberry Pi 5 - Cortex-A76 - 8GB RAM - Pi OS 64bit - SSD M.2 256GB

Offline

 

#4 2021-02-09 14:07:49

TOnin
Member
1970-01-01
106

Re: Calendar by date or creation shows all folders in Page Banner.

I have tried something, but without understanding everything, especialy scss. This is nice enough.

menubar_related_categories.tpl bootstrap_darkroom test

Code:

<li class="nav-item dropdown">
    <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">{'Related albums'|@translate}</a>
    <div class="dropdown-menu dropdown-menu-right" role="menu">
{assign var='ref_level' value=0}
{foreach from=$block->data.MENU_CATEGORIES item=cat}
  {if $cat.LEVEL > $ref_level}
  <ul>
  {else}
    </li>
    {'</ul></li>'|@str_repeat:($ref_level-$cat.LEVEL)}
  {/if}
    <li>
  {if isset($cat.url)}
      <a class="dropdown-item" href="{$cat.url}" title="{$cat.TITLE}">
  {/if}
      {$cat.name}
  {if $cat.count_images > 0}
      <span class="badge badge-secondary ml-2" title="{$cat.count_images|translate_dec:'%d photo':'%d photos'}">{$cat.count_images}</span>
  {/if}
  {if $cat.count_categories > 0}
      <span class="badge badge-primary ml-2" title="{'sub-albums'|translate}">{$cat.count_categories}</span>
  {/if}
  {if isset($cat.url)}
    </a>
  {/if}
  {assign var='ref_level' value=$cat.LEVEL}
{/foreach}
{'</li></ul>'|@str_repeat:$ref_level}
    </div>
</li>

In bootstrap_darkroom theme page > Settings > Custom CSS add

Code:

/* New menu related categories tweak */
.dropdown-menu ul {
    list-style: none;
    padding-left: 1ex;
}

Last edited by TOnin (2021-02-09 14:08:24)

Offline

 
  •  » Miscellaneous
  •  » Calendar by date or creation shows all folders in Page Banner.

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact