diff options
author | flop25 <flop25@piwigo.org> | 2014-07-26 17:42:07 +0000 |
---|---|---|
committer | flop25 <flop25@piwigo.org> | 2014-07-26 17:42:07 +0000 |
commit | 3f37ec3477f32059b094cab322cd37483d9092e8 (patch) | |
tree | 5a888a1900cc30c90485b91b055e36a69a21f3b7 /plugins | |
parent | c97e8ed352b4e82a454b8664dc598181cd2f3494 (diff) |
add new trigger loc_end_photo_add_direct
First Contact tour reviewed and reworked to change dynamically with the new uploader
git-svn-id: http://piwigo.org/svn/trunk@29078 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | plugins/TakeATour/css/roma.css | 13 | ||||
-rw-r--r-- | plugins/TakeATour/language/en_UK/plugin.lang.php | 36 | ||||
-rw-r--r-- | plugins/TakeATour/tours/first_contact/config.inc.php | 38 | ||||
-rw-r--r-- | plugins/TakeATour/tours/first_contact/tour.tpl | 47 |
4 files changed, 87 insertions, 47 deletions
diff --git a/plugins/TakeATour/css/roma.css b/plugins/TakeATour/css/roma.css index 6f6b5b665..ff6741b82 100644 --- a/plugins/TakeATour/css/roma.css +++ b/plugins/TakeATour/css/roma.css @@ -56,7 +56,18 @@ fieldset[disabled] .btn-default.active { .popover {
background-color: #222;
border: 1px solid #333333;
- box-shadow: 0 5px 10px rgba(170, 170, 170, 0.2);
+}
+.popover.right {
+ box-shadow: -5px 5px 10px rgba(170, 170, 170, 0.2);
+}
+.popover.left {
+ box-shadow: 5px 5px 10px rgba(170, 170, 170, 0.2);
+}
+.popover.top {
+ box-shadow: 0px 5px 10px rgba(170, 170, 170, 0.2);
+}
+.popover.bottom {
+ box-shadow: 0px -5px 10px rgba(170, 170, 170, 0.2);
}
.popover-title, .popover-content {
color: #aaa;
diff --git a/plugins/TakeATour/language/en_UK/plugin.lang.php b/plugins/TakeATour/language/en_UK/plugin.lang.php index d845902b6..7ec330d6d 100644 --- a/plugins/TakeATour/language/en_UK/plugin.lang.php +++ b/plugins/TakeATour/language/en_UK/plugin.lang.php @@ -12,7 +12,7 @@ $lang['first_contact_descrp'] = 'Recommended for beginners, this tour introduce $lang['first_contact_title1'] = 'Welcome in your Piwigo gallery'; $lang['first_contact_stp1'] = 'Hello! I will be your guide to discover Piwigo. Please follow my instructions, and click Next (or use the arrows of your keyboard) to navigate. If you go to an other page of the administration, you will be redirected to the current page of the Tour. If you are stuck and can\'t end the tour, going to <em>Plugins » Take A Tour</em> will end the tour.<br>Let\'s start by adding pictures!'; $lang['first_contact_title2'] = ''; -$lang['first_contact_stp2'] = 'The link is here. Click Next to continue'; +$lang['first_contact_stp2'] = 'The link is here. Click on it or click Next to continue'; $lang['first_contact_title3'] = 'Add Photo Page'; $lang['first_contact_stp3'] = 'This first tab is where you add photos directly from your browser. The other tabs are about the other ways to upload photos'; $lang['first_contact_title4'] = 'Lets add photo!'; @@ -20,31 +20,31 @@ $lang['first_contact_stp4'] = 'First choose an album; create one if there is no $lang['first_contact_title5'] = ''; $lang['first_contact_stp5'] = 'Then click the button to select photos to send from your computer, or just drag and drop files in the zone above.'; $lang['first_contact_title6'] = ''; -$lang['first_contact_stp6'] = 'You see that photos are being listed. Add pictures and when you\'re ready click the button Start Upload'; +$lang['first_contact_stp6'] = 'You see that photos are being listed. When you\'re ready click the button Start Upload'; $lang['first_contact_title7'] = ''; -$lang['first_contact_stp7'] = 'Here a summary of your uploaded pictures. See that Piwigo has generated itself the thumbnails. You can now click to manage all the uploaded pictures in the Batch Manager, edit the properties of a picture by clicking on it or add more photos...'; +$lang['first_contact_stp7'] = 'Here a summary of your uploaded pictures. See that Piwigo has generated itself the thumbnails. You can:<ul><li>manage all the uploaded pictures in the Batch Manager</li><li>edit the properties of a picture by clicking on it</li><li>add more photos</li></ul>'; $lang['first_contact_title8'] = ''; $lang['first_contact_stp8'] = 'Let\'s edit them! Click on the link.'; $lang['first_contact_title9'] = 'The Batch Manager'; -$lang['first_contact_stp9'] = 'You are know in the Batch Manager, where you can batch edit multiple pictures. Here the Caddy is set as a filter because we comes from the upload result page.'; +$lang['first_contact_stp9'] = 'You are know in the Batch Manager, where you can batch edit multiple pictures.<br><br>Here the prefilter is already set on "Caddie" because we come from the upload page.'; $lang['first_contact_title10'] = ''; -$lang['first_contact_stp10'] = 'Here is the link to directly access to your caddy: that/s a tool for administrators to easily add pictures to a set in order to edit them in the Batch Manager. You can add photos to the caddy from the public picture page when logged as an admin, or using the action "Add to caddy" on the Batch Manager'; +$lang['first_contact_stp10'] = 'Here is the link to directly access to your caddie: that\'s a tool for administrators to easily pick pictures when browsing the public part in order to edit them in the Batch Manager.<br><br>You can add photos to the caddie from the public picture page when logged as an admin, or using the action "Add to caddie" on the Batch Manager.'; $lang['first_contact_title11'] = 'How to edit a photos'; $lang['first_contact_stp11'] = 'So you can select from here one or more photos'; $lang['first_contact_title12'] = ''; -$lang['first_contact_stp12'] = 'then edit them using and action. But for instance, you can\'t -for now- batch edit descriptions since they are mostly unique'; +$lang['first_contact_stp12'] = 'then edit them using an action. But for instance, you can\'t batch edit descriptions since they are mostly unique'; $lang['first_contact_title13'] = ''; $lang['first_contact_stp13'] = 'You can edit descriptions and more from the batch manager in unit mode. But for now, let\'s stay in the global mode'; $lang['first_contact_title14'] = ''; -$lang['first_contact_stp14'] = 'We will see now the edition page of one picture. That page is reachable from here but also from the public picture page when logged as an administrator. Click on Edit or go next'; +$lang['first_contact_stp14'] = 'We will see now the <b>edition page</b> of one picture. That page is reachable from here but also from the public picture page when logged as an administrator.<br><br>Hover the thumbnail then click on Edit.'; $lang['first_contact_title15'] = 'The edition page of a picture'; $lang['first_contact_stp15'] = 'On that page you can edit all the properties of a photo, for instance...'; $lang['first_contact_title16'] = ''; -$lang['first_contact_stp16'] = 'here to add or remove the photo from albums. The link is virtual, no photos will be physically moved ever.'; +$lang['first_contact_stp16'] = '...in which album(s) is the photo.<br><br>So here you can add or remove the photo from albums. The link is virtual, no photos will be physically moved ever.'; $lang['first_contact_title17'] = ''; -$lang['first_contact_stp17'] = 'and here to set the photo as a picture representative of an album. So you can set as a representative of a public album, a photo in a private album, which is ideal to set custom thumbnails for albums but the user won\'t see those pictures inside those albums. Like setting a portrait of someone as representative, for an album which contains photos of nature; it would be weird to see that photo of the man/woman among trees or animals.'; +$lang['first_contact_stp17'] = 'Here you can set the photo as a picture representative of any album.<br><br>So you can set a photo in a private album, as a representative of a public album which is great to set custom thumbnails for albums. Like setting a portrait of someone as representative, for an album which contains photos of nature; it would be weird to see that photo of the man/woman among trees or animals.'; $lang['first_contact_title18'] = 'Manage albums'; -$lang['first_contact_stp18'] = 'That previous example was just a small overview of tricks and how powerful Piwigo is. So I\'ve told about private albums, but how can we manage albums? Click <em>On album » Manage</em> or hit Next'; +$lang['first_contact_stp18'] = 'That previous example was just a small overview of tricks and how powerful Piwigo is. So I\'ve told you about private albums, but how can we manage albums? Click <em>On album » Manage</em> or hit Next'; $lang['first_contact_title19'] = 'Manage Albums'; $lang['first_contact_stp19'] = 'Here are listed all the \'top\' albums, the ones at the root of your gallery. If you see an album with a dashed background, it\'s an real physical album from a FTP synchronisation, which can\'t be moved or deleted from here. The others albums are called virtual albums.'; $lang['first_contact_stp19_b'] = 'All the albums are called \'virtual albums\'. Here are listed all the \'top\' albums, the ones at the root of your gallery.'; @@ -59,11 +59,11 @@ $lang['first_contact_stp23'] = 'Locking a album means only administrators will b $lang['first_contact_title24'] = ''; $lang['first_contact_stp24'] = 'Certainly, one of the most important page is the permission page of a private album. Click on the permission tab or click next'; $lang['first_contact_title25'] = 'Album Permission'; -$lang['first_contact_stp25'] = 'As you can read in the Help of your Piwigo -link at the top right-, album permissions are set by groups and users. You can directly set private/public multiple albums using the <em>Administration » Albums » Properties</em> page.'; +$lang['first_contact_stp25'] = 'As you can read in the Help of your Piwigo -link at the top right-, album permissions are set by groups and users.'; $lang['first_contact_title26'] = ''; -$lang['first_contact_stp26'] = 'Here you can set the current album as private, then grant access to users and groups. By default, permissions are not recursive for sub albums, but upper-albums will be granted with the same permission in order to let the granted users browse to the album.'; +$lang['first_contact_stp26'] = 'Here you can set the current album as private, then grant access to users and groups. By default, permissions are not recursive for sub albums, but upper-albums will be granted with the same permission in order to let the granted users to browse to the album.'; $lang['first_contact_title27'] = ''; -$lang['first_contact_stp27'] = 'Important fact: the webmasters and administrators are not omniscient when browsing the public part, but they can access to every album and photos on the admin part.'; +$lang['first_contact_stp27'] = 'Important fact: the webmasters and administrators are not omniscient when browsing the public part, but they can access to every album and photos on the admin part.<br><br>More details in the Privacy Tour.'; $lang['first_contact_title28'] = 'Configuration'; $lang['first_contact_stp28'] = 'Now we will look at the options available to set Piwigo working your way. Click on Configuration->Options or just hit Next.'; $lang['first_contact_title29'] = '<em>Configuration » Options » General</em>'; @@ -81,21 +81,21 @@ $lang['first_contact_stp34'] = 'Themes are one of the three way to customize you $lang['first_contact_title35'] = 'Themes'; $lang['first_contact_stp35'] = 'Themes can also be set as Default, which means that\'s the theme for unregistered visitors (guests, you remember?) and any new registered user will be have this theme. But for any previously registered users, the theme won\'t change until you do it from the User Management page or you disable their theme: be careful, you might disturb your users by changing their whole display.'; $lang['first_contact_title36'] = 'Themes'; -$lang['first_contact_stp36'] = 'Themes have a system of dependency: that\'s why some theme can\'t be deleted (a parent theme can\'t be deleted if a child theme is enabled) or others can\'t be enabled (a child theme need its parent theme). For instance, when you put you\'re mouse over a Delete link, if the theme can\'t be deleted, a information bubble will explain you why.'; +$lang['first_contact_stp36'] = 'Themes have a system of dependency:<ul><li>some theme can\'t be deleted: a parent theme can\'t be deleted if a child theme is enabled</li><li>or others can\'t be enabled: a child theme needs its parent theme</li></ul>For instance, when you put you\'re mouse over a Delete link, if the theme can\'t be deleted, a information bubble will explain you why.'; $lang['first_contact_title37'] = 'Themes'; -$lang['first_contact_stp37'] = 'To install new themes, you can directly download them from the tab \'Add a theme\'. Only the themes marked as compatible with your version of Piwigo are showed.<br>Let\'s discover the plugins now! Click on <em>Plugin » Manage</em>'; +$lang['first_contact_stp37'] = 'To install new themes, you can directly download them from the tab \'Add a theme\'. Only the themes marked as compatible with your version of Piwigo are showed.<br><br>Let\'s discover the plugins now! Click on <em>Plugin » Manage</em>'; $lang['first_contact_title38'] = 'Plugins'; $lang['first_contact_stp38'] = 'Plugins are very easy ways to customize your Piwigo. They can do almost anything you can imagine from small text addition to complete features, like the Community plugin which allows non administrators users to upload without entering to the administration part.'; $lang['first_contact_title39'] = 'Plugins'; -$lang['first_contact_stp39'] = 'On that first page, are listed the installed plugins. At the top, are listed the plugins activated, which are currently running. At the bottom, the plugins which are installed in the /plugins folder, but disabled. Deleting a plugin means that any trace of the plugin will be removed (files, options etc). For most of the plugins, disabling will keep the data registered by the plugins.'; +$lang['first_contact_stp39'] = 'On that first page, are listed the installed plugins.<br><br>At the top, are listed the plugins activated, which are currently running.<br><br>At the bottom, the plugins which are installed in the /plugins folder, but disabled.<br><br>Deleting a plugin means that any trace of the plugin will be removed (files, options etc). For most of the plugins, a deactivation will keep the data registered by the plugin.'; $lang['first_contact_title40'] = ''; $lang['first_contact_stp40'] = 'Here it\'s me! Don\'t disable me now, but you can see you can Disable or Restore an activated plugin.'; $lang['first_contact_title41'] = ''; $lang['first_contact_stp41'] = 'You can see on the last tab all the plugins available for your version of Piwigo. Hundred of plugins are there!'; $lang['first_contact_title42'] = 'Languages'; -$lang['first_contact_stp42'] = 'Piwigo is multilingual. By default, the language displayed by Piwigo change according to the language of the browser of the visitor. If the language of the visitor is not available, the language set by default is used.'; +$lang['first_contact_stp42'] = 'Piwigo is multilingual. By default, the language displayed by Piwigo change according to the language of the browser of the visitor.<br><br>If the language of the visitor is not available, the language set by default is used.'; $lang['first_contact_title43'] = 'It\'s been a great time'; -$lang['first_contact_stp43'] = 'This tour was quite long, but we only have seen a small part of how powerful Piwigo is. Everything has a end, this overview is finished.<br>You can discover much deeper the features of Piwigo by taking an other tour or reading our documentation, on the piwigo.org website.'; +$lang['first_contact_stp43'] = 'This tour was quite long, but we only have seen a small part of how powerful Piwigo is. Everything has a end, this overview is finished.<br><br>You can discover much deeper the features of Piwigo by taking an other tour or reading our documentation, on the piwigo.org website.<br><br>Don\'t forget also the Help link at the upper right corner of any administration page.<p style="text-align:center">Enjoy your Piwigo!</p>'; $lang['2.7 Tour'] = '2.7 Tour'; diff --git a/plugins/TakeATour/tours/first_contact/config.inc.php b/plugins/TakeATour/tours/first_contact/config.inc.php index 30f797c66..dc1dfe2db 100644 --- a/plugins/TakeATour/tours/first_contact/config.inc.php +++ b/plugins/TakeATour/tours/first_contact/config.inc.php @@ -9,13 +9,49 @@ $TOUR_PATH = PHPWG_PLUGINS_PATH.'TakeATour/tours/first_contact/tour.tpl'; if ( defined('IN_ADMIN') and IN_ADMIN )
{
/* first contact */
+add_event_handler('loc_end_photo_add_direct', 'TAT_FC_6');
+add_event_handler('loc_end_photo_add_direct', 'TAT_FC_7');
add_event_handler('loc_end_element_set_global', 'TAT_FC_14');
add_event_handler('loc_end_picture_modify', 'TAT_FC_16');
add_event_handler('loc_end_picture_modify', 'TAT_FC_17');
add_event_handler('loc_end_cat_modify', 'TAT_FC_23');
add_event_handler('loc_end_themes_installed', 'TAT_FC_35');
}
-
+
+function TAT_FC_7()
+{
+ global $template;
+ $template->set_prefilter('photos_add', 'TAT_FC_7_prefilter');
+}
+function TAT_FC_7_prefilter ($content, &$smarty)
+{
+ $search = 'UploadComplete: function(up, files) {';
+ $replacement = 'UploadComplete: function(up, files) {
+ if (tour.getCurrentStep()==5)
+ {
+ tour.goTo(6);
+ }
+';
+ return str_replace($search, $replacement, $content);
+}
+function TAT_FC_6()
+{
+ global $template;
+ $template->set_prefilter('photos_add', 'TAT_FC_6_prefilter');
+}
+function TAT_FC_6_prefilter ($content, &$smarty)
+{
+ $search = 'BeforeUpload:';
+ $replacement = 'FilesAdded: function() {
+ if (tour.getCurrentStep()==4)
+ {
+ tour.goTo(5);
+ }
+
+ },
+ BeforeUpload:';
+ return str_replace($search, $replacement, $content);
+}
function TAT_FC_14()
{
global $template;
diff --git a/plugins/TakeATour/tours/first_contact/tour.tpl b/plugins/TakeATour/tours/first_contact/tour.tpl index 92b934c54..e2b597adb 100644 --- a/plugins/TakeATour/tours/first_contact/tour.tpl +++ b/plugins/TakeATour/tours/first_contact/tour.tpl @@ -1,4 +1,4 @@ -{footer_script require='jquery.bootstrap-tour'}{literal}
+{footer_script require='jquery.bootstrap-tour' load="async"}{literal}
var tour = new Tour({
name: "first_contact",
@@ -56,30 +56,32 @@ tour.addSteps([ element: "#afterUploadActions",
title: "{/literal}{'first_contact_title7'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'first_contact_stp7'|@translate|@escape:'javascript'}{literal}",
- prev:4
+ prev:3,
+ onPrev: function (tour) {window.location.reload()}
},
{
path: "{/literal}{$TAT_path}{literal}admin.php?page=photos_add",
placement: "top",
- element: "#batchLink",
+ element: ".batchLink",
reflex:true,
title: "{/literal}{'first_contact_title8'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'first_contact_stp8'|@translate|@escape:'javascript'}{literal}",
- prev:4
},
{
- path: /admin\.php\?page=(photos_add|batch_manager&filter=prefilter-last_import|prefilter-caddie)/,
+ path: /admin\.php\?page=(photos_add|batch_manager&filter=prefilter-last_import|batch_manager&filter=prefilter-caddie)/,
redirect:function (tour) {window.location = "admin.php?page=batch_manager&filter=prefilter-last_import";},
placement: "top",
- element: "",
+ element: "select[name='filter_prefilter']",
title: "{/literal}{'first_contact_title9'|@translate|@escape:'javascript'}{literal}",
- content: "{/literal}{'first_contact_stp9'|@translate|@escape:'javascript'}{literal}"
- },
+ content: "{/literal}{'first_contact_stp9'|@translate|@escape:'javascript'}{literal}",
+ prev:3,
+ onPrev: function (tour) {window.location = "{/literal}{$ABS_U_ADMIN}{literal}admin.php?page=photos_add"}
+ },
{//10
path: /admin\.php\?page=batch_manager&filter=(prefilter-caddie|prefilter-last_import)/,
redirect:function (tour) {window.location = "admin.php?page=batch_manager&filter=prefilter-last_import";},
placement: "right",
- element: ".icon-flag",
+ element: "a[href='./admin.php?page=batch_manager&filter=prefilter-caddie']",
title: "{/literal}{'first_contact_title10'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'first_contact_stp10'|@translate|@escape:'javascript'}{literal}"
},
@@ -150,8 +152,6 @@ tour.addSteps([ },
{
path: "{/literal}{$TAT_path}{literal}admin.php?page=cat_list",
- placement: "left",
- element: "#content",
title: "{/literal}{'first_contact_title19'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{if $TAT_FTP}{'first_contact_stp19'|@translate|@escape:'javascript'}{else}{'first_contact_stp19_b'|@translate|@escape:'javascript'}{/if}{literal}",
onPrev: function (tour) {window.location = "admin.php?page=photo-{/literal}{$TAT_image_id}{literal}";},
@@ -172,7 +172,7 @@ tour.addSteps([ content: "{/literal}{'first_contact_stp21'|@translate|@escape:'javascript'}{literal}"
},
{
- path: /admin\.php\?page=album-/,
+ path: /admin\.php\?page=album-[0-9]+(|-properties)$/,
redirect:function (tour) {window.location = "admin.php?page=album-{/literal}{$TAT_cat_id}{literal}";},
placement: "top",
element: ".selected_tab",
@@ -180,7 +180,7 @@ tour.addSteps([ content: "{/literal}{'first_contact_stp22'|@translate|@escape:'javascript'}{literal}"
},
{
- path: /admin\.php\?page=album-/,
+ path: /admin\.php\?page=album-[0-9]+(|-properties)$/,
redirect:function (tour) {window.location = "admin.php?page=album-{/literal}{$TAT_cat_id}{literal}";},
placement: "top",
element: "#TAT_FC_23",
@@ -188,10 +188,11 @@ tour.addSteps([ content: "{/literal}{'first_contact_stp23'|@translate|@escape:'javascript'}{literal}"
},
{
- path: /admin\.php\?page=album-/,
+ path: /admin\.php\?page=album-[0-9]+(|-properties)$/,
redirect:function (tour) {window.location = "admin.php?page=album-{/literal}{$TAT_cat_id}{literal}";},
placement: "bottom",
- element: ".tabsheet",
+ element: "li.normal_tab:nth-child(3) > a:nth-child(1)",
+ reflex: true,
title: "{/literal}{'first_contact_title24'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'first_contact_stp24'|@translate|@escape:'javascript'}{literal}"
},
@@ -257,8 +258,9 @@ tour.addSteps([ },
{
path: "{/literal}{$TAT_path}{literal}admin.php?page=configuration",
- placement: "top",
- title: "{/literal}{'first_contact_stp33'|@translate|@escape:'javascript'}{literal}",
+ placement: "bottom",
+ element: "li.normal_tab:nth-child(6) > a:nth-child(1)",
+ title: "{/literal}{'first_contact_title33'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'first_contact_stp33'|@translate|@escape:'javascript'}{literal}",
prev:30
},
@@ -324,9 +326,7 @@ tour.addSteps([ content: "{/literal}{'first_contact_stp42'|@translate|@escape:'javascript'}{literal}"
},
{
- path: "{/literal}{$TAT_path}{literal}admin.php?page=plugin-TakeATour",
- placement: "top",
- element: "",
+ path: "{/literal}{$TAT_path}{literal}admin.php",
title: "{/literal}{'first_contact_title43'|@translate|@escape:'javascript'}{literal}",
content: "{/literal}{'first_contact_stp43'|@translate|@escape:'javascript'}{literal}"
}
@@ -337,11 +337,4 @@ tour.init(); // Start the tour
tour.start();
-
-jQuery( ".plupload_start" ).click(function() {
- if (tour.getCurrentStep()==5)
- {
- tour.goTo(6);
- }
-});
{/literal}{/footer_script}
\ No newline at end of file |