| 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 |
$message = <<< END |
|---|
| 9 |
<html> |
|---|
| 10 |
<head> |
|---|
| 11 |
<title>Elgg installation</title> |
|---|
| 12 |
</head> |
|---|
| 13 |
<body> |
|---|
| 14 |
<h1>Elgg isn't ready to run just yet.</h1> |
|---|
| 15 |
<p> |
|---|
| 16 |
There isn't a whole lot of work to do to get up and running, but |
|---|
| 17 |
there is a bit. Here's what you have to do: |
|---|
| 18 |
</p> |
|---|
| 19 |
<ol> |
|---|
| 20 |
<li>Read the INSTALL file that came with your installation package. |
|---|
| 21 |
<li><a href="_elggadmin/">Click here to use the visual installer</a>.</li> |
|---|
| 22 |
</ol> |
|---|
| 23 |
<p> |
|---|
| 24 |
If you have any problems, head over to the main Elgg site |
|---|
| 25 |
at <a href="http://elgg.org/">Elgg.org</a>. |
|---|
| 26 |
</p> |
|---|
| 27 |
</body> |
|---|
| 28 |
</html> |
|---|
| 29 |
END; |
|---|
| 30 |
die($message); |
|---|
| 31 |
} |
|---|
| 32 |
require_once(dirname(__FILE__)."/config.php"); |
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
if (!file_exists(dirname(__FILE__)."/.htaccess")) { |
|---|
| 36 |
$message = <<< END |
|---|
| 37 |
<html> |
|---|
| 38 |
<head> |
|---|
| 39 |
<title>Elgg installation</title> |
|---|
| 40 |
</head> |
|---|
| 41 |
<body> |
|---|
| 42 |
<h1>Elgg still isn't ready to run just yet. (Sorry.)</h1> |
|---|
| 43 |
<p> |
|---|
| 44 |
You're going to need to rename the <i>htaccess-dist</i> file that |
|---|
| 45 |
came with your installation (it's in the main installation directory) |
|---|
| 46 |
to <i>.htaccess</i>. |
|---|
| 47 |
</p> |
|---|
| 48 |
<p> |
|---|
| 49 |
If you're using a Windows <i>server</i>, this is a bit of a problem. |
|---|
| 50 |
Windows doesn't like files starting in a period, |
|---|
| 51 |
but there's a workaround: open htaccess-dist in Notepad, click Save As, |
|---|
| 52 |
change the file type pulldown to all files (*.*), and type .htaccess |
|---|
| 53 |
in the filename box. |
|---|
| 54 |
</p> |
|---|
| 55 |
<p> |
|---|
| 56 |
If you're using any other kind of server, all is well with the world. |
|---|
| 57 |
(If you're uncertain, try renaming the file: most servers run on Linux |
|---|
| 58 |
or a similar operating system.) |
|---|
| 59 |
</p> |
|---|
| 60 |
<p> |
|---|
| 61 |
Read the INSTALL file that came with your installation for more information |
|---|
| 62 |
about installing Elgg. |
|---|
| 63 |
</p> |
|---|
| 64 |
</body> |
|---|
| 65 |
</html> |
|---|
| 66 |
END; |
|---|
| 67 |
die($message); |
|---|
| 68 |
} |
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
require_once(dirname(__FILE__).'/sanitychecks.php'); |
|---|
| 72 |
|
|---|
| 73 |
|
|---|
| 74 |
* HELPER LIBRARIES |
|---|
| 75 |
****************************************************************************/ |
|---|
| 76 |
|
|---|
| 77 |
// Load cache lib |
|---|
| 78 |
require_once($CFG->dirroot.'lib/cache/lib.php'); |
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
require_once($CFG->dirroot.'lib/datalib.php'); |
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
require_once($CFG->dirroot.'lib/elgglib.php'); |
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
require_once($CFG->dirroot.'lib/constants.php'); |
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 |
* CORE FUNCTIONALITY LIBRARIES |
|---|
| 91 |
****************************************************************************/ |
|---|
| 92 |
|
|---|
| 93 |
// Load setup.php which will initialize database connections and such like. |
|---|
| 94 |
require_once($CFG->dirroot.'lib/setup.php'); |
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
require_once(dirname(__FILE__)."/includes_system.php"); |
|---|
| 98 |
|
|---|
| 99 |
|
|---|
| 100 |
require_once($CFG->dirroot.'lib/userlib.php'); |
|---|
| 101 |
|
|---|
| 102 |
|
|---|
| 103 |
require_once($CFG->dirroot.'lib/dbsetup.php'); |
|---|
| 104 |
|
|---|
| 105 |
|
|---|
| 106 |
* PLUGIN INITIALISATION |
|---|
| 107 |
****************************************************************************/ |
|---|
| 108 |
|
|---|
| 109 |
// XMLRPC |
|---|
| 110 |
@include($CFG->dirroot . "units/rpc/main.php"); |
|---|
| 111 |
|
|---|
| 112 |
|
|---|
| 113 |
* CONTENT MODULES |
|---|
| 114 |
* This should make languages easier, although some kind of |
|---|
| 115 |
* selection process will be required |
|---|
| 116 |
****************************************************************************/ |
|---|
| 117 |
|
|---|
| 118 |
// General |
|---|
| 119 |
include_once($CFG->dirroot . "content/general/main.php"); |
|---|
| 120 |
|
|---|
| 121 |
include_once($CFG->dirroot . "content/mainindex/main.php"); |
|---|
| 122 |
|
|---|
| 123 |
include_once($CFG->dirroot . "content/users/main.php"); |
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 |
* HELP MODULES |
|---|
| 127 |
****************************************************************************/ |
|---|
| 128 |
|
|---|
| 129 |
// Include main |
|---|
| 130 |
// include_once($CFG->dirroot . "help/mainindex/main.php"); |
|---|
| 131 |
|
|---|
| 132 |
// Visual editor (tinyMCE) |
|---|
| 133 |
@include($CFG->dirroot . "units/tinymce/main.php"); |
|---|
| 134 |
|
|---|
| 135 |
|
|---|
| 136 |
// require($CFG->dirroot . "units/calendar/main.php"); |
|---|
| 137 |
|
|---|
| 138 |
/*************************************************************************** |
|---|
| 139 |
* START-OF-PAGE RUNNING |
|---|
| 140 |
****************************************************************************/ |
|---|
| 141 |
|
|---|
| 142 |
run("init"); |
|---|
| 143 |
|
|---|
| 144 |
if ($allmods = get_list_of_plugins('mod') ) { |
|---|
| 145 |
foreach ($allmods as $mod) { |
|---|
| 146 |
$mod_init = $mod . '_init'; |
|---|
| 147 |
if (function_exists($mod_init)) { |
|---|
| 148 |
$mod_init(); |
|---|
| 149 |
} |
|---|
| 150 |
} |
|---|
| 151 |
} |
|---|
| 152 |
|
|---|
| 153 |
|
|---|
| 154 |
// and walled garden functionality is turned on, redirect to |
|---|
| 155 |
// the logon screen |
|---|
| 156 |
if (!empty($CFG->walledgarden) && (context != "external" || !defined("context")) && !logged_on) { |
|---|
| 157 |
header("Location: " . $CFG->wwwroot . "login/index.php"); |
|---|
| 158 |
exit(); |
|---|
| 159 |
} |
|---|
| 160 |
|
|---|
| 161 |
?> |
|---|
| 162 |
|
|---|