x
 
Create New Page
 View Previous Changes    ( Last updated by bkuberek )

System Preferences

Table of Contents


The Preferences Object

$PREFS store all runtime system configurations

How to access the Preferences Object

global $PREFS;

Example usage

global $PREFS, $SESS;

$cond['captcha'] = ( $PREFS->ini('captcha_require_members') == 'y'  ||  ($PREFS->ini('captcha_require_members') == 'n' AND $SESS->userdata('member_id') == 0) ) ? TRUE : FALSE;

Available Preferences

This list was generated using var_dump(). To output the preferences of your system do the following:

global $PREFS; var_dump($PREFS);

Below is a list of the default system preferences. This list may change if you have installed modules.

object(Preferences)#2 (5) {
  
["core_ini"] => array(190) {
    [
"enable_image_resizing"] => string(1) "y"
    
["image_resize_protocol"] => string(3) "gd2"
    
["image_library_path"] => string(0) ""
    
["thumbnail_prefix"] => string(5) "thumb"
    
["word_separator"] => string(4) "dash"
    
["use_category_name"] => string(1) "y"
    
["reserved_category_word"] => string(8) "category"
    
["auto_convert_high_ascii"] => string(1) "y"
    
["new_posts_clear_caches"] => string(1) "y"
    
["auto_assign_cat_parents"] => string(1) "n"
    
["site_404"] => string(0) ""
    
["save_tmpl_revisions"] => string(1) "y"
    
["max_tmpl_revisions"] => string(1) "5"
    
["save_tmpl_files"] => string(1) "y"
    
["tmpl_file_basepath"] => string(76) "/var/www/vhosts/domain.com/template_repository/"
    
["un_min_len"] => string(1) "4"
    
["pw_min_len"] => string(1) "5"
    
["allow_member_registration"] => string(1) "y"
    
["allow_member_localization"] => string(1) "n"
    
["req_mbr_activation"] => string(4) "none"
    
["new_member_notification"] => string(1) "n"
    
["mbr_notification_emails"] => string(0) ""
    
["require_terms_of_service"] => string(1) "y"
    
["use_membership_captcha"] => string(1) "n"
    
["default_member_group"] => string(1) "5"
    
["profile_trigger"] => string(9) "oldmember"
    
["member_theme"] => string(6) "default"
    
["enable_avatars"] => string(1) "y"
    
["allow_avatar_uploads"] => string(1) "y"
    
["avatar_url"] => string(46) "http://www.domain.com/images/avatars/"
    
["avatar_path"] => string(51) "/var/www/vhosts/domain.com/images/avatars/"
    
["avatar_max_width"] => string(3) "100"
    
["avatar_max_height"] => string(3) "100"
    
["avatar_max_kb"] => string(2) "50"
    
["enable_photos"] => string(1) "y"
    
["photo_url"] => string(52) "http://www.domain.com/images/member_photos/"
    
["photo_path"] => string(57) "/var/www/vhosts/domain.com/images/member_photos/"
    
["photo_max_width"] => string(3) "100"
    
["photo_max_height"] => string(3) "100"
    
["photo_max_kb"] => string(2) "50"
    
["allow_signatures"] => string(1) "n"
    
["sig_maxlength"] => string(3) "500"
    
["sig_allow_img_hotlink"] => string(1) "n"
    
["sig_allow_img_upload"] => string(1) "n"
    
["sig_img_url"] => string(60) "http://www.domain.com/images/signature_attachments/"
    
["sig_img_path"] => string(65) "/var/www/vhosts/domain.com/images/signature_attachments/"
    
["sig_img_max_width"] => string(3) "480"
    
["sig_img_max_height"] => string(2) "80"
    
["sig_img_max_kb"] => string(2) "30"
    
["prv_msg_upload_path"] => string(58) "/var/www/vhosts/domain.com/images/pm_attachments/"
    
["prv_msg_max_attachments"] => string(1) "3"
    
["prv_msg_attach_maxsize"] => string(3) "250"
    
["prv_msg_attach_total"] => string(3) "100"
    
["prv_msg_html_format"] => string(4) "safe"
    
["prv_msg_auto_links"] => string(1) "y"
    
["prv_msg_max_chars"] => string(4) "6000"
    
["memberlist_order_by"] => string(11) "total_posts"
    
["memberlist_sort_order"] => string(4) "desc"
    
["memberlist_row_limit"] => string(2) "20"
    
["mailinglist_enabled"] => string(1) "y"
    
["mailinglist_notify"] => string(1) "n"
    
["mailinglist_notify_emails"] => string(0) ""
    
["encryption_type"] => string(4) "sha1"
    
["site_index"] => string(0) ""
    
["site_name"] => string(18) "BlackBook Magazine"
    
["site_url"] => string(28) "http://www.domain.com/"
    
["theme_folder_url"] => string(38) "http://www.domain.com/themes/"
    
["webmaster_email"] => string(21) "info@domain.com"
    
["webmaster_name"] => string(21) "info@domain.com"
    
["weblog_nomenclature"] => string(6) "weblog"
    
["max_caches"] => string(3) "150"
    
["captcha_url"] => string(47) "http://www.domain.com/images/captchas/"
    
["captcha_path"] => string(52) "/var/www/vhosts/domain.com/images/captchas/"
    
["captcha_font"] => string(1) "y"
    
["captcha_rand"] => string(1) "y"
    
["captcha_require_members"] => string(1) "n"
    
["enable_db_caching"] => string(1) "y"
    
["enable_sql_caching"] => string(1) "n"
    
["force_query_string"] => string(1) "n"
    
["show_queries"] => string(1) "n"
    
["template_debugging"] => string(1) "n"
    
["include_seconds"] => string(1) "n"
    
["cookie_domain"] => string(0) ""
    
["cookie_path"] => string(0) ""
    
["cookie_prefix"] => string(0) ""
    
["user_session_type"] => string(1) "c"
    
["admin_session_type"] => string(1) "c"
    
["allow_username_change"] => string(1) "n"
    
["allow_multi_logins"] => string(1) "y"
    
["password_lockout"] => string(1) "y"
    
["password_lockout_interval"] => string(1) "1"
    
["require_ip_for_login"] => string(1) "y"
    
["require_ip_for_posting"] => string(1) "y"
    
["allow_multi_emails"] => string(1) "n"
    
["require_secure_passwords"] => string(1) "n"
    
["allow_dictionary_pw"] => string(1) "y"
    
["name_of_dictionary_file"] => string(0) ""
    
["xss_clean_uploads"] => string(1) "y"
    
["redirect_method"] => string(8) "redirect"
    
["deft_lang"] => string(7) "english"
    
["xml_lang"] => string(2) "en"
    
["charset"] => string(5) "utf-8"
    
["send_headers"] => string(1) "y"
    
["gzip_output"] => string(1) "y"
    
["log_referrers"] => string(1) "y"
    
["max_referrers"] => string(3) "500"
    
["time_format"] => string(2) "us"
    
["server_timezone"] => string(3) "UM5"
    
["server_offset"] => string(0) ""
    
["daylight_savings"] => string(1) "y"
    
["default_site_timezone"] => string(0) ""
    
["default_site_dst"] => string(1) "n"
    
["honor_entry_dst"] => string(1) "y"
    
["mail_protocol"] => string(8) "mail"
    
["smtp_server"] => string(17) ""
    
["smtp_username"] => string(18) ""
    
["smtp_password"] => string(6) ""
    
["email_debug"] => string(1) "y"
    
["email_charset"] => string(5) "utf-8"
    
["email_batchmode"] => string(1) "y"
    
["email_batch_size"] => string(3) "300"
    
["mail_format"] => string(4) "html"
    
["word_wrap"] => string(1) "y"
    
["email_console_timelock"] => string(1) "0"
    
["log_email_console_msgs"] => string(1) "y"
    
["cp_theme"] => string(7) "default"
    
["email_module_captchas"] => string(1) "n"
    
["log_search_terms"] => string(1) "y"
    
["secure_forms"] => string(1) "n"
    
["deny_duplicate_data"] => string(1) "y"
    
["redirect_submitted_links"] => string(1) "y"
    
["enable_censoring"] => string(1) "n"
    
["censored_words"] => string(0) ""
    
["censor_replacement"] => string(0) ""
    
["banned_ips"] => string(0) ""
    
["banned_emails"] => string(0) ""
    
["banned_usernames"] => string(0) ""
    
["banned_screen_names"] => string(0) ""
    
["ban_action"] => string(8) "restrict"
    
["ban_message"] => string(34) "This site is currently unavailable"
    
["ban_destination"] => string(21) "http://www.google.com/"
    
["enable_emoticons"] => string(1) "y"
    
["emoticon_path"] => string(46) "http://www.domain.com/images/smileys/"
    
["recount_batch_total"] => string(4) "1000"
    
["remap_pm_urls"] => string(1) "n"
    
["remap_pm_dest"] => string(0) ""
    
["new_version_check"] => string(1) "n"
    
["publish_tab_behavior"] => string(5) "hover"
    
["sites_tab_behavior"] => string(5) "hover"
    
["enable_throttling"] => string(1) "n"
    
["banish_masked_ips"] => string(1) "y"
    
["max_page_loads"] => string(2) "10"
    
["time_interval"] => string(1) "8"
    
["lockout_time"] => string(2) "30"
    
["banishment_type"] => string(7) "message"
    
["banishment_url"] => string(0) ""
    
["banishment_message"] => string(50) "You have exceeded the allowed page load frequency."
    
["enable_search_log"] => string(1) "y"
    
["max_logged_searches"] => string(3) "500"
    
["theme_folder_path"] => string(63) "/var/www/vhosts/domain.com/themes/"
    
["is_site_on"] => string(1) "y"
    
["app_version"] => string(3) "162"
    
["license_number"] => string(19) ""
    
["debug"] => string(1) "0"
    
["install_lock"] => string(1) "1"
    
["db_hostname"] => string(9) "localhost"
    
["db_username"] => string(10) "username"
    
["db_password"] => string(20) "password"
    
["db_name"] => string(17) "database"
    
["db_type"] => string(5) "mysql"
    
["db_prefix"] => string(3) "exp"
    
["db_conntype"] => string(1) "0"
    
["system_folder"] => string(6) "system"
    
["cp_url"] => string(47) "http://www.domain.com/system/index.php"
    
["doc_url"] => string(33) "http://expressionengine.com/docs/"
    
["is_system_on"] => string(1) "y"
    
["allow_extensions"] => string(1) "y"
    
["multiple_sites_enabled"] => string(1) "n"
    
["ip2nation"] => string(1) "y"
    
["site_pages"] => array(2) {
      [
"uris"] => array(0) {}
      [
"templates"] => array(0) {}
    }
    [
"site_id"] => string(1) "1"
    
["site_label"] => string(18) "BlackBook Magazine"
    
["site_description"] => string(0) ""
    
["site_short_name"] => string(12) "default_site"
  
}
  [
"default_ini"] => array(24) {
    [
"app_version"] => string(3) "162"
    
["license_number"] => string(19) "1533-8596-0064-6374"
    
["debug"] => string(1) "0"
    
["install_lock"] => string(1) "1"
    
["db_hostname"] => string(9) "localhost"
    
["db_username"] => string(10) "username"
    
["db_password"] => string(20) "password"
    
["db_name"] => string(17) "database"
    
["db_type"] => string(5) "mysql"
    
["db_prefix"] => string(3) "exp"
    
["db_conntype"] => string(1) "0"
    
["system_folder"] => string(6) "system"
    
["cp_url"] => string(47) "http://www.domain.com/system/index.php"
    
["doc_url"] => string(33) "http://expressionengine.com/docs/"
    
["is_system_on"] => string(1) "y"
    
["allow_extensions"] => string(1) "y"
    
["multiple_sites_enabled"] => string(1) "n"
    
["ip2nation"] => string(1) "y"
  
}
  [
"exceptions"] => array(0) {}
  [
"cp_cookie_domain"] => string(0) ""
  
["special_tlds"] => array(7) {
    [0]
=> string(3) "com"
    
[1] => string(3) "edu"
    
[2] => string(3) "net"
    
[3] => string(3) "org"
    
[4] => string(3) "gov"
    
[5] => string(3) "mil"
    
[6] => string(3) "int"
  
}
}

Using config.php

You can set the value for this preferences in the config.php.

look at Hidden Configuration Variables for more details.

Category:System Category:Preferences Category:Configuration