<?php

// CMS made simple Config File
// Version 1.0
// English, modified Version
// Modified by: Andi Petzoldt <andi@petzoldt.net>

// ESettings for Live-Server
$config['dbms'] = 'mysqli'; // mysql or mysqli
$config['db_hostname'] = '127.0.0.1'; // MySQL Hostname
$config['db_username'] = 'mysql_username'; // MySQL Username
$config['db_password'] = 'mysql_passwort'; // MySQL Password
$config['db_name'] = 'mysql_db_name'; // MySQL Database-Name
$config['db_port'] = '3306'; // MySQL Port, mostly 3306, some Provider are using 3307 for MySQL 5 Databases
$config['db_prefix'] = 'cms_'; // Default value is cms_ - change it if you use more than one CMSms installations within one database
$config['subdir'] = ''; // Default is no subdirectory (leave empty)
$config['https_url'] = ''; // If you use a different URL for SSL (e.g. for a SSL-Proxy), enter this URL here
$config['server_prefix'] = ''; // If you want to use a prefix (e.g. www.)
$config['http_port'] = ''; // If your Webserver uses a different port than 80, enter it here (e.g. 8080)
$config['dev'] = false; // This parameter can be used from developers

// Settings for local development server - remove the comments (#) and fill in your data
#if ($_SERVER["SERVER_ADDR"]=="127.0.0.1") {
#	$config['dbms'] = 'mysqli'; // mysql or mysqli
#	$config['db_hostname'] = 'localhost'; // MySQL Hostname
#	$config['db_username'] = 'mysql_username'; // MySQL Username
#	$config['db_password'] = 'mysql_passwort'; // MySQL Password
#	$config['db_name'] = 'mysql_db_name'; // MySQL Database-Name
#	$config['db_port'] = '3306'; // MySQL Port, mostly 3306, some Provider are using 3307 for MySQL 5 Databases
#	$config['db_prefix'] = 'cms_'; // Default value is cms_ - change it if you use more than one CMSms installations within one database
#	$config['subdir'] = ''; // Default is no subdirectory (leave empty)
#	$config['https_url'] = ''; // If you use a different URL for SSL (e.g. for a SSL-Proxy), enter this URL here
#	$config['server_prefix'] = ''; // If you want to use a prefix (e.g. www.)
#	$config['http_port'] = ''; // If your Webserver uses a different port than 80, enter it here (e.g. 8080)
#	$config['dev'] = true; // This parameter can be used from developers
#}

// If you are experiencing propblems with php memory limit errors, then you may
// want to try enabling and/or adjusting this setting.
// Note: Your server may not allow the application to override memory limits.
$config['php_memory_limit'] = '';

// In versions of CMS Made Simple prior to version 1.4, the page template was processed
// in it's entirety.  This behaviour was later changed to process the head portion of the
// page template after the body.  If you are working with a highly configured site that
// relies significantly on the old order of smarty processing, you may want to try
// uncommenting this parameter.
$config['process_whole_template'] = false;

// CMSMS Debug Mode?  Turn it on to get a better error when you
// see {nocache} errors, or to allow seeing php notices, warnings, and errors in the html output.
// This setting will also disable browser css caching.
$config['debug'] = false;

// Output compression?
// Turn this on to allow CMS to do output compression
// this is not needed for apache servers that have mod_deflate enabled
// and possibly other servers.  But may provide significant performance
// increases on some sites.  Use caution when using this as there have
// been reports of incompatibilities with some browsers.
$config['output_compression'] = false;

// Use persistent connections?  They're generally faster, but not all hosts
// allow them.
$config['persistent_db_conn'] = false;

// Use ADODB Lite?  This should be true in almost all cases.  Note, slight
// tweaks might have to be made to date handling in a "regular" adodb
// install before it can be used.
$config['use_adodb_lite'] = true;

