How to reference server ROOT directory from custom theme.php? How to reference server ROOT directory from custom theme.php?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

How to reference server ROOT directory from custom theme.php?

Started by monkeyboy, April 17, 2006, 05:50:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

monkeyboy

I have a custom configuration php file which defines all of my site's DIRECTORY and URL paths so that I only need to change the appropriate config file(s) and not the actual site pages if I move or create a new folder on my server.

My question is, what is the proper way to reference and include/require my custom config file(s) for use with my custom theme?

Is there a coppermine variable or constant which refers to the server or html root directory?

Nibbler

The theme.php is run from the coppermine directory, the path from there to the webroot depends on your layout. The path to the server root directory is of course /

monkeyboy

Thanks, I understand that. Does coppermine set any constants or defines which refer to specific directories?

ie- $path, or the /themes, /include, etc...

Nibbler

No monkeyboy, those are hardcoded. The only paths that are variable are albums and userpics, set in config and available from the $CONFIG array in the code.

monkeyboy

Thanks. I figured out why my requires were not including my custom config file. My paths where wrong. I was able to include my custom configurations into my template.