View Issue Details

IDProjectCategoryView StatusLast Update
0015459phpList 3 applicationPlugin APIpublic12-05-11 00:38
Reporteradrian15 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Product VersionFuture developments 
Target VersionFixed in Version 
Summary0015459: Wizard plugin
DescriptionThis is the wizard plugin.

Current features:
-----------------
* wizard basic algorithm that lets inform the user what it is the current step, previous step and next step or how to go to first step. Wizard basic algorithm also includes description of the current step.

* Three wizard modes: beginner, medium and advanced.

** Beginner is the default mode that tries to show the most basic options involving sending an email to a test mailing list.
** Medium mode lets you add several users at the same time while it hides some non-common options.
** Advanced mode shows you most every option with its explanation.

* Wizard configure page lets you:
** Set up if configure is no longer the wizard first step (usually you only need to modify this screen once).
** You can turn on or off the wizard without touching the wizard.php file but from the user interface.
** You can select among the three wizard modes: beginner, medium, advanced

* Automatically selected options: Default installation, without the need of user visiting wizard configure page lets you:
** Use the wizard
** Enable configure page
** Enable beginner mode

Discarded from development:
---------------------------
* Adding buttons so that list, user, template, pages can be autocompleted with example values.
* Adding some arrows/images/buttons to make clear the previous and next buttons.
Additional Information* This patch was designed with svn revision 1703 in mind. I suppose it will work in any 2.11 version (aka current svn) but it will fail in 2.10 version because I have read somewhere that there were many changes from the 2.10 to the 2.11 plugin management, but you are free to try it.

* This patch depends on two patches which are found on theses issues: #15457 and #15458. Please relate it to them.

* There might be some buttons, options or links that are not named exactly as they are because development was made with only Spanish version activated.
TagsNo tags attached.

Relationships

related to 0015457 new Display Header function added to plugins functionality 
related to 0015458 resolvedmichiel Extend i18n functionality for plugins 
related to 0015460 new Wizard plugin - Spanish i18n 
related to 0003292 new plugin API functionality 

Activities

27-04-10 11:14

 

