comparison mgallery.php @ 125:379a8cd3bb2c

Show number of images and sub-galleries on the page title. (I can't figure out a better place for that information at the moment.)
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 26 Aug 2017 03:41:16 +0300
parents eac2cf04261a
children e14605c7aea0
comparison
equal deleted inserted replaced
124:eac2cf04261a 125:379a8cd3bb2c
760 // - needs sub-modes / handling of order shit 760 // - needs sub-modes / handling of order shit
761 // - Javascript stuff for picture data updates 761 // - Javascript stuff for picture data updates
762 // 762 //
763 $pageTitle = $galTitlePrefix.mgGetArr($galData, "caption", " - %1", "", "chentities"); 763 $pageTitle = $galTitlePrefix.mgGetArr($galData, "caption", " - %1", "", "chentities");
764 mgPrintPageHeader($pageTitle); 764 mgPrintPageHeader($pageTitle);
765
766 $ptmp = [];
767 if (count($galImagesIndex) > 0)
768 $ptmp[] = count($galImagesIndex)." images";
769 if (count($galAlbumsIndex) > 0)
770 $ptmp[] = count($galAlbumsIndex)." sub-albums";
771
772 if (count($ptmp))
773 $pageTitle .= " (".implode($ptmp, ", ").")";
774
765 echo 775 echo
766 mgGetPageInfoHeaderStart(). 776 mgGetPageInfoHeaderStart().
767 "<h1>".$pageTitle."</h1>\n"; 777 "<h1>".$pageTitle."</h1>\n";
768 778
769 $ctrlFlags = mgGetSetting("album_flags"); 779 $ctrlFlags = mgGetSetting("album_flags");