| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
// All installation specific parameters should be in a file |
|---|
| 6 |
// that is not part of the standard distribution. |
|---|
| 7 |
if (!file_exists(dirname(__FILE__)."/config.php")) { |
|---|
| 8 |
die('Elgg configuration error: config.php is missing. Please see INSTALL file.'); |
|---|
| 9 |
} |
|---|
| 10 |
require_once(dirname(__FILE__)."/config.php"); |
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
if (!file_exists(dirname(__FILE__)."/.htaccess")) { |
|---|
| 14 |
die('Elgg configuration error: .htaccess is missing. Please see INSTALL file.'); |
|---|
| 15 |
} |
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
require_once(dirname(__FILE__).'/sanitychecks.php'); |
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
* HELPER LIBRARIES |
|---|
| 22 |
****************************************************************************/ |
|---|
| 23 |
|
|---|
| 24 |
// Load cache lib |
|---|
| 25 |
require_once($CFG->dirroot.'lib/cache/lib.php'); |
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
require_once($CFG->dirroot.'lib/datalib.php'); |
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
require_once($CFG->dirroot.'lib/elgglib.php'); |
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
require_once($CFG->dirroot.'lib/constants.php'); |
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
* CORE FUNCTIONALITY LIBRARIES |
|---|
| 38 |
****************************************************************************/ |
|---|
| 39 |
|
|---|
| 40 |
// Load setup.php which will initialize database connections and such like. |
|---|
| 41 |
require_once($CFG->dirroot.'lib/setup.php'); |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
require_once(dirname(__FILE__)."/includes_system.php"); |
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
require_once($CFG->dirroot.'lib/userlib.php'); |
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
require_once($CFG->dirroot.'lib/dbsetup.php'); |
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
* PLUGIN INITIALISATION |
|---|
| 54 |
****************************************************************************/ |
|---|
| 55 |
|
|---|
| 56 |
// XMLRPC |
|---|
| 57 |
@include($CFG->dirroot . "units/rpc/main.php"); |
|---|
| 58 |
|
|---|
| 59 |
if ($allmods = get_list_of_plugins('mod') ) { |
|---|
| 60 |
foreach ($allmods as $mod) { |
|---|
| 61 |
$mod_init = $mod . '_init'; |
|---|
| 62 |
if (function_exists($mod_init)) { |
|---|
| 63 |
$mod_init(); |
|---|
| 64 |
} |
|---|
| 65 |
} |
|---|
| 66 |
} |
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
* CONTENT MODULES |
|---|
| 70 |
* This should make languages easier, although some kind of |
|---|
| 71 |
* selection process will be required |
|---|
| 72 |
****************************************************************************/ |
|---|
| 73 |
|
|---|
| 74 |
// General |
|---|
| 75 |
include_once($CFG->dirroot . "content/general/main.php"); |
|---|
| 76 |
|
|---|
| 77 |
include_once($CFG->dirroot . "content/mainindex/main.php"); |
|---|
| 78 |
|
|---|
| 79 |
include_once($CFG->dirroot . "content/users/main.php"); |
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
* HELP MODULES |
|---|
| 83 |
****************************************************************************/ |
|---|
| 84 |
|
|---|
| 85 |
// Include main |
|---|
| 86 |
// include_once($CFG->dirroot . "help/mainindex/main.php"); |
|---|
| 87 |
|
|---|
| 88 |
// Visual editor (tinyMCE) |
|---|
| 89 |
@include($CFG->dirroot . "units/tinymce/main.php"); |
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 |
// require($CFG->dirroot . "units/calendar/main.php"); |
|---|
| 93 |
|
|---|
| 94 |
/*************************************************************************** |
|---|
| 95 |
* START-OF-PAGE RUNNING |
|---|
| 96 |
****************************************************************************/ |
|---|
| 97 |
|
|---|
| 98 |
run("init"); |
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 |
// and walled garden functionality is turned on, redirect to |
|---|
| 102 |
// the logon screen |
|---|
| 103 |
if (!empty($CFG->walledgarden) && (context != "external" || !defined("context")) && !logged_on) { |
|---|
| 104 |
header("Location: " . $CFG->wwwroot . "login/index.php"); |
|---|
| 105 |
exit(); |
|---|
| 106 |
} |
|---|
| 107 |
|
|---|
| 108 |
?> |
|---|
| 109 |
|
|---|