Previous Up Next
Troubleshooting : Common issues In depth explanations Embedding

cpmfetch_config.php

CpmFetch's long term memory

Vuud

Overview

When you run the installer CpmFetch gathers information from your CPG database and from your CPG init files. Instead of doing this everytime you call CpmFetch, the installer saves it in a file named cpmfetch_config.php.

This file is checked each time you start cpmfetch. You need to pass it to CpmFetch when you start up. This way, all that information is available to you and CpmFetch - without costly SQL calls to the CPG database.

This is also a great way to modify the default behaviors of CpmFetch. You can edit this file and make changes to the values you find in there.

What you can change

To keep curious fingers from poking at things they should not, there is a section toward the top of the file that looks like:

// ###### USER OVERRIDES START ###### //
// if not bridged leave as false, if is bridged... 
//  $cfg['cfBridgedTo'] = 'false';

// Consider non-public albums as displayable
//  $cfg['cfShowPrivate'] = 'false';
The installer was nice enough to put commented out copies of the settings it determined for you in. I was also nice enough to sometimes add comments that describe what the settings are.

Now, lets say we want CpmFetch to always be showing non-public albums. We can see from above that the default is false. To change it to true, we will be uncommenting the line (by removing the two slashes in front of it) and changing the value to true.

// Consider non-public albums as displayable
$cfg['cfShowPrivate'] = 'true';
Notice we did NOT uncomment the description line.

Multiple config files

Lets say you want to have more than one configuration file for your installation. Simply run the installer, then rename the cpmfetch_config.php file to something else. I would recommend keeping it as .php though.

When you start CpmFetch and you want to use this other file, you simply pass that as the cpm call parameter. For example, lets say you named it cpmfetch_site1config.php. In this case, your startup code would look like this.

<?php
  include_once "./cpg/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./cpg/cpmfetch/cpmfetch_site1config.php");
?>
The paths may change depending on your installation.

Previous Up Next
Troubleshooting : Common issues In depth explanations Embedding

Documentation generated on Tue, 10 Apr 2007 23:00:31 -0400 by phpDocumentor 1.3.0