Location: PHPKode > projects > Community Learning Network > cln/config/CLN/config.php
<?php
/*
 * Config for CLN
 *
 * Copyright (c) 2003-4 St. Christopher House
 *
 * Developed by The Working Group Inc.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  
 *
 * @version $Id: config.php,v 1.116 2005/01/26 07:24:10 cbooth7575 Exp $
 *
 */
 
/////////////////////////////////////////////////////////////////////
//
// Part One:
// Error Reporting and Logging
//
// The following constants are PHP constants that are used to set different levels
// of error handling. In the CLN we are using the same constants for our own error
// handling as well, but in some cases with a more specific meaning.
// 
//	Constant           Value        PHP's Usage 					Cln Usage
//	-----------------------------------------------------------------------------------------------
//	E_ERROR            1            Fatal runtime error 			Used for internal messages deemed
//																	of very high importance
//	E_WARNING          2            Non-fatal runtime error 		Used for internal messages deemed 
//																	of medium/high importance
//	E_PARSE            4            Runtime parse error				N/A
//	E_NOTICE           8            Non-fatal runtime notice		Used for internal messages deemed 
//																	of small importance, but which may
// 																	be useful during debuggins
//	E_CORE_ERROR       16           Fatal startup error				N/A
//	E_CORE_WARNING     32           Non-fatal startup error			N/A
//	E_COMPILE_ERROR    64           Fatal compile-time error		N/A
//	E_COMPILE_WARNING  128          Non-fatal compile-time error	N/A
//	E_USER_ERROR       256          User-triggered fatal error		Used for major errors by the user, that should
//																	be displayed to them, but also will be useful
//																	to us as developers.
//	E_USER_WARNING     512          User-triggered non-fatal error	Used for errors that are to be displayed
//																	to the site's user, if they have done 
//																	something wrong for example
//	E_USER_NOTICE      1024         User-triggered notice			Used for messages informing the site's user
//																	about an action that has taken place
//	E_ALL                           All of the above				
// 
/////////////////////////////////////////////////////////////////////

if(!defined('CLN_ERROR_REPORTING_LEVEL')) define('CLN_ERROR_REPORTING_LEVEL', 	E_ALL); // This should always be set to E_ALL so that errors can be captured
												// by our error handler. Only change it if you are sure what you
												// are doing.

//	:COMMENT: i've suppressed most of the errors, as it was casuing me trouble.  i discovered that the default behaviour is to
//  show all errors, which in many cases are actually debugging messages...
if(!defined('CLN_ERROR_DISPLAY_HANDLER')) 
	define ('CLN_ERROR_DISPLAY_HANDLER',  E_COMPILE_ERROR
										| E_COMPILE_WARNING);


if(!defined('CLN_ERROR_LOG_HANDLER')) 
	define ('CLN_ERROR_LOG_HANDLER',	  E_ERROR // Which levels of error do you want to be logged?
										| E_WARNING 
										| E_PARSE 
										| E_NOTICE 
										| E_CORE_ERROR
										| E_CORE_WARNING
										| E_COMPILE_ERROR
										| E_COMPILE_WARNING
										| E_USER_ERROR);

if(!defined('CLN_ERROR_EMAIL_HANDLER')) 
	define ('CLN_ERROR_EMAIL_HANDLER', 	  0);


/*
// only define these if you want to receive email messages for errors, as defined above
if(!defined('CLN_ERROR_EMAIL_ADDRESS')) 
	define('CLN_ERROR_EMAIL_ADDRESS', 		'hide@address.com'); // Enter a person's email address for errors to be emailed to

if(!defined('CLN_SERVER_EMAIL_ADDRESS')) 
	define('CLN_SERVER_EMAIL_ADDRESS', 		'hide@address.com'); // Enter a email address for the system, who is sending out email
*/


if(!defined('CLN_LOG_TYPE')) 
	define('CLN_LOG_TYPE', 					'File'); // Either File to log to a file, or DB to log to a DB 
												 // :ONE_DAY: Error logging to a table?

if(!defined('CLN_LOG_FILE')) 
	define('CLN_LOG_FILE', 					'/tmp/cln.log'); 
											// Enter the name of the logfile you want to log errors into. 
											// Default is /tmp/cln.log
