Changeset 29046 for trunk/plugins/TakeATour/main.inc.php
- Timestamp:
- Jul 15, 2014, 8:03:00 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/TakeATour/main.inc.php
r29007 r29046 14 14 15 15 /** Tour sended via $_POST or $_GET**/ 16 if ( isset($_REQUEST['submited_tour ']) and defined('IN_ADMIN') and IN_ADMIN )16 if ( isset($_REQUEST['submited_tour_path']) and defined('IN_ADMIN') and IN_ADMIN ) 17 17 { 18 18 check_pwg_token(); 19 pwg_set_session_var('tour_to_launch', $_REQUEST['submited_tour ']);19 pwg_set_session_var('tour_to_launch', $_REQUEST['submited_tour_path']); 20 20 global $TAT_restart; 21 21 $TAT_restart=true; … … 28 28 /** Setup the tour **/ 29 29 /* 30 * REMOVE FOR RELEASE 31 $version_=str_replace('.','_',PHPWG_VERSION); 32 if (pwg_get_session_var('tour_to_launch')!=$version_ and isset($_GET['page']) and $_GET['page']=="plugin-TakeATour") 30 * CHANGE FOR RELEASE 31 $version_=str_replace('.','_',PHPWG_VERSION);*/ 32 $version_="2_7_0"; 33 /***/ 34 if (pwg_get_session_var('tour_to_launch')!='tours/'.$version_ and isset($_GET['page']) and $_GET['page']=="plugin-TakeATour") 33 35 { 34 36 pwg_unset_session_var('tour_to_launch'); 35 37 } 36 else */if ( pwg_get_session_var('tour_to_launch') )38 elseif ( pwg_get_session_var('tour_to_launch') ) 37 39 { 38 40 add_event_handler('init', 'TAT_tour_setup'); 39 include('tours/'.pwg_get_session_var('tour_to_launch').'/config.inc.php');40 41 } 41 42 … … 45 46 $tour_to_launch=pwg_get_session_var('tour_to_launch'); 46 47 load_language('plugin.lang', PHPWG_PLUGINS_PATH .'TakeATour/', array('force_fallback'=>'en_UK')); 48 47 49 $template->set_filename('TAT_js_css', PHPWG_PLUGINS_PATH.'TakeATour/tpl/js_css.tpl'); 48 $template->assign( 49 array( 50 'ADMIN_THEME' => $conf['admin_theme'], 51 ) 52 ); 50 $template->assign('ADMIN_THEME', $conf['admin_theme']); 53 51 $template->parse('TAT_js_css'); 52 54 53 if (isset($TAT_restart) and $TAT_restart) 55 54 { … … 59 58 $tat_path=str_replace(basename($_SERVER['SCRIPT_NAME']),'', $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']); 60 59 $template->assign('TAT_path', $tat_path); 61 @include('tours/'.$tour_to_launch.'/config_preparse.inc.php'); 62 $template->set_filename('TAT_tour_tpl', PHPWG_PLUGINS_PATH.'TakeATour/tours/'.$tour_to_launch.'/tour.tpl'); 60 $template->assign('ABS_U_ADMIN', get_absolute_root_url());// absolute one due to public pages and $conf['question_mark_in_urls'] = false+$conf['php_extension_in_urls'] = false; 61 include($tour_to_launch.'/config.inc.php'); 62 $template->set_filename('TAT_tour_tpl', $TOUR_PATH); 63 63 $template->parse('TAT_tour_tpl'); 64 64 } … … 102 102 { 103 103 $search = '<div class="bigButton"><a href="{$next_step_url}">{\'I want to add photos\'|@translate}</a></div>'; 104 $replacement = '<div class="bigButton"><a href="'.get_root_url().'admin.php?submited_tour =first_contact&pwg_token='.get_pwg_token().'">{\'I want to discover my gallery and add photos\'|@translate}</a></div>104 $replacement = '<div class="bigButton"><a href="'.get_root_url().'admin.php?submited_tour_path=tours/first_contact&pwg_token='.get_pwg_token().'">{\'I want to discover my gallery and add photos\'|@translate}</a></div> 105 105 <div class="bigButton"><a href="{$next_step_url}">{\'I want to add photos\'|@translate}</a></div>'; 106 106 return(str_replace($search, $replacement, $content)); … … 115 115 if (file_exists('tours/'.$version_.'/config.inc.php')) 116 116 { 117 $page['infos'][] = '<a href="'.get_root_url().'admin.php?submited_tour ='.$version_.'&pwg_token='.get_pwg_token().'">'.l10n('Discover what is new in the version %s of Piwigo', PHPWG_VERSION).'</a>';117 $page['infos'][] = '<a href="'.get_root_url().'admin.php?submited_tour_path=tours/'.$version_.'&pwg_token='.get_pwg_token().'">'.l10n('Discover what is new in the version %s of Piwigo', PHPWG_VERSION).'</a>'; 118 118 } 119 119 }
Note: See TracChangeset
for help on using the changeset viewer.