aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/languages/en.php17
-rw-r--r--mod/blog/start.php32
2 files changed, 49 insertions, 0 deletions
diff --git a/mod/blog/languages/en.php b/mod/blog/languages/en.php
new file mode 100644
index 000000000..634ce200b
--- /dev/null
+++ b/mod/blog/languages/en.php
@@ -0,0 +1,17 @@
+<?php
+
+ $english = array(
+
+ /**
+ * Menu items
+ */
+
+ 'blog' => "Blog",
+ 'blogread' => "Read blog",
+ 'blogwrite' => "Write an entry",
+
+ );
+
+ add_translation("en",$english);
+
+?> \ No newline at end of file
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