diff options
Diffstat (limited to 'documentation')
| -rw-r--r-- | documentation/examples/plugins/README.txt | 4 | ||||
| -rw-r--r-- | documentation/examples/plugins/start.php | 22 | ||||
| -rw-r--r-- | documentation/info/config.php | 6 | ||||
| -rw-r--r-- | documentation/info/manifest.xml | 3 |
4 files changed, 31 insertions, 4 deletions
diff --git a/documentation/examples/plugins/README.txt b/documentation/examples/plugins/README.txt index 9eb04391d..704f56598 100644 --- a/documentation/examples/plugins/README.txt +++ b/documentation/examples/plugins/README.txt @@ -1,3 +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/start.php b/documentation/examples/plugins/start.php index e69de29bb..3af50ce38 100644 --- a/documentation/examples/plugins/start.php +++ 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/info/config.php b/documentation/info/config.php index 19e76c8ae..b45428477 100644 --- a/documentation/info/config.php +++ b/documentation/info/config.php @@ -218,11 +218,11 @@ $CONFIG->dataroot; $CONFIG->simplecache_enabled; /** - * Is view paths cache enabled + * Is the system cache enabled * - * @global string $CONFIG->viewpath_cache_enabled + * @global string $CONFIG->system_cache_enabled */ -$CONFIG->viewpath_cache_enabled; +$CONFIG->system_cache_enabled; /** * The site description from the current site object. diff --git a/documentation/info/manifest.xml b/documentation/info/manifest.xml index baa6cc3fa..4fd4be8ce 100644 --- a/documentation/info/manifest.xml +++ b/documentation/info/manifest.xml @@ -6,6 +6,9 @@ <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> |
