53
Drupal An Introduction

Introduction To Drupal

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Introduction To Drupal

Drupal An Introduction

Page 2: Introduction To Drupal

What Should I Know First?

Before Installing:

Be familiar with databases and PHPMyadmin, have a web server and a local database server

After Installing:

Server admin skills, a lot of curiosity, and some time to spend learning how modules work together and what’s available

Page 3: Introduction To Drupal

Main Drupal Topics

1: Understanding Drupal Core

2: Installation

3: Configuring Core

4: Configuring Modules

5: Best Practices

Page 4: Introduction To Drupal

1: Understanding Drupal

Page 5: Introduction To Drupal

What Is Drupal?

Content Management System (CMS)

Framework - Content Management Framework CMF

Open Source - Under GPL General Public License

Web Application Framework - Written in PHP

A way for developers and non-developers alike to manage content. Uses control panels rather than straight code.

Page 6: Introduction To Drupal

Created By Dries Buytaert

Developer from Antwerp, Belgium

Derived from “Druppel,” the Dutch word for “Drop” which also means village in Dutch.

Page 7: Introduction To Drupal

Drupal Distinctions

Best PHP Open Source CMS from Packt Publishing

Best Overall 2008 Open Source CMS Award for Second Year in a Row

It does everything Wordpress does, and a lot more

Its code is cleaner and better supported than Joomla!’s

Is one of hundreds of CMS, but is continually growing.

Page 8: Introduction To Drupal

Drupal Community Now a large community of developers and designers all work on Drupal and talk to each other

irc.freenode.net - #drupal, #drupal-support #drupaltheming

Conferences - DrupalCon

Unconferences - DrupalCamps

Meetups, etc...

I organize the Drupal Meetup Group here in Austin.

Page 9: Introduction To Drupal

Drupal Planning Stages

Prepare the concept of your website:

What’s the main idea? Figure out what kind of content you want to serve. *CONTENT IS KING.

Create a basic sitemap and features list.

Go shopping for:

Modules

Themes

Page 10: Introduction To Drupal

Drupal Is Platform Agnostic

Allows for modularity and extensibility

You can install:

Apache/ IIS / Unix / Linux / BSD / Solaris / Windows / Mac OS X

Database Independence: you can use both MySQL and PostgreSQL (ask me about even cooler stuff)

Page 11: Introduction To Drupal

The Drupal “Stack”

Apache (lighttpd, IIS)

MySQL (PostgresSQL, SQL Server, Oracle)

PHP

PHPMyAdmin for adminisering your SQL Database

Linux (BSD, Mac OS, Windows, Solaris)

Page 12: Introduction To Drupal

Drupal Core

Page 13: Introduction To Drupal

Drupal Is Modular

Page 14: Introduction To Drupal

Drupal “Stack”

Page 15: Introduction To Drupal

PHP: Generates Dynamic Content

PHPTemplate

<?PHP?>

<?PHP?>

<?PHP?>

Drupal Core

Drupal MySQLDatabase

HTML Page

HTML Page

HTML Page

Client Web

Browser

(Views Is Basically a Query Builder)

Page 16: Introduction To Drupal

Displaying Page To Browser

1. Browser retrieves dynamic information from the database.

2. Browser checks retrieved data against relevant output filters.

3. Server Inserts information into each core template.

4. Theme Engine Merges template files into template.php

5. Browser displays formatted page in the Web Browser.

Page 17: Introduction To Drupal

Themes

Multiple Template Engines Available, though the most common is PHPTemplate

Total customization possible by using

CSS

Writing custom template files

Overriding template.php functions

Writing a subtheme

Page 18: Introduction To Drupal

Drupal 6.xSeparating Design & Logic

• .info files define your theme

• More templates = more control, better separation

• Better phptemplate_variables()

• Theme inheritance makes subtheming and overriding possible

• Pure CSS themes are also possible

Page 19: Introduction To Drupal

Drupal “Core” Allows You To:Customize the layout with regions and block and any number of pages.

Personalize logos, settings, themes, add blocks and customize templates

Use a multi-level menu system - primary, secondary, tertiary, whatever you like

