Changeset 28100


Ignore:
Timestamp:
04/06/14 21:21:58 (5 years ago)
Author:
flop25
Message:

add pwg_token
add text on top of the help pages and a button for no_photo_yet
etc

Location:
extensions/TakeATour
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/TakeATour/admin.php

    r28060 r28100  
    99  array( 
    1010    'F_ACTION' => get_root_url().'admin.php', 
     11    'pwg_token' => get_pwg_token() 
    1112    ) 
    1213  ); 
  • extensions/TakeATour/language/en_UK/plugin.lang.php

    r28098 r28100  
    22$lang['First Contact'] = 'First Contact'; 
    33$lang['Start the Tour'] = 'Start the Tour'; 
     4$lang['Visit your Piwigo!'] = 'Visit your Piwigo!'; 
     5$lang['Take a tour and discover the features of your Piwigo gallery » Go to the available tours'] = 'Take a tour and discover the features of your Piwigo gallery » Go to the available tours'; 
     6$lang[''] = ''; 
     7$lang[''] = ''; 
     8$lang[''] = ''; 
     9$lang[''] = ''; 
     10$lang[''] = ''; 
     11$lang[''] = ''; 
     12$lang[''] = ''; 
     13$lang[''] = ''; 
     14$lang[''] = ''; 
    415 
    516$lang['first_contact_descrp'] = 'Recommended for beginners, this tour introduce you Piwigo, its basic features. It will start by adding pictures, then manage them. The tour continues with album management and permissions, and ends on the customization using the configuration, the themes and the plugins.'; 
    617$lang['first_contact_title1'] = 'Welcome in your Piwigo gallery'; 
    7 $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 in an other page of the administration, you will be redirected to the current page of the Tour.<br>Let\'s start by adding pictures!'; 
     18$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 in 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!'; 
    819$lang['first_contact_title2'] = ''; 
    920$lang['first_contact_stp2'] = 'The link is here. Click Next to continue'; 
    1021$lang['first_contact_title3'] = 'Add Photo Page'; 
    11 $lang['first_contact_stp3'] = 'First tab to add photos from your browser, other tabs to add from a software, mobile or FTP'; 
     22$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'; 
    1223$lang['first_contact_title4'] = 'Lets add photo!'; 
    1324$lang['first_contact_stp4'] = 'First choose an album; create one if there is no album yet.'; 
     
    99110$lang[''] = ''; 
    100111$lang[''] = ''; 
    101 $lang[''] = ''; 
    102 $lang[''] = ''; 
    103112?> 
  • extensions/TakeATour/language/fr_FR/plugin.lang.php

    r28097 r28100  
    22$lang['First Contact'] = 'Premier contact'; 
    33$lang['Start the Tour'] = 'Commencez la visite'; 
    4 $lang[''] = ''; 
    5 $lang['Welcome in your Piwigo gallery'] = 'Bienvenue dans votre galerie Piwigo'; 
    6 $lang['Step_1 Let\'s start by adding pictures'] = 'Bonjour, à travers ce guide, vous allez comprendre comment utiliser votre galerie et avoir un aperçu des fonctionnalités offertes'; 
     4$lang['Visit your Piwigo!'] = 'Visiter votre Piwigo !'; 
     5$lang['Take a tour and discover the features of your Piwigo gallery » Go to the available tours'] = 'Découvrez les fonctionnalités de votre galerie Piwigo » Voir les visites interactives disponibles'; 
    76$lang[''] = ''; 
    87$lang[''] = ''; 
    98$lang[''] = ''; 
     9$lang[''] = ''; 
     10$lang[''] = ''; 
     11$lang[''] = ''; 
     12$lang[''] = ''; 
     13$lang[''] = ''; 
     14$lang[''] = ''; 
     15 
     16$lang['first_contact_descrp'] = 'Recommended for beginners, this tour introduce you Piwigo, its basic features. It will start by adding pictures, then manage them. The tour continues with album management and permissions, and ends on the customization using the configuration, the themes and the plugins.'; 
     17$lang['first_contact_title1'] = 'Welcome in your Piwigo gallery'; 
     18$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 in 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!'; 
     19$lang['first_contact_title2'] = ''; 
     20$lang['first_contact_stp2'] = 'The link is here. Click Next to continue'; 
     21$lang['first_contact_title3'] = 'Add Photo Page'; 
     22$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'; 
     23$lang['first_contact_title4'] = 'Lets add photo!'; 
     24$lang['first_contact_stp4'] = 'First choose an album; create one if there is no album yet.'; 
     25$lang['first_contact_title5'] = ''; 
     26$lang['first_contact_stp5'] = 'Then click the button to select photos to send from your computer'; 
     27$lang['first_contact_title6'] = ''; 
     28$lang['first_contact_stp6'] = 'You see that photos are being listed. Add at least 2 pictures and when you\'re ready click the button Start Upload'; 
     29$lang['first_contact_title7'] = ''; 
     30$lang['first_contact_stp7'] = 'Here a summary of your uploaded pictures. See that Piwigo has generated itself the thumbnails. You can know add more photos with the link at the bottom, edit the properties of a picture by cliking on it, or click to manage all the uploaded pictures in the Batch Manager...'; 
     31$lang['first_contact_title8'] = ''; 
     32$lang['first_contact_stp8'] = 'Let\'s edit them! Click on the link. If you don\'t see it click Prev to add at least 2 photos.'; 
     33$lang['first_contact_title9'] = 'The Batch Manager'; 
     34$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.'; 
     35$lang['first_contact_title10'] = ''; 
     36$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'; 
     37$lang['first_contact_title11'] = 'How to edit a photos'; 
     38$lang['first_contact_stp11'] = 'So you can select from here one or more photos'; 
     39$lang['first_contact_title12'] = ''; 
     40$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'; 
     41$lang['first_contact_title13'] = ''; 
     42$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'; 
     43$lang['first_contact_title14'] = ''; 
     44$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'; 
     45$lang['first_contact_title15'] = 'The edition page of a picture'; 
     46$lang['first_contact_stp15'] = 'On that page you can edit all the properties of a photo, for instance...'; 
     47$lang['first_contact_title16'] = ''; 
     48$lang['first_contact_stp16'] = 'here to add or remove the photo from albums. The link is virtual, no photos will be physcally moved ever.'; 
     49$lang['first_contact_title17'] = ''; 
     50$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.'; 
     51$lang['first_contact_title18'] = 'Manage albums'; 
     52$lang['first_contact_stp18'] = 'That previous example was just a small overview of tricks and how powerfull Piwigo is. So I\'ve told about private albums, but how can we manage albums? Click On album->Manage or hit Next'; 
     53$lang['first_contact_title19'] = 'Manage Albums'; 
     54$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 backgroung, it\'s an real physical album from a FTP synchro, which can\'t be moved or deleted from here. The others albums are called virtual albums.'; 
     55$lang['first_contact_title20'] = 'Manage Albums'; 
     56$lang['first_contact_stp20'] = 'When your mouse is hover a album, links and information appear. When you drag and drop an album -a rounded block-, you will change its position and then you can save or cancel your manual order.'; 
     57$lang['first_contact_title21'] = 'Other Tabs'; 
     58$lang['first_contact_stp21'] = 'The next tab is a page where you can move any virtual album.<br>The permalink tab is to set a particular url for an album, for tecnhical reasons like to set a specific template or for just sending cool customized links.<br>But let\'s edit an album: click on Edit of a album'; 
     59$lang['first_contact_title22'] = 'Album Edition Page'; 
     60$lang['first_contact_stp22'] = 'Like for a picture, here you can edit the properties of an album'; 
     61$lang['first_contact_title23'] = ''; 
     62$lang['first_contact_stp23'] = 'Locking a album means only administrators will be able to see that album: it\'s usually used when an admin is managing the properties of an album or don\'t want to publish the album immediatly'; 
     63$lang['first_contact_title24'] = ''; 
     64$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'; 
     65$lang['first_contact_title25'] = 'Album Permission'; 
     66$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 Administration » Albums » Properties page.'; 
     67$lang['first_contact_title26'] = ''; 
     68$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.'; 
     69$lang['first_contact_title27'] = ''; 
     70$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.'; 
     71$lang['first_contact_title28'] = 'Configuration'; 
     72$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.'; 
     73$lang['first_contact_title29'] = 'Configuration->Options->General'; 
     74$lang['first_contact_stp29'] = 'Here, on that first page, you will set the essential and basic configuration of your gallery.'; 
     75$lang['first_contact_title30'] = ''; 
     76$lang['first_contact_stp30'] = 'Let\'s start by changing the tittle'; 
     77$lang['first_contact_title31'] = ''; 
     78$lang['first_contact_stp31'] = 'Then the banner, which will be displayed on top of every pages. As you can see, HTML tags are allowed here. You can also use the %gallery_title% tag to display the tittle you just typed above.'; 
     79$lang['first_contact_title32'] = ''; 
     80$lang['first_contact_stp32'] = 'Now save you changes'; 
     81$lang['first_contact_title33'] = 'Guest settings'; 
     82$lang['first_contact_stp33'] = 'Just a final word about the options, the \'Guest settings\' page is to set the preferences of unregistered visitors. Each time Piwigo refers to \'guest\' that means unregistered visitors.<br>Let\'s continue about Configuration: click on Configuration->Themes or just hit Next.'; 
     83$lang['first_contact_title34'] = 'Themes'; 
     84$lang['first_contact_stp34'] = 'Themes are one of the three way to customize your Piwigo, with Plugins and Templates. Themes installed are listed here.<br>More than one theme can be enabled: users can change their theme by choosing one among the one enabled here, if the option \'Allow user customization\' is checked on the Option page.'; 
     85$lang['first_contact_title35'] = 'Themes'; 
     86$lang['first_contact_stp35'] = 'Themes can also be set as Default, which means that\'s the theme for unregistred visitors (guests, you remember?) and any new registred user will be have this theme. But for any previously registred users, the theme won\'t change until you do it from the User Management page or you disable their theme: be carefull, you might disturb your users by changing their whole display.'; 
     87$lang['first_contact_title36'] = 'Themes'; 
     88$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.'; 
     89$lang['first_contact_title37'] = 'Themes'; 
     90$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 Plugin->Manage'; 
     91$lang['first_contact_title38'] = 'Plugins'; 
     92$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 admistrators users to upload without entering to the administration part.'; 
     93$lang['first_contact_title39'] = 'Plugins'; 
     94$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.'; 
     95$lang['first_contact_title40'] = ''; 
     96$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.'; 
     97$lang['first_contact_title41'] = ''; 
     98$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!'; 
     99$lang['first_contact_title42'] = 'Languages'; 
     100$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 availble, the language set by default is used.'; 
     101$lang['first_contact_title43'] = 'It\'s been a great time'; 
     102$lang['first_contact_stp43'] = 'This tour was quite long, but we only have seen a small part of how powerfull 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.'; 
    10103$lang[''] = ''; 
    11104$lang[''] = ''; 
  • extensions/TakeATour/main.inc.php

    r28098 r28100  
    1717if ( isset($_POST['submited_tour']) and in_array($_POST['submited_tour'], $avalaible_tour) and defined('IN_ADMIN') and IN_ADMIN ) 
    1818{ 
     19  check_pwg_token(); 
    1920  pwg_set_session_var('tour_to_launch', $_POST['submited_tour']); 
    2021  global $TAT_restart; 
     
    6263 
    6364 
    64 /* 
    65 add_event_handler('init', 'TAT_add_js_css'); 
    66 function TAT_add_js_css() 
     65add_event_handler('loc_end_help','TAT_help'); 
     66function TAT_help() 
    6767{ 
    68   $avalaible_tour = array('first_contact', 'privacy', 'picture_protection'); 
    69  
    70   if ( isset($_POST['submited_tour']) and in_array($_POST['submited_tour'], $avalaible_tour) and defined('IN_ADMIN') and IN_ADMIN ) 
    71   { 
    72     $tour_to_launch = $_POST['submited_tour']; 
    73   } 
    7468  global $template; 
    7569  load_language('plugin.lang', PHPWG_PLUGINS_PATH .'TakeATour/'); 
    76   $template->set_filename('TAT_js_css', PHPWG_PLUGINS_PATH.'TakeATour/tpl/js_css.tpl'); 
    77   $template->parse('TAT_js_css');//http://piwigo.org/forum/viewtopic.php?id=23248 
    78   $template->set_filename('TAT_tour_tpl', PHPWG_PLUGINS_PATH.'TakeATour/tpl/'.$tour_to_launch.'.tpl'); 
    79   $template->parse('TAT_tour_tpl'); 
    80 }*/ 
     70  $template->set_prefilter('help', 'TAT_help_prefilter'); 
     71} 
     72function TAT_help_prefilter($content, &$smarty) 
     73{ 
     74   
     75  $search = '<div id="helpContent">'; 
     76  $replacement = '<div id="helpContent"> 
     77<fieldset> 
     78<legend>{\'Visit your Piwigo!\'|@translate}</legend> 
     79<p class="nextStepLink"><a href="admin.php?page=plugin-TakeATour">{\'Take a tour and discover the features of your Piwigo gallery » Go to the available tours\'|@translate}</a></p> 
     80</fieldset>'; 
     81  return(str_replace($search, $replacement, $content)); 
     82 
     83} 
     84add_event_handler('loc_end_no_photo_yet','TAT_no_photo_yet'); 
     85function TAT_no_photo_yet() 
     86{ 
     87  global $template; 
     88  load_language('plugin.lang', PHPWG_PLUGINS_PATH .'TakeATour/'); 
     89  $template->set_prefilter('no_photo_yet', 'TAT_no_photo_yet_prefilter'); 
     90  $template->assign( 
     91  array( 
     92    'F_ACTION' => get_root_url().'admin.php', 
     93    'pwg_token' => get_pwg_token() 
     94    ) 
     95  ); 
     96} 
     97function TAT_no_photo_yet_prefilter($content, &$smarty) 
     98{ 
     99   
     100  $search = '<div class="bigButton"><a href="{$next_step_url}">{\'I want to add photos\'|@translate}</a></div>'; 
     101  $replacement = '<form class="bigButton" action="{$F_ACTION}" method="post"> 
     102  <input type="hidden" name="submited_tour" value="first_contact"> 
     103  <input type="hidden" name="pwg_token" value="{$pwg_token}"> 
     104  <input type="submit" name="button2" id="button2" value="{\'I want to discover my gallery and add photos\'|@translate}"> 
     105</form> 
     106<div class="bigButton"><a href="{$next_step_url}">{\'I want to add photos\'|@translate}</a></div>'; 
     107  return(str_replace($search, $replacement, $content)); 
     108} 
     109 
    81110add_event_handler('get_admin_plugin_menu_links', 'TAT_admin_menu' ); 
    82111function TAT_admin_menu($menu) 
  • extensions/TakeATour/tpl/admin.tpl

    r28097 r28100  
    99    <form action="{$F_ACTION}" method="post"> 
    1010      <input type="hidden" name="submited_tour" value="first_contact"> 
     11      <input type="hidden" name="pwg_token" value="{$pwg_token}"> 
    1112      <input type="submit" name="button2" id="button2" value="{'Start the Tour'|@translate}"> 
    1213    </form> 
Note: See TracChangeset for help on using the changeset viewer.