Drupal Multimedia - Aaron Winborn - E-Book

Drupal Multimedia E-Book

Aaron Winborn

0,0
31,19 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

In Detail



Adding and handling multimedia in Drupal, such as images or video, requires the use of many contributed modules, and deciding which ones to use and how to get the most from them is often not a straightforward task.



This book will guide you through the steps necessary to add image, video, and audio elements into your Drupal sites. The book will take you through the contributed modules for handling media, showing you what they do, when to use them, and how to get the most from them. When contributed modules aren't enough, you will see examples of custom Drupal development to add that special touch to your media.



Information for Drupal administrators and site developers on all aspects of multimedia in Drupal.

Approach



This book will guide you through the steps necessary to add image, video, and audio elements into your Drupal sites. For each topic, you start with simple techniques and move on to more advanced techniques. By the time you've completed this book, you should have a firm ground from which to tackle most multimedia needs, and enough of an understanding to creatively solve more complex problems.

Who this book is for



This book will provide information for administrators and professional site developers who are required to embed multimedia into a Drupal site. The reader needs basic knowledge of Drupal operation, but no experience of how Drupal handles multimedia items is expected.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB

Seitenzahl: 250

Veröffentlichungsjahr: 2008

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Drupal Multimedia
Credits
About the Author
About the Reviewers
Preface
What This Book Covers
Who Is This Book For?
Conventions
Reader Feedback
Customer Support
Downloading the Example Code for the Book
Errata
Piracy
Questions
1. Introduction and Overview
Drupal's Multimedia
Drupal's Building Blocks
Nodes
Regions and Blocks
Themes
Contributed Modules
Content Construction Kit (CCK)
Custom Content Types
Fields
User Permissions
Creating Content
Views
View Administration
Creating a New View
Basic Settings
Page Views
Advanced Views Options
Advanced Theming
Adding a New Theme
Basic Template Files
Custom Regions
Theme Function Overrides
Template Files Revisited
Summary
2. Images for Admins and Editors
What Does Our Site Want?
Creating a Gallery
Image Module
Gallery Categories
Image Size Settings
Image Gallery Settings
Gallery Alternatives
A Brief Note about Image Toolkits
Teaser Thumbnails
Image attach
Image attach Content Settings
Attaching Images to Content
Images Embedded in Content
HTML
Image Assist
WYSIWYG
WYSIWYG Alternatives
Summary
3. Developing for Images
Image Node: The Traditional Method
Multiple Images
ImageField: Flexible, Powerful, Useful
Widget Field Settings
Global Settings
Managing Fields
Creating Custom Content
Display Fields
Block Views
Resizing and Cropping
ImageCache
Third-Party Images
Embedded Media Field
Views for Galleries and Slideshows
User Images
Taxonomy Images
Summary
4. Theming Images
Styling a View
Investigating a Theme
Firebug
Theme Developer Module
Overriding Image Nodes
Image Effects
Rollover Menus
Slicing Images
Cascading Style Sheets (CSS)
Drop Shadows
LightBox
More Eye Candy
Magnification
Star Ratings
Watermarks
Slideshows
Summary
5. Third-Party Video
Third-Party Video Providers
Embedded Media Field
Summary
6. Local Video
Local Video Files
FileField
Theme Your Video
Preprocess Hook
Thumbnail Overlays
Flash Video Players
jQuery Media
Logo Overlays
Inline Local Video
Summary
7. File Asset Management
Node Referenced Files
Theming Node Referenced Videos
Asset Module
Media Mover
Media Mover Processes
Media Mover in Action
Kaltura
Summary
8. Audio Nodes
Audio Nodes
Audio Formats
WAV Lossless Format
MP3 for Music
Open Source OGG
Encoding Audio
Audio Module
Submitting Audio Content
Metadata
Audio Players
Summary
9. Audio Fields
FileField Remixed
jQuery Media to the Rescue
External Audio
Summary
10. Theming Audio
Node Referenced Clips
Alternatives
Audio Playlists
XSPF Playlists
XSPF File Format
XSPF Playlist
Creating Our XSPF File
Building Our View
Linking Our Links
User-Created Embeddable Playlists
User Playlist Views
Embeddable Audio
Summary
11. The Future of Drupal Multimedia
File Handling
Why This Is Profound
Multimedia APIs
Multimedia in the Core
Multipurpose Fields
Image versus ImageField
Content Field is King
Core Fields
User Experience
Administration Interface
Usability Testing
Embeddable Widgets
Semantic Multimedia
Microformats
RDF Triples
Tagging Semantic Multimedia
Mobile Web
New Media
Virtual Reality
Second Life
Tactile Media
Wii
Embedded Smell Field?
Summary
Index

