Recent posts - Page 3 Recent posts - Page 3
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Recent posts

#21
Feature requests / Re: Header PHP with Login Secu...
Last post by 406man - March 19, 2026, 06:07:10 PM
My gallery doesn't have a file with this name and the forum thread here says the same:
https://coppermine-gallery.com/forum/index.php?topic=80854.0

For a starting point could you clarify what your header.php file is doing and where it lives in your directory structure.

The admin tools are normally in the Admin menu which is displayed only for those users with Administrator privilege.
#22
Feature requests / Header PHP with Login Security...
Last post by Dancefloor - March 19, 2026, 11:42:43 AM
Hyyy...
In my header.php are some things like Database backup and other useful admin tools included.

Unfortunately, it's displayed as a header and visible to EVERYONE who visits the site.

Isn't it possible to display it on a user-specific or admin-specific basis?

So... either EVERYONE sees it, or user groups, or ONLY ADMIN.

Could this query be included in the next version, or is there a simple way to query the admin status directly within the header file?

Regards, Daniel
#23
cpg1.6.x Support / Re: Release version 1.6.28 of ...
Last post by Joe Carver - March 10, 2026, 10:26:44 PM
Thank You ron4mac!
#24
cpg1.6 themes (visuals) / Re: How to hide album stats in...
Last post by zeppo - March 10, 2026, 04:11:35 PM
Thanks a lot 406man & ron4mac!

Been so long I  made the old site, that I forgot these.

Works both ways!

Some tuning still needed.
Something funny happens with spacer.gif ...  =:-)
#25
cpg1.6.x Support / Re: Release version 1.6.28 of ...
Last post by panhead - March 09, 2026, 10:48:48 AM
Thank you!
#26
cpg1.6.x Support / Release version 1.6.28 of Copp...
Last post by ron4mac - March 07, 2026, 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.
#27
cpg1.6 miscellaneous / Re: 1.6.27 error message
Last post by ron4mac - March 06, 2026, 11:56:39 PM
Thank you ... fixed in soon-to-be-released v1.6.28.
#28
cpg1.6 miscellaneous / 1.6.27 error message
Last post by nukeworker - March 06, 2026, 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.
#29
cpg1.6 themes (visuals) / Re: How to hide album stats in...
Last post by ron4mac - March 06, 2026, 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;
}
#30
cpg1.6 themes (visuals) / Re: How to hide album stats in...
Last post by 406man - March 06, 2026, 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.