9 if (typeof elgg !=
'object') {
10 throw new Error(
'elgg configuration object is not defined! You must include the js/initialize_elgg view in html head before JS library files!');
17 $classes_dir =
'js/classes';
24 "$classes_dir/ElggEntity",
25 "$classes_dir/ElggUser",
26 "$classes_dir/ElggPriorityList",
29 "$lib_dir/prototypes",
36 "$lib_dir/configuration",
41 "$lib_dir/ui.widgets",
46 foreach (
$files as $file) {
47 readfile(
"{$root_path}$file.js");
58 elgg.version =
'<?php echo elgg_get_version(); ?>';
59 elgg.release =
'<?php echo elgg_get_version(true); ?>';
60 elgg.config.wwwroot =
'<?php echo elgg_get_site_url(); ?>';
63 elgg.security.interval = <?php echo (
int)
_elgg_services()->actions->getActionTokenTimeout() * 333; ?>;
64 elgg.config.language =
'<?php echo (empty($CONFIG->language) ? 'en
' : $CONFIG->language); ?>';
67 define(
'elgg', [
'jquery',
'languages/' + elgg.get_language()],
function($,
translations) {
68 elgg.add_translation(elgg.get_language(), translations);
71 elgg.trigger_hook(
'init',
'system');
72 elgg.trigger_hook(
'ready',
'system');
85 elgg.trigger_hook(
'boot',
'system');
$CONFIG translations
String translations for the current language.
elgg_get_root_path()
Get the root directory path for this installation.
global $CONFIG
Core Elgg JavaScript file.
$lib_dir
This file is used to make all of Elgg's code available without going through the boot process.
elgg_view_deprecated($view, array $vars, $suggestion, $version)
Display a view with a deprecation notice.