Drupal Multimedia

Aaron Winborn

Drupal Multimedia

Copyright © 2008 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published:October 2008

Production Reference: 1141008

Published by Packt Publishing Ltd.

32 Lincoln Road

Olton

Birmingham, B27 6PA, UK.

ISBN 978-1-847194-60-2

www.packtpub.com

Cover Image by Vinayak Chittar (<[email protected]>)

Credits

Autrhor

Aaron Winborn

Reviewers

James Walker

Kristof De Jaeger

Bruno De Bondt

Ryan Shrout

Senior Acquisition Editor

Douglas Paterson

Development Editor

Swapna V. Verlekar

Technical Editor

Abhinav Prasoon

Copy Editor

Sneha Kulkarni

Editorial Team Leader

Mithil Kulkarni

Project Manager

Abhijeet Deobhakta

Project Coordinator

Lata Basantani

Indexer

Rekha Nair

Proofreader

Chris Smith

Production Coordinator

Aparna Bhagat

Cover Work

Aparna Bhagat

About the Author

Aaron Winborn has been a Drupal developer for over three years, most of that time for Advomatic, where he has helped to develop excellent sites for such companies and organizations as Air America, Sony, NRDC, and Mozilla. Before that, he had followed dual passions for teaching and web development for nearly a decade, teaching at a Sudbury school (a democratic and age-mixed model for young people).

He has contributed several modules to the Drupal community, such as Embedded Media Field, jQuery Media, Views Slideshow, and the upcoming Drupal Media Player. He has also been active in core development, most recently advocating and contributing to efforts for better media support in Drupal 7, such as the hook_file patch and a centralized jQuery plug-in/library registry. As a panelist at several conferences, such as DrupalCon Boston, DrupalCampNYC, and DrupalCampDenver, Aaron continues to share his experience with using multimedia in Drupal with the community.

Aaron has always been interested in teaching and writing. Prior to his current employment with Advomatic, he taught at a Sudbury model school, in a diverse range of classes such as Computer Game Design, Silk-screening, and a History of the Vietnam War. He was also puppeteer for two puppet theaters.

Aaron lives with his partner Gwen and their daughter Ashlin in Harrisburg, Pennsylvania. Theo, their cat, rules the house, while their dog, Mia, sneakily sleeps on their couch when they're out. You can read about Aaron's ongoing adventures with Drupal at AaronWinborn.com, and visit this book's companion site at DrupalMultimedia.org.

Drupal Multimedia could not have been written without the support and encouragement of the great folks at Advomatic, particularly Adam Mordecai, who helped me start running with Drupal; Aaron Welch, who has single-handedly wrestled our servers when needed, and has built an impeccable support team so he doesn't need to; Dylan Clear, who must have been a juggler in another life; Sam Tresler, his simple practicality and clear values dearly appreciated by me; Marco Carbone, who has helped me dig myself out of coding trouble on several occasions; Jack Haas, whose theming wizardry is always appreciated; Fred Gooltz, whose particular vision has inspired at least of couple of modules from me; and Liz Morton, who makes sure we pay the piper's dues.

