Drupal Multimedia
3.5/5
()
About this ebook
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.
ApproachThis 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 forThis 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.
Aaron Winborn
Aaron Winborn has been developing websites since the mid-90s. Beginning as a freelancer while teaching at a Sudbury school (a democratic and age-mixed model for young people), his clients demanded more and more features, until he (like everyone and their grandmother) realized he had built a full-featured content management system that required more work to develop and maintain than he was able in his spare time. He realized at some point that somewhere in the world of Open Source, someone had to have created and released something to the community. Of course, the wonderful news was Drupal. After converting the existing sites of his clients to Drupal, he continued learning and began to contribute back to the community. About this time, Advomatic, a company with similar interests and a commitment to the Drupal community, began expanding beyond the initial partners who formed it in the wake of Howard Dean's presidential campaign of 2004. Aaron realized that his own goals of creating great sites with a team would be better matched there, and he was hired as their first employee. Since that time, he has helped to develop some excellent sites, with clients such as Air America Radio, TPM Cafe, NRDC, Greenopia, Mountain News, Viacom, and Bioneers. He has also contributed several modules to Drupal, mostly stemming from his work with multimedia, including Embedded Media Field (for third-party Video, Audio, and Images), Views Slideshow (to create slide shows out of any content), and the RPG module (for online gaming, still in progress).
Related to Drupal Multimedia
Related ebooks
Microsoft .NET Framework 4.5 Quickstart Cookbook Rating: 0 out of 5 stars0 ratingsNW.js Essentials Rating: 0 out of 5 stars0 ratingsMeteor Design Patterns Rating: 0 out of 5 stars0 ratingsInstant HTML5 Responsive Table Design How-to Rating: 0 out of 5 stars0 ratingsBeginning DotNetNuke Skinning and Design Rating: 0 out of 5 stars0 ratingsLearning Drupal 6 Module Development Rating: 3 out of 5 stars3/5Responsive Design High Performance Rating: 0 out of 5 stars0 ratingsPHP Programming Solutions Rating: 0 out of 5 stars0 ratingsMastering Visual Studio: A Comprehensive Guide Rating: 0 out of 5 stars0 ratingsUltimate Laravel for Modern Web Development Rating: 0 out of 5 stars0 ratingsPractical C Programming: Solutions for modern C developers to create efficient and well-structured programs Rating: 0 out of 5 stars0 ratingsTools and Skills for .NET 8: Get the career you want with good practices and patterns to design, debug, and test your solutions Rating: 0 out of 5 stars0 ratingsReal-World Next.js: Build scalable, high-performance, and modern web applications using Next.js, the React framework for production Rating: 0 out of 5 stars0 ratingsRelational Database Index Design and the Optimizers: DB2, Oracle, SQL Server, et al. Rating: 5 out of 5 stars5/5ASP.NET 3.5 CMS Development Rating: 0 out of 5 stars0 ratingsApache Solr PHP Integration Rating: 0 out of 5 stars0 ratingsOpa Application Development Rating: 0 out of 5 stars0 ratingsData Normalization A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsSoftware Architecture Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsProfessional ASP.NET MVC 5 Rating: 0 out of 5 stars0 ratingsThe Art of Modern PHP 8: Learn how to write modern, performant, and enterprise-ready code with the latest PHP features and practices Rating: 0 out of 5 stars0 ratingsVideo Streaming Second Edition Rating: 0 out of 5 stars0 ratingsDeveloping Web Applications with ASP.NET and C# Rating: 0 out of 5 stars0 ratingsLearning Apache Cassandra - Second Edition Rating: 0 out of 5 stars0 ratingsMastering Kotlin for Android 14: Build powerful Android apps from scratch using Jetpack libraries and Jetpack Compose Rating: 0 out of 5 stars0 ratingsPython for ArcGIS Pro: Automate cartography and data analysis using ArcPy, ArcGIS API for Python, Notebooks, and pandas Rating: 0 out of 5 stars0 ratingsUnix / Linux FAQ: with Tips to Face Interviews Rating: 0 out of 5 stars0 ratingsAngular for Enterprise Applications: Build scalable Angular apps using the minimalist Router-first architecture Rating: 0 out of 5 stars0 ratings
Information Technology For You
Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Data Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5How to Write Effective Emails at Work Rating: 4 out of 5 stars4/5ChatGPT: The Future of Intelligent Conversation Rating: 4 out of 5 stars4/5Learn Algorithmic Trading: Build and deploy algorithmic trading systems and strategies using Python and advanced data analysis Rating: 0 out of 5 stars0 ratingsAlgorithms to Live By: The Computer Science of Human Decisions Rating: 4 out of 5 stars4/5Attention Span: Finding Focus for a Fulfilling Life Rating: 4 out of 5 stars4/5Summary of Super-Intelligence From Nick Bostrom Rating: 4 out of 5 stars4/5The Programmer's Brain: What every programmer needs to know about cognition Rating: 5 out of 5 stars5/5UML 2.0 in Action: A project-based tutorial Rating: 0 out of 5 stars0 ratingsA Mind at Play: How Claude Shannon Invented the Information Age Rating: 4 out of 5 stars4/5Quantum Computing for Programmers and Investors: with full implementation of algorithms in C Rating: 5 out of 5 stars5/5The Tetris Effect: The Cold War Battle for the World's Most Addictive Game Rating: 3 out of 5 stars3/5Solution Architecture Foundations Rating: 3 out of 5 stars3/5AWS Certified Cloud Practitioner: Study Guide with Practice Questions and Labs Rating: 5 out of 5 stars5/5Personal Knowledge Graphs: Connected thinking to boost productivity, creativity and discovery Rating: 0 out of 5 stars0 ratingsWho Says Elephants Can't Dance?: Leading a Great Enterprise Through Dramatic Change Rating: 4 out of 5 stars4/5The BPMN Graphic Handbook Rating: 4 out of 5 stars4/5Information Theory: A Concise Introduction Rating: 0 out of 5 stars0 ratingsMachine Learning Interview Questions Rating: 5 out of 5 stars5/5The Age of AI: How Artificial Intelligence Will Transform Our World Rating: 0 out of 5 stars0 ratingsGoogle Cloud Platform an Architect's Guide Rating: 5 out of 5 stars5/5Inkscape Beginner’s Guide Rating: 5 out of 5 stars5/5A Modern Enterprise Architecture Approach: Enterprise Architecture Rating: 4 out of 5 stars4/5A Vulnerable System: The History of Information Security in the Computer Age Rating: 0 out of 5 stars0 ratingsCharacter Expression: Using ChatGPT to Write Believable Emotions in Fiction Rating: 3 out of 5 stars3/5
Reviews for Drupal Multimedia
3 ratings0 reviews
Book preview
Drupal Multimedia - Aaron Winborn
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