18.10.2016 Views

Drupal 7 Module Development

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Building an Admin Interface<br />

Starting our module<br />

We will begin as we did in Chapter 2, by creating a new folder for our module called<br />

user_warn in the sites/default/modules directory in our <strong>Drupal</strong> installation. We<br />

can then create a user_warn.info file as shown in the following:<br />

;$Id$<br />

name = User Warn<br />

description = Exposes an admin interface to send behavior warning<br />

e-mails to users.<br />

core = 7.x<br />

package = <strong>Drupal</strong> 7 <strong>Development</strong><br />

files[] = user_warn.module<br />

You should be pretty familiar with this now. We will also create our user_warn.<br />

module file and add an implementation of hook_help() to let site administrators<br />

know what our module does.<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!