build drupal camp shanghai with drupal6

20
CODE MY WEBSITE WITH DRUPAL 6 王浩宇 Makara Wang

Upload: ronan-berder

Post on 30-Nov-2014

4.832 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Build Drupal Camp Shanghai with Drupal6

CODE MY WEBSITEWITH DRUPAL 6

王浩宇Makara Wang

Page 2: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

What’s in this session

Setup a basic website with Drupal 6

Build some custom modules

Discussion

Page 3: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

Why Drupal 6

Page 4: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

Why Code

Extensible

Version control

...

Page 5: Build Drupal Camp Shanghai with Drupal6

SETUP DRUPAL 6

Page 6: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

Setup a clean Drupal 6Your directory, database...

Install

Play with modules

Setup Profile

RSVP, Organization, URL

Page 7: Build Drupal Camp Shanghai with Drupal6

BUILD MY MODULES

Page 8: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

RequirementsContent types

Session, Sponsor

Pages / Blocks

Session list, Sponsor list, Attendee list

Random sponsor logo

Page 9: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

Contributed Modules

Must have

Devel

Recommend

BUEditor

Page 10: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

Coding GuidelinesKeep simple

Always find examples

Core, Handbook...

Use existing functions & hooks

Read Documents

Page 12: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

Build a Content Type

“Session”

Subject, Description, Presenter

Implement hooks

Display (theme) your fields (nodes)

Page 13: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

Another type“Sponsor”

Name, Description, URL, Logo

URL

hook_validate, valid_url

Logo

Img module; Image functions later

Page 14: Build Drupal Camp Shanghai with Drupal6

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

Page 15: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

Another page

Sponsors list

Theme sponsor logo

Dealing with images

image.inc

Page 16: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

Site support module

A specific module for one site

Best practice

Attendees list - using profile names

Page 17: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

What else

I18n

...

Page 18: Build Drupal Camp Shanghai with Drupal6

Code my Drupal 6 site

Conclusion of coding

Drupal as framework

Page 19: Build Drupal Camp Shanghai with Drupal6

DISCUSSION

Page 20: Build Drupal Camp Shanghai with Drupal6

THANK YOU!谢谢!

王浩宇Makara Wang