aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/TakeATour
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2014-04-16 21:17:10 +0000
committerflop25 <flop25@piwigo.org>2014-04-16 21:17:10 +0000
commitcf8b032c14dfde3e3b9d0ae552d44f289dec3ff2 (patch)
treecdf2619da7bb0f5fe9e6b99db8d7cc625538d82c /plugins/TakeATour
parent2383cd0072dbb04ce962864313e651b77a060633 (diff)
use GET to start a tour also
git-svn-id: http://piwigo.org/svn/trunk@28208 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/TakeATour')
-rw-r--r--plugins/TakeATour/main.inc.php27
1 files changed, 2 insertions, 25 deletions
diff --git a/plugins/TakeATour/main.inc.php b/plugins/TakeATour/main.inc.php
index 46ed9e5d7..a6402205c 100644
--- a/plugins/TakeATour/main.inc.php
+++ b/plugins/TakeATour/main.inc.php
@@ -16,7 +16,7 @@ if (!defined('PHPWG_ROOT_PATH'))
if ( isset($_REQUEST['submited_tour']) and defined('IN_ADMIN') and IN_ADMIN )
{
check_pwg_token();
- pwg_set_session_var('tour_to_launch', $_POST['submited_tour']);
+ pwg_set_session_var('tour_to_launch', $_REQUEST['submited_tour']);
global $TAT_restart;
$TAT_restart=true;
}
@@ -93,32 +93,9 @@ function TAT_no_photo_yet()
}
function TAT_no_photo_yet_prefilter($content, &$smarty)
{
-
$search = '<div class="bigButton"><a href="{$next_step_url}">{\'I want to add photos\'|@translate}</a></div>';
- $replacement = '<form style="text-align:center" action="{$F_ACTION}" method="post">
- <input type="hidden" name="submited_tour" value="first_contact">
- <input type="hidden" name="pwg_token" value="{$pwg_token}">
- <input type="submit" name="button2" id="button2" value="{\'I want to discover my gallery and add photos\'|@translate}">
-</form>
+ $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>
<div class="bigButton"><a href="{$next_step_url}">{\'I want to add photos\'|@translate}</a></div>';
- $content=str_replace($search, $replacement, $content);
- $search = '</style>';
- $replacement = '
-form input[type="submit"] {
- font-size: 25px;
- letter-spacing: 2px;
- margin: 0 5px;
- padding: 20px;
- border:none;
- background-color:#666666;
- color:#fff;
- cursor:pointer;
-}
-form input[type="submit"]:hover {
- background-color:#ff7700;
- color:white;
-}
-</style>';
return(str_replace($search, $replacement, $content));
}