pluginspath . "cv/info.php"); break; case "desired": include($CONFIG->pluginspath . "cv/desired.php"); break; case "workexp": include($CONFIG->pluginspath . "cv/workexp.php"); break; case "education": include($CONFIG->pluginspath . "cv/education.php"); break; case "languages": include($CONFIG->pluginspath . "cv/languages.php"); break; case "skills": include($CONFIG->pluginspath . "cv/skills.php"); break; case "additional": include($CONFIG->pluginspath . "cv/additional.php"); break; default: include($CONFIG->pluginspath . "cv/index.php"); } return true; } function cv_pagesetup() { global $CONFIG; // Get current user for now if ($user = page_owner()) { $user = page_owner_entity(); } else { $user = $_SESSION['user']; if (!$user) $user = get_entity($_SESSION['id']); set_page_owner($user->getGUID()); } //add submenu options if (get_context() == "cv") { if (isloggedin()) { if ( $user->canEdit() ) { /*translation:Info*/ add_submenu_item(elgg_echo('cv:cv'),$CONFIG->wwwroot."pg/cv/".$user->username); /*translation:Info*/ add_submenu_item(elgg_echo('cv:info'),$CONFIG->wwwroot."pg/cv/info/".$user->username); /*translation:Desired job*/ add_submenu_item(elgg_echo('cv:desired_job'),$CONFIG->wwwroot."pg/cv/desired/".$user->username); /*translation:Work experience*/ add_submenu_item(elgg_echo('cv:work_experience'),$CONFIG->wwwroot."pg/cv/workexp/".$user->username); /*translation:Education*/ add_submenu_item(elgg_echo('cv:education'),$CONFIG->wwwroot."pg/cv/education/".$user->username); /*translation:Languages*/ add_submenu_item(elgg_echo('cv:languages'),$CONFIG->wwwroot."pg/cv/languages/".$user->username); /*translation:Skills*/ add_submenu_item(elgg_echo('cv:skills'),$CONFIG->wwwroot."pg/cv/skills/".$user->username); /*translation:Additional*/ add_submenu_item(elgg_echo('cv:additional'),$CONFIG->wwwroot."pg/cv/additional/".$user->username); } } } } register_elgg_event_handler('init','system','cv_init'); register_elgg_event_handler('pagesetup','system','cv_pagesetup'); ?>