How to hide album stats in the album view? How to hide album stats in the album view?
 

News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

Main Menu

How to hide album stats in the album view?

Started by zeppo, March 05, 2026, 07:14:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zeppo

Hi Friends,

I updated to 1.6 version.

All is mostly fine, but in album view theme shows album statistics, and breaks the theme.
I couldn't find a way to hide statistics form viewers.


406man

I've wondered the same thing myself so thought I'd take a look.

There's no way of suppressing the display of the album information using settings in the gallery configuration. Display of the text itself can be prevented by adding some PHP code to your theme.php file. If you don't already have function theme_album_info in your theme, add the following code:

// Below added by 406man 6 March 2026 to suppress information display beside album thumbnail
/******************************************************************************
** Section <<<theme_album_info>>> - START
******************************************************************************/
// Format information which is displayed next to each album
function theme_album_info($pic_count, $link_pic_count, $last_upload_date)
{
    $album_info = '';
    return $album_info;
}
/******************************************************************************
** Section <<<theme_album_info>>> - END
******************************************************************************/

If you already use function theme_album_info it's going to need to be modified to return an empty string.

The text no longer appears but the table column is still there.

You may want to make further modifications to the layout as the album thumbnails and text are all left justified which looks odd when the album statistics are no longer displayed. But anyway, hope you find this useful.

ron4mac

Or you can, in the theme's style.css file, find (or add if not present) an entry for .album_stat and add display:none to it.
.album_stat {
    ...
    ....
    display: none;
}