| 1 |
<?php
|
| 2 |
// $Id: deadwood.help.inc,v 1.2 2008/07/23 15:19:56 solotandem Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Generate version upgrade code from 5.x to 6.x.
|
| 7 |
*
|
| 8 |
* Copyright 2008 by Jim Berry ("solotandem", http://drupal.org/user/240748)
|
| 9 |
*/
|
| 10 |
|
| 11 |
/**
|
| 12 |
* Implementation of hook_help().
|
| 13 |
*/
|
| 14 |
function deadwood_help($path) {
|
| 15 |
$input = file_directory_path() . '/' . variable_get('deadwood_dir', DEADWOOD_IN);
|
| 16 |
$output = file_directory_path() . '/' . variable_get('goodwood_dir', DEADWOOD_OUT);
|
| 17 |
switch ($path) {
|
| 18 |
case 'admin/settings/deadwood/list':
|
| 19 |
return tp('This is a list of the variables used by the module conversion suite.');
|
| 20 |
case 'admin/settings/deadwood/api':
|
| 21 |
return tp('The purpose of this module is to automate as much as possible the task of updating a contributed module for Drupal API changes.' .
|
| 22 |
' This particular version of the module helps update the 5.x version of a contributed module to the version 6.x API.') .
|
| 23 |
tp(' The Drupal API changes from version 5.x to 6.x are listed below.' .
|
| 24 |
' The second column indicates the availability of conversion code. Check the box next to each category to be included in the set of default conversions applied.' .
|
| 25 |
' The default choices can be overridden on the !link page.',
|
| 26 |
array('!link' => l(t('Conversions Build'), 'admin/build/deadwood')));
|
| 27 |
case 'admin/build/deadwood':
|
| 28 |
return tp('The purpose of this module is to automate as much as possible the task of updating a contributed module for Drupal API changes.' .
|
| 29 |
' This particular module helps update the 5.x version of a contributed module to the version 6.x API.' .
|
| 30 |
' For specific instructions on this page and the module conversion process, click the "more help" link below.');
|
| 31 |
case 'admin/help#deadwood':
|
| 32 |
return tp('The purpose of this module is to automate as much as possible the task of updating a contributed module for Drupal API changes.' .
|
| 33 |
' This particular module helps update the 5.x version of a contributed module to the version 6.x API.') .
|
| 34 |
tp('The conversion process involves searching the module files (i.e., those files with extensions of .info, .install, .module, .inc and .php) for 5.x syntax and replacing the text with the 6.x equivalent.' .
|
| 35 |
' In many cases, this can be easily done in an automated fashion.' .
|
| 36 |
' However, some of the API changes do not easily lend themselves to search and replace automation.' .
|
| 37 |
' In those cases, and when a conversion routine has not been provided, manual intervention by the module maintainer is required.') .
|
| 38 |
tp('As a module updater, you may want to restrict the automated conversions that are performed by this module. The default conversions applied are !link.',
|
| 39 |
array('!link' => l(t('set here'), 'admin/settings/deadwood/api'))) .
|
| 40 |
tp('<b>Conversion Process</b>') .
|
| 41 |
tp('Begin the conversion process by uploading your module\'s files to a directory beneath the module input directory (currently set to !input).' .
|
| 42 |
' A directory (with the same name) for the converted files will automatically be created for you beneath the module output directory (currently set to !output).' .
|
| 43 |
' You may define the name of the module input and output directories !link.',
|
| 44 |
array('!input' => $input,
|
| 45 |
'!output' => $output,
|
| 46 |
'!link' => l(t('here'), 'admin/settings/deadwood'))) .
|
| 47 |
tp('To perform the conversions, go to the !link page, select the appropriate runtime parameters based on the instructions below, and click the Run button.' .
|
| 48 |
' In the instructions below, references to checkboxes and other interface items apply to the build page.',
|
| 49 |
array('!input' => $input,
|
| 50 |
'!link' => l(t('Conversions Build'), 'admin/build/deadwood'))) .
|
| 51 |
tp('To convert 5.x files to 6.x files do the following:') .
|
| 52 |
t('<ol>
|
| 53 |
<li>Select the file types to convert by checking the appropriate boxes in the table.</li>
|
| 54 |
<li>Select the directory containing the files to be converted.</li>
|
| 55 |
<li>Select the conversions to be done by expanding the "Conversions to apply" fieldset and checking the appropriate boxes therein. The boxes will be initially set based on the default conversions you defined !link.</li>
|
| 56 |
<li>Click the Run button.</li>
|
| 57 |
</ol>
|
| 58 |
The conversions will be done as follows:
|
| 59 |
<ol>
|
| 60 |
<li>The selected directory in the module input directory (!input) will be copied to the module output directory (!output).</li>
|
| 61 |
<li>Files in the output directory will be reviewed one at a time and the selected conversions applied.</li>
|
| 62 |
</ol>
|
| 63 |
After the automated conversions are made:
|
| 64 |
<ol>
|
| 65 |
<li>Review the changes made (using your favorite directory or file comparison utility).</li>
|
| 66 |
<li>Review the "TODO" comments and manually change any remaining conversion items.</li>
|
| 67 |
<li>Copy the directory from the module output directory to the 6.x installation directory for your contributed modules (e.g., sites/all/modules or sites/default/modules).</li>
|
| 68 |
<li>Install the module through the !install and test it. Good luck!</li>
|
| 69 |
</ol>',
|
| 70 |
array('!input' => $input,
|
| 71 |
'!output' => $output,
|
| 72 |
'!link' => l(t('here'), 'admin/settings/deadwood/api'),
|
| 73 |
'!install' => l(t('Drupal interface'), 'admin/build/modules'))) .
|
| 74 |
tp('<b>Manual Changes</b>') .
|
| 75 |
tp('In some cases, if syntax conversion was not made for a particular conversion item, we have attempted to highlight the applicable portions of the code with a "TODO" message or to provide a single message at the top of the file.' .
|
| 76 |
' As the marking of code is not the primary objective of this module, you may want to install the !coder and use it to mark the areas in your module\'s code needing manual review.',
|
| 77 |
array('!coder' => l(t('Coder Module'), 'http://drupal.org/project/coder/'))) .
|
| 78 |
tp('<b>Feedback</b>') .
|
| 79 |
tp('If any of the automated conversions are not successful with your module, please submit a project issue to the !issue if you have reason to believe the code could be changed to handle your module\'s code.' .
|
| 80 |
' If you can supply a patch for the change, that would be greatly appreciated too.',
|
| 81 |
array('!issue' => l(t('Deadwood Module'), 'http://drupal.org/project/deadwood/')));
|
| 82 |
}
|
| 83 |
}
|