wizard_D03_wizard_plugin_english.patch (28,459 bytes)
diff -urN wizard_D03_plugins_i18n/lists/admin/plugins/wizard/configure.php wizard_D04_wizard_plugin_english/lists/admin/plugins/wizard/configure.php
--- wizard_D03_plugins_i18n/lists/admin/plugins/wizard/configure.php	1970-01-01 01:00:00.000000000 +0100
+++ wizard_D04_wizard_plugin_english/lists/admin/plugins/wizard/configure.php	2010-04-12 18:59:02.000000000 +0200
@@ -0,0 +1,56 @@
+<?php
+
+include dirname(__FILE__).'/header.php';
+
+$pl = $GLOBALS['plugins']['wizard'];
+
+if (!empty($_POST) && is_array($_POST)) {
+  foreach ($pl->configvars as $var => $desc) {
+    if (isset($_POST[$var])) {
+      $pl->writeConfig($var,$_POST[$var]);
+    }
+  }
+  print '<div class="info">'.$GLOBALS['I18N']->get('Changes Saved').'</div>';
+}  
+print $pl->menu();
+
+print '<form method="post" action="">';
+print '<table>';
+foreach ($pl->configvars as $var => $desc) {
+  print '<tr>';
+  print '<td>'.$GLOBALS['I18N']->get($desc[1]).'</td>';
+  print '<td>'.$pl->displayConfig($var).'</td>';
+  print '</tr>';
+}
+
+print '<tr><td colspan=2><input type="submit" name="save" value="'.htmlspecialchars($GLOBALS['I18N']->get('Save Changes')).'"></td></tr>';
+
+print '</table>';
+print '</form>';
+
+print $GLOBALS['I18N']->get('beginner').' :'. $GLOBALS['I18N']->get('beginnerDescription');
+print '</br></br>';
+print $GLOBALS['I18N']->get('medium').' :'. $GLOBALS['I18N']->get('mediumDescription');
+print '</br></br>';
+print $GLOBALS['I18N']->get('advanced').' :'. $GLOBALS['I18N']->get('advancedDescription');
+print '<hr>';
+print $GLOBALS['I18N']->get('Current mode')  . ': '. $pl->getMode();
+print '</br></br>';
+
+if ($pl->getConfig('enabled') == null) {
+  print $GLOBALS['I18N']->get('Wizard is automatically enabled') ;
+} elseif  ($pl->myIsEnabled()) {
+    print $GLOBALS['I18N']->get('Wizard is manually enabled');
+  } else {
+    print $GLOBALS['I18N']->get('Wizard is manually disabled');
+  }
+
+print '</br></br>';
+
+if ($pl->getConfig('configure') == null) {
+  print $GLOBALS['I18N']->get('Configure page is automatically enabled') ;
+} elseif  ($pl->isConfigure()) {
+    print $GLOBALS['I18N']->get('Configure page is manually enabled');
+  } else {
+    print $GLOBALS['I18N']->get('Configure page is manually disabled');
+  }
\ No hay ningún carácter de nueva línea al final del fichero
diff -urN wizard_D03_plugins_i18n/lists/admin/plugins/wizard/lan/en/configure.php wizard_D04_wizard_plugin_english/lists/admin/plugins/wizard/lan/en/configure.php
--- wizard_D03_plugins_i18n/lists/admin/plugins/wizard/lan/en/configure.php	1970-01-01 01:00:00.000000000 +0100
+++ wizard_D04_wizard_plugin_english/lists/admin/plugins/wizard/lan/en/configure.php	2010-04-12 18:59:02.000000000 +0200
@@ -0,0 +1,22 @@
+<?
+$lan = array(
+'beginner' => 'Beginner',
+'medium' => 'Medium',
+'advanced' => 'Advanced',
+'beginnerDescription' => 'Beginner is the default mode that tries to show the most basic options involving sending an email to a test mailing list',
+'mediumDescription' => 'Medium mode lets you add several users at the same time while it hides some non-common options.',
+'advancedDescription' => 'Advanced mode shows you most every option with its explanation.',
+
+'Wizard is automatically enabled' => 'Wizard is automatically enabled',
+'Wizard is manually enabled' => 'Wizard is manually enabled',
+'Wizard is manually disabled' => 'Wizard is manually disabled',
+
+'Configure page is automatically enabled' => 'Configure page is automatically enabled',
+'Configure page is manually enabled' => 'Configure page is manually enabled',
+'Configure page is manually disabled' => 'Configure page is manually disabled',
+
+'Current mode' => 'Current mode',
+
+
+);
+?>
\ No hay ningún carácter de nueva línea al final del fichero
diff -urN wizard_D03_plugins_i18n/lists/admin/plugins/wizard/lan/en/main.php wizard_D04_wizard_plugin_english/lists/admin/plugins/wizard/lan/en/main.php
--- wizard_D03_plugins_i18n/lists/admin/plugins/wizard/lan/en/main.php	1970-01-01 01:00:00.000000000 +0100
+++ wizard_D04_wizard_plugin_english/lists/admin/plugins/wizard/lan/en/main.php	2010-04-12 18:59:02.000000000 +0200
@@ -0,0 +1,7 @@
+<?
+$lan = array(
+'Wizard plugin Main page' => 'Wizard plugin Main page',
+
+
+);
+?>
\ No hay ningún carácter de nueva línea al final del fichero
diff -urN wizard_D03_plugins_i18n/lists/admin/plugins/wizard/main_lan/en/common.php wizard_D04_wizard_plugin_english/lists/admin/plugins/wizard/main_lan/en/common.php
--- wizard_D03_plugins_i18n/lists/admin/plugins/wizard/main_lan/en/common.php	1970-01-01 01:00:00.000000000 +0100
+++ wizard_D04_wizard_plugin_english/lists/admin/plugins/wizard/main_lan/en/common.php	2010-04-12 18:59:02.000000000 +0200
@@ -0,0 +1,85 @@
+<?php
+
+# file with common texts for translation
+
+$lan = array(
+
+'beginner' => 'Principiante (beginner)',
+'medium' => 'Medio (medium)',
+'advanced' => 'Avanzado (advanced)',
+  'WizardStartStr' => 'This is the tutorial\'s first step. You can <a href="?page=main&pi=wizard">set it up here</a>.</br></br> Please click on the next link to start the Wizard',
+  'nextStepStr' => 'Next step is:',
+  'previousStepStr' => 'Previous step was:',
+  'lastStepStr' => 'This is the tutorial\'s last step. You can <a href="?page=main&pi=wizard">set it up here</a>. ',
+  'defaultTitle' => 'Wizard',
+  'defaultDescription' => 'This wizard will guide you through phplist basic usage. You can <a href="?page=main&pi=wizard">setup how wizard works here</a>.',
+
+  'configureDescription' => 'In this page you can change values like the <b>email footer</b> that your list members receive. You have more detailed information below.</br>If you want to change any value please click on <b>edit</b> link next to the value.</br><b>This wizard step is used usually once</b> although from time to time you might want to change some data here.',
+  'configureTitle' => '<b>Configure Basic Details</b>',
+
+  'listDescription' => 'In order to send emails to your public, your public has to be assigned to a list. Having several lists will let you focuss your emails in different categories: Clients, General public, Workers, et caetera.<ul><li>You just have to click on <b>Add list</b> link below.</li><li>You can also <b>edit</b> a current list.</li><li> If you already have your list created you can skip this step safely.</li></ul>',
+  'listTitle' => '<b>Add a list</b>',
+
+  'editlistDescription' => 'You have to fill in the following values:<ul><li> <b>List name</b></li><li><b>Public list (list on the frontend)</b> has to be ticked (V) if you want the list to actually work.</li><li> Finally <b>List description</b> describes what the list offers to the their users or what it is the list public.</li></ul> When you have finished editing the list click on <b>Save</b> button.',
+  'editlistTitle' => '<b>Create (or edit) a list</b>',
+
+  'processqueueDescription' => 'Here you start the actual message send (if cron is not enabled).Here you will see a report on what is the message sending status.',
+  'processqueueTitle' => '<b>Process Messages Queue</b>',
+  'sendDescription' => 'This is a wizard special page. We are going to learn how to send messages with all the possible options.</br></br><b>SCREEN I</b></br></br>
+<ul><li> Usually you should click on <b>start a new message</b>.</li><li> If you want to edit other message click on message\'s <b>edit</b> link.</li></ul></br><b>SCREEN II</b></br></br><ul><li>Click on <b>Content</b> tab (where it says: Content) in order to begin Send Wizard.</li></ul>',
+  'sendTitle' => 'Send',
+
+
+  'ContentsendDescription' => 'Here you should enter message main content. If you are going to use a template (We will talk about templates in another tab) you are not going to need to write neither header nor footer.</br> If you scroll over icons your mouse you will see its descriptions. Most interesting ones are:<ul><li>Insert/Edit Link</li><li>Insert/Edit Image</li><li>Preview</li></ul> There is an additional footer (which it is common to all messages) which comes from <a href="?page=configure">configure</a> page value. You can edit it also so that message has a different footer.</br></br> Do not forget to click on <b>Save Changes</b> button before going to next tutorial step.',
+  'ContentsendTitle' => 'Send - Content',
+
+
+  'FormatsendDescription' => 'We recommend to use <b>Send as HTML</b></br>Here we should choose previously created template in the <b>-- choose one.</b> dropbox.</br></br> Do not forget to click on <b>Save Changes</b> button before going to next tutorial step.',
+  'FormatsendTitle' => 'Send - Format',
+
+  'SchedulingsendDescription' => 'Ask your lists provider if cron is enabled. If it is enabled you can select on which date and hour the message should be sent.</br> This feature might be useful in special dates like the Thanksgiving day. You can send a message without being i the office.</br></br> Do not forget to click on <b>Save Changes</b> button before going to next tutorial step.',
+  'SchedulingsendTitle' => 'Send - Scheduling',
+
+  'CriteriasendDescription' => 'If criteria have been activated you can selec them so that you can select in more detail which it is your specific target for this email.</br></br> Do not forget to click on <b>Save Changes</b> button before going to next tutorial step.',
+  'CriteriasendTitle' => 'Send - Criteria',
+
+  'MiscsendDescription' => 'we can set an email so that it receives a message whenever email sending has just began or finished. This is quite useful when a boss wants to know if a given email has been set and, whatever the reason, you cannot contact him/her. </br></br> Do not forget to click on <b>Save Changes</b> button before going to next tutorial step.',
+  'MiscsendTitle' => 'Enviar - Misc',
+
+  'ListssendDescription' => '<b>OPTIONAL</b></br></br>You can write an email in the box near <b>Send test email</b> button and click <b>Send test email</b> button. </br> This action sends an identical mail to the one who would receive list subscribers but only to this specific email.<b>Do not forget that emails have to be previously registered to the mailing list where you would like to send the final message.</b></br></br><b>COMPULSORY</b></br></br>Just choose lists where you want to send the message with a click on verificatio boxes.</br>.</br>Click on <b>Save Changes</b> button.</br>Finally click on <b>Send message to selected lists</b> button</br></br>',
+  'ListssendTitle' => 'Send - Lists',
+
+  'templateDescription' => 'Here you can edit templates. Templates lets you define a common header and footer for your emails. De esta manera se mejora tu imagen corporativa.</br>[CONTENT] is an special string that once you are writing a definitive mail is being substitued with its content. So text that it is written before [CONTENT] string is going to mail\'s header and text after [CONTENT] string will be mail\'s footer.</br></br>Here there is a template example:
+<pre>
+I am the header</br>
+<b>[CONTENT]</b></br>
+I am the footer
+</pre>.</br> If we send an email which content is: <b>Incredible offer</b> Sent mail is like this:</br>
+<pre>
+I am the header</br>
+<b>Incredible offer</b></br>
+I am the footer
+</pre>
+<ul>
+<li><b>Header example</b>: Entreprise name and logo.</li>
+<li><b>Footer example</b>: Legal warning about email content</li>
+</ul>
+</br></br>
+Finally:
+<ul>
+<li>We should write template name in: <b>This template\'s name</b>.</b></li>
+<li>We should click on <b>Save changes</b> button.</li>
+</ul>
+',
+  'templateTitle' => '<b>Edit template</b>',
+
+  'templatesDescription' => 'Here you can edit templates that you have edited previosly or add new templates. We are going to add a new template that might serve us as a template email for emails that are targeted to general public..</br></br>Click on <b>add template</b> button.',
+    'templatesTitle' => '<b>Add templates</b>',
+
+  'userDescription' => 'Here you can add users one by one.</br>You have to fill in:<ul><li><b>Email</b>: Write email.</li><li><b>Is this user confirmed (1/0)</b>:Write always an 1 here so that you can send emails to the above email. </li><li><b>Send this user HTML emails</b>: It should be set to 1 so that you do not have problems when sending images in emails.</li><li><b>Mailinglist Membership:</b> Check the mailing list where you want to add this email. </li><li>Finally you have to click on <b>Save Changes</b></li></ul> If you want to add several users/emails at once please go to next step.',
+  'userTitle' => '<b>Add a User</b>',
+
+  'import1Description' => 'The previous step is to generate in your computer with all the emails you want to import.</br><ul><li>Click on <b>Browse...</b> button.</li><li>Choose the previous generated csv.</li><li>First of all you should check the <b>Test Output</b> checkbox.</li><li>Choose: <b>Confirm inmediately</b>.</li><li>Click on <b>Import</b> button.</li><li>Once we have seen that csv would have been imported ok we are going to <b>actually</b> import it.</li></ul></br><ul><li>Click on  <b>Button...</b> button.</li><li>We choose previously generated csv file.</li><li>We uncheck <b>Test Output</b> option.</li><li>Usually it is recommended to choose: <b>Confirm inmediately</b>.</li><li>Do not forget to check <b>I prefer to receive emails in HTML format</b>. It is easier in order to send images.</li><li>Click on <b>Import</b> button.</li></ul>',
+  'import1Title' => '<b>Add several emails at once.</b>'
+);
+?>
\ No hay ningún carácter de nueva línea al final del fichero
diff -urN wizard_D03_plugins_i18n/lists/admin/plugins/wizard/main.php wizard_D04_wizard_plugin_english/lists/admin/plugins/wizard/main.php
--- wizard_D03_plugins_i18n/lists/admin/plugins/wizard/main.php	1970-01-01 01:00:00.000000000 +0100
+++ wizard_D04_wizard_plugin_english/lists/admin/plugins/wizard/main.php	2010-04-12 18:59:02.000000000 +0200
@@ -0,0 +1,13 @@
+
+
+
+<?php
+
+print '<h1>' . $GLOBALS['I18N']->get('Wizard plugin Main page') . '</h1>';
+
+if (!class_exists('wizard')) return;
+
+$pl = $GLOBALS['plugins']['wizard'];
+print $pl->menu();
+
+
diff -urN wizard_D03_plugins_i18n/lists/admin/plugins/wizard.php wizard_D04_wizard_plugin_english/lists/admin/plugins/wizard.php
--- wizard_D03_plugins_i18n/lists/admin/plugins/wizard.php	1970-01-01 01:00:00.000000000 +0100
+++ wizard_D04_wizard_plugin_english/lists/admin/plugins/wizard.php	2010-04-12 18:59:02.000000000 +0200
@@ -0,0 +1,501 @@
+<?php
+class wizard extends phplistPlugin {
+  var $name = "Wizard";
+  var $coderoot = "plugins/wizard/";
+  var $enabled= 1;
+
+  var $configvars = array(
+    # config var    array( type, name )
+    'enabled' => array('radio','ON/OFF',array('1' => 'ON','0' => 'OFF')),
+    'configure' => array('radio','Configure page',array('1' => 'ON','0' => 'OFF')),
+    'mode' => array('radio','Wizard Mode',
+      array('beginner' => 'beginner',
+	    'medium' => 'medium',
+	    'advanced' => 'advanced')),
+
+
+  );
+
+
+
+  function myIsEnabled() {
+    if (($this->getConfig('enabled')) == '0') 
+    return false; 
+    else return true;
+  }
+
+  function isConfigure() {
+    if (($this->getConfig('configure')) == '0') 
+    return false; 
+    else return true;
+  }
+
+
+  function getMode() {
+  if (!($this->getConfig('mode'))) 
+  return 'beginner';
+  else return ($this->getConfig('mode'));
+  }
+
+  function wizard() {
+  }
+
+  function menu() {
+    return '<div class="menu">[ '.PageLink2('configure',$GLOBALS['I18N']->get('Configure')).' | '.
+    ' ]</div><br/>';
+  }
+
+  function adminmenu() {
+  }
+
+
+  function i18nLanguageDir() {
+    return $this->coderoot . "main_lan" . "/";
+  }
+
+
+  function displayHeader($info) {
+  $page=$info;
+
+  $mode = $this->getMode();
+
+
+  if ($mode == "advanced") {
+
+	$HeaderStringArray = array(
+
+	  "default" => array (
+		    "title" => $GLOBALS['I18N']->get('defaultTitle'),
+		    "description" => $GLOBALS['I18N']->get('defaultDescription'),
+		    "nextstep" => "configure",
+		    ),	
+
+	  "configure" => array (
+		    "title" => $GLOBALS['I18N']->get('configureTitle'),
+		    "description" => $GLOBALS['I18N']->get('configureDescription'),
+		    "nextstep" => "list",
+		    "begin" => "true",
+		    ),	
+
+	  "list" => array (
+		    "title" => $GLOBALS['I18N']->get('listTitle'),
+		    "description" => $GLOBALS['I18N']->get('listDescription'),
+		    "nextstep" => "editlist",
+		    "previousstep" => "configure",
+		    ),	
+
+	  "editlist" => array (
+		    "title" => $GLOBALS['I18N']->get('editlistTitle'),
+		    "description" => $GLOBALS['I18N']->get('editlistDescription'),
+		    "nextstep" => "user",
+		    "previousstep" => "list",
+		    ),	
+
+	  "user" => array (
+		    "title" => $GLOBALS['I18N']->get('userTitle'),
+		    "description" => $GLOBALS['I18N']->get('userDescription'),
+		    "nextstep" => "import1",
+		    "previousstep" => "editlist",
+		    ),	
+
+	  "import1" => array (
+		    "title" => $GLOBALS['I18N']->get('import1Title'),
+		    "description" => $GLOBALS['I18N']->get('import1Description'),
+		    "nextstep" => "templates",
+		    "previousstep" => "user",
+		    ),	
+
+	  "templates" => array (
+		    "title" => $GLOBALS['I18N']->get('templatesTitle'),
+		    "description" => $GLOBALS['I18N']->get('templatesDescription'),
+		    "nextstep" => "template",
+		    "previousstep" => "import1",
+		    ),	
+
+	  "template" => array (
+		    "title" => $GLOBALS['I18N']->get('templateTitle'),
+		    "description" => $GLOBALS['I18N']->get('templateDescription'),
+		    "nextstep" => "send",
+		    "previousstep" => "templates",
+		    ),	
+
+	  "send" => array (
+		    "title" => $GLOBALS['I18N']->get('sendTitle'),
+		    "description" => $GLOBALS['I18N']->get('sendDescription'),
+		    "previousstep" => "template",
+		    ),	
+
+
+	  "processqueue" => array (
+		    "title" => $GLOBALS['I18N']->get('processqueueTitle'),
+		    "description" => $GLOBALS['I18N']->get('processqueueDescription'),
+		    "previousstep" => "send",
+		    "end" => "true",
+		    ),	
+	);
+
+	$SendStringArray = array(
+	  "Content" => array (
+		    "title" => $GLOBALS['I18N']->get('ContentsendTitle'),
+		    "description" => $GLOBALS['I18N']->get('ContentsendDescription'),
+		    "previousstep" => "send",
+		    "nexttab" => "Format",
+
+		    ),	
+	  "Format" => array (
+		    "title" => $GLOBALS['I18N']->get('FormatsendTitle'),
+		    "description" => $GLOBALS['I18N']->get('FormatsendDescription'),
+		    "nexttab" => "Scheduling",
+		    "previoustab" => "Content",
+		    ),	
+	  "Scheduling" => array (
+		    "title" => $GLOBALS['I18N']->get('SchedulingsendTitle'),
+		    "description" => $GLOBALS['I18N']->get('SchedulingsendDescription'),
+		    "nexttab" => "Criteria",
+		    "previoustab" => "Format",
+		    ),	
+	  "Criteria" => array (
+		    "title" => $GLOBALS['I18N']->get('CriteriasendTitle'),
+		    "description" => $GLOBALS['I18N']->get('CriteriasendDescription'),
+		    "nexttab" => "Misc",
+		    "previoustab" => "Scheduling",
+		    ),	
+	  "Misc" => array (
+		    "title" => $GLOBALS['I18N']->get('MiscsendTitle'),
+		    "description" => $GLOBALS['I18N']->get('MiscsendDescription'),
+		    "nexttab" => "Lists",
+		    "previoustab" => "Criteria",
+		    ),	
+	  "Lists" => array (
+		    "title" => $GLOBALS['I18N']->get('ListssendTitle'),
+		    "description" => $GLOBALS['I18N']->get('ListssendDescription'),
+		    "previoustab" => "Criteria",
+		    "nextstep" => "processqueue",
+		    ),	
+
+
+	);
+} elseif ($mode == "medium") {
+
+	$HeaderStringArray = array(
+
+	  "default" => array (
+		    "title" => $GLOBALS['I18N']->get('defaultTitle'),
+		    "description" => $GLOBALS['I18N']->get('defaultDescription'),
+		    "nextstep" => "configure",
+		    ),	
+
+	  "configure" => array (
+		    "title" => $GLOBALS['I18N']->get('configureTitle'),
+		    "description" => $GLOBALS['I18N']->get('configureDescription'),
+		    "nextstep" => "list",
+		    "begin" => "true",
+		    ),	
+
+	  "list" => array (
+		    "title" => $GLOBALS['I18N']->get('listTitle'),
+		    "description" => $GLOBALS['I18N']->get('listDescription'),
+		    "nextstep" => "editlist",
+		    "previousstep" => "configure",
+		    ),	
+
+	  "editlist" => array (
+		    "title" => $GLOBALS['I18N']->get('editlistTitle'),
+		    "description" => $GLOBALS['I18N']->get('editlistDescription'),
+		    "nextstep" => "user",
+		    "previousstep" => "list",
+		    ),	
+
+	  "user" => array (
+		    "title" => $GLOBALS['I18N']->get('userTitle'),
+		    "description" => $GLOBALS['I18N']->get('userDescription'),
+		    "nextstep" => "import1",
+		    "previousstep" => "editlist",
+		    ),	
+
+	  "import1" => array (
+		    "title" => $GLOBALS['I18N']->get('import1Title'),
+		    "description" => $GLOBALS['I18N']->get('import1Description'),
+		    "nextstep" => "templates",
+		    "previousstep" => "user",
+		    ),	
+
+	  "templates" => array (
+		    "title" => $GLOBALS['I18N']->get('templatesTitle'),
+		    "description" => $GLOBALS['I18N']->get('templatesDescription'),
+		    "nextstep" => "template",
+		    "previousstep" => "import1",
+		    ),	
+
+	  "template" => array (
+		    "title" => $GLOBALS['I18N']->get('templateTitle'),
+		    "description" => $GLOBALS['I18N']->get('templateDescription'),
+		    "nextstep" => "send",
+		    "previousstep" => "templates",
+		    ),	
+
+	  "send" => array (
+		    "title" => $GLOBALS['I18N']->get('sendTitle'),
+		    "description" => $GLOBALS['I18N']->get('sendDescription'),
+		    "previousstep" => "template",
+		    ),	
+
+
+	  "processqueue" => array (
+		    "title" => $GLOBALS['I18N']->get('processqueueTitle'),
+		    "description" => $GLOBALS['I18N']->get('processqueueDescription'),
+		    "previousstep" => "send",
+		    "end" => "true",
+		    ),	
+	);
+
+	$SendStringArray = array(
+	  "Content" => array (
+		    "title" => $GLOBALS['I18N']->get('ContentsendTitle'),
+		    "description" => $GLOBALS['I18N']->get('ContentsendDescription'),
+		    "previousstep" => "send",
+		    "nexttab" => "Format",
+
+		    ),	
+	  "Format" => array (
+		    "title" => $GLOBALS['I18N']->get('FormatsendTitle'),
+		    "description" => $GLOBALS['I18N']->get('FormatsendDescription'),
+		    "nexttab" => "Misc",
+		    "previoustab" => "Content",
+		    ),	
+	  "Misc" => array (
+		    "title" => $GLOBALS['I18N']->get('MiscsendTitle'),
+		    "description" => $GLOBALS['I18N']->get('MiscsendDescription'),
+		    "nexttab" => "Lists",
+		    "previoustab" => "Format",
+		    ),	
+	  "Lists" => array (
+		    "title" => $GLOBALS['I18N']->get('ListssendTitle'),
+		    "description" => $GLOBALS['I18N']->get('ListssendDescription'),
+		    "previoustab" => "Criteria",
+		    "nextstep" => "processqueue",
+		    ),	
+
+
+	);
+
+} else  { // Default = beginner
+
+	$HeaderStringArray = array(
+
+	  "default" => array (
+		    "title" => $GLOBALS['I18N']->get('defaultTitle'),
+		    "description" => $GLOBALS['I18N']->get('defaultDescription'),
+		    "nextstep" => "configure",
+		    ),	
+
+	  "configure" => array (
+		    "title" => $GLOBALS['I18N']->get('configureTitle'),
+		    "description" => $GLOBALS['I18N']->get('configureDescription'),
+		    "nextstep" => "list",
+		    "begin" => "true",
+		    ),	
+
+	  "list" => array (
+		    "title" => $GLOBALS['I18N']->get('listTitle'),
+		    "description" => $GLOBALS['I18N']->get('listDescription'),
+		    "nextstep" => "editlist",
+		    "previousstep" => "configure",
+		    ),	
+
+	  "editlist" => array (
+		    "title" => $GLOBALS['I18N']->get('editlistTitle'),
+		    "description" => $GLOBALS['I18N']->get('editlistDescription'),
+		    "nextstep" => "user",
+		    "previousstep" => "list",
+		    ),	
+
+	  "user" => array (
+		    "title" => $GLOBALS['I18N']->get('userTitle'),
+		    "description" => $GLOBALS['I18N']->get('userDescription'),
+		    "nextstep" => "send",
+		    "previousstep" => "editlist",
+		    ),	
+	  "send" => array (
+		    "title" => $GLOBALS['I18N']->get('sendTitle'),
+		    "description" => $GLOBALS['I18N']->get('sendDescription'),
+		    "previousstep" => "user",
+		    ),	
+
+
+	  "processqueue" => array (
+		    "title" => $GLOBALS['I18N']->get('processqueueTitle'),
+		    "description" => $GLOBALS['I18N']->get('processqueueDescription'),
+		    "previousstep" => "send",
+		    "end" => "true",
+		    ),	
+	);
+
+	$SendStringArray = array(
+	  "Content" => array (
+		    "title" => $GLOBALS['I18N']->get('ContentsendTitle'),
+		    "description" => $GLOBALS['I18N']->get('ContentsendDescription'),
+		    "previousstep" => "send",
+		    "nexttab" => "Lists",
+
+		    ),	
+	  "Lists" => array (
+		    "title" => $GLOBALS['I18N']->get('ListssendTitle'),
+		    "description" => $GLOBALS['I18N']->get('ListssendDescription'),
+		    "previoustab" => "Content",
+		    "nextstep" => "processqueue",
+		    ),	
+
+
+	);
+
+}
+
+
+
+
+
+    if ($this->getMode() == 'advanced') {
+      $first_page='configure';
+      $last_page='processqueue';
+      if (!($this->isConfigure())) {
+	$first_page='list';
+      }
+    }
+    elseif ($this->getMode() == 'medium') {
+      $first_page='configure';
+      $last_page='processqueue';
+      if (!($this->isConfigure())) {
+	$first_page='list';
+      }
+    } else {
+      $first_page='configure';
+      $last_page='processqueue';
+      if (!($this->isConfigure())) {
+	$first_page='list';
+      }
+
+    }
+    
+
+
+
+if (!($_GET["pi"] == null)) {
+  return null;
+}
+
+
+// If we have a tab it is a send wizard specific page
+// Either way it is a normal wizard page
+// Or finally it is not a wizard page (return null)
+    if (array_key_exists($_GET["tab"],$SendStringArray)) {
+	$tab=$_GET["tab"];
+    } elseif (!(array_key_exists($page,$HeaderStringArray))) 
+      {
+      if ($page == "home") {} 
+      else return null;
+      }
+
+  $str='';
+if ($page == "home") {
+  if ($HeaderStringArray["$first_page"]["description"]) {
+      $str.= $GLOBALS['I18N']->get('WizardStartStr');
+    $str.="</br></br";
+    $str.="<a href='?page=" .
+    $first_page . 
+    "'>". 
+    $HeaderStringArray["$first_page"]["title"].
+    "</a>";
+    }
+}
+
+
+  $str.=$HeaderStringArray["$page"]["title"];
+  $str.=" (" . $GLOBALS['I18N']->get($mode) ." )"; 
+  if ($SendStringArray["$tab"]["title"]) {
+    $str.="</br>";
+    $str.= $SendStringArray["$tab"]["title"] .
+    "</a>";
+
+    }
+  if ($HeaderStringArray["$page"]["previousstep"]) {
+    $str.="</br>";
+    $str.=$GLOBALS['I18N']->get('previousStepStr') . 
+    "<a href='?page=" .
+    $HeaderStringArray["$page"]["previousstep"] . 
+    "'>". 
+    $HeaderStringArray[($HeaderStringArray["$page"]["previousstep"])]["title"].
+    "</a>";
+
+    }
+  $str.="</br>";
+  if ($SendStringArray["$tab"]["previoustab"]) {
+    $str.="</br>";
+    $str.=$GLOBALS['I18N']->get('previousStepStr') . 
+    "<a href='?page=send&id=". $_GET["id"] ."&tab=".
+    $SendStringArray["$tab"]["previoustab"] . 
+    "'>". 
+    $SendStringArray[($SendStringArray["$tab"]["previoustab"])]["title"].
+    "</a>";
+
+    }
+
+  $str.="</br>";
+  // Hide step description if a tab description is available
+  if ($SendStringArray["$tab"]["description"]) {
+    $str.= $SendStringArray["$tab"]["description"];
+  } else {
+    $str.=$HeaderStringArray["$page"]["description"];
+  }
+
+  
+
+  if ($HeaderStringArray["$page"]["nextstep"]) {
+    $str.="</br>";
+    $str.=$GLOBALS['I18N']->get('nextStepStr') . 
+    "<a href='?page=" .
+    $HeaderStringArray["$page"]["nextstep"] . 
+    "'>". 
+    $HeaderStringArray[$HeaderStringArray["$page"]["nextstep"]]["title"].
+    "</a>";
+
+    }
+  $str.="</br>";
+
+  if ($SendStringArray["$tab"]["nextstep"]) {
+    $str.="</br>";
+    $str.=$GLOBALS['I18N']->get('nextStepStr') . 
+    "<a href='?page=" .
+    $SendStringArray["$tab"]["nextstep"] . 
+    "'>". 
+    $HeaderStringArray[$SendStringArray["$tab"]["nextstep"]]["title"].
+    "</a>";
+
+    }
+  $str.="</br>";
+
+  if ($SendStringArray["$tab"]["nexttab"]) {
+    $str.="</br>";
+    $str.=$GLOBALS['I18N']->get('nextStepStr') . 
+    "<a href='?page=send&id=". $_GET["id"] ."&tab=".
+    $SendStringArray["$tab"]["nexttab"] . 
+    "'>". 
+    $SendStringArray[$SendStringArray["$tab"]["nexttab"]]["title"].
+    "</a>";
+
+    }
+
+  if ($HeaderStringArray["$page"]["end"]) {
+    $str.="</br>";
+    $str.=$GLOBALS['I18N']->get('lastStepStr');
+
+    }
+
+
+  return $str; 
+
+
+  }
+}
+
+?>

