Book Image

Drupal 7 Social Networking

Book Image

Drupal 7 Social Networking

Overview of this book

Drupal is ideally equipped to serve as a base system for creating a custom social networking site like Facebook or MySpace. While these large social networks have their place, niche social networking websites can help promote businesses, products, projects, and hobbies of any nature. Drupal 7 Social Networking provides careful instructions and clear explanations to take you through the setup and management of your social network site, covering topics from users, to marketing, to maintenance. It will help you create your own social networking site, suitable for whatever audience you choose! Starting from the very basics of both Drupal and Social Networking, right through to more complicated aspects, you will progressively learn how to add to and expand your social networking site and add more features. You will learn how to secure your social network, deploy it on the Internet, and keep it running and well maintained. As social networking sites rely on the participation of their users, this book helps you to structure your site in such a way so that users can easily and enjoyably contribute, thus creating a powerful social network.
Table of Contents (22 chapters)
Drupal 7 Social Networking
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Building our module


Modules are built up of a number of different files:

  • Installation files: These files contain code which is executed when a module is installed and uninstalled

  • Info files: These files contain basic information about the module, including the name and Drupal core they are compatible with

  • Module files: These files contain the logic behind the module

  • Optional templates: These files are used to override the layout and design of the pages (suggestions)

For each module we want to create we need to create some, if not all of these files. Detailed documentation for them is available on the Drupal website:

Let's get started with building our modules, and begin by creating the relevant .install files.

Installation files

When we enable our modules, Drupal will automatically look for an .install file to run as part of the module installation process...