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: $CONFIG  (Read 6521 times)

0 Members and 1 Guest are viewing this topic.

nanothree

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 70
    • RockThoseLocks
$CONFIG
« on: January 07, 2005, 12:35:46 pm »

I searched and it didnt help me, how can i find out about waht variables are held in the $CONFIG array? Is it what is held in the config table?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: $CONFIG
« Reply #1 on: January 07, 2005, 12:36:39 pm »

yes
Logged

nanothree

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 70
    • RockThoseLocks
Re: $CONFIG
« Reply #2 on: January 07, 2005, 01:07:43 pm »

thanks, another question... what does this mean:

Code: [Select]
define('IN_COPPERMINE', true);
define('FAQ_PHP', true);
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: $CONFIG
« Reply #3 on: January 07, 2005, 01:11:11 pm »

Code: [Select]
define('IN_COPPERMINE', true);
define('FAQ_PHP', true);

These constants are defined to stop the direct execution of the init.inc.php script.
Logged
Chief Geek at Ranium Systems

nanothree

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 70
    • RockThoseLocks
Re: $CONFIG
« Reply #4 on: January 07, 2005, 01:24:52 pm »

if i were to put

define('MY_PAGE', true);

would i get an error? i'm trying to create a mod/hack, but im not syre about what needs to be done with bits like that, im finding it a bit confusing,

Also how can i add more options on config.php i looked at the script and it made no sense
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: $CONFIG
« Reply #5 on: January 07, 2005, 01:39:56 pm »

Code: [Select]
define('MY_PAGE', true);wont give you any error. But you will have to add the above mentioned constants (IN_COPPERMINE) if you want init.inc.php to be used by your mod.

Quote
Also how can i add more options on config.php i looked at the script and it made no sense

What i suggest is rather changing the config.php file you should add the values in the config table in the database. By doing so you will have the options available to you in $CONFIG array automatically.
Logged
Chief Geek at Ranium Systems

Nibbler

  • Guest
Re: $CONFIG
« Reply #6 on: January 07, 2005, 03:56:07 pm »

define('FAQ_PHP'true);

That is for the benefit of the language files, you don't need to make one up yourself.

You can put print_r($CONFIG); to see what is in $CONFIG.

To add more options to the config page you need to add an entry both into the config table, and into the language file.
Logged

nanothree

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 70
    • RockThoseLocks
Re: $CONFIG
« Reply #7 on: January 07, 2005, 06:08:10 pm »

thanks alot , ill get working on my mod then :D
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.