if(!defined('CLN_LOG_FILE_INFO')) 
	define('CLN_LOG_FILE_INFO', 					'1'); 
 
/////////////////////////////////////////////////////////////////////
//
// Part Two:
// Main Database Configuration
//
// The CLN system is designed to allow connections to multiple databases
// if needed. We use a DSN style for connecting to databases.
// 
// Basically a DSN looks like this:
//
// phptype(dbsyntax)://username:hide@address.com+hostspec/database
// 
// For a MySQL database, an example would be:
//
// mysql://someUser:hide@address.com/someDatabase
//
// See here for more info: http://pear.php.net/manual/en/package.database.db.intro-dsn.php
// 
/////////////////////////////////////////////////////////////////////

if(!defined('CLN_VERSION')) define('CLN_VERSION', '1.2 RC1');

// Main DSN
if(!defined('MAIN_CLN_DSN')) define ('MAIN_CLN_DSN', "mysql://clnDemo:hide@address.com/cln");


// Classes
if(!isset($GLOBALS['classes']['db'])) {
	$GLOBALS['classes']['db']['library'] = 'lib/CLN/Cln_Db.php';
	$GLOBALS['classes']['db']['classname'] = 'Cln_Db';
}
if(!isset($GLOBALS['classes']['ko'])) {
	$GLOBALS['classes']['ko']['library'] = 'lib/CLN/Cln_KO.php';
	$GLOBALS['classes']['ko']['classname'] = 'Cln_KO';
}
if(!isset($GLOBALS['classes']['metadata'])) {
	$GLOBALS['classes']['metadata']['library'] = 'lib/CLN/Cln_Metadata.php';
	$GLOBALS['classes']['metadata']['classname'] = 'Cln_Metadata';
}
if(!isset($GLOBALS['classes']['user'])) {
	$GLOBALS['classes']['user']['library'] = 'lib/CLN/Cln_User.php';
	$GLOBALS['classes']['user']['classname'] = 'Cln_User';
}
if(!isset($GLOBALS['classes']['group'])) {
	$GLOBALS['classes']['group']['library'] = 'lib/CLN/Cln_Group.php';
	$GLOBALS['classes']['group']['classname'] = 'Cln_Group';
}
if(!isset($GLOBALS['classes']['module_loader'])) {
	$GLOBALS['classes']['module_loader']['library'] = 'lib/CLN/Cln_Module_Loader.php';
	$GLOBALS['classes']['module_loader']['classname'] = 'Cln_Module_Loader';
}
if(!isset($GLOBALS['classes']['process_manager'])) {
	$GLOBALS['classes']['process_manager']['library'] = 'lib/CLN/Cln_Process_Manager.php';
	$GLOBALS['classes']['process_manager']['classname'] = 'Cln_Process_Manager';
}




/////////////////////////////////////////////////////////////////////
//
// Part Three:
// The names of your tables. Probably you won't need to change this, but you might.
// 
/////////////////////////////////////////////////////////////////////

// Users and Groups
if(!defined('USER_TABLE')) define('USER_TABLE', 'user');
if(!defined('GROUP_TABLE')) define('GROUP_TABLE', 'group');
if(!defined('USER2GROUP_TABLE')) define('USER2GROUP_TABLE', 'user2group');

// General Knowledge Objects
if(!defined('KO_TABLE')) define('KO_TABLE', 'ko');
if(!defined('KO_METADATA_TABLE')) define('KO_METADATA_TABLE', 'kometadata');
if(!defined('PERMISSION_TABLE')) define('PERMISSION_TABLE', 'kopermissions');

// Rooms
if(!defined('ROOM_TABLE')) define('ROOM_TABLE', 'room');
if(!defined('ROOM_LOOK_TABLE')) define('ROOM_LOOK_TABLE', 'roomlook');
if(!defined('ROOM_NODE_TABLE')) define('ROOM_NODE_TABLE', 'roomnode');


// Pages
if(!defined('PAGE_TABLE')) define('PAGE_TABLE', 'page');
if(!defined('PAGE_LAYOUT_TABLE')) define('PAGE_LAYOUT_TABLE', 'pagelayout');

// General Settings
if(!defined('ROLES_TABLE')) define('ROLES_TABLE', 'roles');
if(!defined('MODULE_TABLE')) define('MODULE_TABLE', 'module');

