<?php
/**
* Project: cwc CompWebChess
* File: config.inc.php
*
* Main configuration file
*
* 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.
*
* @package Config
* @copyright CompWebChess2 Development Team
* @since 2009
* @license GPL This program is free software; you can redistribute it and/or modify it under the
* terms of the General Public License as published by the Free Software Foundation;
* either version 2 of the License, or (at your option) any later version.
* You should have received a copy of the GNU General Public License along with this
* program; if not, write to:
* Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
* @link http://www.compwebchess.com/cms/index.php English Forum & Support
* @link http://www.trimbrain.com German Forum
* @link http://www.ready-4-it.de German Support
* @author First: nelson8317, http://www.compwebchess.com/cms/index.php
* @author Nejat Philip Eryigit <info@trimbrain.de>
* @author next one
* @version 2.2dev
*
*/
//set_magic_quotes_runtime(1);
/* A list of timezones to choose from, other than "US/Eastern" for your putenv() is here:
* http://www.theprojects.org/dev/zone.txt e.g
* Europe/Berlin
* TZ=US/Eastern
* Europe/Istanbul
*/
date_default_timezone_set('Europe/Berlin');
$VERSION = "2.2 dev";
$_CONFIG = TRUE;
/**
* General debug switch for firebug and firephp
*
* var Boolean
* @see fSendMailUtf8
*/
$bDEBUG = TRUE; #FALSE;
/**
* Switch to testing environment and config
*
* var Boolean
* @see fSendMailUtf8
*/
$bTestingEnv = TRUE;
/**
* Set TRUE if you want not send mails and see the message displayed instead
*
* var Boolean
* @see fSendMailUtf8
*/
$bDebugMail = TRUE;
/* FirePHP (download and include it {see http://www.firephp.org/Wiki/Libraries/FirePHPCore} or use pear install {see http://www.firephp.org/HQ/Install.htm}) */
// if not within the include pathes; download below classes dir
//require_once(""$CFG_SITE_ROOT/classes/FirePHPCore/FirePHP.class.php");
require_once('FirePHPCore/FirePHP.class.php');
$firephp = FirePHP::getInstance(TRUE);
ob_start();
if ($bDEBUG) {
ini_set('display_errors', '1');
// error_reporting(2037); /* Will show only critical errors */
error_reporting(2039); /* verbose error reporting */
//error_reporting(2047); /* very verbose error reporting */
/* database settings */
$firephp->setEnabled($bDEBUG); // false disable output
$bPIncludeSequence = TRUE; // show running process sequence of includes
// Defaults:
$options = array('maxObjectDepth' => 10,
'maxArrayDepth' => 20,
'useNativeJsonEncode' => TRUE,
'includeLineNumbers' => TRUE);
$firephp->setOptions($options);
// $firephp->registerErrorHandler();
// $firephp->registerExceptionHandler();
/* usage for debugging */
//$firephp->group('Test Group');
//$firephp->log('Hello World');
//$firephp->groupEnd();
//$firephp->info('öooo', $sController);
//$firephp->info($sController);
} else {
ini_set('display_errors', '0');
$firephp->setEnabled(FALSE); // false disable output
$bPIncludeSequence = FALSE; // show running process sequence of includes
}
if ($bTestingEnv) {
/* database settings */
$CFG_SERVER = "localhost";
$CFG_USER = "web.....";
$CFG_PASSWORD = "...............";
$CFG_DATABASE = "usr_web......_1";
/* Server settings I dev Linux */
$CFG_SITE_URL = "http://192.168.2.165/trimbrain.com/compwebchess2"; /* Enter the url to your webchess installation ...no backslash!*/
$CFG_MAILADDRESS = "info@....."; /* email address people see when receiving WebChess generated mail */
$CFG_SITE_ROOT = "/raid/web/trimbrain.com/compwebchess2"; /* Enter the absolute path to your webchess installation...no backslash! */
$CFG_SITE_HOME = $CFG_SITE_URL; /* Enter the url to your webchess installation ...no backslash! */
$CFG_SITE_NAME = "my site - test"; /* Enter the name of your site */
/* Server settings I dev Windows on XAMPP vhost*/
$CFG_SITE_URL = "http://cwc.trimbrain.com"; /* Enter the url to your webchess installation ...no backslash!*/
$CFG_SITE_ROOT = "F:/web/trimbrain.com/dev/chess2009"; /* Windows: Enter the absolute path to your webchess installation...no backslash! */
/* Logs */
/* webchess.log must be writeable to http server user, use Blank to disable log*/
$CFG_LOG_PATH = "/raid/web/trimbrain.com/compwebchess2/logs"; /* Enter the absolute path to your webchess.log file...no backslash! */
$CFG_LOG_DEBUG = TRUE; /* Save Ranking updates in the txt log */
} else {
# ini_set('display_errors', '0');
/* database settings */
$CFG_SERVER = "localhost";
$CFG_USER = "web....";
$CFG_PASSWORD = "...............";
$CFG_DATABASE = "usr_web...._1";
/* Server settings I */
$CFG_SITE_URL = "http://compwebchess.chess-knights.com"; /* Enter the url to your webchess installation ...no backslash!*/
$CFG_MAILADDRESS = "info@....."; /* email address people see when receiving WebChess generated mail */
$CFG_SITE_ROOT = "/home/chessknights/public_html"; /* Enter the absolute path to your webchess installation...no backslash! */
$CFG_SITE_HOME = $CFG_SITE_URL; /* Enter the url to your webchess installation ...no backslash! */
$CFG_SITE_NAME = "my site"; /* Enter the name of your site */
/* Logs */
/* webchess.log must be writeable to http server user, use Blank to disable log*/
$CFG_LOG_PATH = "/home/chessknights/public_html/logs"; /* Enter the absolute path to your webchess.log file...no backslash! */
$CFG_LOG_DEBUG = TRUE; /* Save Ranking updates in the txt log */
}
$CFG_JPGRAPH_DIR = "./jpgraph"; /* Path where JPgraph is installed */
$CFG_GRAPH_LINE_COLOR = "red"; /* Rating Graph */
$CFG_GRAPH_FILL_COLOR = "orange";
/* % Victories Graph */
$CFG_GRAPH_LINE2_COLOR = "black"; /* Victories Graph */
$CFG_GRAPH_FILL2_COLOR = "#60A0F0";
$CFG_GRAPH_SHOW = "rating"; /* Values = rating | pv */
$CFG_GRAPH_SHOW2 = "pv"; /* Values = rating | pv */
$CFG_GRAPH_LIMIT = 200; /* Show graphic from these number of past games. Less number means faster graphics */
/* server settings II */
$CFG_SITE_LOGO = "compwebchess.gif";
$CFG_SITE_ADMIN = "admin"; /* first name of admin */
$CFG_SESSIONTIMEOUT = 36000; /* session times out if user doesn't interact after x secs */
$CFG_EXPIREGAME = 45; /* number of days before untouched games expire (minimum 1)*/
$CFG_MINAUTORELOAD = 45; /* min number of secs between automatic reloads reloads */
$CFG_USEEMAILNOTIFICATION = true; /* Use email notification require_onces PHP to be properly configured for */
$CFG_NICKCHANGEALLOWED = 0; /* whether a user can change their nick from the main menu */
$CFG_ENABLE_CHAT = TRUE; /* Can permit chat between players? */
$CFG_DEFAULT_COLOR_THEME = "LightBlue"; /* Color Theme to use at index and to the new users. If you are using version 2.0, do NOT change this! */
$STRONG_EMAIL_VALIDATION = FALSE; /* Checks for e-mail validation at login, and ask the user to choose a valid email.*/
/* SMTP operations. This flag allows you to easily activate */
/* or deactivate this feature. It is highly recommended you test */
/* it before putting it into production */
/* forum settings */
$replies_perpage = 10; // Topicview
$topics_perpage = 10; // Forumview
$spiele_forum = 1; // id of the forum used for game related discussions
$main_perpage = 3; // Mainmenu
$main_perpage2 = 8; // Mainmenu
$forum_banned = array(); // ids of banned users (forum only)
/* Game settings */
$CFG_GAME_LIMIT ="45"; /* Enter the game limit you wish to place on your users. */
$CFG_MIN_ROUNDS = 3; /* Number of rounds needed to a game count in the ranking - Minimun 1 */
$CFG_ENABLE_UNDO = FALSE; /* Can permit undo moves? */
$CFG_ENABLE_UNDO_TOURNAMENT = TRUE; /* Can permit undo moves in tournament or blitz games? */
$CFG_DEFAULT_LANGUAGE = "english"; /* Default Language */
$CFG_RANKING_LIMIT = 0; /* Use 0 to show all players*/
$CFG_PERPAGE_LIST = 100; /* How many items should be displayed per page */
$CFG_RANK_COMPUTER = FALSE; /* Games played against chess-bots can count at ranking? */
$CFG_ENABLE_SUBRANKING = TRUE; /* Enable SubRanking (Medal Ranking) */
$CFG_USE_RANDOM_QUOTES = TRUE; /* Radom quotes in the mainmenu */
$CFG_PERMIT_MULTIPLE_GAMES = TRUE; /* Can the same player be invited more than once at the same time?*/
$CFG_CONFIRM_MOVE = TRUE; /* Ask confirmation for every move */
/* Useful for old databases */
$COMPRESSION = TRUE; /* Compress pages */
$CFG_ENABLE_TRIAL_RATING = FALSE; /* Should new users pass by 5 games before receive a rating? */
$CFG_TIME_ARRAY = array(30,60,120,180,360,720,1440); /* Time that can be used in time limited games (in seconds and less than 1440) */
$JAVASCRIPT_EXT = ".js"; /* What javascript extension to use?
.js are faster but if you are updating from an
older version of compwebchess use .php */
$ONLINE_LIMIT = "0"; /* how many users can conect simultaniously? 0 = unlimited */
$TEAM_LIMIT = "30"; /* how many player in one team? */
/* Tournament Section*/
$t_banned_users = array(); // array(1,2,3,4); Banned user Ids -> Can't create or join a tournament
$t_min_rating = array(1200,1300,1400,1500,1600,1700,1800,1900,2000); /* Minimum Rating selection*/
$t_max_rating = array(1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900); /* Maximum Rating selection */
$t_admin_only = false; /* Select TRUE if you want only admins to start 16 player tournaments */ // if true, only admins can create big tournaments
$ag_leiter = array(1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,49,50,51,52,53,55,56,58,59,61,62,63,64,65,66,67,68,71,72,73,74,75,76,77,79,81,82,83,84,85,89,90,91,92,93,94,95,96,98,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,120,121,122,123,124,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,234,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,
288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,367,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,
543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,
797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000); // these is the array for that users which can create more than one group
$CFG_EXPIRE_POSTED_GAME=168;
$CFG_POSTED_TIME_ARRAY = array(30,60,120,180,360,720,1440);
/* AVATAR Settings */
$AVATAR_LOCATION = "directory"; /* Where store avatars? (database|directory) */
$max_size = 24; /* Maximum File Size in KB */
$max_width= 200; /* maximum width in pixel */
$max_height= 300; /* maximum height in pixel */
$extensions = array("gif", "png", "JPG", "GIF", "JPEG", "jpeg", "jpg"); /* allowed files (.gif and .GIF are different) */
$def_avatar = "default.gif"; /* name of the default avatar (in /avatars/ directory) */
/**
* Essential includes
*/
// if not within the include pathes; download below classes directory and uncomment the line below; comment out next line
//require_once(""$CFG_SITE_ROOT/classes/phpmailer/class.phpmailer.php");
require_once("phpmailer/class.phpmailer.php");
// TODO: Lines below to be moved into header.inc.php or maybe mainfile.inc.php which should be require_onced by each controller scripts
// (position: historical reason)
require_once("$CFG_SITE_ROOT/classes/error.class.php");
?>