27-04-10 15:33

 

E03_wizard_plugins_i18n_fix_wizard.patch (872 bytes)
diff -urN wizard2_E02_plugins_i18n_fix/lists/admin/plugins/wizard.php wizard2_E03_plugins_i18n_fix_wizard/lists/admin/plugins/wizard.php
--- wizard2_E02_plugins_i18n_fix/lists/admin/plugins/wizard.php	2010-04-12 22:43:31.000000000 +0200
+++ wizard2_E03_plugins_i18n_fix_wizard/lists/admin/plugins/wizard.php	2010-04-27 17:31:39.000000000 +0200
@@ -55,6 +55,7 @@
 
 
   function displayHeader($info) {
+  $this->needI18N = 1;
   $page=$info;
 
   $mode = $this->getMode();
@@ -381,6 +382,7 @@
 
 
 if (!($_GET["pi"] == null)) {
+  $this->needI18N = 0;
   return null;
 }
 
@@ -393,7 +395,7 @@
     } elseif (!(array_key_exists($page,$HeaderStringArray))) 
       {
       if ($page == "home") {} 
-      else return null;
+      else {  $this->needI18N = 0; return null;}
       }
 
   $str='';
@@ -491,7 +493,7 @@
 
     }
 
-
+  $this->needI18N = 0;
   return $str; 
 
 

