Talking About Drupal
Talking About Drupal
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
Who Uses Drupal?
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
More...
• www.zappos.com
• amnesty.org
• theonion.com
• popsci.com (Popular Science)
• http://www.drupalsites.net/
What it is NOT.
• Appropriate for every website.
• A silver bullet.
• A “set and forget” system
Disadvantages
• Technical/knowledge requirements
• Design biases - columns, blocks, header
• Dries Buytaert quote...
The Drupal Way
Basic Terminology
• Node
• nid, uid, fid
• Module
• Core
• Contributed
• Block
• Theme
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.
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
node
YourContent
Poll
Blog
“Content Type”
node
node
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
Core Modules
• Node
• System
• User
• Block} Cannot
be deleted
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
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
Core (Optional) Modules
• Help: context-sensitive guidance
• Legacy: remapping of old-style URLs
• Locale: multi-language support
• and many more we’ll discuss...
Navigation (Menus)
• Primary links
• Secondary links
• Navigation
Blocks
• Small, self-contained units of information
• Typically displayed in navigation areas or side areas of the page
• Enable, disable and position
Themes
• Responsible for look and feel
• Generated by PHP template engine
• not a “Page” in the traditional Dreamweaver sense
• Site Building>Themes
But, First...a word from our sponsor on tips
and tricks..
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.
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)
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!
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.
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)
Designing a Drupal Implementation
Architecture & Project Issues
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.
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.
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...
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
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
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.
Do NOT Hack Core
Deploying Drupal
• Try to separate out the specific from the generic:
• host
• platform
• security clearance
• admin panel/site issues
• from the fairly generic
On the DVD
• Drupal Install
• Drupal Modules
• Resource Documents
• Tools