Here are bunch of options for site.php that we've found from various places - looking to add to the list so please post your options/improvements/corrections (we're designers so chime in with better ways to configure stuff).
BTW, does anyone know if you can set user login options such as "Use emails for login". We're finding that certain options are not sticking when moving environments.
Here's our list so far - usual disclaimers apply and some items have not been tested by us personally. Have tried to link to all the places we've found stuff but can't remember everything - sorry if we missed you.
Also, is there a place in C5 that allows you to determine what all these settings are - or is it just your level of guruness?
<?php
define('DIR_REL', '');
// ----------------------- PASSWORD SALT ----------------------------------------------------
// Make unique to your site by logging into the C5 control panel and resetting the admin account's password
define('PASSWORD_SALT', 'LfJ61s5bZTp8NEOoQvg4sVpL5e7vUm6zE2aq4DVUUVBJa9mW9neilYUjMsuImHtW');
// ----------------------- ENVIRONMENTS ----------------------------------------------------
// Loads correct database based on incoming domain (example domains shown)
// Put live production site first:
if ($_SERVER['HTTP_HOST'] == 'site-name.com') { // Production site
define('DB_SERVER', 'localhost'); // Or whatever your DB server address is
define('DB_USERNAME', 'db-username');
define('DB_PASSWORD', 'db-password');
define('DB_DATABASE', 'db-name');
define('BASE_URL', 'http://www.site-name.com');
} else if ($_SERVER['HTTP_HOST'] == 'site-name.dev.com') { // DEV server
define('DB_SERVER', 'localhost'); // Or whatever your DB server address is
define('DB_USERNAME', 'db-username');
define('DB_PASSWORD', 'db-password');
define('DB_DATABASE', 'db-name');
define('BASE_URL', 'http://site-name.dev.com');
} else { // LOCAL (MAMP or similar)
define('DB_SERVER', 'localhost'); // Or whatever your DB server address is
define('DB_USERNAME', 'db-username');
define('DB_PASSWORD', 'db-password');
define('DB_DATABASE', 'db-name');
define('BASE_URL', 'http://site-name');
}
// ----------------------- SUB DIRECTORY ----------------------------------------------------
// For when site is in a subdirectory, uncomment, leave blank and define the sub directory below
// define('BASE_URL', '');
// For when the site is in a subdirectory e.g.http://domain-name/site-name
// define('DIR_REL', '/site-name');
// ----------------------- FORMAT PAGE TITLES ----------------------------------------------------
// Explained here:http://www.concrete5.org/documentation/how-tos/editors/change-the-f...
// %1$s = Site title
// %2$s = Page title
// Page title first for SEO:
define('PAGE_TITLE_FORMAT', '%2$s - %1$s');
// ----------------------- MISER ----------------------------------------------------
// MISER minifies and merges JavaScript and CSS (concrete5 caching must also be OFF)
// Miser needs to be installed on the server and configured - About:http://www.concrete5.org/community/forums/customizing_c5/miser-web-...
// Latest Version:http://sourceforge.net/projects/miser/...
// NOTE: MISER doesn't support this global toggle "out-of-the-box" and required a small tweak in its view.php file
// See:http://sourceforge.net/projects/miser/...
//define('ENABLE_MISER', FALSE);
// ----------------------- CACHE --------------------------------
// APC CACHING (Alternative PHP Caching needs to be installed on the server)
// CHECK IF APC IS ON THE SERVER BEFORE USING (The below option should not be used if using this option)
// if ( extension_loaded('apc') && ini_get('apc.enabled') == "1") { // check if APC is enabled
// define('CACHE_LIBRARY', 'apc'); // if so, instruct c5 to use
// }
// TURN APC CACHING ON WITHOUT CHECKING (The above should be commented out if using this option)
//define('CACHE_LIBRARY', 'apc');
// Disable Zend Cache Cleaning (may improve performance)
// define('CACHE_FRONTEND_OPTIONS',
// serialize(array('automatic_cleaning_factor' => 0)));
// ----------------------- ADVANCED PERMISSIONS AND USER SECURITY DEFAULTS --------------------------------------
// Set advanced permissions on
// define('PERMISSIONS_MODEL', 'advanced');
// Change minimum user name length from default value 3
// define('USER_USERNAME_MINIMUM', 3);
// Change maximum username length from default value 64
// define('USER_USERNAME_MAXIMUM', 64);
// Change minimum password length from default value 3
// define('USER_PASSWORD_MINIMUM', 5);
// Change maximum password length from default value 64
// define('USER_PASSWORD_MAXIMUM', 64);
// Change session time from default of 2 hours
// define('SESSION_MAX_LIFETIME', 7200); // 2 hours
// ----------------------- DATE & TIME SETTINGS --------------------------------------
// Set time to 24 hour format
// define('DATE_FORM_HELPER_FORMAT_HOUR', '24');
// Date Formatting
// define('DATE_APP_GENERIC_MDYT_FULL', 'F d, Y \a\t g:i A');
// define('DATE_APP_GENERIC_MDYT', 'n/j/Y \a\t g:i A');
// define('DATE_APP_GENERIC_MDY', 'n/j/Y');
// define('DATE_APP_GENERIC_MDY_FULL', 'F d, Y');
// ---------------------- EMAILS SENT FROM THE SITE --------------------------------------
// Set default email from address
define('EMAIL_DEFAULT_FROM_ADDRESS', 'example@domain.com');
// Set default email from name
define('EMAIL_DEFAULT_FROM_NAME', 'Company Name');
// Set registration email notification address
// define('EMAIL_ADDRESS_REGISTER_NOTIFICATION','example@domain.com');
// Set registration email notification from address
// define('EMAIL_ADDRESS_REGISTER_NOTIFICATION_FROM','example@domain.com');
// ----------------------- WHITE LABELING --------------------------------------
// More:http://www.concrete5.org/documentation/how-tos/developers/white-lab...
// Defaults to true. False removes portions of the interface that link to the marketplace, disable marketplace results in intelligent search, and no longer attempt to connect to the community
define('ENABLE_MARKETPLACE_SUPPORT', false);
// Defaults to true. Controls if Newsflow 1 (which is populated by Dashboard home content) appears on the front-end of the site for administrators, if they haven't seen it in a 24 hour period
define('ENABLE_NEWSFLOW_OVERLAY', false);
// Defaults to false. If this is set to a valid image (either local or a remote URL), this image will be used as the background on every dashboard page.
// If set to "none" no image will be shown.
define('WHITE_LABEL_DASHBOARD_BACKGROUND_SRC', none);
// Defaults to the concrete5 logo. To include your own logo, set this as a path to the image - can be a full URL and be 49x49 pixels
// define('WHITE_LABEL_LOGO_SRC', '/logo.png');
// Defaults to concrete5. This is used in the alt text for the logo, but it may be used elsewhere in the future
// define('WHITE_LABEL_APP_NAME', 'Your company');
// Defaults to true. If false, Layouts are not available.
// define('ENABLE_AREA_LAYOUTS', false);
// Defaults to true. If false, custom design is not available for blocks or areas.
// define('ENABLE_CUSTOM_DESIGN', false);
// Defaults to true. If false, Newsflow will not attempt to connect to concrete5.org to retrieve latest updates.
// Note: if this is the case, you should probably reorganize Newsflow 1 to include different blocks than the Dashboard Newsflow Latest blocks (see Dashboard Customization below.)
// define('ENABLE_APP_NEWS', false);
// Defaults to false. If set to a valid web address, an image for today's date will be requested.
// e.g. If you set this: define('WHITE_LABEL_DASHBOARD_BACKGROUND_FEED', 'http://www.yourapp.com/backgrounds/');
// Then, on January 18th, 2012, an image will be requested fromhttp://www.yourapp.com/backgrounds/20120118.jpg...
// define('WHITE_LABEL_DASHBOARD_BACKGROUND_FEED', false);
// This URL requests credits for the image of the day. If you're including your own image, you should set this to false (instead of an offsite URL.)
// define('DASHBOARD_BACKGROUND_INFO', false);
?>
Here's a free add-on that lists all the constants built by a true C5 guru, JohntheFish.
http://www.concrete5.org/marketplace/addons/constants-info/...