Table of Contents

stovenumerousInternet and Web Development

Dec 4, 2013 (3 years and 6 months ago)

54 views

Table of Contents
Master Drupal 7 Module Development
4
Thank you
5
This book
6
Lesson One - Introduction
9
Drupal code
9
Nodes
13
Comments
15
Blocks
16
Entities, Fields and Bundles
17
Request and Response
19
Hook system
20
Menu & Routing
24
Theme System
25
Forms API
26
Users
27
Devel
27
Drush
28
Summary
28
Lesson Two - First Module
30
Drush basics
30
Module Structure
32
Create Your First Module
32
Display a string on a custom page
36
Display a node on a custom page
39
Summary
45
Lesson Three - Extend First Module
46
Access Control
46
Change an existing form with hook form alter
49
Create a block programatically
54
Configurable block
57
Table of Contents
Master Drupal 7 Module Development 1
Display message when a user logs in
59
Summary
62
Lesson Four - Todotoday Feature Module
63
Features
63
Add content type
64
Add data
74
Add to feature
77
Summary
81
Lesson Five - Extend Todotoday Feature Module
82
Custom code
82
Editing .module file
83
Display data on custom path
84
Add argument to path
91
Security and usability issues
97
Display data with Views
100
Todo Today Block
103
Recreate Feature
105
Summary
106
Lesson Six - Welcome module
107
Create module files
107
Display a message
108
Admin interface
109
Drupal Variables
114
Display the configured message
117
Personalise the message
118
Summary
126
Lesson Seven - Extend Welcome Module
127
Getting the code organised
127
Setup a new table
131
Updating an enabled module
134
Adjusting the admin form
139
Table of Contents
Master Drupal 7 Module Development 2
Saving to the Database
144
Pre-populating the admin form
150
Dealing with new vs existing records
158
Display message to user
160
Testing the welcome message
165
Summary
169
Lesson Eight - Further Extend Welcome Module
170
Registering a theme function
170
Theme Function
172
Form help text
176
Invoking your own hook
178
Summary
184
Lesson Nine - Latest News Feature
186
Why theme a module?
186
Content type
187
Block
190
Create Latest News Feature
193
Add Latest News template
195
Add fields to template
198
Add blog specific CSS
200
Summary
201
Lesson Ten - Extend Latest News
202
Generate dummy content
202
List of latest news in Drush
205
Your first Drush command
206
Get latest news
207
Drush Log
209
Check for result
210
Limiting the results
211
Adding an alias
216
Summary
216
Table of Contents
Master Drupal 7 Module Development 3
Lesson Eleven - Security Best Practice
218
SQL Injection
219
Cross-site Request Forgeries (CSRF)
222
Cross-site scripting (XSS)
225
Text formats
228
Filtering functions
230
Access control
234
Admin account
236
Security configuration outside Drupal
237
Incorrect use of Form API
238
Hacking core
240
Summary
240
Lesson Twelve - Security Audit
242
Not sanitising user data
243
SQL Injection
245
Unsanitised form data
247
Cross-site Request Forgery
250
Node access
253
More information
256