Elgg
Version 1.9
|
Go to the source code of this file.
Namespaces | |
Elgg\Core | |
Activate a plugin or plugins. | |
Functions | |
elgg_get_site_url ($site_guid=0) | |
Get the URL for the current (or specified) site. More... | |
elgg_get_plugins_path () | |
Get the plugin path for this installation. More... | |
elgg_get_data_path () | |
Get the data directory path for this installation. More... | |
elgg_get_root_path () | |
Get the root directory path for this installation. More... | |
elgg_get_config ($name, $site_guid=0) | |
Get an Elgg configuration value. More... | |
elgg_set_config ($name, $value) | |
Set an Elgg configuration value. More... | |
elgg_save_config ($name, $value, $site_guid=0) | |
Save a configuration setting. More... | |
datalist_get ($name) | |
Get the value of a datalist element. More... | |
datalist_set ($name, $value) | |
Set the value for a datalist element. More... | |
run_function_once ($functionname, $timelastupdatedcheck=0) | |
Run a function one time per installation. More... | |
unset_config ($name, $site_guid=0) | |
Removes a config setting. More... | |
set_config ($name, $value, $site_guid=0) | |
Add or update a config setting. More... | |
get_config ($name, $site_guid=0) | |
Gets a configuration value. More... | |
_elgg_get_all_config ($site_guid=0) | |
Loads all configuration values from the dbprefix_config table into $CONFIG. More... | |
_elgg_load_site_config () | |
Loads configuration related to this site. More... | |
_elgg_load_application_config () | |
Loads configuration related to Elgg as an application. More... | |
_elgg_config_test ($hook, $type, $tests) | |
private More... | |
Variables | |
global | $DATALIST_CACHE = array() |
An array of key value pairs from the datalists table. More... | |
_elgg_config_test | ( | $hook, | |
$type, | |||
$tests | |||
) |
private
Definition at line 686 of file configuration.php.
_elgg_get_all_config | ( | $site_guid = 0 | ) |
Loads all configuration values from the dbprefix_config table into $CONFIG.
int | $site_guid | Optionally, the GUID of the site (current site is assumed by default) |
Definition at line 519 of file configuration.php.
_elgg_load_application_config | ( | ) |
Loads configuration related to Elgg as an application.
This runs on the engine boot and loads from the datalists database table.
private
Definition at line 586 of file configuration.php.
_elgg_load_site_config | ( | ) |
Loads configuration related to this site.
This runs on engine boot and loads from the config database table and the site entity. It runs after the application configuration is loaded by _elgg_load_application_config().
private
Definition at line 551 of file configuration.php.
datalist_get | ( | $name | ) |
Get the value of a datalist element.
Plugin authors should use elgg_get_config() and pass null for the site GUID.
Definition at line 206 of file configuration.php.
datalist_set | ( | $name, | |
$value | |||
) |
Set the value for a datalist element.
Plugin authors should use elgg_save_config() and pass null for the site GUID.
string | $name | The name of the datalist |
string | $value | The new value |
Definition at line 269 of file configuration.php.
elgg_get_config | ( | $name, | |
$site_guid = 0 |
|||
) |
Get an Elgg configuration value.
string | $name | Name of the configuration value |
int | $site_guid | null for installation setting, 0 for default site |
Definition at line 86 of file configuration.php.
elgg_get_data_path | ( | ) |
Get the data directory path for this installation.
Definition at line 61 of file configuration.php.
elgg_get_plugins_path | ( | ) |
Get the plugin path for this installation.
Definition at line 50 of file configuration.php.
elgg_get_root_path | ( | ) |
Get the root directory path for this installation.
Definition at line 72 of file configuration.php.
elgg_get_site_url | ( | $site_guid = 0 | ) |
Get the URL for the current (or specified) site.
int | $site_guid | The GUID of the site whose URL we want to grab |
Definition at line 28 of file configuration.php.
elgg_save_config | ( | $name, | |
$value, | |||
$site_guid = 0 |
|||
) |
Save a configuration setting.
string | $name | Configuration name (cannot be greater than 255 characters) |
mixed | $value | Configuration value. Should be string for installation setting |
int | $site_guid | null for installation setting, 0 for default site |
Definition at line 154 of file configuration.php.
elgg_set_config | ( | $name, | |
$value | |||
) |
Set an Elgg configuration value.
string | $name | Name of the configuration value |
mixed | $value | Value |
Definition at line 136 of file configuration.php.
get_config | ( | $name, | |
$site_guid = 0 |
|||
) |
Gets a configuration value.
Plugin authors should use elgg_get_config().
Definition at line 453 of file configuration.php.
run_function_once | ( | $functionname, | |
$timelastupdatedcheck = 0 |
|||
) |
Run a function one time per installation.
If you pass a timestamp as the second argument, it will run the function only if (i) it has never been run before or (ii) the timestamp is >= the last time it was run.
Use $timelastupdatedcheck in your plugins init function to perform automated upgrades. Schedule a function to run once and pass the timestamp of the new release. This will cause the run once function to be run on all installations. To perform additional upgrades, create new functions for each release.
Definition at line 331 of file configuration.php.
set_config | ( | $name, | |
$value, | |||
$site_guid = 0 |
|||
) |
Add or update a config setting.
Plugin authors should use elgg_set_config().
If the config name already exists, it will be updated to the new value.
Definition at line 408 of file configuration.php.
unset_config | ( | $name, | |
$site_guid = 0 |
|||
) |
Removes a config setting.
Definition at line 364 of file configuration.php.
$DATALIST_CACHE = array() |
An array of key value pairs from the datalists table.
Used as a cache in datalist functions.
array $DATALIST_CACHE
Definition at line 190 of file configuration.php.