How to create Drupal 7 custom module

Error message

The specified file temporary://fileEfDamd could not be copied, because the destination directory is not properly configured. This may be caused by a problem with file or directory permissions. More information is available in the system log.

if we need to create custom module we shoul create folder with a name of our module in directory sites/all/modules/your_module_name. Then inside this directory we should create two files your_module_name.info your_module_name.module. In the first file .info we should paste code given below:

 

name = Your module name visible in administration interface
description = Module description also visible in admin interface.
package = module package name
core = 7.x

 

The last line shows that module created for drupal 7.

Then we should create .module file with content we need. All hooks inside this module should be named as your_module_name. Thats all. Then you should enable your module through admin interface. Continue doing Drupal, good luck!

Rating: 
8 out of 10 based on 2 ratings.