if(!defined('RECORD_LOCK_TABLE')) define('RECORD_LOCK_TABLE', 'recordlock');


/////////////////////////////////////////////////////////////////////
//
// Part Four:
// Miscellaneous options
// 
/////////////////////////////////////////////////////////////////////

// Site Name:
if(!defined('CLN_SITE_NAME')) define ('CLN_SITE_NAME', 'St. Christopher House');

if(!defined('CLN_DEFAULT_LANGUAGE')) define ('CLN_DEFAULT_LANGUAGE', 'en'); // The default language of the system.

if(!defined('CLN_CONTROL_FILE_EXTENSION')) define('CLN_CONTROL_FILE_EXTENSION',".php");

if(!defined('CLN_DEFAULT_TEMPLATE')) define('CLN_DEFAULT_TEMPLATE','GoodRobotDefault'); //:TODO: delete these default things...it shoudl be based on /system/template/MyHouse, shouldn't it?
if(!defined('CLN_DEFAULT_STYLESHEET')) define('CLN_DEFAULT_STYLESHEET','GoodRobotDefaultStyle');

if(!defined('CLN_PASSWORD_LENGTH')) define('CLN_PASSWORD_LENGTH',5);

if(!defined('CLN_GROUPID_PUBLIC')) define('CLN_GROUPID_PUBLIC',1);
if(!defined('CLN_GROUPID_REGISTERED')) define('CLN_GROUPID_REGISTERED',2);
if(!defined('CLN_GROUPID_GROUPCREATORS')) define('CLN_GROUPID_GROUPCREATORS',4);

if(!defined('CLN_PASSWORD_PREFIX')) define('CLN_PASSWORD_PREFIX','cln');

if(!defined('CLN_CLEAN_URLS')) define('CLN_CLEAN_URLS',0);

// cookie information:
if(!defined('CLN_COOKIE_NAME')) define('CLN_COOKIE_NAME','CLNSESSID');
if(!defined('CLN_COOKIE_PATH')) define('CLN_COOKIE_PATH','/');
if(!defined('CLN_COOKIE_DOMAIN')) define('CLN_COOKIE_DOMAIN', $_SERVER['HTTP_HOST']);
if(!defined('CLN_COOKIE_SECURE')) define('CLN_COOKIE_SECURE',0);


// turns on debug
if(!defined('CLN_DEBUG')) define('CLN_DEBUG',0);

// shows koIds in borts
if(!defined('CLN_DEBUG_SHOW_KOID')) define('CLN_DEBUG_SHOW_KOID',0);

/* this is a relative CLN path - should not begin with a slash */
if(!defined('CLN_ERROR_PAGE')) define('CLN_ERROR_PAGE','System/ErrorPages/PageNotFound.php');
if(!defined('CLN_UNAUTHORIZED_PAGE')) define('CLN_UNAUTHORIZED_PAGE','System/ErrorPages/PageNotAuthorized.php');

if(!defined('CLN_HELP_PAGE')) define('CLN_HELP_PAGE','Help/index.php');

if(!defined('CLN_USERS_ROOM')) define('CLN_USERS_ROOM','Users');
if(!defined('CLN_MY_HOUSE_TEMPLATE')) define('CLN_MY_HOUSE_TEMPLATE','System/Templates/MyHouse');
if(!defined('CLN_MY_WORKSHOP_TEMPLATE')) define('CLN_MY_WORKSHOP_TEMPLATE','System/Templates/MyWorkshop'); 


if(!defined('CLN_DEFAULT_BLOCK_ID')) define('CLN_DEFAULT_BLOCK_ID',3);


if(!defined('CLN_SUPERUSER_GROUPID')) define('CLN_SUPERUSER_GROUPID','3');

if(!defined('CLN_TEMPLATE_SEARCH_KOID')) define('CLN_TEMPLATE_SEARCH_KOID','26');

if(!defined('CLN_RECORD_LOCK_TIME')) define('CLN_RECORD_LOCK_TIME','300');

if(!defined('CLN_VIEWER_ROLEIDS')) define('CLN_VIEWER_ROLEIDS','1,2,3,4');
if(!defined('CLN_COLLABORATOR_ROLEIDS')) define('CLN_COLLABORATOR_ROLEIDS','1,2,3');
if(!defined('CLN_PUBLISHER_ROLEIDS')) define('CLN_PUBLISHER_ROLEIDS','1,2');
if(!defined('CLN_OWNER_ROLEIDS')) define('CLN_OWNER_ROLEIDS','1');


