Changeset 28208


Ignore:
Timestamp:
04/16/14 23:17:10 (6 years ago)
Author:
flop25
Message:

use GET to start a tour also

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/TakeATour/main.inc.php

    r28207 r28208  
    1717{ 
    1818  check_pwg_token(); 
    19   pwg_set_session_var('tour_to_launch', $_POST['submited_tour']); 
     19  pwg_set_session_var('tour_to_launch', $_REQUEST['submited_tour']); 
    2020  global $TAT_restart; 
    2121  $TAT_restart=true; 
     
    9494function TAT_no_photo_yet_prefilter($content, &$smarty) 
    9595{ 
    96    
    9796  $search = '<div class="bigButton"><a href="{$next_step_url}">{\'I want to add photos\'|@translate}</a></div>'; 
    98   $replacement = '<form style="text-align:center" action="{$F_ACTION}" method="post"> 
    99   <input type="hidden" name="submited_tour" value="first_contact"> 
    100   <input type="hidden" name="pwg_token" value="{$pwg_token}"> 
    101   <input type="submit" name="button2" id="button2" value="{\'I want to discover my gallery and add photos\'|@translate}"> 
    102 </form> 
     97  $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> 
    10398<div class="bigButton"><a href="{$next_step_url}">{\'I want to add photos\'|@translate}</a></div>'; 
    104   $content=str_replace($search, $replacement, $content); 
    105   $search = '</style>'; 
    106   $replacement = ' 
    107 form input[type="submit"] { 
    108   font-size: 25px; 
    109   letter-spacing: 2px; 
    110   margin: 0 5px; 
    111   padding: 20px; 
    112   border:none; 
    113   background-color:#666666; 
    114   color:#fff; 
    115   cursor:pointer; 
    116 } 
    117 form input[type="submit"]:hover { 
    118   background-color:#ff7700; 
    119   color:white; 
    120 } 
    121 </style>'; 
    12299  return(str_replace($search, $replacement, $content)); 
    123100} 
Note: See TracChangeset for help on using the changeset viewer.