true, 'local'=>true) ); $template->set_filename('TAT_js_css', PHPWG_PLUGINS_PATH.'TakeATour/tpl/js_css.tpl'); $template->parse('TAT_js_css');//http://piwigo.org/forum/viewtopic.php?id=23248 if (isset($TAT_restart) and $TAT_restart) { $TAT_restart=false; $template->assign('TAT_restart',true); } $tat_path=str_replace(basename($_SERVER['SCRIPT_NAME']),'', $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']); //$tat_path=$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']; $template->assign('TAT_path', $tat_path); include('tours/'.$tour_to_launch.'/config_preparse.inc.php'); $template->set_filename('TAT_tour_tpl', PHPWG_PLUGINS_PATH.'TakeATour/tours/'.$tour_to_launch.'/tour.tpl'); $template->parse('TAT_tour_tpl'); } /* add_event_handler('init', 'TAT_add_js_css'); function TAT_add_js_css() { $avalaible_tour = array('first_contact', 'privacy', 'picture_protection'); if ( isset($_POST['submited_tour']) and in_array($_POST['submited_tour'], $avalaible_tour) and defined('IN_ADMIN') and IN_ADMIN ) { $tour_to_launch = $_POST['submited_tour']; } global $template; load_language('plugin.lang', PHPWG_PLUGINS_PATH .'TakeATour/'); $template->set_filename('TAT_js_css', PHPWG_PLUGINS_PATH.'TakeATour/tpl/js_css.tpl'); $template->parse('TAT_js_css');//http://piwigo.org/forum/viewtopic.php?id=23248 $template->set_filename('TAT_tour_tpl', PHPWG_PLUGINS_PATH.'TakeATour/tpl/'.$tour_to_launch.'.tpl'); $template->parse('TAT_tour_tpl'); }*/ add_event_handler('get_admin_plugin_menu_links', 'TAT_admin_menu' ); function TAT_admin_menu($menu) { array_push($menu, array( 'NAME' => 'Take a Tour', 'URL' => get_root_url().'admin.php?page=plugin-TakeATour' ) ); return $menu; } ?>