aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/blog/start.php')
-rw-r--r--mod/blog/start.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php
new file mode 100644
index 000000000..0ec357200
--- /dev/null
+++ b/mod/blog/start.php
@@ -0,0 +1,32 @@
+<?php
+
+ /**
+ * Blog initialisation
+ *
+ * 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 blog_init() {
+
+ // Load system configuration
+ global $CONFIG;
+
+ // Load translations
+ register_translations($CONFIG->pluginspath . "blog/languages/");
+
+ // Set up menu
+ add_menu(elgg_echo('blog'), $CONFIG->wwwroot . "mod/blog/",array(
+ menu_item(elgg_echo('blogread'),$CONFIG->wwwroot."mod/blog/"),
+ menu_item(elgg_echo('blogwrite'),$CONFIG->wwwroot."mod/blog/edit.php"),
+ ));
+
+ }
+
+ // Make sure the blog initialisation function is called on initialisation
+ register_event_handler('init','system','blog_init');
+
+?> \ No newline at end of file