adrian15

27-04-10 15:34

reporter   ~0050971

I have uploaded E03_wizard_plugins_i18n_fix_wizard.patch which fine tunes i18n support on wizard plugin so that it is only used when needed.

I had some problems with Spanish language and disabling rssmanager with the former patch.

Both patches should be applied one after the another. I mean, second patch is not a substitute for the first patch.

17-05-10 14:58

 

F07_wizards_ends_at_send_page_instead_of_processqueue.patch (2,313 bytes)
diff -urN saidi_E06_send_final_page_message_was_processed_ok//lists/admin/plugins/wizard.php saidi_E07_wizards_ends_at_send_page_instead_of_processqueue//lists/admin/plugins/wizard.php
--- saidi_E06_send_final_page_message_was_processed_ok//lists/admin/plugins/wizard.php	2010-05-15 21:39:37.000000000 +0200
+++ saidi_E07_wizards_ends_at_send_page_instead_of_processqueue//lists/admin/plugins/wizard.php	2010-05-15 22:24:29.000000000 +0200
@@ -171,7 +171,7 @@
 		    "title" => $GLOBALS['I18N']->get('ListssendTitle'),
 		    "description" => $GLOBALS['I18N']->get('ListssendDescription'),
 		    "previoustab" => "Criteria",
-		    "nextstep" => "processqueue",
+		    "end" => "true",
 		    ),	
 
 
