From 96604b6836edc0ee2f9bfc58fdbaedf19a6f099c Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Thu, 13 Oct 2011 22:08:26 -0700 Subject: Fixes #3917. Removed uses of admin interface in manifests. Removed related code. --- documentation/examples/plugins/manifest.xml | 4 ---- 1 file changed, 4 deletions(-) (limited to 'documentation/examples') diff --git a/documentation/examples/plugins/manifest.xml b/documentation/examples/plugins/manifest.xml index 1602a7358..2a8a2bd5c 100644 --- a/documentation/examples/plugins/manifest.xml +++ b/documentation/examples/plugins/manifest.xml @@ -32,10 +32,6 @@ admin api - setup_function - teardown_function - simple - php_extension gd -- cgit v1.2.3 From cd8124c0bd49e479cc115fc829cbd05aff16de7a Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 29 Oct 2011 17:22:55 -0400 Subject: creates a simple manifest for people to copy and use --- .../examples/plugins/full_manifest/manifest.xml | 95 ++++++++++++++++++++++ documentation/examples/plugins/manifest.xml | 95 ---------------------- .../examples/plugins/simple_manifest/manifest.xml | 18 ++++ 3 files changed, 113 insertions(+), 95 deletions(-) create mode 100644 documentation/examples/plugins/full_manifest/manifest.xml delete mode 100644 documentation/examples/plugins/manifest.xml create mode 100644 documentation/examples/plugins/simple_manifest/manifest.xml (limited to 'documentation/examples') diff --git a/documentation/examples/plugins/full_manifest/manifest.xml b/documentation/examples/plugins/full_manifest/manifest.xml new file mode 100644 index 000000000..48a5a9558 --- /dev/null +++ b/documentation/examples/plugins/full_manifest/manifest.xml @@ -0,0 +1,95 @@ + + + My Plugin + Elgg + 1.0 + A concise description. + This is a longer, more interesting description of my plugin, its features, and other important information. + http://www.elgg.org/ + (C) Elgg 2010 + GNU Public License version 2 + + + elgg_version + 2009030802 + + + + elgg_release + 1.8 + + + + An example screenshot + graphics/plugin_ss1.png + + + + Another screenshot + graphics/plugin_ss2.png + + + admin + api + + + php_extension + gd + + + + php_ini + short_open_tag + off + + + + php_extension + made_up + 1.0 + + + + plugin + fake_plugin + 1.0 + + + + plugin + profile + 1.0 + + + + plugin + profile_api + 1.3 + lt + + + + priority + after + blog + + + + plugin + profile_api + 1.0 + + + + plugin + profile_api + 1.3 + + + + php_extension + curl + 1.0 + + + diff --git a/documentation/examples/plugins/manifest.xml b/documentation/examples/plugins/manifest.xml deleted file mode 100644 index 2a8a2bd5c..000000000 --- a/documentation/examples/plugins/manifest.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - My Plugin - Elgg - 1.0 - A concise description. - This is a longer, more interesting description of my plugin, its features, and other important information. - http://www.elgg.org/ - (C) Elgg 2010 - GNU Public License version 2 - - - elgg_version - 2009030802 - - - - elgg_release - 1.8-svn - - - - An example screenshot - graphics/plugin_ss1.png - - - - Another screenshot - graphics/plugin_ss2.png - - - admin - api - - - php_extension - gd - - - - php_ini - short_open_tag - off - - - - php_extension - made_up - 1.0 - - - - plugin - fake_plugin - 1.0 - - - - plugin - profile - 1.0 - - - - plugin - profile_api - 1.3 - lt - - - - priority - after - blog - - - - plugin - profile_api - 1.0 - - - - plugin - profile_api - 1.3 - - - - php_extension - curl - 1.0 - - - diff --git a/documentation/examples/plugins/simple_manifest/manifest.xml b/documentation/examples/plugins/simple_manifest/manifest.xml new file mode 100644 index 000000000..febe71999 --- /dev/null +++ b/documentation/examples/plugins/simple_manifest/manifest.xml @@ -0,0 +1,18 @@ + + + My Plugin + My Name + 1.0 + This is a description of my plugin and its features. + http://www.elgg.org/ + (C) My Name or Company 2012 + GNU Public License version 2 + + + elgg_release + 1.8 + + + communication + + -- cgit v1.2.3 From 9046723db0c21cd0995ec87e69734bd1f0edcae6 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 29 Oct 2011 17:30:36 -0400 Subject: better organization for the manifests and plugin skeleton --- .../examples/plugins/full_manifest/manifest.xml | 95 ---------------------- .../examples/plugins/manifest_options/manifest.xml | 95 ++++++++++++++++++++++ .../examples/plugins/simple_manifest/manifest.xml | 18 ---- .../examples/plugins/skeleton/manifest.xml | 18 ++++ documentation/examples/plugins/skeleton/start.php | 0 5 files changed, 113 insertions(+), 113 deletions(-) delete mode 100644 documentation/examples/plugins/full_manifest/manifest.xml create mode 100644 documentation/examples/plugins/manifest_options/manifest.xml delete mode 100644 documentation/examples/plugins/simple_manifest/manifest.xml create mode 100644 documentation/examples/plugins/skeleton/manifest.xml create mode 100644 documentation/examples/plugins/skeleton/start.php (limited to 'documentation/examples') diff --git a/documentation/examples/plugins/full_manifest/manifest.xml b/documentation/examples/plugins/full_manifest/manifest.xml deleted file mode 100644 index 48a5a9558..000000000 --- a/documentation/examples/plugins/full_manifest/manifest.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - My Plugin - Elgg - 1.0 - A concise description. - This is a longer, more interesting description of my plugin, its features, and other important information. - http://www.elgg.org/ - (C) Elgg 2010 - GNU Public License version 2 - - - elgg_version - 2009030802 - - - - elgg_release - 1.8 - - - - An example screenshot - graphics/plugin_ss1.png - - - - Another screenshot - graphics/plugin_ss2.png - - - admin - api - - - php_extension - gd - - - - php_ini - short_open_tag - off - - - - php_extension - made_up - 1.0 - - - - plugin - fake_plugin - 1.0 - - - - plugin - profile - 1.0 - - - - plugin - profile_api - 1.3 - lt - - - - priority - after - blog - - - - plugin - profile_api - 1.0 - - - - plugin - profile_api - 1.3 - - - - php_extension - curl - 1.0 - - - diff --git a/documentation/examples/plugins/manifest_options/manifest.xml b/documentation/examples/plugins/manifest_options/manifest.xml new file mode 100644 index 000000000..48a5a9558 --- /dev/null +++ b/documentation/examples/plugins/manifest_options/manifest.xml @@ -0,0 +1,95 @@ + + + My Plugin + Elgg + 1.0 + A concise description. + This is a longer, more interesting description of my plugin, its features, and other important information. + http://www.elgg.org/ + (C) Elgg 2010 + GNU Public License version 2 + + + elgg_version + 2009030802 + + + + elgg_release + 1.8 + + + + An example screenshot + graphics/plugin_ss1.png + + + + Another screenshot + graphics/plugin_ss2.png + + + admin + api + + + php_extension + gd + + + + php_ini + short_open_tag + off + + + + php_extension + made_up + 1.0 + + + + plugin + fake_plugin + 1.0 + + + + plugin + profile + 1.0 + + + + plugin + profile_api + 1.3 + lt + + + + priority + after + blog + + + + plugin + profile_api + 1.0 + + + + plugin + profile_api + 1.3 + + + + php_extension + curl + 1.0 + + + diff --git a/documentation/examples/plugins/simple_manifest/manifest.xml b/documentation/examples/plugins/simple_manifest/manifest.xml deleted file mode 100644 index febe71999..000000000 --- a/documentation/examples/plugins/simple_manifest/manifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - My Plugin - My Name - 1.0 - This is a description of my plugin and its features. - http://www.elgg.org/ - (C) My Name or Company 2012 - GNU Public License version 2 - - - elgg_release - 1.8 - - - communication - - diff --git a/documentation/examples/plugins/skeleton/manifest.xml b/documentation/examples/plugins/skeleton/manifest.xml new file mode 100644 index 000000000..febe71999 --- /dev/null +++ b/documentation/examples/plugins/skeleton/manifest.xml @@ -0,0 +1,18 @@ + + + My Plugin + My Name + 1.0 + This is a description of my plugin and its features. + http://www.elgg.org/ + (C) My Name or Company 2012 + GNU Public License version 2 + + + elgg_release + 1.8 + + + communication + + diff --git a/documentation/examples/plugins/skeleton/start.php b/documentation/examples/plugins/skeleton/start.php new file mode 100644 index 000000000..e69de29bb -- cgit v1.2.3 From 77b53f716a9043b89a7ad128eec34c910006fe24 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Tue, 8 Nov 2011 06:45:18 -0500 Subject: it is GPL General Public License not GPL Public License --- .../examples/plugins/manifest_options/manifest.xml | 4 ++-- documentation/examples/plugins/skeleton/manifest.xml | 2 +- engine/tests/api/plugins.php | 16 ++++++++-------- engine/tests/test_files/plugin_17/manifest.xml | 4 ++-- engine/tests/test_files/plugin_18/manifest.xml | 4 ++-- mod/blog/manifest.xml | 2 +- mod/bookmarks/manifest.xml | 2 +- mod/categories/manifest.xml | 2 +- mod/custom_index/manifest.xml | 2 +- mod/dashboard/manifest.xml | 2 +- mod/developers/manifest.xml | 2 +- mod/diagnostics/manifest.xml | 2 +- mod/embed/manifest.xml | 2 +- mod/externalpages/manifest.xml | 2 +- mod/file/manifest.xml | 2 +- mod/garbagecollector/manifest.xml | 2 +- mod/groups/manifest.xml | 2 +- mod/htmlawed/manifest.xml | 2 +- mod/invitefriends/manifest.xml | 2 +- mod/likes/manifest.xml | 2 +- mod/logbrowser/manifest.xml | 2 +- mod/logrotate/manifest.xml | 2 +- mod/members/manifest.xml | 2 +- mod/messageboard/manifest.xml | 2 +- mod/messages/manifest.xml | 2 +- mod/notifications/manifest.xml | 2 +- mod/oauth_api/manifest.xml | 2 +- mod/pages/manifest.xml | 2 +- mod/profile/manifest.xml | 2 +- mod/reportedcontent/manifest.xml | 2 +- mod/search/manifest.xml | 2 +- mod/tagcloud/manifest.xml | 2 +- mod/thewire/manifest.xml | 2 +- mod/tinymce/manifest.xml | 2 +- mod/twitter/manifest.xml | 2 +- mod/twitter_api/manifest.xml | 2 +- mod/uservalidationbyemail/manifest.xml | 2 +- mod/zaudio/manifest.xml | 2 +- 38 files changed, 48 insertions(+), 48 deletions(-) (limited to 'documentation/examples') diff --git a/documentation/examples/plugins/manifest_options/manifest.xml b/documentation/examples/plugins/manifest_options/manifest.xml index 48a5a9558..baa6cc3fa 100644 --- a/documentation/examples/plugins/manifest_options/manifest.xml +++ b/documentation/examples/plugins/manifest_options/manifest.xml @@ -6,8 +6,8 @@ A concise description. This is a longer, more interesting description of my plugin, its features, and other important information. http://www.elgg.org/ - (C) Elgg 2010 - GNU Public License version 2 + (C) Elgg 2011 + GNU General Public License version 2 elgg_version diff --git a/documentation/examples/plugins/skeleton/manifest.xml b/documentation/examples/plugins/skeleton/manifest.xml index febe71999..e31624432 100644 --- a/documentation/examples/plugins/skeleton/manifest.xml +++ b/documentation/examples/plugins/skeleton/manifest.xml @@ -6,7 +6,7 @@ This is a description of my plugin and its features. http://www.elgg.org/ (C) My Name or Company 2012 - GNU Public License version 2 + GNU General Public License version 2 elgg_release diff --git a/engine/tests/api/plugins.php b/engine/tests/api/plugins.php index 8f5f5dd1e..a0faaff0e 100644 --- a/engine/tests/api/plugins.php +++ b/engine/tests/api/plugins.php @@ -68,8 +68,8 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { 'blurb' => 'A concise description.', 'description' => 'A longer, more interesting description.', 'website' => 'http://www.elgg.org/', - 'copyright' => '(C) Elgg 2010', - 'license' => 'GNU Public License version 2', + 'copyright' => '(C) Elgg Foundation 2011', + 'license' => 'GNU General Public License version 2', 'requires' => array( array('type' => 'elgg_version', 'version' => '3009030802', 'comparison' => 'lt'), @@ -117,8 +117,8 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { 'version' => '1.0', 'description' => 'A 1.7-style manifest.', 'website' => 'http://www.elgg.org/', - 'copyright' => '(C) Elgg 2010', - 'license' => 'GNU Public License version 2', + 'copyright' => '(C) Elgg Foundation 2011', + 'license' => 'GNU General Public License version 2', 'elgg_version' => '2009030702', 'name' => 'Plugin Test 17', ); @@ -165,13 +165,13 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { } public function testElggPluginManifestGetCopyright() { - $this->assertEqual($this->manifest18->getCopyright(), '(C) Elgg 2010'); - $this->assertEqual($this->manifest18->getCopyright(), '(C) Elgg 2010'); + $this->assertEqual($this->manifest18->getCopyright(), '(C) Elgg Foundation 2011'); + $this->assertEqual($this->manifest18->getCopyright(), '(C) Elgg Foundation 2011'); } public function testElggPluginManifestGetLicense() { - $this->assertEqual($this->manifest18->getLicense(), 'GNU Public License version 2'); - $this->assertEqual($this->manifest17->getLicense(), 'GNU Public License version 2'); + $this->assertEqual($this->manifest18->getLicense(), 'GNU General Public License version 2'); + $this->assertEqual($this->manifest17->getLicense(), 'GNU General Public License version 2'); } diff --git a/engine/tests/test_files/plugin_17/manifest.xml b/engine/tests/test_files/plugin_17/manifest.xml index bb178ab93..706734265 100644 --- a/engine/tests/test_files/plugin_17/manifest.xml +++ b/engine/tests/test_files/plugin_17/manifest.xml @@ -4,7 +4,7 @@ - - + + \ No newline at end of file diff --git a/engine/tests/test_files/plugin_18/manifest.xml b/engine/tests/test_files/plugin_18/manifest.xml index 445a41c2e..e0776ffc1 100644 --- a/engine/tests/test_files/plugin_18/manifest.xml +++ b/engine/tests/test_files/plugin_18/manifest.xml @@ -6,8 +6,8 @@ A concise description. A longer, more interesting description. http://www.elgg.org/ - (C) Elgg 2010 - GNU Public License version 2 + (C) Elgg Foundation 2011 + GNU General Public License version 2 elgg_version diff --git a/mod/blog/manifest.xml b/mod/blog/manifest.xml index bd5f9c396..29ee1bfc8 100644 --- a/mod/blog/manifest.xml +++ b/mod/blog/manifest.xml @@ -10,7 +10,7 @@ Adds simple blogging capabilities to your Elgg installation. http://elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/bookmarks/manifest.xml b/mod/bookmarks/manifest.xml index 679d3f1d8..b95af87f8 100644 --- a/mod/bookmarks/manifest.xml +++ b/mod/bookmarks/manifest.xml @@ -10,7 +10,7 @@ Adds the ability for users to bookmark internal and external sites. Other users can then comment on the bookmarks. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/categories/manifest.xml b/mod/categories/manifest.xml index a2f4d97fc..4a6bd0864 100644 --- a/mod/categories/manifest.xml +++ b/mod/categories/manifest.xml @@ -9,7 +9,7 @@ Site-wide Categories lets administrators define categories that users across the site can add content to. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/custom_index/manifest.xml b/mod/custom_index/manifest.xml index f93251214..80187efbc 100644 --- a/mod/custom_index/manifest.xml +++ b/mod/custom_index/manifest.xml @@ -7,7 +7,7 @@ A demonstration of how to create a front page plugin. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/dashboard/manifest.xml b/mod/dashboard/manifest.xml index 14a620268..cbbc1044c 100644 --- a/mod/dashboard/manifest.xml +++ b/mod/dashboard/manifest.xml @@ -7,7 +7,7 @@ A widget-based dashboard for your users http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/developers/manifest.xml b/mod/developers/manifest.xml index 6b672e231..93a12945d 100644 --- a/mod/developers/manifest.xml +++ b/mod/developers/manifest.xml @@ -9,7 +9,7 @@ A set of tools for writing plugins and themes. It is recommended that you have this plugin at the top of the plugin list. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release diff --git a/mod/diagnostics/manifest.xml b/mod/diagnostics/manifest.xml index a9034d695..21e847d22 100644 --- a/mod/diagnostics/manifest.xml +++ b/mod/diagnostics/manifest.xml @@ -9,7 +9,7 @@ Elgg diagnostics tool http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/embed/manifest.xml b/mod/embed/manifest.xml index c33c8b40a..7ffbc23a4 100644 --- a/mod/embed/manifest.xml +++ b/mod/embed/manifest.xml @@ -8,7 +8,7 @@ Allows users to easily upload and embed media into text areas. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/externalpages/manifest.xml b/mod/externalpages/manifest.xml index 389ad6960..f2aef09f3 100644 --- a/mod/externalpages/manifest.xml +++ b/mod/externalpages/manifest.xml @@ -7,7 +7,7 @@ Create simple web pages for about, contact, privacy, and terms. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/file/manifest.xml b/mod/file/manifest.xml index 85ff76b41..26282a8e3 100644 --- a/mod/file/manifest.xml +++ b/mod/file/manifest.xml @@ -9,7 +9,7 @@ File browser plugin http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/garbagecollector/manifest.xml b/mod/garbagecollector/manifest.xml index 1cbf33592..5aafebf38 100644 --- a/mod/garbagecollector/manifest.xml +++ b/mod/garbagecollector/manifest.xml @@ -8,7 +8,7 @@ Perform some database cleanup tasks http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/groups/manifest.xml b/mod/groups/manifest.xml index b8fd92de7..fd28360d0 100644 --- a/mod/groups/manifest.xml +++ b/mod/groups/manifest.xml @@ -9,7 +9,7 @@ Provides group support for elgg http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/htmlawed/manifest.xml b/mod/htmlawed/manifest.xml index aac599dee..5c1f14cb5 100644 --- a/mod/htmlawed/manifest.xml +++ b/mod/htmlawed/manifest.xml @@ -8,7 +8,7 @@ Provides security filtering. Disabling this plugin is extremely insecure. DO NOT DISABLE. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 3 + GNU General Public License version 3 elgg_release 1.8 diff --git a/mod/invitefriends/manifest.xml b/mod/invitefriends/manifest.xml index 0a1ed2012..b36238a05 100644 --- a/mod/invitefriends/manifest.xml +++ b/mod/invitefriends/manifest.xml @@ -8,7 +8,7 @@ Invite friends via email invites. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/likes/manifest.xml b/mod/likes/manifest.xml index 5a18b8862..62835fcf5 100644 --- a/mod/likes/manifest.xml +++ b/mod/likes/manifest.xml @@ -8,7 +8,7 @@ Enables users to like content on the site. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/logbrowser/manifest.xml b/mod/logbrowser/manifest.xml index d3b76ee8c..4527e2cbb 100644 --- a/mod/logbrowser/manifest.xml +++ b/mod/logbrowser/manifest.xml @@ -8,7 +8,7 @@ Browse the system event log http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/logrotate/manifest.xml b/mod/logrotate/manifest.xml index db04e762f..1aa62e2e7 100644 --- a/mod/logrotate/manifest.xml +++ b/mod/logrotate/manifest.xml @@ -8,7 +8,7 @@ Rotate the system log at specific intervals http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/members/manifest.xml b/mod/members/manifest.xml index efd1ede5e..8b18c9f91 100644 --- a/mod/members/manifest.xml +++ b/mod/members/manifest.xml @@ -7,7 +7,7 @@ Lists the members of your site http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/messageboard/manifest.xml b/mod/messageboard/manifest.xml index b4f74c7d0..617813725 100644 --- a/mod/messageboard/manifest.xml +++ b/mod/messageboard/manifest.xml @@ -8,7 +8,7 @@ This plugin allows users to put a message board on their profile for other users to post comments. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/messages/manifest.xml b/mod/messages/manifest.xml index 238ccf42b..73a58d9d4 100644 --- a/mod/messages/manifest.xml +++ b/mod/messages/manifest.xml @@ -8,7 +8,7 @@ Elgg internal messages plugin. This plugin lets user send each other messages. See COPYRIGHT.txt http://www.elgg.org/ - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/notifications/manifest.xml b/mod/notifications/manifest.xml index a07486331..205476881 100644 --- a/mod/notifications/manifest.xml +++ b/mod/notifications/manifest.xml @@ -7,7 +7,7 @@ Elgg notifications plugin http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/oauth_api/manifest.xml b/mod/oauth_api/manifest.xml index 62111e258..efd3d944f 100644 --- a/mod/oauth_api/manifest.xml +++ b/mod/oauth_api/manifest.xml @@ -8,7 +8,7 @@ api http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/pages/manifest.xml b/mod/pages/manifest.xml index dfc521e11..6990bd6b0 100644 --- a/mod/pages/manifest.xml +++ b/mod/pages/manifest.xml @@ -9,7 +9,7 @@ Elgg Pages http://www.elgg.org See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/profile/manifest.xml b/mod/profile/manifest.xml index f56604c7e..86fbc7b7b 100644 --- a/mod/profile/manifest.xml +++ b/mod/profile/manifest.xml @@ -8,7 +8,7 @@ social http://elgg.org/ See COPYRIGHT.txt - GNU Public License Version 2 + GNU General Public License Version 2 true elgg_release diff --git a/mod/reportedcontent/manifest.xml b/mod/reportedcontent/manifest.xml index aea8f8114..e96620b01 100644 --- a/mod/reportedcontent/manifest.xml +++ b/mod/reportedcontent/manifest.xml @@ -7,7 +7,7 @@ Adds the option for users to report content and for admins to check it out. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/search/manifest.xml b/mod/search/manifest.xml index 9a952d3d8..513d3a6b9 100644 --- a/mod/search/manifest.xml +++ b/mod/search/manifest.xml @@ -7,7 +7,7 @@ Allow search across entities of the site http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/tagcloud/manifest.xml b/mod/tagcloud/manifest.xml index 1127e9559..c0f89f35e 100644 --- a/mod/tagcloud/manifest.xml +++ b/mod/tagcloud/manifest.xml @@ -8,7 +8,7 @@ Widget-based tag clouds. http://cashcostello.com/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/thewire/manifest.xml b/mod/thewire/manifest.xml index 9f6b0eaa9..962ed12f1 100644 --- a/mod/thewire/manifest.xml +++ b/mod/thewire/manifest.xml @@ -8,7 +8,7 @@ Microblogging for Elgg http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/tinymce/manifest.xml b/mod/tinymce/manifest.xml index ac7b23b29..61bf0c22c 100644 --- a/mod/tinymce/manifest.xml +++ b/mod/tinymce/manifest.xml @@ -8,7 +8,7 @@ TinyMCE plugin. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/twitter/manifest.xml b/mod/twitter/manifest.xml index 38380a2ba..18fa8c957 100644 --- a/mod/twitter/manifest.xml +++ b/mod/twitter/manifest.xml @@ -8,7 +8,7 @@ Elgg simple twitter widget http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/twitter_api/manifest.xml b/mod/twitter_api/manifest.xml index 51ad0dcb4..86bba4b50 100644 --- a/mod/twitter_api/manifest.xml +++ b/mod/twitter_api/manifest.xml @@ -8,7 +8,7 @@ bundled http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/uservalidationbyemail/manifest.xml b/mod/uservalidationbyemail/manifest.xml index 232ba71ca..800dd2641 100644 --- a/mod/uservalidationbyemail/manifest.xml +++ b/mod/uservalidationbyemail/manifest.xml @@ -8,7 +8,7 @@ Simple user account validation via email. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/zaudio/manifest.xml b/mod/zaudio/manifest.xml index 767637a56..54f819658 100644 --- a/mod/zaudio/manifest.xml +++ b/mod/zaudio/manifest.xml @@ -9,7 +9,7 @@ This simple plugin lets users play mp3's in the page. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 -- cgit v1.2.3 From 11aacb4f048e659d1b86a6ba229438444a186142 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 12 Nov 2011 14:28:52 -0500 Subject: added better plugin skeleton and added documentation to some of the examples --- documentation/examples/actions/basic.php | 22 ++ documentation/examples/actions/manual_tokens.php | 6 - documentation/examples/events/advanced.php | 7 +- documentation/examples/events/all.php | 16 +- documentation/examples/events/basic.php | 14 +- documentation/examples/events/emit.php | 7 - documentation/examples/events/trigger.php | 11 + documentation/examples/plugins/README.txt | 3 + documentation/examples/plugins/actions/.gitignore | 0 documentation/examples/plugins/languages/en.php | 24 ++ documentation/examples/plugins/manifest.xml | 18 + .../examples/plugins/manifest_options/manifest.xml | 95 ----- .../examples/plugins/skeleton/manifest.xml | 18 - documentation/examples/plugins/skeleton/start.php | 0 documentation/examples/plugins/start.php | 0 .../examples/plugins/views/default/.gitignore | 0 documentation/info/config.php | 430 +++++++++++++++++++++ documentation/info/manifest.xml | 95 +++++ documentation/stubs/config.php | 430 --------------------- 19 files changed, 628 insertions(+), 568 deletions(-) create mode 100644 documentation/examples/actions/basic.php delete mode 100644 documentation/examples/actions/manual_tokens.php delete mode 100644 documentation/examples/events/emit.php create mode 100644 documentation/examples/events/trigger.php create mode 100644 documentation/examples/plugins/README.txt create mode 100644 documentation/examples/plugins/actions/.gitignore create mode 100644 documentation/examples/plugins/languages/en.php create mode 100644 documentation/examples/plugins/manifest.xml delete mode 100644 documentation/examples/plugins/manifest_options/manifest.xml delete mode 100644 documentation/examples/plugins/skeleton/manifest.xml delete mode 100644 documentation/examples/plugins/skeleton/start.php create mode 100644 documentation/examples/plugins/start.php create mode 100644 documentation/examples/plugins/views/default/.gitignore create mode 100644 documentation/info/config.php create mode 100644 documentation/info/manifest.xml delete mode 100644 documentation/stubs/config.php (limited to 'documentation/examples') 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 @@ +annotate('rating', $rating); + +system_message(elgg_echo('rating:success')); +forward(REFERER); diff --git a/documentation/examples/actions/manual_tokens.php b/documentation/examples/actions/manual_tokens.php deleted file mode 100644 index 8dcf61fb1..000000000 --- a/documentation/examples/actions/manual_tokens.php +++ /dev/null @@ -1,6 +0,0 @@ -getSubtype(); + if ($object instanceof ElggObject) { + $subtype = $object->getSubtype(); - switch($subtype) { + switch ($subtype) { case 'blog': case 'thewire': case 'pages': + // prevent these object subtypes from being saved or changed return false; default: return true; @@ -21,4 +28,3 @@ function example_event_handler($event, $type, $params) { return true; } - diff --git a/documentation/examples/events/basic.php b/documentation/examples/events/basic.php index 91704e60b..ca2762344 100644 --- a/documentation/examples/events/basic.php +++ b/documentation/examples/events/basic.php @@ -1,13 +1,17 @@ "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 @@ + + + My Plugin + My Name + 1.0 + This is a description of my plugin and its features. + http://www.elgg.org/ + (C) My Name or Company 2012 + GNU General Public License version 2 + + + elgg_release + 1.8 + + + communication + + diff --git a/documentation/examples/plugins/manifest_options/manifest.xml b/documentation/examples/plugins/manifest_options/manifest.xml deleted file mode 100644 index baa6cc3fa..000000000 --- a/documentation/examples/plugins/manifest_options/manifest.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - My Plugin - Elgg - 1.0 - A concise description. - This is a longer, more interesting description of my plugin, its features, and other important information. - http://www.elgg.org/ - (C) Elgg 2011 - GNU General Public License version 2 - - - elgg_version - 2009030802 - - - - elgg_release - 1.8 - - - - An example screenshot - graphics/plugin_ss1.png - - - - Another screenshot - graphics/plugin_ss2.png - - - admin - api - - - php_extension - gd - - - - php_ini - short_open_tag - off - - - - php_extension - made_up - 1.0 - - - - plugin - fake_plugin - 1.0 - - - - plugin - profile - 1.0 - - - - plugin - profile_api - 1.3 - lt - - - - priority - after - blog - - - - plugin - profile_api - 1.0 - - - - plugin - profile_api - 1.3 - - - - php_extension - curl - 1.0 - - - diff --git a/documentation/examples/plugins/skeleton/manifest.xml b/documentation/examples/plugins/skeleton/manifest.xml deleted file mode 100644 index e31624432..000000000 --- a/documentation/examples/plugins/skeleton/manifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - My Plugin - My Name - 1.0 - This is a description of my plugin and its features. - http://www.elgg.org/ - (C) My Name or Company 2012 - GNU General Public License version 2 - - - elgg_release - 1.8 - - - communication - - diff --git a/documentation/examples/plugins/skeleton/start.php b/documentation/examples/plugins/skeleton/start.php deleted file mode 100644 index e69de29bb..000000000 diff --git a/documentation/examples/plugins/start.php b/documentation/examples/plugins/start.php new file mode 100644 index 000000000..e69de29bb diff --git a/documentation/examples/plugins/views/default/.gitignore b/documentation/examples/plugins/views/default/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/documentation/info/config.php b/documentation/info/config.php new file mode 100644 index 000000000..19e76c8ae --- /dev/null +++ b/documentation/info/config.php @@ -0,0 +1,430 @@ += 1.8 with {@link elgg_unregister_event_handler()}. + * + * Events are stored as a multidimensional array in the format: + * + * $CONFIG->events[str $event_name][str $event_type][int priority] = str callback_function + * + * + * @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: + * + * $CONFIG->hooks[str $hook_name][str $hook_type][int priority] = str callback_function + * + * + * @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: + * + * $CONFIG->language_paths[str $language_path] = true + * + * + * @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: + * + * $CONFIG->translations[str $language_code][str $string_key] = str 'Translated Language String'; + * + * + * @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 view paths cache enabled + * + * @global string $CONFIG->viewpath_cache_enabled + */ +$CONFIG->viewpath_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..baa6cc3fa --- /dev/null +++ b/documentation/info/manifest.xml @@ -0,0 +1,95 @@ + + + My Plugin + Elgg + 1.0 + A concise description. + This is a longer, more interesting description of my plugin, its features, and other important information. + http://www.elgg.org/ + (C) Elgg 2011 + GNU General Public License version 2 + + + elgg_version + 2009030802 + + + + elgg_release + 1.8 + + + + An example screenshot + graphics/plugin_ss1.png + + + + Another screenshot + graphics/plugin_ss2.png + + + admin + api + + + php_extension + gd + + + + php_ini + short_open_tag + off + + + + php_extension + made_up + 1.0 + + + + plugin + fake_plugin + 1.0 + + + + plugin + profile + 1.0 + + + + plugin + profile_api + 1.3 + lt + + + + priority + after + blog + + + + plugin + profile_api + 1.0 + + + + plugin + profile_api + 1.3 + + + + php_extension + curl + 1.0 + + + diff --git a/documentation/stubs/config.php b/documentation/stubs/config.php deleted file mode 100644 index 19e76c8ae..000000000 --- a/documentation/stubs/config.php +++ /dev/null @@ -1,430 +0,0 @@ -= 1.8 with {@link elgg_unregister_event_handler()}. - * - * Events are stored as a multidimensional array in the format: - * - * $CONFIG->events[str $event_name][str $event_type][int priority] = str callback_function - * - * - * @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: - * - * $CONFIG->hooks[str $hook_name][str $hook_type][int priority] = str callback_function - * - * - * @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: - * - * $CONFIG->language_paths[str $language_path] = true - * - * - * @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: - * - * $CONFIG->translations[str $language_code][str $string_key] = str 'Translated Language String'; - * - * - * @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 view paths cache enabled - * - * @global string $CONFIG->viewpath_cache_enabled - */ -$CONFIG->viewpath_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 -- cgit v1.2.3 From 0ec65a0130347b3b846628e9e59a1f1cbf0f0e06 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 12 Nov 2011 14:49:36 -0500 Subject: cleaned up the plugin hooks documentation --- documentation/examples/hooks/advanced.php | 28 +++++++++++++++ documentation/examples/hooks/all.php | 12 +++++++ documentation/examples/hooks/basic.php | 41 +++++++--------------- documentation/examples/hooks/register/advanced.php | 23 ------------ documentation/examples/hooks/register/all.php | 8 ----- documentation/examples/hooks/register/basic.php | 14 -------- documentation/examples/hooks/register/emit.php | 7 ---- documentation/examples/hooks/trigger.php | 14 ++++++++ documentation/examples/hooks/trigger/advanced.php | 9 ----- documentation/examples/hooks/trigger/basic.php | 9 ----- 10 files changed, 66 insertions(+), 99 deletions(-) create mode 100644 documentation/examples/hooks/advanced.php create mode 100644 documentation/examples/hooks/all.php delete mode 100644 documentation/examples/hooks/register/advanced.php delete mode 100644 documentation/examples/hooks/register/all.php delete mode 100644 documentation/examples/hooks/register/basic.php delete mode 100644 documentation/examples/hooks/register/emit.php create mode 100644 documentation/examples/hooks/trigger.php delete mode 100644 documentation/examples/hooks/trigger/advanced.php delete mode 100644 documentation/examples/hooks/trigger/basic.php (limited to 'documentation/examples') 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 @@ + 'Joe'); -$items = elgg_trigger_plugin_hook('get_items', 'example', $params, $default); +function example_plugin_hook_handler($hook, $type, $value, $params) { + var_dump($hook); + var_dump($type); + var_dump($value); + var_dump($params); -var_dump($items); - -function example_plugin_hook($hook, $type, $value, $params) { - if (is_array($value)) { - $value[] = "Hook Value 1"; - $value[] = "Hook Value 2"; - } - - return $value; -} - -function example_plugin_hook_2($hook, $type, $value, $params) { - $username = isset($params['username']) ? $params['username'] : NULL; - if (is_array($value)) { - switch($username) { - case 'Joe': - $value[] = "Joe's item"; - break; - case 'John': - $value[] = "Joe's item"; - break; - } - } - - return $value; + // we are not changing $value so return null + return null; } diff --git a/documentation/examples/hooks/register/advanced.php b/documentation/examples/hooks/register/advanced.php deleted file mode 100644 index e3951c19c..000000000 --- a/documentation/examples/hooks/register/advanced.php +++ /dev/null @@ -1,23 +0,0 @@ - Date: Tue, 15 Nov 2011 21:17:31 -0500 Subject: updated the plugin skeleton with some instructions --- documentation/examples/plugins/README.txt | 4 +++- documentation/examples/plugins/start.php | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'documentation/examples') 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..ea1e894b2 100644 --- a/documentation/examples/plugins/start.php +++ b/documentation/examples/plugins/start.php @@ -0,0 +1,12 @@ +