b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (CVS HEAD) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Class: GeneralSettings

Source Location: /blogs/inc/settings/model/_generalsettings.class.php

Class GeneralSettings

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From AbstractSettings

AbstractSettings::$all_loaded
AbstractSettings::$cache
AbstractSettings::$cache_by_col_keys
AbstractSettings::$col_key_names
AbstractSettings::$col_value_name
AbstractSettings::$db_table_name

Inherited From AbstractSettings

AbstractSettings::AbstractSettings()
Constructor.
AbstractSettings::dbupdate()
Commit changed settings to DB.
AbstractSettings::delete()
Remove a setting.
AbstractSettings::delete_array()
Delete an array of values.
AbstractSettings::get()
Get a setting from the DB settings table.
AbstractSettings::get_cond()
Only set the first variable (passed by reference) if we could retrieve a setting.
AbstractSettings::get_default()
Get the default for the last key of $col_key_names
AbstractSettings::load_all()
Load all settings, disregarding the derived classes setting of $cache_by_col_keys
  • useful if you know that you want to get
all user settings for example.
AbstractSettings::param_Request()
Get a param from Request and save it to Settings, or default to previously saved user setting.
AbstractSettings::reset()
Reset cache (includes settings to be written to DB).
AbstractSettings::restore_defaults()
Delete values for $_defaults in DB.
AbstractSettings::set()
Temporarily sets a setting (dbupdate() writes it to DB).
AbstractSettings::set_array()
Set an array of values.
AbstractSettings::_load()
Loads the settings. Not meant to be called directly, but gets called when needed.

[ Top ]
Property Summary
array   $_defaults   The default settings to use, when a setting is not given in the database.

[ Top ]
Method Summary
GeneralSettings   GeneralSettings()   Constructor.
string   get_public_key_salt()   Get a 32-byte string that can be used as salt for public keys.

[ Top ]
Properties
array   $_defaults = array(
'admin_skin' => 'chicago',

'antispam_last_update' => '2000-01-01 00:00:00',
'antispam_threshold_publish' => '-90',
'antispam_threshold_delete' => '100', // do not delete by default!
'antispam_block_spam_referers' => '0', // By default, let spam referers go in silently (just don't log them). This is in case the blacklist is too paranoid (social media, etc.)
'antispam_report_to_central' => '1',

'evonet_last_update' => '1196000000', // just around the time we implemented this ;)
'evonet_last_attempt' => '1196000000', // just around the time we implemented this ;)

'log_public_hits' => '1',
'log_admin_hits' => '0',
'log_spam_hits' => '0',
'auto_prune_stats_mode' => 'page', // 'page' is the safest mode for average installs (may be "off", "page" or "cron")
'auto_prune_stats' => '15', // days (T_hitlog and T_sessions)

'outbound_notifications_mode' => 'immediate', // 'immediate' is the safest mode for average installs (may be "off", "immediate" or "cron")

'fm_enable_create_dir' => '1',
'fm_enable_create_file' => '1',
'fm_enable_roots_blog' => '1',
'fm_enable_roots_user' => '1',
'fm_enable_roots_shared' => '1',
'fm_enable_roots_skins' => '1',

'fm_showtypes' => '0',
'fm_showfsperms' => '0',

'fm_default_chmod_file' => '664',
'fm_default_chmod_dir' => '775',

'newusers_canregister' => '0',
'newusers_mustvalidate' => '1',
'newusers_revalidate_emailchg' => '0',
'newusers_level' => '1',

'allow_avatars' => 1,

'regexp_filename' => '^[a-zA-Z0-9\-_. ]+$', // TODO: accept (spaces and) special chars / do full testing on this
'regexp_dirname' => '^[a-zA-Z0-9\-_]+$', // TODO: accept spaces and special chars / do full testing on this
'reloadpage_timeout' => '300',
'time_difference' => '0',
'timeout_sessions' => '604800', // seconds (604800 == 7 days)
'upload_enabled' => '1',
'upload_maxkb' => '2048',

'user_minpwdlen' => '5',
'js_passwd_hashing' => '1', // Use JS password hashing by default

'webhelp_enabled' => '1',

'allow_moving_chapters' => '0', // Do not allow moving chapters by default
'chapter_ordering' => 'alpha',

'general_cache_enabled' => 0,

'eblog_enabled' => 0, // blog by email
'eblog_method' => 'pop3', // blog by email
'eblog_encrypt' => 'none', // blog by email
'eblog_server_port' => 110, // blog by email
'eblog_default_category' => 1, // blog by email
'AutoBR' => 0, // Used for email blogging. fp> TODO: should be replaced by "email renderers/decoders/cleaners"...
'eblog_add_imgtag' => 1, // blog by email
'eblog_body_terminator' => '___', // blog by email
'eblog_subject_prefix' => 'blog:', // blog by email
'general_xmlrpc' => 1,
'xmlrpc_default_title' => '', //default title for posts created throgh blogger api

'nickname_editing' => 'edited-user', // "never" - Never allow; "default-no" - Let users decide, default to "no" for new users; "default-yes" - Let users decide, default to "yes" for new users; "always" - Always allow
'multiple_sessions' => 'userset_default_no', // multiple sessions settings -- overriden for demo mode in contructor
)
[line 53]

The default settings to use, when a setting is not given in the database.

API Tags:
Access:  protected

Information Tags:
Todo:  Allow overriding from /conf/_config_TEST.php?

Redefinition of:
AbstractSettings::$_defaults
Default settings.

[ Top ]
Methods
Constructor GeneralSettings  [line 139]

  GeneralSettings GeneralSettings( )

Constructor.

This loads the general settings and checks db_version.

It will also turn off error-reporting/halting of the DB object temporarily to present a more decent error message if tables do not exist yet.

Because the DB object itself creates a connection when it gets created "Error selecting database" occurs before we can check for it here.



[ Top ]
get_public_key_salt  [line 184]

  string get_public_key_salt( )

Get a 32-byte string that can be used as salt for public keys.



[ Top ]

Documentation generated on Sat, 06 Mar 2010 04:11:32 +0100 by phpDocumentor 1.4.2. This site is hosted and maintained by Daniel HAHLER (Contact).