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

#71
cpg1.6 miscellaneous / Re: Custom Page(s) In Folders?
Last post by findingcolors - December 27, 2025, 07:25:44 PM
Quote from: 406man on December 27, 2025, 05:36:16 PMThere's a way you can implement it which I won't claim is particularly clean or clever but it works.

Here's an example with a page called  page-abc.php  which uses the PHP require statement to call  page-xyz.php  in sub directory /sub  which is directly beneath the main coppermine directory

Here is the code for the two scripts, being sure to include a security check:

<?php
/***   page-abc.php   ***/

define('IN_COPPERMINE'true);

define('INDEX_PHP'true);
define('RESTRICTED_PRIV'true);

require(
'include/init.inc.php');

include 
'./sub/page-xyz.php';

?>



<?php
/***   page-xyz.php   ***/

if (!defined('IN_COPPERMINE')) {
    die(
'Not in Coppermine...');
}
echo 
'This is the sub page';


?>

Once page-abc.php has been created you don't need to touch it again and you can just update page-xyz.php


This still kind of defeats the purpose. I want all of my pages in mygallery.com/pages/page-title.php and use the /sub url in the url bar, with no duplicate pages in the main folder, and take the style of my coppermine theme.
#72
cpg1.6 miscellaneous / Error messages
Last post by sharpo - December 27, 2025, 06:19:04 PM
Not sure if it's a coppermine problem or if my hosting site has been hacked.

Not looked at everything, but one example:-

The plugin page has errors showing and not many plugins listed, but in the plugins folder in my host there are a lot of plugins.
Also, the install/uninstall "buttons" don't exist, it's just letters.

The site is:- https://www.sharpos-world.co.uk/cpg/

and it was recently upgraded to 1.6.27 - it does seem to work, although I haven't checked everything

Any ideas what the problem might be?

Thanks, Sharpo.
#73
cpg1.6 miscellaneous / Re: Custom Page(s) In Folders?
Last post by 406man - December 27, 2025, 05:36:16 PM
There's a way you can implement it which I won't claim is particularly clean or clever but it works.

Here's an example with a page called  page-abc.php  which uses the PHP require statement to call  page-xyz.php  in sub directory /sub  which is directly beneath the main coppermine directory

Here is the code for the two scripts, being sure to include a security check:

<?php
/***   page-abc.php   ***/

define('IN_COPPERMINE'true);

define('INDEX_PHP'true);
define('RESTRICTED_PRIV'true);

require(
'include/init.inc.php');

include 
'./sub/page-xyz.php';

?>



<?php
/***   page-xyz.php   ***/

if (!defined('IN_COPPERMINE')) {
    die(
'Not in Coppermine...');
}
echo 
'This is the sub page';


?>

Once page-abc.php has been created you don't need to touch it again and you can just update page-xyz.php
#74
cpg1.6 miscellaneous / Custom Page(s) In Folders?
Last post by findingcolors - December 24, 2025, 08:51:20 PM
I was wondering if there's a way to put custom pages in folders? I know how to make a custom page and upload it to the main branch (example: yourwebsite.com/gallery/page.php)

but for organization purposes, is there a way to put these pages in folders and still have them display properly? For example, If I make a folder (named "pages") that has 3 custom pages, I would like the url to be: yourwebsite.com/gallery/pages/custom-page.php.

I tried and the pages don't show.
#75
cpg1.6 plugin contributions / Re: Suppressor Plugin
Last post by panhead - November 28, 2025, 03:21:27 PM
Sorry for the late reply. I will do what you described (later) and come bck.
And I really like your plugin  ;)
#76
cpg1.6 install / Re: Fresh Install with Install...
Last post by nowordneeded - November 27, 2025, 02:45:07 AM
Update:

I contacted my host to find out what was going on, and they fixed whatever was wrong on the backend. I have no idea what they fixed, but I was able to finish the install on the gallery. It's up and ready for me to customize.

Thank you to all of you who helped on this thread. I do appreciate your time.

Closing it.
#77
cpg1.6 install / Re: Fresh Install with Install...
Last post by nowordneeded - November 25, 2025, 10:13:26 PM
Admin:

Thanks for all you've given me to explore.

NWN
#78
cpg1.6 install / Re: Fresh Install with Install...
Last post by 406man - November 25, 2025, 08:14:16 AM
A Google search for "direct admin change php settings" brings up the following link, and many others:
https://docs.directadmin.com/webservices/php/php-options.html
#79
cpg1.6 install / Re: Fresh Install with Install...
Last post by nowordneeded - November 25, 2025, 04:24:16 AM
Hi:

Do you know how to do this on Direct Admin? I don't have Control Panel on my server.

NWN
#80
cpg1.6 install / Re: Fresh Install with Install...
Last post by 406man - November 24, 2025, 03:52:10 PM
Ron4mac's reply #3 in this thread is relevant here. Exec is a standard function in PHP – see here:
https://www.php.net/manual/en/function.exec.php

...and it ought to work. It seems that the PHP on your server has been configured without it. Therefore it's a hosting problem and not Coppermine's fault.

There are various articles around the Net such as this one:
https://openjournaltheme.com/how-to-enable-and-disable-exec-php-function-in-ojs-omp-ops/
Possibly your hosting Control Panel allows you to enable it yourself as the article above describes. If not, suggest you log a support query with your web hosting company.