@@ -274,7 +274,7 @@
 		    "title" => $GLOBALS['I18N']->get('ListssendTitle'),
 		    "description" => $GLOBALS['I18N']->get('ListssendDescription'),
 		    "previoustab" => "Criteria",
-		    "nextstep" => "processqueue",
+		    "end" => "true",
 		    ),	
 
 
@@ -328,7 +328,7 @@
 		    "title" => $GLOBALS['I18N']->get('processqueueTitle'),
 		    "description" => $GLOBALS['I18N']->get('processqueueDescription'),
 		    "previousstep" => "send",
-		    "end" => "true",
+		    
 		    ),	
 	);
 
@@ -344,7 +344,7 @@
 		    "title" => $GLOBALS['I18N']->get('ListssendTitle'),
 		    "description" => $GLOBALS['I18N']->get('ListssendDescription'),
 		    "previoustab" => "Content",
-		    "nextstep" => "processqueue",
+		    "end" => "true",
 		    ),	
 
 
@@ -358,20 +358,20 @@
 
     if ($this->getMode() == 'advanced') {
       $first_page='configure';
-      $last_page='processqueue';
+      $last_page='send';
       if (!($this->isConfigure())) {
 	$first_page='list';
       }
     }
     elseif ($this->getMode() == 'medium') {
       $first_page='configure';
-      $last_page='processqueue';
+      $last_page='send';
       if (!($this->isConfigure())) {
 	$first_page='list';
       }
     } else {
       $first_page='configure';
-      $last_page='processqueue';
+      $last_page='send';
       if (!($this->isConfigure())) {
 	$first_page='list';
       }
@@ -487,7 +487,7 @@
 
     }
 
-  if ($HeaderStringArray["$page"]["end"]) {
+  if (($HeaderStringArray["$page"]["end"]) || (($SendStringArray["$tab"]["end"]))) {
     $str.="</br>";
     $str.=$GLOBALS['I18N']->get('lastStepStr');
 

adrian15

17-05-10 15:01

reporter   ~0051013

I have added a third patch and changes default wizard behaviour.
Now it ends at send page instead of processqueue page.
It is like that because we assume that cron is enabled and setup ok (as in my company).

I would have liked to implement with a configure variable in plugin's configure page but I have not been able to implement it without repeating two much php code.

If you are reading this you are welcomed to implement that part.

adrian15