# HG changeset patch # User Matti Hamalainen # Date 1503708076 -10800 # Node ID 379a8cd3bb2cc42cad64eb6d057edd87e190167e # Parent eac2cf04261aec7fe8d383636f009b900818dd40 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.) diff -r eac2cf04261a -r 379a8cd3bb2c mgallery.php --- a/mgallery.php Mon Jul 31 14:48:09 2017 +0300 +++ b/mgallery.php Sat Aug 26 03:41:16 2017 +0300 @@ -762,6 +762,16 @@ // $pageTitle = $galTitlePrefix.mgGetArr($galData, "caption", " - %1", "", "chentities"); mgPrintPageHeader($pageTitle); + + $ptmp = []; + if (count($galImagesIndex) > 0) + $ptmp[] = count($galImagesIndex)." images"; + if (count($galAlbumsIndex) > 0) + $ptmp[] = count($galAlbumsIndex)." sub-albums"; + + if (count($ptmp)) + $pageTitle .= " (".implode($ptmp, ", ").")"; + echo mgGetPageInfoHeaderStart(). "

".$pageTitle."

\n";