Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: How to reference server ROOT directory from custom theme.php?  (Read 3121 times)

0 Members and 1 Guest are viewing this topic.

monkeyboy

  • Coppermine newbie
  • Offline Offline
  • Posts: 9

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?
« Last Edit: April 17, 2006, 08:42:11 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: How to reference server ROOT directory from custom theme.php?
« Reply #1 on: April 17, 2006, 05:56:37 pm »

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 /
Logged

monkeyboy

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: How to reference server ROOT directory from custom theme.php?
« Reply #2 on: April 17, 2006, 06:04:09 pm »

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

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

Nibbler

  • Guest
Re: How to reference server ROOT directory from custom theme.php?
« Reply #3 on: April 17, 2006, 06:08:37 pm »

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.
Logged

monkeyboy

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: How to reference server ROOT directory from custom theme.php?
« Reply #4 on: April 17, 2006, 08:41:40 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.013 seconds with 16 queries.