aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/start.php
blob: 0ec357200f26455f9dc101581b294bd45b4550ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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');
		
?>