pluginspath . "task_manager/index.php"); break; case "task": set_input('task_guid', $page[1]); include($CONFIG->pluginspath . "task_manager/task.php"); break; case "add_task": include($CONFIG->pluginspath . "task_manager/add_task.php"); break; case "edit_task": set_input('task_guid', $page[1]); include($CONFIG->pluginspath . "task_manager/add_task.php"); break; case "progress": include($CONFIG->pluginspath . "task_manager/progress.php"); break; case "competencies": include($CONFIG->pluginspath . "task_manager/competencies.php"); break; default: include($CONFIG->pluginspath . "task_manager/index.php"); } return true; } function task_manager_pagesetup() { global $CONFIG; $page_owner = page_owner_entity(); //add submenu options if (get_context() == "task_manager") { if (isloggedin()) { /*translation:My tasks*/ add_submenu_item(elgg_echo('task_manager:My tasks'),$CONFIG->wwwroot."pg/task_manager/" . $page_owner->username); /*translation:Progress*/ add_submenu_item(elgg_echo('task_manager:progress'),$CONFIG->wwwroot . "pg/task_manager/progress"); if (is_plugin_enabled('competencies')) { /*translation:Competencies*/ add_submenu_item(elgg_echo('task_manager:competencies'),$CONFIG->wwwroot."pg/task_manager/competencies"); } /*translation:Add task*/ add_submenu_item(elgg_echo('task_manager:Add task'),$CONFIG->wwwroot."pg/task_manager/add_task"); } } } function task_entity_url($entity) { global $CONFIG; return $CONFIG->url . "pg/task_manager/task/" . $entity->getGUID(); } register_elgg_event_handler('init','system','task_manager_init'); register_elgg_event_handler('pagesetup','system','task_manager_pagesetup'); register_action("task_manager/add_task", false, $CONFIG->pluginspath . "task_manager/actions/add_task.php"); register_action("task_manager/change_task", false, $CONFIG->pluginspath . "task_manager/actions/change_task.php"); register_action("task_manager/delete_task", false, $CONFIG->pluginspath . "task_manager/actions/delete_task.php"); register_action("task_manager/goedit", false, $CONFIG->pluginspath . "task_manager/actions/goedit.php"); register_action("task_manager/goreflect", false, $CONFIG->pluginspath . "task_manager/actions/goreflect.php"); ?>