diff options
Diffstat (limited to 'mod/messageboard/start.php')
-rw-r--r-- | mod/messageboard/start.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/mod/messageboard/start.php b/mod/messageboard/start.php index 56dfce1bd..d12086bf2 100644 --- a/mod/messageboard/start.php +++ b/mod/messageboard/start.php @@ -21,6 +21,11 @@ function messageboard_init() { // add a messageboard widget - only for profile add_widget_type('messageboard', elgg_echo("messageboard:board"), elgg_echo("messageboard:desc"), "profile"); + + // Register actions + $action_path = elgg_get_plugin_path() . 'messageboard/actions'; + elgg_register_action("messageboard/add", "$action_path/add.php"); + elgg_register_action("messageboard/delete", "$action_path/delete.php"); } /** @@ -30,15 +35,13 @@ function messageboard_init() { */ function messageboard_page_handler($page) { - global $CONFIG; - // The username should be the first array entry if (isset($page[0])) { set_input('username', $page[0]); } // Include the standard messageboard index - include($CONFIG->pluginspath . "messageboard/index.php"); + include(elgg_get_plugin_path() . "messageboard/index.php"); } /** @@ -51,7 +54,6 @@ function messageboard_page_handler($page) { * @return bool */ function messageboard_add($poster, $owner, $message, $access_id = ACCESS_PUBLIC) { - global $CONFIG; $result = $owner->annotate('messageboard', $message, $access_id, $poster->guid); if (!$result) { @@ -86,7 +88,3 @@ function messageboard_add($poster, $owner, $message, $access_id = ACCESS_PUBLIC) // Register initialisation callback elgg_register_event_handler('init', 'system', 'messageboard_init'); - -// Register actions -elgg_register_action("messageboard/add", $CONFIG->pluginspath . "messageboard/actions/add.php"); -elgg_register_action("messageboard/delete", $CONFIG->pluginspath . "messageboard/actions/delete.php"); |