Allow multiple people to create and edit content

Utilize “roles” and flexible account privileges

Use a hierarchical taxonomy to categorize content, use tagging

Access statistics/logging and use advanced search functions

Page 20: Introduction To Drupal

PHPTemplate Engine

• Understands HTML & PHP Statements for Dynamic Data

• Comes installed, so you need not touch it.

• File Extension - *.tpl.php

• Handles - page.tpl.php, front-page.tpl.php, node.tpl.php, comment.tpl.php, forum.tpl.php

Wrapper that interfaces

Drupal Template Language

Page 21: Introduction To Drupal

3 CommonTemplate Files

Navigation

Syndicate Blog Post 2

Who’s Online

Blog Post 1

page.tpl.php

node.tpl.php

page.tpl.php

block.tpl.php

Page 22: Introduction To Drupal

Each Template HandlesA Region of Your Site

• page.tpl.php - Entire Page

• front-page.tpl.php - Just Front Page

• block.tpl.php - Blocks

• comment.tpl.php - Comments

• forum.tpl.php - Forums

Page 23: Introduction To Drupal

Template Hierarchy - Specific before General

Home Pagepage-front.tpl.phppage.tpl.php

Pagespage-node-edit.tpl.phppage-node-1.tpl.phppage-node.tpl.phppage.tpl.php

Boxesbox.tpl.php

Nodesnode-type.tpl.phpnode.tpl.php

Commentscomment.tpl.php

Blocksblock-module-delta.tpl.phpblock-module.tpl.phpblock-region.tpl.phpblock.tpl.php

Page 24: Introduction To Drupal

Theme vs. Sub-Theme

Page 25: Introduction To Drupal

Modules

Page 26: Introduction To Drupal

2. Installation

Page 27: Introduction To Drupal

Acquia Drupal Localhost Installation

Download the Acqiua Drupal Stack Installer

Unzip

Run installation GUI

Set up Database name and click through to see your new Drupal Site!

Page 28: Introduction To Drupal

Installation

Localhost:

Acquia Drupal Stack Installer

WampServer

XAMPP

MAMP

3rd Party Server: Make sure host supports Drupal stack, upload files and create database on server.

Page 29: Introduction To Drupal

Other Installation Options

XAMP - Windows, Does not work well with Mac.

WAMP - Windows

MAMP - I use this on Mac OS X

WampServer - This is the one we will use if the Acquia Stack Installer does not work out.

Page 30: Introduction To Drupal

Installing on 3rd Party

FTP

Shell/ SSH / Command Line

wget

tar -xvzf

DATABASE

Database name

User name and password

Host (localhost on your machine)

Page 31: Introduction To Drupal

3. Site Configuration

Page 32: Introduction To Drupal

admin_menu

Administration menu module provides a theme-independent administration interface (aka. "navigation", "back-end") for Drupal. It's a helper for novice Drupal users coming from other CMS, a real time-saver for Drupal site administrators, and definitely a must for Drupal developers and site builders (keyword: Devel integration).

The module renders all administrative menu items below 'administer' in a clean, attractive and purely CSS-based menu at the top of your website. It contains not only regular menu items - local tasks are also included, giving you extremely fast access to any administrative resource and function your Drupal installation provides.

Page 33: Introduction To Drupal

What You Can Do With Core

Enable your blog

Configure your site

Write content

Create roles

Create blocks & move them around

Page 34: Introduction To Drupal

Site Configuration

Create the first user

Go to admin page - handle errors

Site configuration - file system

Enable clean URLs

Enable modules

Creat roles and 2nd user

Page 35: Introduction To Drupal

Add Content

Blog

Story

Pages

Enable Taxonomy to Create Content Categories

Install admin_menu before doing anything else

Page 36: Introduction To Drupal

Creating News (For example)

