aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/TakeATour/tours/2_7_0
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2014-07-05 15:22:55 +0000
committerflop25 <flop25@piwigo.org>2014-07-05 15:22:55 +0000
commitf140339c7dcac4c4670421b5619b80a84eac131e (patch)
treeed83a7de8eee2414fa61b63a38adf262903c1a5c /plugins/TakeATour/tours/2_7_0
parent0e562071c44ec55f72988bab48be9e9ddb35d1b0 (diff)
[take a tour]
empty language value with a space tour 2.7 : search page, select js tour privacy : wip git-svn-id: http://piwigo.org/svn/trunk@28951 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/TakeATour/tours/2_7_0')
-rw-r--r--plugins/TakeATour/tours/2_7_0/config_preparse.inc.php28
-rw-r--r--plugins/TakeATour/tours/2_7_0/tour.tpl13
2 files changed, 38 insertions, 3 deletions
diff --git a/plugins/TakeATour/tours/2_7_0/config_preparse.inc.php b/plugins/TakeATour/tours/2_7_0/config_preparse.inc.php
index 7a0afce0b..87aa6227b 100644
--- a/plugins/TakeATour/tours/2_7_0/config_preparse.inc.php
+++ b/plugins/TakeATour/tours/2_7_0/config_preparse.inc.php
@@ -1,3 +1,31 @@
<?php
$template->assign('TAT_index', make_index_url(array('section' => 'categories')));
+ $template->assign('TAT_search', get_root_url().'search.php');
+
+ //picture id
+ if (isset($_GET['page']) and preg_match('/^photo-(\d+)(?:-(.*))?$/', $_GET['page'], $matches))
+ {
+ $_GET['image_id'] = $matches[1];
+ }
+ check_input_parameter('image_id', $_GET, false, PATTERN_ID);
+ if (isset($_GET['image_id']) and pwg_get_session_var('TAT_image_id')==null)
+ {
+ $template->assign('TAT_image_id', $_GET['image_id']);
+ pwg_set_session_var('TAT_image_id', $_GET['image_id']);
+ }
+ elseif (is_numeric(pwg_get_session_var('TAT_image_id')))
+ {
+ $template->assign('TAT_image_id', pwg_get_session_var('TAT_image_id'));
+ }
+ else
+ {
+ $query = '
+ SELECT id
+ FROM '.IMAGES_TABLE.'
+ ORDER BY RAND()
+ LIMIT 1
+ ;';
+ $row = pwg_db_fetch_assoc(pwg_query($query));
+ $template->assign('TAT_image_id', $row['id']);
+ }
?> \ No newline at end of file
diff --git a/plugins/TakeATour/tours/2_7_0/tour.tpl b/plugins/TakeATour/tours/2_7_0/tour.tpl
index b9b5631e0..e62390f57 100644
--- a/plugins/TakeATour/tours/2_7_0/tour.tpl
+++ b/plugins/TakeATour/tours/2_7_0/tour.tpl
@@ -29,16 +29,23 @@ tour.addSteps([
content: "{/literal}{'2_7_0_stp3'|@translate|@escape:'javascript'}{literal}",
},
{
- path: "{/literal}{$TAT_path}{literal}admin.php?page=plugin-TakeATour",
+ path: "{/literal}{$TAT_path}{$TAT_search}{literal}",
+ placement: "left",
+ element: "#content",
+ title: "{/literal}{'2_7_0_title4'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'2_7_0_stp4'|@translate|@escape:'javascript'}{literal}"
},
{//5
- path: "{/literal}{$TAT_path}{literal}admin.php?page=plugin-TakeATour",
+ path: "{/literal}{$TAT_path}{literal}admin.php?page=photo-{/literal}{$TAT_image_id}{literal}",
+ placement: "top",
+ element: ".icon-calendar",
title: "{/literal}{'2_7_0_title5'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'2_7_0_stp5'|@translate|@escape:'javascript'}{literal}"
},
{
- path: "{/literal}{$TAT_path}{literal}admin.php?page=plugin-TakeATour",
+ path: "{/literal}{$TAT_path}{literal}admin.php?page=photo-{/literal}{$TAT_image_id}{literal}",
+ placement: "top",
+ element: "#catModify > fieldset:nth-child(2) > p:nth-child(5) > strong",
title: "{/literal}{'2_7_0_title6'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'2_7_0_stp6'|@translate|@escape:'javascript'}{literal}"
},