Taken from: https://drupal.org/node/1074362
Choose a short name for your module
Ours will be "madlibs" but it could be "mad_libs" or "madlib_maker"sites/all/modules/madlibs
Create a ".module" file in the module folder
Format is "module_name.module" so in our case, "madlibs.module"
<?php
and need only contain Let's build a .module file now!
Taken from https://drupal.org/node/1075072
Create a ".info" file in the module folder
Format is "module_name.info" so in our case, "madlibs.info"
The .info file must contain the following information:
name = Module Name
description = A description of what your module does.
core = 7.x
Let's build a .info file now!
Or, if you want to avoid all that...
Easiest thing -- display some text
Let's make people feel good about finishing the Madlib with a silly picture in a block.
Taken from https://drupal.org/node/1104464
dependencies[] = block
We should now have a working version of the module!
See repo at this state: v1.0
But the code's not very pretty...
We have two choices here for theming:
$themes = array (
'madlib' => array(
'path' => drupal_get_path('module', 'madlibs') .'/templates',
'template' => 'madlib',
),
);
Give users the option of uploading their own funny image
See http://fourkitchens.com/blog/2012/07/18/building-custom-blocks-drupal-7
We should now have a much better, still functional module.
These slides: https://slid.es/mariafisher/dug-nov-2013
The project: https://github.com/mariacha/madlibs
Me: mariacha1 on Drupal