aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-07 19:05:34 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-07 19:05:34 +0000
commit33bb9b2098b3c2cfd79671f22e6443bd70846979 (patch)
tree4e310f83c3cd946ba403e52c51eaa78ccb19181a /mod
parent0d1c7250f0036bd72297aacc4414664488db44e8 (diff)
downloadelgg-33bb9b2098b3c2cfd79671f22e6443bd70846979.tar.gz
elgg-33bb9b2098b3c2cfd79671f22e6443bd70846979.tar.bz2
Test plugin
git-svn-id: https://code.elgg.org/elgg/trunk@112 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/test/start.php26
-rw-r--r--mod/test/views/default/testplugin/pageshell.php1
2 files changed, 27 insertions, 0 deletions
diff --git a/mod/test/start.php b/mod/test/start.php
new file mode 100644
index 000000000..2eedf6431
--- /dev/null
+++ b/mod/test/start.php
@@ -0,0 +1,26 @@
+<?php
+
+ /**
+ * Test plugin
+ *
+ * These parameters are required for the event API, but we won't use them:
+ *
+ * @param unknown_type $event
+ * @param unknown_type $object_type
+ * @param unknown_type $object
+ */
+
+ function test_init($event, $object_type, $object = null) {
+
+ global $CONFIG;
+
+ // Let's add to the pageshell view.
+ extend_view("pageshell", "testplugin/pageshell");
+ set_view_location("testplugin/pageshell",$CONFIG->pluginspath . "test/views/");
+
+ }
+
+ // Make sure test_init is called on initialisation
+ register_event_handler('init','system','test_init');
+
+?> \ No newline at end of file
diff --git a/mod/test/views/default/testplugin/pageshell.php b/mod/test/views/default/testplugin/pageshell.php
new file mode 100644
index 000000000..889fba661
--- /dev/null
+++ b/mod/test/views/default/testplugin/pageshell.php
@@ -0,0 +1 @@
+<p><i>Gosh! This view was added to!</i></p> \ No newline at end of file