I also want to thank the numerous people in the larger Drupal community who have helped me. Dries Buytaert, without whose original vision we would have all been stuck hacking away at some second-rate solution. Neil Drumm, who is a wizard at high-performance queries, and can cook a mean vegan dinner. Morbus Iff, who can take a hundred lines of hacked code and hammer it into a dozen, complete with documentation and to coding standard. Earl Miles, who continues to raise the bar for developers. Alex Urevick-Ackelsberg, a friend and peer whose continued help with many interesting projects and modules has been invaluable. Suzi Arnold, a theming virtuoso on a level all her own. Andrew Morton, who gave me a crash course on SimpleTests during the media code sprint. Oleg Terenchuk, a generous person, a leader in the Drupal NYCcommunity, and an enthusiast for gaming in Drupal. Geoff Holden, whose contributions to the Drupal Media Player project have turned it from a pipe dream to nearly a reality. Angela Byron, an ambassador and bridge between the many, sometimes disparate, groups composing our community. And Károly Négyesi, Drupal incarnate.

Obviously, this book would never have seen the light of day were it not for its editors and reviewers. I want to thank Douglas Paterson, who championed the book in the first place. Lata Basantani, who probably pulled out some hair every time I was late with a chapter, but managed to sound nice about it from my end. The technical reviewers, James, Kristof, Bruno, and Ryan, who smoothed the rough edges of this book; if there's anything still lacking, it is through no fault of theirs. And all the other great editors at Packt: I only wrote the thing; you all made it presentable.

The person I need to thank most is my partner, Gwen Pfeifer, whom I love dearly. She has endured many sleepless nights as I've struggled over minutiae while writing this book, and has still managed to be endlessly supportive.

There are so many more people who deserve my gratitude, and I deeply fear I'll forget someone important, and so need to ask forgiveness in advance. In particular, there are dozens of maintainers, developers, and testers who are responsible for the excellent modules reviewed throughout this book, which would not be possible without their hard work. Thank you all.

About the Reviewers

James Walker is Lullabot's Director of Education where he oversees the company's public workshops, seminars and private Drupal trainings, combining his passion for both technology and teaching. A leader in the Drupal community, James is a founding member of the non-profit Drupal Association and the Drupal security team. As a long-time member of the Drupal community, James maintains over a dozen modules and has contributed countless patches to Drupal core. He is one of the authors of O'Reilly's upcoming book Using Drupal.

A long-time believer in Open Source and Open Standards, James has spent years co-ordinating Drupal's involvement with other communities such as Jabber/XMPP and, most recently, OpenID. An engaging speaker, James is a frequently requested presenter at many types of technical conferences. His humorous and informative lectures have been among the best-attended at DrupalCons, starting with the first—four years ago. James is known as "walkah" on drupal.org.

Kristof De Jaeger is a senior Drupal developer at Krimson with a focus primarily on module development. His first baby steps with Drupal were around 2005 and since then, he's been hooked helping out the community on IRC, writing modules, testing out patches, and spreading the word to everyone interested in web development.

Bruno De Bondt currently lives in Brussels, Belgium, where he does web and tech work for Indymedia.be (IMC Belgium). This involves Drupal site development and theming, system administration, and ocassional GNU/Linux support. He studied journalism in Ghent (Belgium) and Utrecht (The Netherlands), where he specialised in internet and international journalism.

After developing a website for a school project, he dived further into web development. Over the last few years, he built and managed websites for several NGOs and non-profits. After dabbling with several CMSs, he discovered Drupal in 2005, while looking for software to run the new Indymedia.be website.

The Indymedia.be site has been running on Drupal since autumn 2005. The switch to Drupal coincided with a choice of the Indymedia.be team to create a broadly oriented progressive citizen news website, instead of the more in-crowd activist website it had been before. Drupal has played a crucial role in this process, enabling Indymedia.be to run a solid and secure website, while at the same time allowing a high degree of flexibility. At the time of writing. the Indymedia.be tech team is hard at work on its new website, leveraging Drupal's capabilities even more—it's amazing what you learn in three years' time. A lot of the practices and tips discussed in this book are part of Indymedia.be's new site. Thanks Aaron!

Being a trained journalist, Bruno still does some writing work now and then. He co-authored 'Media-activisme/Don't hate the media, be the media', a media-activist guide (2004— www.media-activism.be). He also did editing and reviewing work for 'Burgermedia', a reader discussing citizen media in Belgium and abroad (2008— www.burgermedia.be).