1. Create Vocabulary (administer>>categories>> add vocabulary tab called “News” with “story” checked under “Types:”, “Hierarchy:”, set to “Disabled”, uncheck “Multiple select” and check “Required”

2. Create terms (administer>>categories>>add terms) Under this “News” Vocabulary as follows: “News,” “Media Releases” and “Events”

Page 37: Introduction To Drupal

4. Installing More Modules

Page 38: Introduction To Drupal

Where to Get More Modules

http://drupal.org/project/Modules

How to figure out which modules are best

Read “Using Drupal” from O’REILLY

Go to www.drupalmodules.com

Page 39: Introduction To Drupal

Essential Contrib. Modules

admin_menu

CCK

Views

Bueditor

FCKeditor

IMCE

Filefield

SEOchecklist

Page 40: Introduction To Drupal

CCK Module

Allows you to add custom fields to nodes using a web browser.

Drupal comes with core content types like story and blog. For each content type, I can go to 'create content' and submit a new story, blog entry, etc. That's great if I can tailor my content needs to fit those models of pure chunks of text with or without attachments.

Page 41: Introduction To Drupal

Views Module

Provides a flexible method for Drupal site designers to control how lists and tables of content (nodes in Views 1, almost anything in Views 2) are presented. Traditionally, Drupal has hard-coded most of this, particularly in how taxonomy and tracker lists are formatted.

This tool is essentially a smart query builder that, given enough information, can build the proper query, execute it, and display the results. It has four modes, plus a special mode, and provides an impressive amount of functionality from these modes.

Page 42: Introduction To Drupal

Bueditor Module

Editor interface and button functionality are completely customizable through administration pages.

It supports role based editor interfaces.

It's possible to create image or text buttons.

Buttons can be customized to generate code snippets, html tags, bbcode tags etc.

Page 43: Introduction To Drupal

IMCE Module

Used as a file browser in many popular rich text editors such as FCKEditor, TinyMCE, WYMEditor, Whizzywig etc.

It can been also used for inline image/file insertion into textareas. This is a built-in feature that can be used stand-alone or with a text editor such as BUEditor.

Page 44: Introduction To Drupal

Filefield Module

Configurable upload paths allow you to save files into per-field or per-user directories

Per-field and per-node file size limits

Extensive API for extending field widgets and managing files

Full revision/translation file management

Views support

Page 45: Introduction To Drupal

SEO Checklist

Provides a checklist of good Drupal SEO (Search Engine Optimization) best practices.

Provides a checklist that helps you keep track of what needs to be done.

Looks to see what modules you already have installed. Then, all you have to do is go down the list of unchecked items and do them.

When all the items are checked, you're done!

Page 46: Introduction To Drupal

More Modules

Spam Control - Mollom

Google Analytics - drupal.org/project/google_analytics

Pathauto - drupal.org/project/pathauto

Token - drupal.org/project/token

Update module - drupal.org/project/update_status

etc...

Page 47: Introduction To Drupal

Best Practices

Don’t Hack Core!

Account and Roles

Plan for future upgrades

Back up both the database and the files regularly

Use sites/all/modules and sites/all/themes

Avoid spaces in any directory name

Page 48: Introduction To Drupal

Community Websites

Page 49: Introduction To Drupal

Self-Taught Drupal

http://www.drupal.org

www.learnbythedrop.com

www.lullabot.com

Books: Pro Drupal Development, Using Drupal, Learning Module Development, Front-End Drupal, etc...

Page 50: Introduction To Drupal

Multi-Language Support

You can have a site in three languages, or more:

English

Hungarian

Spanish

System is independent of the language, the author defines it

Page 51: Introduction To Drupal

IRC Is a Big Resource

- Support exhange- Collaboration in ideas, code & events - Local user groups

Page 52: Introduction To Drupal

Useful Linksapi.drupal.org

drupal.org/handbooks

drupalchat.net

is.gd/15tJF - Chatzilla Firefox plugin

is.gd/15vNY - Wikipedia IRC client comparison

drupal.org/forum

drupal.org/project/issues

Page 53: Introduction To Drupal

Me: Lauren N. Roth

512.461.5313, [email protected]

Assisting at Installation Fest Wednesday July 15th at 7:15pm - Union Park downtown

Speaking at Drupalcamp Dallas in early August

Introducing Drupal at Austin Developers and Designers Meeting on August 11th