[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/module_builder/ -> README.txt (source)

   1  
   2  Welcome to module_builder.module! 
   3  This is a module designed to help expedite the process of creating custom 
   4  modules. Simply fill out the form, select the hooks you want and the 
   5  script will automatically generate a skeleton module file for you, 
   6  along with PHPDoc comments and function definitions.
   7  
   8  FEATURES
   9  --------
  10  * Automatically parses available hook names from CVS at your command...
  11    so help keep those files updated, won't you? ;)
  12  * Comes with some sample standard hook function declarations to get 
  13    you started and a default module header; but if you don't like those,
  14    simply rename the .template files to -custom.template instead and 
  15    create your own definitions!
  16  * Saves you the trouble of looking at api.drupal.org 50 times a day to 
  17    remember what arguments and what order different hooks use. Score one
  18    for laziness! ;)
  19  * Automatically selects hooks based on your needs.
  20  * Option allows you to turn off informative comments.
  21  
  22  INSTALL/CONFIG ON DRUPAL
  23  --------------
  24  1. Move this folder into your modules/ directory like you would any 
  25     other module.
  26  2. Enable it from administer >> modules.
  27  3. Go to administer >> settings >> module_builder and specify the path
  28     to save the hook documentation files.
  29  4. (On Drupal 5 and 6 only) The first time you visit the module builder form,
  30     the module will retrieve hook documentation from cvs.drupal.org and store it
  31     locally. 
  32     When you want to update this documentation later on, return to the 
  33     settings page and click the "Update" button.
  34  5. (Optional) Create custom function declaration template file(s) if you
  35     don't like the default output.
  36  6. (Optional) Create your own hook groupings if you don't like the 
  37     default ones.
  38  
  39  INSTALL/CONFIG ON DRUSH
  40  ----------------
  41  1. Move the module folder to somewhere where Drush can find the command. 
  42     Inside ~/.drush will do it. Drush documentation has details on other options.
  43  2. From a Drupal installation, do:
  44       $ drush mbdl
  45     This will download hook data to that Drupal's files/hooks folder. 
  46     Hooks are downloaded for core and any other module builder-aware modules that
  47     are in this install of Drupal.
  48  3. You can now generate module code. For more help, do:
  49       $ drush help mb
  50  
  51  If you use Drush with multiple Drupal installations, you can store your hook data centrally, and so only download it once for all your sites.
  52  To do so, specify the --data option when both downloading hooks and generating code. You can use Drush's drushrc.php to set this option automatically.
  53  
  54  USING THE MODULE ON DRUPAL
  55  ----------------
  56  1. Click the "module_builder" link in the menu (note: you will require
  57     'access module builder' privileges to see this link)
  58  2. Enter a module name, description, and so on.
  59  3. Select from one of the available hook groupings to automatically 
  60     select hook choices for you, or expand the fieldsets and choose
  61     hooks individually.
  62  4. Click the "Submit" button and watch your module's code generated
  63     before your eyes! ;)
  64  5. Copy and paste the code into a files called <your_module>.module,
  65     <your_module>.info and <your_module>.install and save them to
  66     a <your_module> directory under one of the modules directories.
  67  6. Start customizing it to your needs; most of the tedious work is 
  68     already done for you! ;)
  69  
  70  USING THE MODULE ON DRUSH
  71  ----------------
  72  Full help is available via 'drush help mb'.
  73  The drush command uses an interactive mode by default to request any
  74  parameters not initially given. To disable this and use default values for
  75  anything omitted, specify the --noi option.
  76  
  77  It's a good idea to set up your drushrc.php with:
  78    $options['data'] = '/path/to/drupal_hooks/';
  79  
  80  and if you prefer the non-interactive command line style:
  81    $options['noi']  = 1;
  82  
  83  TODO/WISHLIST
  84  -------------
  85  * Maybe some nicer theming/swooshy boxes on hook descriptions or 
  86    something to make the form look nicer/less cluttered
  87  * I would like to add the option to import help text from a Drupal.org
  88    handbook page, to help encourage authors to write standardized 
  89    documentation in http://www.drupal.org/handbook/modules/
  90  
  91  KNOWN ISSUES
  92  ------------
  93  * Can't set default values in PHP 5 for some strange reason
  94  * Fieldsets in Opera look mondo bizarr-o
  95  
  96  API
  97  -------------
  98  This module can be considered to be an API and two wrappers: 
  99  - Drupal's web-based UI (referred to in code comments as Drupal UI or just Drupal)
 100  - Drush's command line
 101  Furthermore, while the Drupal part of the module is version-specific (that is, you download the version of the module to match your version of Drupal core as you would any module), the Drush part, works across versions in the same way as Drush itself.
 102  That is, you can download the current version of module builder, install it as a Drush command, and where you can use Drush you can use module builder. (Note this is still a work in progress...)
 103  
 104  
 105  CONTRIBUTORS
 106  ------------
 107  * Owen Barton (grugnog2), Chad Phillips (hunmonk), and Chris Johnson 
 108    (chrisxj) for initial brainstorming stuff @ OSCMS in Vancouver
 109  * Jeff Robbins for the nice mockup to work from and some great suggestions
 110  * Karthik/Zen/|gatsby| for helping debug some hairy Forms API issues
 111  * Steven Wittens and David Carrington for their nice JS checkbox magic
 112  * jsloan for the excellent "automatically generate module file" feature
 113  * Folks who have submitted bug reports and given encouragement, thank you
 114    so much! :)


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7