Thanks to: The Indymedia.be team. All IMC'stas (Belgium and worldwide). Mark, Ekes and others of the Indymedia Drupal gang.

Dries Buytaert for posting his scripts on the web (and the Drupal community for making them what they are today). The Krimson guys for support and feedback (www.krimson.be). Joeri Poesen for being my personal PHP guru (www.symbiotix.be). Development Seed for inspiration, feedback and good times at several DrupalCons. The thousands & thousands carrying the torch high for free and open-source software.

http://indymedia.be

http://brunodbo.be

Ryan Shrout is the owner and editor-in-chief of PC Perspective, a PC hardware and technology review website. Before joining the hardware world Ryan was a CS student who worked primarily in web technologies PHP, MySQL, JavaScript, and more. He maintains and develops custom CMS systems for PC Perspective, among others, as a hobby and has recently adopted Drupal for future projects going forward. Ryan's background in a wide array of software and hardware allows him a unique view of the open-source community.

To my father, Victor, who set me on this path.

Preface

Drupal Multimedia takes an in-depth look at one of the most common questions posed by new (and old) Drupal developers: How can I place images/video/audio into my site?

Drupal is an open-source Content Management System (CMS), used on thousands of sites from personal blogs to e-commerce sites to media powerhouses. Although Drupal can be easily installed and configured to quickly get a site up with all the best features one might expect, its modular building blocks can be used to customize that site to fit the required solution.

For anything beyond a simple listing of files uploaded with content, multimedia handling requires modules and techniques beyond what's supplied with the core of Drupal. Fortunately (or unfortunately, depending on your perspective), there are hundreds of modules that have been contributed by and for the community, which can handle nearly any current need. Drupal Multimedia will help you make sense of it all.

What This Book Covers

Chapter 1: It offers an in-depth introduction to Drupal and the basic modules required for most of the book. By the end of the chapter, you will have learned about the building blocks of Drupal, including nodes, users, themes, regions, and blocks. You will also have explored the Content Construction Kit (CCK) and Views, learning to use them to create custom content and display it just the way you want.

Chapter 2: It will explore the Image module, and others that depend on its functionality, to easily create image galleries and attach images to content, or even place them inline using a WYSIWYG editor.

Chapter 3: It taps the power of CCK and Views, using ImageField and ImageCache to create powerful, custom solutions for image needs. Using these modules, you'll be able to quickly create your own custom content types and display images that can be altered on the fly, for resizing, cropping, and other manipulations. You'll also learn to create slide shows, and use Embedded Media Field to pull image content from Flickr and other third-party providers.

Chapter 4: Once you learned various ways to display an image, you'll learn how to override the display, to add effects such as drop shadows and rollovers. You'll use Firebug and the Theme Developer module to investigate a theme at its most basic building blocks, jump into PHPTemplate to transform our content, and study style sheets as a mean of controlling output from a user's browser.

Chapter 5: You'll learn how to embed and display third-party video within your content, using Embedded Media Field to automatically parse and display video from an editor's pasted URL from YouTube, Blip.TV, or other providers.

Chapter 6: It will show you how to supply video from your own server. Using the techniques and modules introduced here, specifically FileField and jQuery Media, you'll learn how to create your own YouTube clone. You'll also see how to create video thumbnail links and logo overlays for rudimentary branding.

Chapter 7: It will give a brief segue into file asset management, where you will learn various methods of controlling the workflow of media in your site. You'll see how to use Node Reference to tie disparate pieces of content together. You'll also examine the Asset module as an intuitive User Interface for editors to manage media, and Media Mover as a powerful back-end solution to bring videos, images, and audio into your file system, using FTP or even email as an alternative to a browser upload for attaching media to your content. You'll also briefly examine the benefits of using a third-party solution such as Kaltura for asset management and control.

Chapter 8: You'll learn how to use the Audio module as a powerful solution for integrating audio into your site. Using the node type created by the module, you'll be able to easily and quickly embed music and podcasts into your content.

Chapter 9: Using the FileField + jQuery Media solution examined earlier, you'll see how to use that for finite and flexible control over audio content. This separates audio functionality from the node, placing it into the field, so you will have the full benefits of CCK and Views for controlling our data. you'll also examine how the Embedded Media Field can be used to embed third-party audio content with the same ease as with images and video.

