slow but convenient and user friendly
// * popup: adds an icon that runs a popup with and html editor
// --> faster, but html code is displayed on the form
// * none: no html editor
$defaulthtmleditormode = 'inline';
// $surveyPreview_require_Auth
// Enforce Authentication to the LS system
// before beeing able to preview a survey (testing a non active survey)
// Default is true
$surveyPreview_require_Auth = true;
// $use_one_time_passwords
// Activate One time passwords
// The user can call the limesurvey login at /limesurvey/admin and pass username and
// a one time password which was previously written into the users table (column one_time_pw) by
// an external application.
// This setting has to be turned on to enable the usage of one time passwords (default = off).
$use_one_time_passwords = false;
// $useWebserverAuth
// Enable delegation of authentication to the webserver.
// If you set this parameter to true and set your webserver to authenticate
// users accessing the /admin subdirectory, then the username returned by
// the webserver will be trusted by LimeSurvey and used for authentication
// unless a username mapping is used see $userArrayMap below
//
// The user still needs to be defined in the limesurvey database in order to
// login and get his permissions (unless $WebserverAuth_autocreateUser is set to true)
$useWebserverAuth = false;
// $userArrayMap
// Enable username mapping
// This parameter is an array mapping username from the webserver to username
// defined in LimeSurvey
// Can be usefull if you have no way to add an 'admin' user to the database
// used by the webserver, then you could map your true loginame to admin with
// $userArrayMap = Array ('mylogin' => 'admin');
//
// $WebserverAuth_autocreateUser
// Enable this if you want to automatically create users authenticated by the
// webserver in LS
// Default is false (commenting this options also means false)
// $WebserverAuth_autocreateUser = false;
//
// $WebserverAuth_autouserprofile
// This parameter MUST be defined if you set $WebserverAuth_autocreateUser to true
// otherwise autocreateUser will be disabled.
// This is an array describing the default profile to use for auto-created users
// This profile will be the same for all users (unless you define the optionnal
// 'hook_get_autouserprofile' function).
//
//$WebserverAuth_autouserprofile = Array(
// 'full_name' => 'autouser',
// 'email' => $siteadminemail,
// 'lang' => 'en',
// 'htmleditormode' => $defaulthtmleditormode,
// 'templatelist' => 'default,basic',
// 'create_survey' => 1,
// 'create_user' => 0,
// 'delete_user' => 0,
// 'superadmin' => 0,
// 'configurator' =>0,
// 'manage_template' => 0,
// 'manage_label' => 0);
//
//
// The optionnal 'hook_get_autouserprofile' function
// is for advanced user usage only.
// It is used to customize the profile of the imported user
// If set, the this function will overwrite the $WebserverAuth_autouserprofile
// defined above by its return value
//
// You can use any external DB in order to fill the profile for the user_name
// passed as the first parameter
// A dummy example for the 'hook_get_autouserprofile' function is given
// below:
//function hook_get_autouserprofile($user_name)
//{
// return Array(
// 'full_name' => '$user_name',
// 'email' => "$user_name@localdomain.org",
// 'lang' => 'en',
// 'htmleditormode' => 'inline',
// 'templatelist' => 'default,basic,MyOrgTemplate',
// 'create_survey' => 1,
// 'create_user' => 0,
// 'delete_user' => 0,
// 'superadmin' => 0,
// 'configurator' =>0,
// 'manage_template' => 0,
// 'manage_label' => 0);
//}
// $usercontrolSameGroupPolicy
// If this option is set to true, then limesurvey operators will only 'see'
// users that belong to at least one of their groups
// Otherwise they can see all operators defines in LimeSurvey
$usercontrolSameGroupPolicy = true;
// $addTitleToLinks
// If this option is set to true, then LimeSurvey will add 'title' html element
// to all links used in menus. This will help screen reader to analyse the
// menus. Only set this to true if you're using a screen reader because
// it overlaps with tooltips. This option shouldn't be required anymore
// for new releases of screen readers.
$addTitleToLinks = false;
// $demoModeOnly
// If this option is set to true, then LimeSurvey will go into demo mode.
// Demo mode disables the following things:
//
// * Disables changing of the admin user's details and password
// * Disables uploading files on the Template Editor
// * Disables sending email invitations and reminders
// * Disables doing a database dump
// * Disables the ability to save the following global settings: Site name, Default language, Default Htmleditor Mode, XSS filter
$demoModeOnly = false;
/** -----------------------------------------------------
* Because columns are tricky things, in terms of balancing visual
* layout against semantic markup. The choice has been left to the
* system administrator or designer. (Who ever cares most.)
*
* $column_style defines how columns are rendered for survey answers.
* There are four possible options:
* 'css' using one of the various CSS only methods for creating
columns (see template style sheet for details).
* 'ul' using multiple floated unordered lists. (DEFAULT)
* 'table' using conventional tables based layout.
* NULL blocks the use of columns
*/
$column_style = 'ul';
/**
* $hide_groupdescr_allinone.
* This parameter 'hide_groupdescr_allinone' can be set to control
* if the group description should be hidden if the group description of a group of questions
* with all questions hidden by conditions is displayed in all-in-one survey mode.
* hide_groupdescr_allinone can be set to true or false (default: true)
*/
$hide_groupdescr_allinone=true;
/**
* Use FireBug Lite for JavaScript and template development and testing.
* This allows you to use all the features of Firebug in any browser.
* see http://getfirebug.com/lite.html for more info.
*/
$use_firebug_lite = false;
/*
* When activated there are additional values like arithmetic mean and standard deviation at statistics.
* This only affects question types "A" (5 point array) and "5" (5 point choice).
* Furthermore data is aggregated to get a faster overview.
*/
$showaggregateddata = 1;
/**
* When this settings is true/1 (default) then the standard templates that are delivered with the
* LimeSurvey installation package are read-only. If you want to modify a template just copy it first.
* This prevents upgrade problems later because if you modify your standard templates you could accidenitally
* overwrite these on a LimSurvey upgrade. Only set this to 0 if you know what you are doing.
*/
$standard_templates_readonly = true;
/**
* When this settings is true/1 (default = false/0) then the printable survey option will show a reference
* to the "lime_survey_12345" table which stores the survey answers.
* It will show a code like "12345X22X333name":
* 12345 = surveyID
* 22 = groupID
* 333 = questionID
* name = answer code (only shown for certain question types
*
* This code will be shown in front of each question and in front of each answer option at the printable survey.
* It can be used as a data analysis code book for querying data from the main response table.
*/
$showsgqacode = false;
/**
* PDF Export Settings
* This feature activates PDF export for printable survey and Print Answers
* The PDF export is totally experimental. The output is mostly ugly.
* At this point no support can be given - if you want to help to fix it please get in touch with us
*/
$usepdfexport = 0; //Set 0 to disable; 1 to enable
$pdfdefaultfont = 'freemono'; //Default font for the pdf Export
$pdffontsize = 9; //Fontsize for normal text; Surveytitle is +4; grouptitle is +2
$notsupportlanguages = array('zh-Hant-TW','zh-Hant-HK','zh-Hans','ja','th');
$pdforientation = 'P'; // Set L for Landscape or P for portrait format
// RemoteControl Settings
/**
* This value determines if the RemoteControl is enabled (true) or not (false)
*/
$enableLsrc = false;
/**
* This value determines if you can save survey structures (as .csv) into your lsrc folder in export menu
*/
$export4lsrc = false;
// CAS Settings
/**
* Please note that CAS functionality is very basic and you have to modify the client to your needs.
* At least the hard work is done.
* The Client is deployed in Limesurvey and a file login_check_cas.php does what login_check.php does in normal mode.
*
* $casEnabled determines if CAS should be used or not for Authentication.
* $casAuthServer the servername of the cas Auth Server. Without http://
* $casAuthPort CAS Server listening Port
* $casAuthUri relative uri from $casAuthServer to cas workingdirectory
*/
$casEnabled = false;
$casAuthServer = 'localhost';
$casAuthPort = 8443;
$casAuthUri = '/cas-server/';
/**
* Statistics chart settings
* Different languages need different fonts to properly create charts - this is what the following settings are for
*/
/**
* $chartfontfile - set the font file name used to created the charts in statistics - this font must reside in /fonts
* Set this to specific font-file (for example 'vera.ttf') or set it to 'auto' and LimeSurvey tried to pick the best font depending on your survey base language
*/
$chartfontfile='auto';
/**
* $chartfontsize - set the size of the font to created the charts in statistics
*/
$chartfontsize =10;
/**
* $updatecheckperiod - sets how often LimeSurvey checks for updates - the number sets the number of days between updates.
* Set to 0 to disable any update checks
* Recommended: 7
*/
$updatecheckperiod=7;
/**
* @var $showXquestions string allows you to control whether or not
* {THEREAREXQUESTIONS} is displayed (if it is included in a template)
* hide = always hide {THEREAREXQUESTIONS}
* show = always show {THEREAREXQUESTIONS}
* choose = allow survey admins to choose
*/
$showXquestions = 'choose';
/**
* @var $showgroupinfo string allows you to control whether or not
* {GROUPNAME} and/or {GROUPDESCRIPTION} are displayed (if they are
* included in a template)
* none = always hide both title and description
* name = always {GROUPNAME} only
* description = always show {GROUPDESCRIPTION} only
* both = always show both {GROUPNAME} and {GROUPDESCRIPTION}
* choose = allow survey admins to choose
*/
$showgroupinfo = 'choose';
/**
* @var $showqnumcode string allows you to control whether or not
* {QUESTION_NUMBER} and/or {QUESTION_CODE} are displayed (if they
* are included in a template)
* none = always hide both {QUESTION_NUMBER} and {QUESTION_CODE}
* code = always show {QUESTION_CODE} only
* number = always show {QUESTION_NUMBER} only
* both = always show both {QUESTION_NUMBER} and {QUESTION_CODE}
* choose = allow survey admins to choose
*/
$showqnumcode = 'choose';
/**
* @var $force_ssl string - forces LimeSurvey to run through HTTPS or to block HTTPS
* 'on' = force SSL/HTTPS to be on (This will cause LimeSurvey
* to fail in SSL is turned off)
* 'off' = block SSL/HTTPS (this prevents LimeSurvey from
* running through SSL)
* '' = do nothing (default)
*
* DO NOT turn on secure unless you are sure SSL/HTTPS is working and
* that you have a current, working, valid certificate. If you are
* unsure whether your server has a valid certificate, just add 's'
* to the http part of your normal LimeSurvey URL.
* e.g. https://your.domain.org/limesurvey/admin/admin.php
* If LimeSurvey comes up as normal, then everything is fine. If you
* get a page not found error or permission denied error then
*/
$force_ssl = ''; // DO not turn on unless you are sure your server supports SSL/HTTPS
/**
* @var $ssl_emergency_override boolean forces SSL off
* if You've turned HTTPS/SSL on in the global settings but your
* server doesn't have HTTPS enabled, the only way to turn it off is
* by changing a value in the database directly. This allows you to
* force HTTPS off while you change the global settings for Force Secure.
*
* false = do nothing;
* true = override $force_ssl=on;
*
* This should always be false except in emergencies where you change
* it to true until you fix the problem.
*/
$ssl_emergency_override = false;
// Get your IP Info DB key from http://ipinfodb.com/
// If you have the API key, you can use it to get the approximate location of the user initially.
$ipInfoDbAPIKey = '';
// Google Maps API key. http://code.google.com/apis/maps/signup.html
// To have questions that require google Maps!
$googleMapsAPIKey = '';
//DO NOT EVER CHANGE THE FOLLOWING 5 LINES ---------------
require_once(dirname(__FILE__).'/config.php');
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on')
{
$rooturl=str_replace('http://', 'https://', $rooturl);
}
//-----------------------------------------------------
// === Advanced Setup
// The following parameters need information from config.php
// and thus are defined here (After reading your config.php file).
// This means that if you want to tweak these very advanced parameters
// you'll have to do this in this file and not in config.php
// In this case, don't forget to backup your config-defaults.php settings when upgrading LS
// and report them to the new config-defaults.php file (Do not simply overwrite the new
// config-defaults file with your old one
//The following url and dir locations do not need to be modified unless you have a non-standard
//LimeSurvey installation. Do not change unless you know what you are doing.
$homeurl = "$rooturl/admin"; // The website location (url) of the admin scripts
$publicurl = "$rooturl"; // The public website location (url) of the public survey script
$tempurl = "$rooturl/tmp";
$imageurl = "$rooturl/images"; // Location of button bar files for admin script
$uploadurl = "$rooturl/upload";
$standardtemplaterooturl = "$rooturl/templates"; // Location of the standard templates
$usertemplaterooturl = "$uploadurl/templates"; // Location of the user templates
$homedir = "$rootdir".DIRECTORY_SEPARATOR."admin"; // The directory path of the admin scripts
$publicdir = "$rootdir"; // The directory path of the public scripts
$tempdir = "$rootdir".DIRECTORY_SEPARATOR."tmp"; // The directory path where LimeSurvey can store temporary files
$imagedir = "$rootdir".DIRECTORY_SEPARATOR."images"; // The directory path of the image directory
$uploaddir = "$rootdir".DIRECTORY_SEPARATOR."upload";
$standardtemplaterootdir = "$rootdir".DIRECTORY_SEPARATOR."templates"; // The directory path of the standard templates
$usertemplaterootdir = "$uploaddir".DIRECTORY_SEPARATOR."templates"; // The directory path of the user templates
// Note: For OS/2 the $tempdir may need to be defined as an actual directory
// example: "x:/limesurvey/tmp". We don't know why.
$sFCKEditorURL = "$homeurl/scripts/fckeditor.266";
$fckeditexpandtoolbar = true; // defines if the FCKeditor toolbar should be opened by default
$pdfexportdir = "$homedir/classes/tcpdf"; //Directory with the tcpdf.php extensiontcpdf.php
$pdffonts = $pdfexportdir.'/fonts'; //Directory for the TCPDF fonts
// Computing relative url
// $relativeurl is the url relative to you DocumentRoot where is installed LimeSurvey.
// Usually same as $rooturl without http://{$_SERVER['HTTP_HOST']}.
// $relativeurl is now automatically computed from $rooturl
if(!isset($cmd_install) || !$cmd_install==true)
{
$parsedurl = parse_url($rooturl);
$relativeurl= isset($parsedurl['path']) ? $parsedurl['path'] : "";
}
else
{
// commandline installation, no relativeurl needed
}