Piwigo / piwigo-bootstrap-darkroom

A mobile-ready and feature-rich theme for Piwigo photo gallery, based on Bootstrap 4
Apache License 2.0
83 stars 40 forks source link

Feature Request: Option for showing count of images in breadcrumbs #187

Open Schmidtze2 opened 5 years ago

Schmidtze2 commented 5 years ago

I like to see the count of images in the breadcrumb, for example like this

Schlagwort | Brandenburger Tor (131 Fotos)

I changed themecontroller.php now to do it. It would be great to have an option for it! :-)

...
if (!empty($title)) {
  $splt = strpos($title, "[");
  if ($splt) {
    $title_links = substr($title, 0, $splt);
    $count = substr($title, $splt+1, 100);
    $splt = strpos($count, "]");
    if ($splt) {
      $count = substr($count, 0, $splt);
    }
    if (!empty($count)) {
      $count =  ' (' . $count . ' Fotos)';
    }
    $title = $title_links;
  } else {
    $count = '';
  }
  ...
  if (empty($section_title)) {
    $template->assign('TITLE', $title.$count);

  ...

Of course "Fotos" is not possible for a public version...

Best regards Friedemann

tkuther commented 5 years ago

If you look through the commit history, I decided to get rid of the count at some point because it just wastes space and looks awful.

But having an option for it would be a compromise.

tkuther commented 5 years ago

https://github.com/Piwigo/Piwigo/commit/a4187cabf0914e223b94db62f163374286381d1a This will make things a lot easier.