| 1 |
MODULES |
|---|
| 2 |
------- |
|---|
| 3 |
|
|---|
| 4 |
These are main modules in Elgg, allowing various activities. |
|---|
| 5 |
|
|---|
| 6 |
Each of these modules contains a number of expected components: |
|---|
| 7 |
|
|---|
| 8 |
version.php: defines some meta-info and provides upgrading code |
|---|
| 9 |
|
|---|
| 10 |
db/mysql.sql SQL dumps of all the required db tables and data |
|---|
| 11 |
db/postgres7.sql if you only have access to one of them, feel free to |
|---|
| 12 |
ask for help on development@elgg.org |
|---|
| 13 |
|
|---|
| 14 |
index.php: a page to list all instances in a course |
|---|
| 15 |
|
|---|
| 16 |
view.php: a page to view a particular instance |
|---|
| 17 |
|
|---|
| 18 |
lib.php: functions defined by the module should be in here. |
|---|
| 19 |
constants should be defined using MODULENAME_xxxxxx |
|---|
| 20 |
functions should be defined using modulename_xxxxxx |
|---|
| 21 |
|
|---|
| 22 |
There are a number of standard functions: |
|---|
| 23 |
|
|---|
| 24 |
modulename_pagesetup() called on every page just before |
|---|
| 25 |
templates are parsed. Use to populate $PAGE. |
|---|
| 26 |
|
|---|
| 27 |
modulename_cron() -- gets called every 5' |
|---|
| 28 |
Also, optional |
|---|
| 29 |
modulename_cron_maint() -- gets called ~ every hour |
|---|
| 30 |
modulename_cron_daily() -- gets called once a day |
|---|
| 31 |
|
|---|
| 32 |
Note: we strive to keep lib.php lightweight and without |
|---|
| 33 |
side-effects, as it is pulled in by every request. |
|---|
| 34 |
Large functions needed only from some pages are |
|---|
| 35 |
are better defined in an extraslib.php or |
|---|
| 36 |
<edit>lib.php. |
|---|
| 37 |
|
|---|
| 38 |
If you are a developer and interested in developing new Modules see: |
|---|
| 39 |
|
|---|
| 40 |
Elgg Developer Wiki: http://elgg.org/info/ |
|---|
| 41 |
Elgg Developer Mailinglist: http://lists.elgg.org/mailman/listinfo/development |
|---|
| 42 |
Elgg Community http://elgg.net/ |
|---|