aboutsummaryrefslogtreecommitdiff
path: root/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'documentation')
-rw-r--r--documentation/coding_standards/best_practices.txt60
-rw-r--r--documentation/coding_standards/css_coding_standards.txt67
-rw-r--r--documentation/coding_standards/deprecation.txt36
-rw-r--r--documentation/coding_standards/html_best_practices.txt1
-rw-r--r--documentation/coding_standards/javascript_best_practices.txt1
-rw-r--r--documentation/coding_standards/javascript_coding_standards.txt13
-rw-r--r--documentation/coding_standards/php_best_practices.txt1
-rw-r--r--documentation/coding_standards/php_coding_standards.txt55
-rw-r--r--documentation/examples/actions/basic.php22
-rw-r--r--documentation/examples/crontab.example28
-rw-r--r--documentation/examples/events/advanced.php13
-rw-r--r--documentation/examples/events/all.php30
-rw-r--r--documentation/examples/events/basic.php17
-rw-r--r--documentation/examples/events/trigger.php11
-rw-r--r--documentation/examples/hooks/advanced.php28
-rw-r--r--documentation/examples/hooks/all.php12
-rw-r--r--documentation/examples/hooks/basic.php17
-rw-r--r--documentation/examples/hooks/trigger.php14
-rw-r--r--documentation/examples/plugins/README.txt5
-rw-r--r--documentation/examples/plugins/actions/.gitignore0
-rw-r--r--documentation/examples/plugins/languages/en.php24
-rw-r--r--documentation/examples/plugins/manifest.xml18
-rw-r--r--documentation/examples/plugins/start.php22
-rw-r--r--documentation/examples/plugins/views/default/.gitignore0
-rw-r--r--documentation/info/config.php430
-rw-r--r--documentation/info/manifest.xml98
26 files changed, 1023 insertions, 0 deletions
diff --git a/documentation/coding_standards/best_practices.txt b/documentation/coding_standards/best_practices.txt
new file mode 100644
index 000000000..df04aa845
--- /dev/null
+++ b/documentation/coding_standards/best_practices.txt
@@ -0,0 +1,60 @@
+*** CODING BEST PRACTICES ***
+
+The following best practices make code easier to read, easier to maintain,
+and easier to debug. Consistent use of these guidelines means less guess
+work for developers, which means happier, more productive developers.
+
+* Adhere to "Don't Repeat Yourself" (DRY) principles of code design and
+ organization. If you are copy-and-pasting code YOU ARE DOING SOMETHING WRONG.
+ If you find a block of code that you want to use multiple times, make a
+ function. If you find views that are identical except for a single value,
+ pull it out into a generic view that takes an option.
+
+* Whitespace is free. Don't be afraid to use it to separate blocks of code.
+ Use a single space to separate function params and string concatenation.
+
+* Use self-documenting variable names. $group_guids is better than $array.
+
+* Use "positive" variable names. Prefer `$enable = true` to `$disable = false`.
+
+* Functions returning an array should return an empty array instead of FALSE
+ on no results.
+
+* Functions not throwing an exception on error should return FALSE upon
+ failure.
+
+* Functions returning only boolean should be prefaced with is_ or has_ (eg,
+ elgg_is_logged_in(), elgg_has_access_to_entity()).
+
+* Ternary syntax is acceptable for single-line, non-embedded statements.
+
+* Use comments effectively. Good comments describe the "why." Good code
+ describes the "how." Ex:
+ Not a very useful comment:
+
+ // increment $i only when the entity is marked as active.
+ foreach($entities as $entity) {
+ if ($entity->active == TRUE) {
+ $i++;
+ }
+ }
+
+ Useful comment:
+
+ // find the next index for inserting a new active entity.
+ foreach($entities as $entity) {
+ if ($entity->active == TRUE) {
+ $i++;
+ }
+ }
+
+* Use commit messages effectively. Be concise and meaningful. Ex:
+ Not meaningful:
+ Small fix to groups.
+
+ Meaningful:
+ Fixes #1234: Added missing ) that caused a WSOD on group profile page
+ when logged out.
+
+* Commit effectively: Err on the side of atomic commits. One revision with
+ many changes is scary.
diff --git a/documentation/coding_standards/css_coding_standards.txt b/documentation/coding_standards/css_coding_standards.txt
new file mode 100644
index 000000000..195ca345b
--- /dev/null
+++ b/documentation/coding_standards/css_coding_standards.txt
@@ -0,0 +1,67 @@
+*** CSS CODING STANDARDS ***
+
+* Use shorthand where possible:
+ Bad:
+ background-color: #333333;
+ background-image: url(...);
+ background-repeat: repeat-x;
+ background-position: left 10px;
+ padding: 2px 9px 2px 9px;
+
+ Good:
+ background: #333 url(...) repeat-x left 10px;
+ padding: 2px 9px;
+
+* Use hyphens as separators in classes/ids, not underscores:
+ Bad:
+ .example_class
+
+ Good:
+ .example-class
+
+* One property per line
+ Bad:
+ color: white;font-size: smaller;
+
+ Good:
+ color: white;
+ font-size: smaller;
+
+* Property declarations should be spaced like so: `property: value;`
+ Bad:
+ color:value;
+ color :value;
+ color : value;
+
+ Good:
+ color: value;
+
+* Group vendor-prefixes for the same property together:
+* Longest vendor-prefixed version first:
+* Always include non-vendor-prefixed version:
+* Put an extra newline between vendor-prefixed groups and other properties:
+ Bad:
+ -moz-border-radius: 5px;
+ border: 1px solid #999999;
+ -webkit-border-radius: 5px;
+ width: auto;
+
+ Good:
+ border: 1px solid #999999;
+
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+
+ width: auto;
+
+* Group declarations of subproperties:
+ Bad:
+ background-color: white;
+ color: #0054A7;
+ background-position: 2px -257px;
+
+ Good:
+ background-color: white;
+ background-position: 2px -257px;
+ color: #0054A7;
diff --git a/documentation/coding_standards/deprecation.txt b/documentation/coding_standards/deprecation.txt
new file mode 100644
index 000000000..370090138
--- /dev/null
+++ b/documentation/coding_standards/deprecation.txt
@@ -0,0 +1,36 @@
+*** DEPRECATING APIs ***
+
+Occasionally, functions and classes must be deprecated in favor of newer
+replacements. Since 3rd party plugin authors rely on a consistent API,
+backward compatibility must be maintained, but will not be maintained
+indefinitely as plugin authors are expected to properly update their
+plugins. In order to maintain backward compatibility, deprecated APIs will
+follow these guidelines:
+
+* Incompatible API changes cannot occur between bugfix versions
+ (1.6.0 - 1.6.1).
+
+* API changes between minor versions (1.6 - 1.7) must maintain backward
+ compatibility for at least 2 minor versions. (1.7 and 1.8. See
+ procedures, below.)
+
+* Bugfixes that change the API cannot be included in bugfix versions.
+
+* API changes between major versions (1.0 - 2.0) can occur without regard to
+ backward compatibility.
+
+The procedure for deprecating an API is as follows:
+
+* The first minor version (1.7) with a deprecated API must include a wrapper
+ function/class (or otherwise appropriate means) to maintain backward
+ compatibility, including any bugs in the original function/class.
+ This compatibility layer uses elgg_deprecated_notice('...', 1.7) to log
+ that the function is deprecated.
+
+* The second minor version (1.8) maintains the backward compatibility
+ layer, but elgg_deprecated_notice() will produce a visible warning.
+
+* The third minor version (1.9) removes the compatibility layer. Any use of
+ the deprecated API should be corrected before this.
+
+The general timeline for two minor releases is 8 to 12 months.
diff --git a/documentation/coding_standards/html_best_practices.txt b/documentation/coding_standards/html_best_practices.txt
new file mode 100644
index 000000000..ac2338a77
--- /dev/null
+++ b/documentation/coding_standards/html_best_practices.txt
@@ -0,0 +1 @@
+*** HTML BEST PRACTICES ***
diff --git a/documentation/coding_standards/javascript_best_practices.txt b/documentation/coding_standards/javascript_best_practices.txt
new file mode 100644
index 000000000..9ec1d0a19
--- /dev/null
+++ b/documentation/coding_standards/javascript_best_practices.txt
@@ -0,0 +1 @@
+*** JAVASCRIPT BEST PRACTICES ***
diff --git a/documentation/coding_standards/javascript_coding_standards.txt b/documentation/coding_standards/javascript_coding_standards.txt
new file mode 100644
index 000000000..9939e80ab
--- /dev/null
+++ b/documentation/coding_standards/javascript_coding_standards.txt
@@ -0,0 +1,13 @@
+*** JAVASCRIPT CODING STANDARDS ***
+
+* Same formatting standards as PHP.
+
+* All functions should be in the elgg namespace.
+
+* Function expressions should end with a semi-colon:
+
+ elgg.ui.toggles = function(event) {
+ event.preventDefault();
+ $(target).slideToggle('medium');
+ };
+
diff --git a/documentation/coding_standards/php_best_practices.txt b/documentation/coding_standards/php_best_practices.txt
new file mode 100644
index 000000000..9e4c63483
--- /dev/null
+++ b/documentation/coding_standards/php_best_practices.txt
@@ -0,0 +1 @@
+*** PHP BEST PRACTICES ***
diff --git a/documentation/coding_standards/php_coding_standards.txt b/documentation/coding_standards/php_coding_standards.txt
new file mode 100644
index 000000000..b7adc5dd9
--- /dev/null
+++ b/documentation/coding_standards/php_coding_standards.txt
@@ -0,0 +1,55 @@
+*** PHP CODING STANDARDS ***
+
+These are the coding standards for Elgg. All core development and bundled
+plugins are required to be in this format. Plugin developers are strongly
+encouraged to adopt these standards.
+
+* Unix line endings.
+
+* Hard tabs, 4 character tab spacing.
+
+* No PHP shortcut tags ( <? or <?= or <% ).
+
+* PHPDoc comments on functions and classes (all methods; declared properties
+ when appropriate).
+
+* Mandatory wrapped {}s around any code blocks.
+ Bad:
+ if (true)
+ foreach($arr as $elem)
+ echo $elem;
+
+ Good:
+ if (true) {
+ foreach ($arr as $elem) {
+ echo $elem;
+ }
+ }
+
+* Name standalone functions using underscore_character().
+
+* Name classes using CamelCase() and methods using lowerCamelCase().
+
+* Name globals and constants in ALL_CAPS (ACCESS_FRIENDS, $CONFIG).
+
+* Use underscores / camel case to separate standard English words in
+ functions, classes, and methods. (get_default_site(), ElggUser->isLoggedIn()).
+
+* Space functions like_this($required, $optional = TRUE).
+
+* Space keywords and constructs like this: if (FALSE) { ... }.
+
+* Correctly use spaces, quotes, and {}s in strings:
+ Bad (hard to read, misuse of quotes and {}s):
+ echo 'Hello, '.$name."! How is your {$time_of_day}?";
+
+ Good:
+ echo "Hello, $name! How is your $time_of_day?";
+
+* Line lengths should be reasonable. If you are writing lines over 100
+ characters on a line, please revise the code.
+
+* Use // or /* */ when commenting.
+
+* No closing PHP tag (?>) at EOF unless after a heredoc. (Avoids problems with
+ trailing whitespace. Required after heredoc by PHP.)
diff --git a/documentation/examples/actions/basic.php b/documentation/examples/actions/basic.php
new file mode 100644
index 000000000..926e11b79
--- /dev/null
+++ b/documentation/examples/actions/basic.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Demonstrates adding an annotation through an action
+ *
+ * This action adds a rating annotation to an entity. If this was coming from
+ * a five-star rating tool, the rating would be a number between 0 and 5. The
+ * GUID of the entity being rating is also submitted to the action.
+ */
+
+$rating = get_input('rating');
+$guid = get_input('guid');
+
+$entity = get_entity($guid);
+if (!$entity) {
+ register_error(elgg_echo('rating:failure'));
+ forward(REFERER);
+}
+
+$entity->annotate('rating', $rating);
+
+system_message(elgg_echo('rating:success'));
+forward(REFERER);
diff --git a/documentation/examples/crontab.example b/documentation/examples/crontab.example
new file mode 100644
index 000000000..f25f5cb07
--- /dev/null
+++ b/documentation/examples/crontab.example
@@ -0,0 +1,28 @@
+# Crontab example.
+#
+# This file is an example of triggering Elgg cron events. It hits a URL to
+# trigger the events. For testing, you can simulate the cronjob by loading the
+# URL in a browser.
+#
+# See http://docs.elgg.org/wiki/Cron for more information
+#
+# @author Marcus Povey
+
+# Location of GET (see: http://docs.elgg.org/wiki/What_is_get)
+GET='/usr/bin/GET'
+
+# Location of your site (don't forget the trailing slash!)
+ELGG='http://www.example.com/'
+
+# The crontab
+# Don't edit below this line unless you know what you are doing
+@reboot $GET ${ELGG}cron/reboot/
+* * * * * $GET ${ELGG}cron/minute/
+*/5 * * * * $GET ${ELGG}cron/fiveminute/
+15,30,45,59 * * * * $GET ${ELGG}cron/fifteenmin/
+30,59 * * * * $GET ${ELGG}cron/halfhour/
+@hourly $GET ${ELGG}cron/hourly/
+@daily $GET ${ELGG}cron/daily/
+@weekly $GET ${ELGG}cron/weekly/
+@monthly $GET ${ELGG}cron/monthly/
+@yearly $GET ${ELGG}cron/yearly/
diff --git a/documentation/examples/events/advanced.php b/documentation/examples/events/advanced.php
new file mode 100644
index 000000000..73edea9da
--- /dev/null
+++ b/documentation/examples/events/advanced.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * This snippets demonstrates how returning false changes the normal operation
+ * of Elgg.
+ */
+
+elgg_register_event_handler('create', 'object', 'example_event_handler');
+
+function example_event_handler($event, $type, $object) {
+ // Don't allow any non-admin users to create objects
+ // Returning false from this function will halt the creation of the object.
+ return elgg_is_admin_logged_in();
+}
diff --git a/documentation/examples/events/all.php b/documentation/examples/events/all.php
new file mode 100644
index 000000000..0ad02c1d4
--- /dev/null
+++ b/documentation/examples/events/all.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * If you register an 'all' string for the event name, the handler function will
+ * be called for all events with that name, regardless of event type. The same
+ * can be done for the event type argument. Registering 'all' for both
+ * argyuments results in a handler being called for every event.
+ */
+
+elgg_register_event_handler('all', 'object', 'example_event_handler');
+
+// This function will be called for any event of type 'object'
+function example_event_handler($event, $type, $object) {
+ // check what sort of object is passed
+ if ($object instanceof ElggObject) {
+ $subtype = $object->getSubtype();
+
+ switch ($subtype) {
+ case 'blog':
+ case 'thewire':
+ case 'pages':
+ // prevent these object subtypes from being saved or changed
+ return false;
+ default:
+ return true;
+ }
+
+ }
+
+ return true;
+}
diff --git a/documentation/examples/events/basic.php b/documentation/examples/events/basic.php
new file mode 100644
index 000000000..ca2762344
--- /dev/null
+++ b/documentation/examples/events/basic.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * This snippet demonstrates how to register for an event. It dumps the
+ * parameters that the handler receives to the screen. The third argument
+ * of the handler function is an object that is related to the event. For
+ * the 'init', 'system' eveny, it is null.
+ */
+
+elgg_register_event_handler('init', 'system', 'example_event_handler');
+
+function example_event_handler($event, $type, $object) {
+ var_dump($event);
+ var_dump($type);
+ var_dump($object);
+
+ return true;
+}
diff --git a/documentation/examples/events/trigger.php b/documentation/examples/events/trigger.php
new file mode 100644
index 000000000..6ce3a76f0
--- /dev/null
+++ b/documentation/examples/events/trigger.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * These two snippets demonstrates triggering an event and how to register for
+ * that event.
+ */
+
+$object = new ElggObject();
+elgg_trigger_event('test', 'example', $object);
+
+// elsewhere a handler could be registered by saying
+elgg_register_event_handler('test', 'example', 'example_event_handler');
diff --git a/documentation/examples/hooks/advanced.php b/documentation/examples/hooks/advanced.php
new file mode 100644
index 000000000..ca036c46a
--- /dev/null
+++ b/documentation/examples/hooks/advanced.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * This snippet demonstrates how to change the value of a hook. The content
+ * passed into the hook is 'This is some Sample Content.'. After the two hook
+ * handlers are done, the new content is 'This is some $@mple Content.'.
+ */
+
+// the output:page hook is triggered by elgg_view_page().
+elgg_register_plugin_hook_handler('output', 'page', 'example_plugin_hook_handler', 600);
+elgg_register_plugin_hook_handler('output', 'page', 'example_plugin_hook_handler_2', 601);
+
+function example_plugin_hook_handler($hook, $type, $value, $params) {
+ // change a to @
+ $value = str_replace('a', '@', $value);
+
+ return $value;
+}
+
+function example_plugin_hook_handler_2($hook, $type, $value, $params) {
+ // change S to $
+ $value = str_replace('S', '$', $value);
+
+ return $value;
+}
+
+$content = 'This is some Sample Content.';
+
+echo elgg_view_page('Title', $content);
diff --git a/documentation/examples/hooks/all.php b/documentation/examples/hooks/all.php
new file mode 100644
index 000000000..76b562335
--- /dev/null
+++ b/documentation/examples/hooks/all.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * This snippet demonstrates how to register for multiple hooks with the same
+ * type.
+ */
+
+elgg_register_plugin_hook_handler('all', 'system', 'example_plugin_hook_handler');
+
+// This function will be called for any hook of type 'system'
+function example_plugin_hook_handler($hook, $type, $value, $params) {
+ // logic here.
+}
diff --git a/documentation/examples/hooks/basic.php b/documentation/examples/hooks/basic.php
new file mode 100644
index 000000000..734d9e884
--- /dev/null
+++ b/documentation/examples/hooks/basic.php
@@ -0,0 +1,17 @@
+<?php
+/**
+ * The handler for a plugin hook receives information about the hook (name and
+ * type), the current value for the hook, and parameters related to the hook.
+ */
+
+elgg_register_plugin_hook_handler('forward', '404', 'example_plugin_hook_handler');
+
+function example_plugin_hook_handler($hook, $type, $value, $params) {
+ var_dump($hook);
+ var_dump($type);
+ var_dump($value);
+ var_dump($params);
+
+ // we are not changing $value so return null
+ return null;
+}
diff --git a/documentation/examples/hooks/trigger.php b/documentation/examples/hooks/trigger.php
new file mode 100644
index 000000000..4216fd6c0
--- /dev/null
+++ b/documentation/examples/hooks/trigger.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * The current value for the hook is passed into the trigger function. Handlers
+ * can change this value. In this snippet, we check if the value of true was
+ * changed by the handler functions.
+ */
+
+$result = elgg_trigger_plugin_hook('get_status', 'example', null, true);
+
+if ($result) {
+ var_dump('Plugin hook says ok!');
+} else {
+ var_dump('Plugin hook says no.');
+}
diff --git a/documentation/examples/plugins/README.txt b/documentation/examples/plugins/README.txt
new file mode 100644
index 000000000..704f56598
--- /dev/null
+++ b/documentation/examples/plugins/README.txt
@@ -0,0 +1,5 @@
+Plugin Skeleton
+=========================
+This directory includes a plugin skeleton to be used as the starting point when
+creating a new plugin. Just create a new directory in /mod/ and copy the files
+and directories into it. Then update the manifest and start coding. \ No newline at end of file
diff --git a/documentation/examples/plugins/actions/.gitignore b/documentation/examples/plugins/actions/.gitignore
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/documentation/examples/plugins/actions/.gitignore
diff --git a/documentation/examples/plugins/languages/en.php b/documentation/examples/plugins/languages/en.php
new file mode 100644
index 000000000..35f838560
--- /dev/null
+++ b/documentation/examples/plugins/languages/en.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * The core language file is in /languages/en.php and each plugin has its
+ * language files in a languages directory. To change a string, copy the
+ * mapping into this file.
+ *
+ * For example, to change the blog Tools menu item
+ * from "Blog" to "Rantings", copy this pair:
+ * 'blog' => "Blog",
+ * into the $mapping array so that it looks like:
+ * 'blog' => "Rantings",
+ *
+ * Follow this pattern for any other string you want to change. Make sure this
+ * plugin is lower in the plugin list than any plugin that it is modifying.
+ *
+ * If you want to add languages other than English, name the file according to
+ * the language's ISO 639-1 code: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
+ */
+
+$mapping = array(
+ 'string:here' => 'Display string here',
+);
+
+add_translation('en', $mapping);
diff --git a/documentation/examples/plugins/manifest.xml b/documentation/examples/plugins/manifest.xml
new file mode 100644
index 000000000..e31624432
--- /dev/null
+++ b/documentation/examples/plugins/manifest.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
+ <name>My Plugin</name>
+ <author>My Name</author>
+ <version>1.0</version>
+ <description>This is a description of my plugin and its features.</description>
+ <website>http://www.elgg.org/</website>
+ <copyright>(C) My Name or Company 2012</copyright>
+ <license>GNU General Public License version 2</license>
+
+ <requires>
+ <type>elgg_release</type>
+ <version>1.8</version>
+ </requires>
+
+ <category>communication</category>
+
+</plugin_manifest>
diff --git a/documentation/examples/plugins/start.php b/documentation/examples/plugins/start.php
new file mode 100644
index 000000000..3af50ce38
--- /dev/null
+++ b/documentation/examples/plugins/start.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Describe plugin here
+ */
+
+elgg_register_event_handler('init', 'system', 'my_plugin_init');
+
+function my_plugin_init() {
+ // Rename this function based on the name of your plugin and update the
+ // elgg_register_event_handler() call accordingly
+
+ // Register a script to handle (usually) a POST request (an action)
+ $base_dir = elgg_get_plugins_path() . 'my_plugin/actions/my_plugin';
+ elgg_register_action('my_plugin', "$base_dir/my_action.php");
+
+ // Extend the main CSS file
+ elgg_extend_view('css/elgg', 'my_plugin/css');
+
+ // Add a menu item to the main site menu
+ $item = new ElggMenuItem('my_plugin', elgg_echo('my_plugin:menu'), 'my_url');
+ elgg_register_menu_item('site', $item);
+}
diff --git a/documentation/examples/plugins/views/default/.gitignore b/documentation/examples/plugins/views/default/.gitignore
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/documentation/examples/plugins/views/default/.gitignore
diff --git a/documentation/info/config.php b/documentation/info/config.php
new file mode 100644
index 000000000..b45428477
--- /dev/null
+++ b/documentation/info/config.php
@@ -0,0 +1,430 @@
+<?php
+/**
+ * Stub info for $CONFIG global options.
+ *
+ * @tip Plugins should never use the $CONFIG array directly.
+ *
+ * @package Elgg.Core
+ * @subpackage Configuration
+ */
+
+/**
+ * Event information for the events subsystem.
+ *
+ * Events are added with {@link elgg_register_event_handler()} and
+ * can be removed in >= 1.8 with {@link elgg_unregister_event_handler()}.
+ *
+ * Events are stored as a multidimensional array in the format:
+ * <code>
+ * $CONFIG->events[str $event_name][str $event_type][int priority] = str callback_function
+ * </code>
+ *
+ * @global array $CONFIG->events
+ * @name $CONFIG->events
+ * @see events()
+ * @see elgg_register_event_handler()
+ * @see elgg_unregister_event_handler()
+ * @see elgg_trigger_event()
+ */
+$CONFIG->events;
+
+/**
+ * Plugin Hook information for the plugin hooks subsystem.
+ *
+ * Hooks are added with {@link elgg_register_plugin_hook_handler()} and
+ * can be removed in >= 1.8 with {@link elgg_unregister_plugin_hook_handler()}.
+ *
+ * Hooks are stored as a multidimensional array in the format:
+ * <code>
+ * $CONFIG->hooks[str $hook_name][str $hook_type][int priority] = str callback_function
+ * </code>
+ *
+ * @global array $CONFIG->hooks
+ * @see elgg_register_plugin_hook_handler()
+ * @see elgg_unregister_plugin_hook_handler()
+ * @see elgg_trigger_plugin_hook()
+ */
+$CONFIG->hooks;
+
+/**
+ * Paths to scan for autoloading languages.
+ *
+ * Languages are automatically loaded for the site or
+ * user's default language. Plugins can extend or override strings.
+ * language_paths is an array of paths to scan for PHP files matching
+ * the default language. The order of paths is determined by the plugin load order,
+ * with later entries overriding earlier. Language files within these paths are
+ * named as the two-letter ISO 639-1 country codes for the language they represent.
+ *
+ * Language paths are stored as array keys in the format:
+ * <code>
+ * $CONFIG->language_paths[str $language_path] = true
+ * </code>
+ *
+ * @link http://en.wikipedia.org/wiki/ISO_639-1
+ * @see register_language()
+ * @global array $CONFIG->language_paths
+ */
+$CONFIG->language_paths;
+
+
+/**
+ * String translations for the current language.
+ *
+ * Elgg uses a key-based system for string internationalization, which
+ * is accessed with {@link elgg_echo()}.
+ *
+ * Translations are stored as an array in the following format:
+ * <code>
+ * $CONFIG->translations[str $language_code][str $string_key] = str 'Translated Language String';
+ * </code>
+ *
+ * @see register_translation()
+ * @see elgg_echo()
+ * @global array $CONFIG->translations
+ */
+$CONFIG->translations;
+
+/**
+ * Stores input used by {@link set_input()} and {@link get_input()}.
+ *
+ * @global array $CONFIG->input
+ */
+$CONFIG->input;
+
+/**
+ * An array of metadata names to be used as tags.
+ *
+ * Because tags are simply names of meatdata, This is used
+ * in search to prevent data exposure by searching on
+ * arbitrary metadata.
+ *
+ * @global array $CONFIG->registered_tag_metadata_names
+ */
+$CONFIG->registered_tag_metadata_names;
+
+/**
+ * An associative array of page handlers and their function names.
+ *
+ * Page handlers must be registered by {@link elgg_register_page_handler()} and
+ * will be dispatched by {@link engine/handlers/pagehandler.php} to the
+ * proper function.
+ *
+ * @global array $CONFIG->pagehandler
+ */
+$CONFIG->pagehandler;
+
+/**
+ * An object holding valid widgets and their configurations.
+ *
+ * This object stores the valid context for widgets, and the handlers
+ * registered, as well as a description of the widget.
+ *
+ * Widgets are added with {@link add_widget_type()}.
+ *
+ * @global stdClass $CONFIG->widgets
+ */
+$CONFIG->widgets;
+
+/**
+ * The full path where Elgg is installed.
+ *
+ * @global string $CONFIG->path;
+ */
+$CONFIG->path;
+
+/**
+ * The full path for core views.
+ *
+ * @global string $CONFIG->viewpath
+ */
+$CONFIG->viewpath;
+
+/**
+ * The full path where plugins are stored.
+ *
+ * @global string $CONFIG->pluginspath
+ */
+$CONFIG->pluginspath;
+
+/**
+ * The full URL where Elgg is installed
+ *
+ * @global string $CONFIG->wwwroot
+ */
+$CONFIG->wwwroot;
+
+/**
+ * The full URL where Elgg is installed
+ *
+ * @global string $CONFIG->wwwroot
+ */
+$CONFIG->url;
+
+/**
+ * The name of the site as defined in the config table.
+ *
+ * @global string $CONFIG->sitename
+ */
+$CONFIG->sitename;
+
+/**
+ * The current language for either the site or the user.
+ *
+ * @global $CONFIG->language
+ */
+$CONFIG->language;
+
+/**
+ * Is the site fully installed
+ *
+ * @global bool $CONFIG->installed
+ */
+$CONFIG->installed;
+
+/**
+ * The guid of the current site object.
+ *
+ * @global int $CONFIG->site_id
+ */
+$CONFIG->site_id;
+
+/**
+ * The guid of the current site object.
+ *
+ * @global int $CONFIG->site_id
+ */
+$CONFIG->site_guid;
+
+/**
+ * The current site object.
+ *
+ * @global ElggSite $CONFIG->site
+ */
+$CONFIG->site;
+
+/**
+ * The full path to the data directory.
+ *
+ * @global string $CONFIG->dataroot
+ */
+$CONFIG->dataroot;
+
+/**
+ * Is simplecache enabled?
+ *
+ * @global string $CONFIG->simplecache_enabled
+ */
+$CONFIG->simplecache_enabled;
+
+/**
+ * Is the system cache enabled
+ *
+ * @global string $CONFIG->system_cache_enabled
+ */
+$CONFIG->system_cache_enabled;
+
+/**
+ * The site description from the current site object.
+ *
+ * @global string $CONFIG->sitedescription
+ */
+$CONFIG->sitedescription;
+
+/**
+ * The site email from the current site object.
+ *
+ * @global string $CONFIG->siteemail
+ */
+$CONFIG->siteemail;
+
+/**
+ * The current view type
+ *
+ * View types determin the location of view files that are used to draw pages.
+ * They are set system-wide by the $_REQUEST['view']. If a view type is manually
+ * set in settings.php or through a function hooking to the {@elgg_hook
+ *
+ * @warning This is the current view type used to determine where to load views.
+ * Don't confuse this with the current view.
+ *
+ * @global string $CONFIG->view
+ */
+$CONFIG->view;
+
+/**
+ * Default access as defined in the config table for the current site.
+ *
+ * @global string $CONFIG->default_access
+ */
+$CONFIG->default_access;
+
+/**
+ * Is registration enabled?
+ *
+ * @global bool $CONFIG->allow_registration
+ */
+$CONFIG->allow_registration;
+
+/**
+ * Is current site in walled garden mode?
+ *
+ * @global bool $CONFIG->walled_garden
+ */
+$CONFIG->walled_garden;
+
+/**
+ * Are users allow to enter their own default access levels
+ *
+ * @global bool $CONFIG->allow_user_default_access
+ */
+$CONFIG->allow_user_default_access;
+
+/**
+ * A list of feature URLs for the main site menu.
+ *
+ * These links are added via the admin interface.
+ *
+ * @global string $CONFIG->menu_items_featured_urls
+ */
+$CONFIG->menu_items_featured_urls;
+
+/**
+ * The custom menu items entered in the administration.
+ *
+ * @global string $CONFIG->menu_items_custom_items
+ */
+$CONFIG->menu_items_custom_items;
+
+/**
+ * A list of registered actions, their file locations, and access permissions.
+ *
+ * @global array $CONFIG->actions
+ */
+$CONFIG->actions;
+
+/**
+ * Holds information about views.
+ *
+ * @global object $CONFIG->views
+ */
+$CONFIG->views;
+
+/**
+ * A list of views to cache in the simple cache.
+ *
+ * @global object $CONFIG->views->simplecache
+ */
+$CONFIG->views->simplecache;
+
+/**
+ * A list of views and the top level views directory to search for the view in.
+ *
+ * @note Views are stored as the key and the top level view location is stored as the value.
+ * The current viewtype {@link $CONFIG->view} is used to determin which directory under the entry
+ * in $CONFIG->views->location to search. View names are automatically appened a '.php' extension.
+ *
+ * @global object $CONFIG->views->locations
+ */
+$CONFIG->views->locations;
+
+
+/**
+ * A list of valid view types as discovered.
+ *
+ * @global array $CONFIG->view_types
+ */
+$CONFIG->view_types;
+
+/**
+ * A list of plugins and their load order
+ *
+ * @global string $CONFIG->pluginlistcache
+ */
+$CONFIG->pluginlistcache;
+
+/**
+ * Holds URL handler information for ElggExtender objects.
+ *
+ * @global array $CONFIG->extender_url_handler
+ */
+$CONFIG->extender_url_handler;
+
+/**
+ * A list of registered entities and subtypes. Used in search.
+ *
+ * @global array $CONFIG->registered_entities
+ */
+$CONFIG->registered_entities;
+
+/**
+ * A list of URL handlers for {@link ElggEntity::getURL()}
+ *
+ * @global array $CONFIG->entity_url_handler
+ */
+$CONFIG->entity_url_handler;
+
+/**
+ * A list of entity types and subtypes that have metadata whose access permission
+ * can be changed independently of the main object. {@link register_metadata_as_indepenent()}
+ *
+ * @global string $CONFIG->independents
+ */
+$CONFIG->independents;
+
+/**
+ * Holds items for all submenus.
+ *
+ * @global string $CONFIG->submenu_items
+ */
+$CONFIG->submenu_items;
+
+/**
+ * Holds the service handlers as registered by {@register_service_handler()}
+ *
+ * @global array $CONFIG->servicehandler
+ */
+$CONFIG->servicehandler;
+
+/**
+ * A list of stop works for search. Not currently used.
+ *
+ * @global array $CONFIG->wordblacklist
+ * @todo currently unused.
+ */
+$CONFIG->wordblacklist;
+
+/**
+ * A list of menu contexts for menus registered with {@link add_menu()}. Not currently used.
+ *
+ * @global array $CONFIG->menucontexts
+ */
+$CONFIG->menucontexts;
+
+/**
+ * A list of registers and their children added via {@add_to_register()}. Used only for menus.
+ *
+ * @global string $CONFIG->registers
+ */
+$CONFIG->registers;
+
+/**
+ * A list of objects that can emit notifications. {@link register_notification_object()}
+ *
+ * @global array $CONFIG->register_objects
+ */
+$CONFIG->register_objects;
+
+/**
+ * Holds available group tools options. Added with {@link add_group_tool_option()}
+ *
+ * @global array $CONFIG->group_tool_options
+ */
+$CONFIG->group_tool_options;
+
+/**
+ * The last cache time for the current viewtype. Used in the generation of CSS and JS links.
+ *
+ * @global string $CONFIG->lastcache
+ */
+$CONFIG->lastcache; \ No newline at end of file
diff --git a/documentation/info/manifest.xml b/documentation/info/manifest.xml
new file mode 100644
index 000000000..4fd4be8ce
--- /dev/null
+++ b/documentation/info/manifest.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
+ <name>My Plugin</name>
+ <author>Elgg</author>
+ <version>1.0</version>
+ <blurb>A concise description.</blurb>
+ <description>This is a longer, more interesting description of my plugin, its features, and other important information.</description>
+ <website>http://www.elgg.org/</website>
+ <repository>https://github.com/Elgg/Elgg</repository>
+ <bugtracker>https://github.com/Elgg/Elgg/issues</bugtracker>
+ <donations>http://elgg.org/supporter.php</donations>
+ <copyright>(C) Elgg 2011</copyright>
+ <license>GNU General Public License version 2</license>
+
+ <requires>
+ <type>elgg_version</type>
+ <version>2009030802</version>
+ </requires>
+
+ <requires>
+ <type>elgg_release</type>
+ <version>1.8</version>
+ </requires>
+
+ <screenshot>
+ <description>An example screenshot</description>
+ <path>graphics/plugin_ss1.png</path>
+ </screenshot>
+
+ <screenshot>
+ <description>Another screenshot</description>
+ <path>graphics/plugin_ss2.png</path>
+ </screenshot>
+
+ <category>admin</category>
+ <category>api</category>
+
+ <requires>
+ <type>php_extension</type>
+ <name>gd</name>
+ </requires>
+
+ <requires>
+ <type>php_ini</type>
+ <name>short_open_tag</name>
+ <value>off</value>
+ </requires>
+
+ <requires>
+ <type>php_extension</type>
+ <name>made_up</name>
+ <version>1.0</version>
+ </requires>
+
+ <requires>
+ <type>plugin</type>
+ <name>fake_plugin</name>
+ <version>1.0</version>
+ </requires>
+
+ <requires>
+ <type>plugin</type>
+ <name>profile</name>
+ <version>1.0</version>
+ </requires>
+
+ <requires>
+ <type>plugin</type>
+ <name>profile_api</name>
+ <version>1.3</version>
+ <comparison>lt</comparison>
+ </requires>
+
+ <requires>
+ <type>priority</type>
+ <priority>after</priority>
+ <plugin>blog</plugin>
+ </requires>
+
+ <conflicts>
+ <type>plugin</type>
+ <name>profile_api</name>
+ <version>1.0</version>
+ </conflicts>
+
+ <provides>
+ <type>plugin</type>
+ <name>profile_api</name>
+ <version>1.3</version>
+ </provides>
+
+ <provides>
+ <type>php_extension</type>
+ <name>curl</name>
+ <version>1.0</version>
+ </provides>
+
+</plugin_manifest>