// Document root as seen from the webserver.
// In the following lines we try to get your settings automatically.
// Do only change if you know, what you do!
if ($_SERVER['SERVER_PORT']==443 && $config['https_url']) { $config['root_url'] = $config['https_url']; }
else {
	$http_port = $config['http_port'] ? ':'.preg_replace('/[^0-9]/','',$config['http_port']) : '';
	$config['root_url'] = 'http';
	if($_SERVER['SERVER_PORT']==443) { $config['root_url'].= 's'; }
	if ($config['server_prefix'] && substr($_SERVER['SERVER_NAME'],0,strlen($config['server_prefix']))==$config['server_prefix']) { $config['server_prefix'] = ''; }
	if (trim($config['subdir'])) {
		$config['subdir'] = str_replace ('\\','/',trim($config['subdir']));
		while (substr($config['subdir'],0,1) == "/") { $config['subdir'] = substr($config['subdir'],1); }
		while (substr($config['subdir'],-1) == "/") { $config['subdir'] = substr($config['subdir'],0,-1); }
		while (strpos($config['subdir'],'..')) { $config['subdir'] = str_replace('..','.',$config['subdir']); }
	}
	$_SERVER['SERVER_NAME'] = $config['server_prefix'].$_SERVER['SERVER_NAME'].$http_port;
	$config['root_url'].= $config['subdir'] ? '://'.$_SERVER['SERVER_NAME'].'/'.$config['subdir'] : '://'.$_SERVER['SERVER_NAME'];
}

// Path to document root. This should be the directory this file is in.
// e.g. /var/www/localhost
// In the following line we try to get your settings automatically.
// Do only change if you know, what you do!
$config['root_path'] = $config['subdir'] ? $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.$config['subdir'] : $_SERVER['DOCUMENT_ROOT'];

// Name of the admin directory
// Default is admin
$config['admin_dir'] = 'admin';

// Where do previews get stored temporarily?  It defaults to tmp/cache.
$config['previews_path'] = $config['root_path'].DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'cache';

// Where are uploaded files put?  This defaults to uploads.
$config['uploads_path'] = $config['root_path'].DIRECTORY_SEPARATOR.'uploads';

// Where is the url to this uploads directory?
$config['uploads_url'] = $config['root_url'].'/uploads';

// Maxium upload size (in bytes)?
// Notice: This value could be limited in your php.ini
$config['max_upload_size'] = 32000000;

// Permissions for uploaded files.  This only really needs changing if your
// host has a weird permissions scheme.
$config['default_upload_permission'] = '664';

// Allow smarty {php} tags?  These could be dangerous if you don't trust your users.
$config['use_smarty_php_tags'] = false;

// Automatically assign alias based on page title?
$config['auto_alias_content'] = true;

// User-friendly URLs (Pretty URLs)
// Activate this parameter to use user-friendly URLs.
// This parameter has 3 setting possibilities:
// 'none' - Pretty URLs are de-activated
// 'mod_rewrite' - Pretty URLs are activatet using the Apache Module mod_rewrite (file .htaccess is needed in CMSms Root Directory, additionally the placeholder {metadata} is needed in the page templates).
// 'internal' - Pretty URLs are activated using the CMSms-internal function (will not work with IIS and some CGI configurations)
// Find more information here: http://wiki.cmsmadesimple.org/index.php/FAQ/Installation/Pretty_URLs#Pretty_URL.27s
$config['url_rewriting'] = 'mod_rewrite';

// If you're using the internal pretty url mechanism or mod_rewrite, would you like to
// show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = false;

// Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '/';

// If using none of the above options, what should we be using for the query string
// variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';

// Which program should be used for handling thumbnails in the image manager.
// See http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Content/Image_Manager for more
// info on what this all means
$config['image_manipulation_prog'] = 'GD';
$config['image_transform_lib_path'] = '/usr/bin/ImageMagick/';

// Default path and URL for uploaded images in the image manager
$config['image_uploads_path'] = $config['root_path'].DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.'images';
$config['image_uploads_url'] = $config['root_url'].'/uploads/images';

// Locale to use for various default date handling functions, etc.  Leaving
// this blank will use the server's default.  This might not be good if the
// site is hosted in a different country than it's intended audience.
// Default is ''.
// For German you should use 'de_DE.UTF8'
$config['locale'] = 'de_DE.UTF8';

// In almost all cases, default_encoding should be empty (which defaults to utf-8)
// and admin_encoding should be utf-8.  If you'd like this to be different, change
// both.  Keep in mind, however, that the admin interface translations are all in
// utf-8, and will be converted on the fly to match the admin_encoding.  This
// could seriously slow down the admin interfaces for users.
$config['default_encoding'] = 'utf-8';
$config['admin_encoding'] = 'utf-8';

// Use Database as UTF-8
$config['set_names'] = true;

// URL of the Admin Panel section of the User Handbook
$config['wiki_url'] = 'http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel';

// EOF