introduction to drupal

Post on 28-Jan-2015

9.202 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

Drupal An Introduction

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

Main Drupal Topics

1: Understanding Drupal Core

2: Installation

3: Configuring Core

4: Configuring Modules

5: Best Practices

1: Understanding 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.

Created By Dries Buytaert

Developer from Antwerp, Belgium

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

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.

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.

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

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)

The Drupal “Stack”

Apache (lighttpd, IIS)

MySQL (PostgresSQL, SQL Server, Oracle)

PHP

PHPMyAdmin for adminisering your SQL Database

Linux (BSD, Mac OS, Windows, Solaris)

Drupal Core

Drupal Is Modular

Drupal “Stack”

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)

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.

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

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

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

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

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

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

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

Theme vs. Sub-Theme

Modules

2. Installation

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!

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.

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.

Installing on 3rd Party

FTP

Shell/ SSH / Command Line

wget

tar -xvzf

DATABASE

Database name

User name and password

Host (localhost on your machine)

3. Site Configuration

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.

What You Can Do With Core

Enable your blog

Configure your site

Write content

Create roles

Create blocks & move them around

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

Add Content

Blog

Story

Pages

Enable Taxonomy to Create Content Categories

Install admin_menu before doing anything else

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”

4. Installing More Modules

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

Essential Contrib. Modules

admin_menu

CCK

Views

Bueditor

FCKeditor

IMCE

Filefield

SEOchecklist

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.

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.

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.

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.

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

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!

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...

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

Community Websites

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...

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

IRC Is a Big Resource

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

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

Me: Lauren N. Roth

512.461.5313, lauren@laurennroth.com

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

top related