CODE MY WEBSITEWITH DRUPAL 6
王浩宇Makara Wang
Code my Drupal 6 site
What’s in this session
Setup a basic website with Drupal 6
Build some custom modules
Discussion
Code my Drupal 6 site
Why Drupal 6
Code my Drupal 6 site
Why Code
Extensible
Version control
...
SETUP DRUPAL 6
Code my Drupal 6 site
Setup a clean Drupal 6Your directory, database...
Install
Play with modules
Setup Profile
RSVP, Organization, URL
BUILD MY MODULES
Code my Drupal 6 site
RequirementsContent types
Session, Sponsor
Pages / Blocks
Session list, Sponsor list, Attendee list
Random sponsor logo
Code my Drupal 6 site
Contributed Modules
Must have
Devel
Recommend
BUEditor
Code my Drupal 6 site
Coding GuidelinesKeep simple
Always find examples
Core, Handbook...
Use existing functions & hooks
Read Documents
Code my Drupal 6 site
Documentations
Module developer's guide 6.x
http://drupal.org/node/231276
http://api.drupal.org
http://api.drupal.org/api/file/developer/examples/node_example.module/6
Code my Drupal 6 site
Build a Content Type
“Session”
Subject, Description, Presenter
Implement hooks
Display (theme) your fields (nodes)
Code my Drupal 6 site
Another type“Sponsor”
Name, Description, URL, Logo
URL
hook_validate, valid_url
Logo
Img module; Image functions later
Code my Drupal 6 site
Build pages & blocksSessions list page & block
hook_menu, hook_block
Query, Table, Pager
Sessions admin page (form)
drupal_get_form
system_settings_form
Code my Drupal 6 site
Another page
Sponsors list
Theme sponsor logo
Dealing with images
image.inc
Code my Drupal 6 site
Site support module
A specific module for one site
Best practice
Attendees list - using profile names
Code my Drupal 6 site
What else
I18n
...
Code my Drupal 6 site
Conclusion of coding
Drupal as framework
DISCUSSION
THANK YOU!谢谢!
王浩宇Makara Wang