diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-01 15:17:27 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-01 15:17:27 +0000 |
commit | 2b5f9116ad644455810f0dfb981042e17d66881f (patch) | |
tree | 1e4c8a5fcc4b40a70f1681debd6a3f9d1416dbf4 | |
parent | 3a57c0192e492f5086f39b46c7733b6c2dab041f (diff) | |
download | elgg-2b5f9116ad644455810f0dfb981042e17d66881f.tar.gz elgg-2b5f9116ad644455810f0dfb981042e17d66881f.tar.bz2 |
Initial blog plugin commit
git-svn-id: https://code.elgg.org/elgg/trunk@315 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | mod/blog/languages/en.php | 17 | ||||
-rw-r--r-- | mod/blog/start.php | 32 |
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 |