72d5drupal

29
By Mahesh Introduction to DRUPAL

Upload: mahesh-sherkar

Post on 20-Aug-2015

104 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 72d5drupal

By Mahesh

Introduction to

DRUPAL

Page 2: 72d5drupal

What is Drupal?Drupal is an open-source platform and content management system for building dynamic web sites offering a broad range of features and services including •user administration,• publishing workflow, •discussion capabilities, •news aggregation,• metadata functionalities

using controlled vocabularies and XML publishing for content sharing purposes.

Page 3: 72d5drupal

What is Drupal?What is Open-Source?• Open Source means that whoever writes a piece of computer code makes it available for anybody else to see it, modify it, or use it.•Free•Community Based Support• Help find and fix bugs• answer questions on forums / blogs• provide documentation• Code extension modules

•GPL (GNU [GNU Not Unix] Public License) is the most common open-source license standard

Page 4: 72d5drupal

What is Drupal?

What is Content Management?• Web pages are often easily created with

static (non-changing) content, but it is usually very difficult to make regular changes to a page.

• Content Management is the process of easily changing what a user sees at a web page.

Page 5: 72d5drupal

What is needed to run Drupal?

•A web server capable of executing PHP scripts• recommended: Apache

•PHP• Recommend using the latest stable

release•A PHP supported database server• recommended: mySQL

Page 6: 72d5drupal

Drupal Is Cool

•Centralized managementTemplates and modulesStylesScripting

•Content creation, editing, and maintenance can be done without technical Web knowledge

•Changes in styles, layout can be done across the site without content maintainers involvement

Page 7: 72d5drupal

…More Cool

•Information managementCategoriesTaxonomiesKeywords

•Navigation structures generated for you•Easy to add Web2.0 features

Page 8: 72d5drupal

…Even More Cool

•Authentication, roles•Workflow•Customization based on default designs, templates, styles

-Intercepts, overrides, and subthemes

Page 9: 72d5drupal

General System Info•Current Version: Drupal 5.1 (Drupal 7 to be released soon)•Programming Language: PHP 4 and 5Data Storage: MySQL or PostgresSQL (support for other databases, Oracle, MSSQL, DB2, etc).•Operating System: Linux, FreeBSD, MS WindowsWeb server: Apache, IIS•Recommendation: WAMP (Window, Apache, MySQL, PHP/Python) for security purposes, ease of installation, and robustness.

Page 10: 72d5drupal

Content Management System Content Publishing /

Threaded Commenting Blogging Platform Forums Version Control (Diff

module shows revision in friendly format)

PollsNews aggregation / RSSBlocks / NavigationModules / Themes

Other Web Features Friendly URL and

Permalinks (node/nid) Page caching Integrated search

functionality Page Hits / Statistics

Prominent Drupal Sites http://www.mtv.co.uk/ http://www.theonion.com/ http://appel.nasa.gov/

See also http://drupal.org/features

Drupal Features: Quick list

Page 11: 72d5drupal

Steps to Accessible Design

1. Install2. Update3. Select theme4. Add modules5. Build blocks

Page 12: 72d5drupal

Drupal Installation / Site Setup

•Setup a database container to hold the tables•Create the necessary user credentials in database•Run the setup program (run database script which create the necessary tables in DB)•Apache (setup domain, root)•In Drupal config file (which matches domain name path), point to database instance•Setup working directory (web server permissions)•Setup CRON job (periodic script), which performs various actions, like indexing for search.

Page 13: 72d5drupal

2. Update

•Updates are essential•Each time the administrator logs in Drupal will display messages of needed updates•Do them promptly

Page 14: 72d5drupal

Theming

•Themes involve HTML templates, CSS files, and a template.php file for custom theme code and theme function overrides•HTML templates use PHP snippets for inserting variables and control structures•Zen theme is a great starting theme for creating custom designs

Page 15: 72d5drupal

3. Select Theme•Tables or tableless?• Tableless layouts best, especially if fluid

Controllable with CSSReading order can be independent of layout positionFluid sizing allows scaling by user as needed

• Table layout not so goodImposes reading sequencePresentation only somewhat controllable with CSS

• Nested tables badNavigation nightmare

•Many theme design philosophies

Page 16: 72d5drupal

How do I change a themeThe desired theme must be downloaded to the server• Existing documentation explaining this

step in detailAdministration > Site Configuration > Themes• Select desired theme in default theme

dropdown box• Sets the default theme seen by most users,

although users can change the theme to what they want by editing their accounts

Page 17: 72d5drupal

Managing Themes

Page 18: 72d5drupal

4. Add Modules

•Hundreds of modules are available•Offer a wide range of functionality

Editors, games, feeds, tools•Most are standards compliant

Problem: Inconsistent implementations among modules

•Frequently updated

Page 19: 72d5drupal

How do I Develop and Use a Module?

•Modules are used to add menus to DrupalExamples of available modules are: stories, blogs, polls, images, etc•Creating modules in Drupal is simple:• It is simply a text file, including PHP

code, in the directory that ends in .module• Allows the use of any text editor

•Modules can easily integrate with Drupal core or other modules by using the Drupal API (http://api.drupal.org/)

Page 20: 72d5drupal

Managing Modules

Page 21: 72d5drupal

How to Use a Node Module Nodes are the individual pieces of content which make up the entire Drupal community—like individual page in website

Node Modules differ from regular modules in that they contain a _node hook.

What is a _node hook?:A Special PHP function that is defined in a module

What the _node hook does for the module:Tells Drupal what type node the module defines.

Page 22: 72d5drupal

5. Build Blocks

•Blocks contain the code fragments for the different areas of your layout•Blocks are placed in page regions•Must be well-formed and strictly compliant to fit in context

Structured, semantic markup very desirable to get CSS to work

•How you add things like “Skip to Content”

Page 23: 72d5drupal

Drupal Basics

1. Block2. User, Roles, Permissions3. Taxonomy4. URL aliases5. Menus and Navigations

Page 24: 72d5drupal

Blocks

•Blocks allow the placement of secondary content in various regions on the page•Out-of-the-box Drupal allows 5 regions (left column, right column, header, footer and content)•Modules can provide blocks with specific functionality•Custom blocks can be created

Page 25: 72d5drupal

Users, Roles, Permissions

•First user created is the website administrator, and this user has complete control over the system.•Other users can be created by administrator or by online registration (with or without admin approval)•Roles: anonymous, authenticated, and custom•Users can belong to one or more roles•Permissions within system are role based•Therefore, once users are created in the system and assigned a role, they have permission to various parts of the framework, including content creation.

Page 26: 72d5drupal

Taxonomy

•Taxonomy is a method of categorizing your content in a flexible way•Taxonomy is usually the most confusing aspect of Drupal for the uninitiated•Category groups are defined as “Vocabularies”•Categories themselves are defined as “Terms”

Page 27: 72d5drupal

URL Aliases

•Makes Drupal sites easily SEO friendly•URLs typically have variables embedded in them that are required by PHP to process the page request correctly•URL alias mask these url variables with any URL of your choice•The PathAuto module allows logical rules to be used in automatically creating path alias’ for content

Page 28: 72d5drupal

Menus and Navigation

•Drupal allows the creation of unlimited menu groups, each with it’s own hierarchy•Menu items can be tied directly to a content page or be unattached•Menu system is tied to permissions, so menu items will only appear for users with permission to view that page

Page 29: 72d5drupal

Project Title