Introduction To Module Development
Introduction To Module Development
Content Management Systems manage website (or intranet) content Open Source Content Management Systems have become one of the real open source success stories The three most popular open source CMS in the nonprofit sector are:
If your answer is, Yes, I have done enough research and am sure I have to write the code now, then go ahead ....
Examples of modules
Core required modules:
System, Filter, Node, Block, User
Hooks
Can be thought of as internal Drupal
events Allow modules to interact with the Drupal core Events include:
Creation, deletion of nodes and users Logging in, logging out
Hook examples
hook_user
login, logout, insert, view, update
hook_block
view, save, configure, list
Useful modules/tools
Devel (drupal.org/project/devel) Admin Menu
(drupal.org/project/admin_menu) Drush (drupal.org/project/drush) Any others?
helloworld.info
helloworld.module
helloworld.info
; $Id$ name = Hello World description = Creates a Hello World Content package = Module Dev Training core = 6.x
helloworld.module
<?php function helloworld_perm() { return array(access content); } function helloworld_menu() { $items[My Module'] = array( 'title' => My First Module', 'page callback' => 'display_helloworld', 'access arguments' => array(access content'), 'type' => MENU_NORMAL_ITEM, ); return $items; } function display_helloworld () { return Welcome to my first Drupal Module helloworld; }
ICT Center
We are making IT happen
Integrity
Commitment
Teamwork