Creating a basic Drupal module is not so hard if you have some knowledge of PHP. All you need is some basic ideas on Drupal directory system. All third party modules are stored in /sites/all/modules/modulename folder. So we are going to create a module and place it there. To run a Module you will need two files "modulename.info" and "modulename.module", note modulename is the name of the module you are going to create.
- Create a modulename.info file with the following informaiton
name = modulename
description = My first module
core = 7.x - Now create a modulename.module file with the following content
- Go to the module section(http://sitename/admin/modules) you will see the module with a check box before it. Check it and click save button down below.
- Go to http://sitename/customurl/firstmodule (same url you defined in modulename_menu function) and you should see the page content as "Hello World".