Chapter 10: It explores some advanced techniques to control our audio content, creating play lists, both automatic editor-controlled and custom end-user defined. You'll also see how to allow end users to embed audio content from our sites in their own blogs, with a method that can be extrapolated for the other types of media.

In the final chapter, you'll take a look at the future of multimedia and Drupal. For the near term, you'll examine some great things coming for Drupal 7, such as Fields and better media handling in the core. You'll also take a longer view, of the role of multimedia in the semantic web, mobile media, and even experimental new types of embeddable media.

Who Is This Book For?

Drupal Multimedia is written for people interested in learning how to better control and display media on their sites. The book is written for beginners and intermediate developers, although some of the techniques are admittedly advanced. The author assumes you already have a Drupal installation to work with, but will guide you through the administration and development of your site as it applies to each section of the book. If you do not yet know how to install Drupal on a web host's server, you are directed to Drupal.org for more information. A video cast is available at http://drupal.org/videocasts/installing-6 that can guide you through the steps of installation.

Please visit this book's companion site at DrupalMultimedia.org, where you can see live demonstrations of all the techniques explored here.

Reader Feedback

Feedback from our readers is always welcome. Let us know what you think about this book, what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply drop an email to <[email protected]>, making sure to mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email <[email protected]>.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer Support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the Example Code for the Book

Visit http://www.packtpub.com/files/code/4602_Code.zip to directly download the example code.

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing this you can save other readers from frustration, and help us to improve subsequent versions of this book. If you find any errata, report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to the list of existing errata. The existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide the location address or website name immediately so we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at <[email protected]> if you are having a problem with some aspect of the book, and we will do our best to address it.

Chapter 1. Introduction and Overview

Drupal is an open-source Content Management System (CMS), which can be used to create powerful, flexible websites that are easily configured and edited by the end users, who don't even need to know how to use HTML to harness its power. Using contributed modules to provide specialized functionality, you can use Drupal to create nearly any site that can be envisioned. Being scalable, it can be used to power anything from a community portal to a corporate network.

Drupal is the framework of choice for tens of thousands of developers and companies that build their sites based on Drupal. Drupal has been consistently rated among the top CMSs for several years.