if(!defined('CLN_SHOW_DROP_DOWN_MENU')) define('CLN_SHOW_DROP_DOWN_MENU','0');
if(!defined('CLN_DROP_DOWN_MENU_HIDE_PAGES')) define('CLN_DROP_DOWN_MENU_HIDE_PAGES','1');

// Search Admin username/password - PLEASE REDEFINE THIS IN config-local.php
if(!defined('CLN_SEARCH_ADMIN_USERNAME')) define('CLN_SEARCH_ADMIN_USERNAME','cln');
if(!defined('CLN_SEARCH_ADMIN_PASSWORD')) define('CLN_SEARCH_ADMIN_PASSWORD','cln');


// modId for Image - not easy to get from db yet
if(!defined('CLN_IMAGE_MODID')) define('CLN_IMAGE_MODID',4);


// Legal area Boilerplate pages
if(!defined('CLN_PRIVACY_PAGE')) define('CLN_PRIVACY_PAGE','Legal/privacyStatement.php');
if(!defined('CLN_TERMS_OF_USE_PAGE')) define('CLN_TERMS_OF_USE_PAGE','Legal/index.php');
if(!defined('CLN_LEGAL_TERMS_KOID')) define('CLN_LEGAL_TERMS_KOID',33);


// Contact Us page
if(!defined('CONTACT_US')) define('CONTACT_US','contactUs/index.php');

// Login Redirect Page - leave blank to have the user stay wherever they are
if(!defined('CLN_LOGIN_REDIRECT')) define('CLN_LOGIN_REDIRECT', '');

// Force unique KO titles - default is off
if(!defined('CLN_FORCE_UNIQUE_TITLES')) define('CLN_FORCE_UNIQUE_TITLES', '0');

// What to show as the public name of a user, options are - fullName, firstName, or memberName
if(!defined('CLN_DEFAULT_PUBLIC_NAME')) define('CLN_DEFAULT_PUBLIC_NAME', 'memberName');



/////////////////////////////////////////////////////////////////////
//
// Part Five:
// Session options
// 
/////////////////////////////////////////////////////////////////////

if(!defined('CLN_AUTHENTICATION_LIFETIME')) define('CLN_AUTHENTICATION_LIFETIME',0);
if(!defined('CLN_AUTHENTICATION_REFRESH')) define('CLN_AUTHENTICATION_REFRESH',0);


/////////////////////////////////////////////////////////////////////
//
// Part Six:
// Installed Templates
// 
/////////////////////////////////////////////////////////////////////

if(!defined('CLN_ALLOW_ROOM_PAGE_TEMPLATE_OVERRIDE')) define('CLN_ALLOW_ROOM_PAGE_TEMPLATE_OVERRIDE',0);
if(!defined('CLN_ALLOW_ROOM_PAGE_STYLESHEET_OVERRIDE')) define('CLN_ALLOW_ROOM_PAGE_STYLESHEET_OVERRIDE',0);

//if(!isset($GLOBALS['CLN_TEMPLATES'])) {


$GLOBALS['CLN_TEMPLATES']['GoodRobotDefault']['Title'] = "GoodRobot Default";
$GLOBALS['CLN_TEMPLATES']['GoodRobotDefault']['StyleSheets']['GoodRobotDefaultStyle'] = "GoodRobot Default";

$GLOBALS['CLN_TEMPLATES']['help']['Title'] = "Help Area Template";
$GLOBALS['CLN_TEMPLATES']['help']['StyleSheets']['default'] = "Default";

//}

/////////////////////////////////////////////////////////////////////
//
// Part Seven:
// Available languages
// 
/////////////////////////////////////////////////////////////////////

// Cannot be a constant because they are an array
$GLOBALS['languages']['en'] = 'English';
$GLOBALS['languages']['fr'] = 'French';
$GLOBALS['languages']['es'] = 'Spanish';
$GLOBALS['languages']['pt'] = 'Portuguese';
$GLOBALS['languages']['zh'] = 'Chinese';
$GLOBALS['languages']['vi'] = 'Vietnamese';

?>
Return current item: Community Learning Network