Recent posts - Page 2 Recent posts - Page 2
 

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

#11
cpg1.6 miscellaneous / Problem bei Berwertung von Bil...
Last post by VolkerF - March 22, 2026, 06:57:09 AM
Hallo und guten Morgen,

es gibt ja die Möglichkeit Bilder mit bis zu 5 Sternen zu bewerten. Eine Userin schreibt gestern folgendes:
...wieder ist es mir missglückt bei der Bewertung Dir 5 Sterne zukommen zu lassen.
Nach 2 Sternen blockiert Deine Webseite und lässt keine Korrektur zu.

Was kann ich dagegen tun und woran kann das liegen?

Danke und Gruß, Volker

#12
Feature requests / Re: Header PHP with Login Secu...
Last post by ron4mac - March 20, 2026, 02:55:06 AM
You can use some of these variables and defines in your custom header include file to present different content according to the CPG state (logged in [USER_ID>0], user is an admin, etc.)
https://coppermine-gallery.com/docs/curr/en/dev_vars.htm
#13
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.
#14
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
#15
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!
#16
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 ...  =:-)
#17
cpg1.6.x Support / Re: Release version 1.6.28 of ...
Last post by panhead - March 09, 2026, 10:48:48 AM
Thank you!
#18
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.
#19
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.
#20
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.