39
Talking About Drupal

Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Talking About Drupal

Page 2: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Web browser

Web server

DBMS

File system

Script interpreter5. SQL statement

6. Query result

4. File contents 7. HTML

2. filename

3. File contents

1. URL 8. HTML

Dynamically Generated Web Pages

Page 3: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Who Uses Drupal?

Page 4: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Who Uses Drupal?• Nike.com

• FedEx

• Fox News

• Belgian Government & the Prime Minister’s site

• Fast Company.com

• AOL Corporate

• Ozzy Osborne

• Mike Bloomberg, Mayor - City of New York

• Warner Bros.

• NASA/NATO

• Yahoo! Help

• Adobe Flex

• Britney Spears

• Universal Music

Page 5: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

More...

• www.zappos.com

• amnesty.org

• theonion.com

• popsci.com (Popular Science)

• http://www.drupalsites.net/

Page 6: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

What it is NOT.

• Appropriate for every website.

• A silver bullet.

• A “set and forget” system

Page 7: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Disadvantages

• Technical/knowledge requirements

• Design biases - columns, blocks, header

• Dries Buytaert quote...

Page 8: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

The Drupal Way

Page 9: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s
Page 10: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s
Page 11: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Basic Terminology

• Node

• nid, uid, fid

• Module

• Core

• Contributed

• Block

• Theme

Page 12: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Nodes

• Nodes

• The basic content “unit” - serves as a generic “content” bucket.

• All content types are based off of it.

• It is stored together with all other nodes in one big "shoe-box" known as a "table" in your database.

Page 13: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Nodes

• Node:

• May be a "page," "story," "book page," or "blog entry.”

• New types may be created.

• May be heavily customized using the Content Creation Kit.

• Different types of content are also referred to as "Content types".

Page 14: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Page

node

YourContent

Poll

Blog

“Content Type”

node

node

Page 15: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s
Page 16: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Drupal Framework• Core Modules

• Modules that are integrated with the “core” Drupal code

• Some optional/some not

• Contributed “Contrib” Modules

• Extended functionality

• Modules contributed by the Drupal community, may be companies or individuals

Page 17: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Core Modules

• Node

• System

• User

• Block} Cannot

be deleted

Page 18: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Core - Optional Modules

• Aggregator: publishing syndicated content Block: controlling content in the sidebars

• Blog: a blog for every user

• BlogApi: post from blog tools

• Book: structured document publishing

• Color: Allows the user to change the color scheme of certain themes

• Comment: allow comments on content

Page 19: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Core (Optional) Modules

• Content translation: translating posts to different languages

• Dblog: Capture system events in log

• Filter: Input formats for user content

• Forum: create threaded

Page 20: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Core (Optional) Modules

• Help: context-sensitive guidance

• Legacy: remapping of old-style URLs

• Locale: multi-language support

• and many more we’ll discuss...

Page 21: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Navigation (Menus)

• Primary links

• Secondary links

• Navigation

Page 22: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Blocks

• Small, self-contained units of information

• Typically displayed in navigation areas or side areas of the page

• Enable, disable and position

Page 23: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Themes

• Responsible for look and feel

• Generated by PHP template engine

• not a “Page” in the traditional Dreamweaver sense

• Site Building>Themes

Page 24: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

But, First...a word from our sponsor on tips

and tricks..

Page 25: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Memory Allocation Error!

• Caused by running “out” of allocated PHP memory -99% of the time it occurs on the Modules page

• Fixes:

• Turn off modules in phpmyadmin with the “0” flag.

• Collapse fieldsets on the modules page

• BEST IDEA: reallocate more memory in php.ini.

Page 26: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Editing php.ini

;;;;;;;;;;;;;;;;;;;; Resource Limits ;;;;;;;;;;;;;;;;;;;;

max_execution_time = 30 ; Maximum execution time of each script, in secondsmax_input_time = 60 ; Maximum amount of time each script may spend parsing request datamemory_limit = 512M ; Maximum amount of memory a script may consume (32MB)

Page 27: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

1. Enter http://www.myexample.com/user (or, if you don't use Clean URLs,

http://www.myexample.com/?q=user). Yes, it is the word "user" -- not your user ID.

2. Go to your Site information settings and stick a "login" link in the footer.

<a href="/user">login</a>

I’m locked out of Admin!

Page 28: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Forgot my Password!

• Go to phpmyadmin and login

• Go to the users table, go to “Browse”

• Find the password field and delete the contents

• Enter a new password and assign it a “type” of “MD5”

• Hit “Go” to execute the SQL query.

• Login as admin.

Page 29: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Selecting Modules• drupal.org/project/modules

• Filter by 6.0

• Assess module health by:

• Look at Project Pages

• Check last commit date

• Check last release date

• Look at issue queue

• Check user profiles (project involvement, etc)

Page 30: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Designing a Drupal Implementation

Architecture & Project Issues

Page 31: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Key Issues

• It’s all about the content

• Pen & Paper are your Friends. Exploit them.

• Consider OO, going forward

• Design for what works/what you need - now.

Page 32: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Initial Questions to AskGeneral Architectural Approach:

1. What are the general aims of the site?

2. What kinds of content currently exists?

3. What kinds of content might I want in 3 months, 6 months, 12 months?

4. What immediate customizations will you need? (AFAYK)

5. Don’t go further.

Page 33: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

An Approach

• Decide on basic content.

• Layout blocks/structure on paper.

• Fill in the “blanks” with tentative content.

• Set up test server and sandbox.

• Lock down security around the server/sandbox today. Do not wait until “later”. You WILL...

Page 34: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

An Approach

• Select modules (80% rule).

• Check module health:

• Maintainer track record

• Commit record

• Issue queue for the module

• Any forum discussion

• Project page

• Check drupalmodules.com

Page 35: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Build

• Use Demo mode. Take frequent snapshots.

• Use Devel - be prepared to turn it off.

• Make back up copies of underlying config files, including .htaccess, and any module config files. (Store away carefully.)

• Install modules by themselves or in groups by functionality.

• Do not allow errors to go uninvestigated.

• Use cron.php - run update.php

Page 36: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Do NOT hack core.

• Do NOT hack core.

• Do NOT hack core.

• Do NOT hack core.

• Do NOT hack core.

• Do NOT hack core.

• Do NOT hack core.

Page 37: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Do NOT Hack Core

Page 38: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

Deploying Drupal

• Try to separate out the specific from the generic:

• host

• platform

• security clearance

• admin panel/site issues

• from the fairly generic

Page 39: Talking About Drupal - Meetupfiles.meetup.com/95697/Talking about Drupal.pdf · Who Uses Drupal? • Nike.com • FedEx • Fox News • Belgian Government & the Prime Minister’s

On the DVD

• Drupal Install

• Drupal Modules

• Resource Documents

• Tools