Released as an open-source project in 2001 by its original creator, Dries Buytaert (http://buytaert.net/), it quickly attracted a strong community of developers and programmers. By now it is a mature and stable product that continues to evolve. With the release of Drupal 6 earlier this year, it remains a cutting-edge choice for website development.

Drupal is a database-driven dynamic web application built on PHP. As PHP is offered by most web hosts, as are MySQL and PostgreSQL, the database management systems supported by Drupal can be deployed from most server environments.

Note

PHP is a reflective programming language, which means that a Drupal script can observe and modify itself at runtime, allowing advanced features such as custom dynamic blocks and its template theming system.

Also, Drupal encapsulates the database in an abstract layer so that the contributed modules may access data stored on the server without knowing the implementation procedure. This allows a site to be deployed from any of the wide array of servers, using MySQL or PostgreSQL, Apache or IIS, Linux or Windows, and many other options.

Note

Drupal has sometimes been criticized as not following Object-Oriented Programming (OOP), largely because it doesn't make much use of PHP's object classes, which is far from true. In reality, Drupal standards implement OOP in an advanced and efficient way (see http://api.drupal.org/api/file/developer/topics/oop.html/6 for more discussion on this topic). Additionally, PHP 5 offers better OOP support and as Drupal moves to the requirement of this version of PHP, module maintainers will take more advantage of it.

The end result is that a site built with Drupal can be expanded and enhanced, using plug-in contributed modules and custom themes to create a powerful and unique site. It is specifically these two facets (contributed modules and custom theming) that will be explored in detail throughout this book, obviously with an eye towards multimedia.

Because of the limited space and the availability of excellent resources, this book assumes you have some basic experience of using Drupal, and that you already know how to install it on a server. In fact, to get the most out of this book, you probably want to have a test installation to test some of the techniques and ideas presented here. Besides visiting Drupal.org, you can also find more help in the Resources Appendix of this book.

Drupal's Multimedia

The Internet has literally exploded with multimedia over the past few years. We will specifically study images, audio, and video in this book, with some additional discussion of interactive media such as FLASH.

Drupal is well-suited to handling multimedia with its modular structure. However, at first glance on installation, this may not seem to be true. This is by design. The core of Drupal is meant to be fast, light, and scalable. It needs functionalities such as asset management and multimedia display that are provided by contributed modules, which must be added onto its core by developers and administrators. Finally, theme developers (or Themers, as these people are commonly referred to in the world of Drupal) take the resultant display and change it to meet the specifications for the site, matching content to compositions.

Due to the dichotomy between the light feel of Drupal core and the overwhelming dread of scouring through hundreds of contributed modules, the need has arisen for a book such as this, which will demonstrate how best to create a site that harnesses the power available for multimedia handling. But firstly, we need to understand the basics offered by the Drupal core and a few essential modules.

Drupal's Building Blocks

There are many essential components of Drupal. The basic components that we'll cover in this chapter are Nodes (content), Regions (areas of a page), Blocks (information placed in a specific region), Themes (describing how content is displayed), and Modules (adding new capabilities to a site). There are other essential components such as Users (providing individual accounts on a site), Filters (to filter user-generated content such as removing unwanted markup), and Comments (added to nodes by multiple users), but they are out of scope for this discussion (though may be touched upon in relevant sections throughout the book).

Nodes

Most content in Drupal is stored in the form of nodes. In general, if you are new to the concept, you can begin by thinking of a node as what would normally be thought of as a blog, post, or article in more static sites. The reality is that nodes can be far more complex yet flexible than this and may be extended in novel ways, as we'll explore throughout this book:

All nodes have an associated node type. This can be defined by a module such as the built-in page and blog types, contributed image, or video node types. In addition, using Content Construction Kit (CCK), you may define your own custom types and store specific information based on the needs of your site. We will explore this soon.

The basic node will have a title and a body. In general, the body will store the text, although it can be used to display multimedia in line with the text. Modules may allow other types of data known as fields, which may display a set type of multimedia in a specific place in the content, for instance. In addition, some modules such as Image attach may allow multimedia or other data to be attached to any node type.

Nodes are usually displayed in one of these three ways: as teasers, as full pages, and in views. There may be other ways of displaying node content, especially when writing custom code, but we will explore these options, which should suffice in most of the cases.

Teasers are generally smaller or shorter versions of the full content. For instance, a teaser might display the first paragraph or two with a thumbnail. On a basic default Drupal installation, once you have created some nodes, you will see an example of teasers on the front page of the site. By theming, developers may alter how a teaser is displayed.

All nodes may be viewed in full at their respective node pages, usually accessed by clicking on the title of a teaser. By default, this will display all the data stored in a node, although that may be overridden or altered in any of several ways.

Note

The URL for the default node page view will always be at /node/[nid], replacing [nid] with the node's unique identification number. This URL may be overridden manually or with other modules such as by using the URL path settings section of the node submission page or automatically using the Pathauto module. But it will still always be accessible using /node/[nid], for example at http://www.example.com/node/225 or http://www.example.com/?q=node/225 (if not using clean URLs).

Throughout this book, when displaying a URL, we'll assume you have enabled clean URLs on your site. If you have not, you would need to prepend ?q= to a URL. For example, /admin/build/modules would be ?q=admin/build/modules. In both cases, that would be local to your site such as http://www.example.com/admin/build/modules or http://www.example.com/?q=admin/build/modules. To enable clean URLs on your site, browse to Administer | Site configuration | Clean URLs at /admin/settings/clean-urls or ?q=admin/settings/clean-urls.

The Views module (touched upon later in this chapter) opens up many new ways of displaying information from nodes. Views may display nodes as teasers, full views, or slide shows, or may take specific parts of the data and display them in a list or

a table. There are many other ways a view can display content and we will explore the more common methods in this book.

Regions and Blocks