Recent posts Recent posts
 

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

Recent posts

#1
cpg1.6.x Support / Release version 1.6.28 of Copp...
Last post by ron4mac - Today at 01:13:46 AM
Version 1.6.28 of CPG has been made available. There aren't many changes but there is a somewhat obscure security vulnerability that has been removed. Upgrading is recommended.
#2
cpg1.6 miscellaneous / Re: 1.6.27 error message
Last post by ron4mac - Yesterday at 11:56:39 PM
Thank you ... fixed in soon-to-be-released v1.6.28.
#3
cpg1.6 miscellaneous / 1.6.27 error message
Last post by nukeworker - Yesterday at 09:12:16 PM
[06-Mar-2026 19:19:17 UTC] PHP Deprecated:  Optional parameter $showYear declared before required parameter $only_future_dates is implicitly treated as a required parameter in /pictures/calendar.php on line 233

This PHP error occurs because of a change in PHP 8.0+ regarding how function parameters are handled. In older versions, you could place an optional parameter (one with a default value) before a required parameter, but this is now deprecated because it's logically inconsistent.

Old
function getMonthHTML($m, $y, $showYear = 1, $only_future_dates) {
New:
function getMonthHTML($m, $y, $showYear = 1, $only_future_dates = false) {
While you are at it, there are a few other spots in this specific file that will likely trigger the same or similar issues in PHP 8.x:

    Line 161 (getMonthView): The call to getMonthHTML here only passes 4 arguments. By adding the = false default above, this line will now work correctly without modification.

    Lines 304–318 (getYearHTML): These lines call getMonthHTML with only 3 arguments (missing the $only_future_dates entirely).

        Current code: $this->getMonthHTML(0 + $this->startMonth, $year, 0)

Need to add the default value to the function definition, then these calls will now automatically use false for the missing 4th argument, and the error will vanish.
#4
cpg1.6 themes (visuals) / Re: How to hide album stats in...
Last post by ron4mac - Yesterday at 07:05:39 PM
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;
}
#5
cpg1.6 themes (visuals) / Re: How to hide album stats in...
Last post by 406man - Yesterday at 02:29:56 PM
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.
#6
cpg1.6 themes (visuals) / How to hide album stats in the...
Last post by zeppo - March 05, 2026, 07:14:29 PM
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.

#7
cpg1.6 install / Re: Update from cpg 1.5.48 –> ...
Last post by ron4mac - February 15, 2026, 10:53:24 PM
Upgrading to CPG 1.6.x from 1.5.48: It would seem, since you refer to step 4, you are trying to perform an install, not an upgrade. Easiest method to upgrade 1.5.48 to 1.6.x can be found here: https://coppermine-gallery.com/forum/index.php/topic,79013.0.html. Copy your old site to the new one along with the database. Make any needed changes to the include/config.inc.php to reflect any new database name or credentials. Then run the cpg_installer_stub to perform the update for you.
If your new server is fully controlled by you, you need to make sure that a number of required PHP modules have been installed.

Language files: Once upgraded, you can use a language utility script to help identify where updates are needed for the Finnish language. Access ... <your 1.6.x site>/lang_check.php

HTH
#8
cpg1.6 install / Re: Update from cpg 1.5.48 –> ...
Last post by Joe Carver - February 15, 2026, 05:41:14 PM
You can edit/update the older language files by following the instruction in this post from ron4mac here:

Upgrading to CPG 1.6.18 (or later)
#9
cpg1.6 install / Re: Update from cpg 1.5.48 –> ...
Last post by zeppo - February 14, 2026, 07:36:05 PM
Thanks 406man & Joe!

Now both language versiona work.

I updated language files & theme php. And then run the update.php

Now both are working. Still some tuning needed.

Is there a wotking Finnish language file in 1.6?
#10
cpg1.6 install / Re: Update from cpg 1.5.48 –> ...
Last post by zeppo - February 14, 2026, 04:32:24 PM
Thanks Joe!

This is interesting.

I'll check the list.