Drupal 7 Business Solutions
By Trevor James
()
About this ebook
Related to Drupal 7 Business Solutions
Related ebooks
Drupal 6 Site Builder Solutions Rating: 4 out of 5 stars4/5Drupal for Education and E-Learning Rating: 3 out of 5 stars3/5WordPress 3.7 Complete Rating: 5 out of 5 stars5/5TypePad For Dummies Rating: 0 out of 5 stars0 ratingsCMS Made Simple 1.6 Beginner's Guide Rating: 5 out of 5 stars5/5Drupal 5 Views Recipes Rating: 3 out of 5 stars3/5Drupal for Education and E-Learning - Second Edition Rating: 0 out of 5 stars0 ratingsBuilding Business Websites with Squarespace 7 Rating: 0 out of 5 stars0 ratingsFuelPHP Application Development Blueprints Rating: 0 out of 5 stars0 ratingsJoomla! VirtueMart 1.1 Theme and Template Design Rating: 0 out of 5 stars0 ratingsDrupal For Dummies Rating: 4 out of 5 stars4/5WordPress 4.0 Site Blueprints - Second Edition Rating: 0 out of 5 stars0 ratingsWordPress Web Application Development Rating: 5 out of 5 stars5/5WordPress 3 Search Engine Optimization Rating: 0 out of 5 stars0 ratingsJoomla! 1.5 SEO Rating: 0 out of 5 stars0 ratingsElgg 1.8 Social Networking Rating: 0 out of 5 stars0 ratingsJoomla! 1.6 First Look Rating: 0 out of 5 stars0 ratingsDrupal 6 Search Engine Optimization Rating: 4 out of 5 stars4/5Teach Yourself VISUALLY Complete WordPress Rating: 3 out of 5 stars3/5Moodle For Dummies Rating: 3 out of 5 stars3/5Joomla! 3 Beginner's Guide Second Edition Rating: 0 out of 5 stars0 ratingsWordPress 2.8 Theme Design Rating: 0 out of 5 stars0 ratingsSilverStripe 2.4 Module Extension, Themes, and Widgets: Beginner's Guide Rating: 0 out of 5 stars0 ratingsJoomla! 2.5 Beginner's Guide Rating: 0 out of 5 stars0 ratingsFlash with Drupal Rating: 0 out of 5 stars0 ratingsAgile Web Application Development with Yii1.1 and PHP5 Rating: 4 out of 5 stars4/5Drupal 7 Bible Rating: 4 out of 5 stars4/5Drupal 7 Social Networking Rating: 0 out of 5 stars0 ratingsWordPress MU 2.8 - Beginner's Guide Rating: 0 out of 5 stars0 ratingsNode.js 6.x Blueprints Rating: 0 out of 5 stars0 ratings
Information Technology For You
ChatGPT: The Future of Intelligent Conversation Rating: 4 out of 5 stars4/5Summary of Super-Intelligence From Nick Bostrom Rating: 5 out of 5 stars5/5How to Write Effective Emails at Work Rating: 4 out of 5 stars4/5How To Use Chatgpt: Using Chatgpt To Make Money Online Has Never Been This Simple Rating: 0 out of 5 stars0 ratingsCreating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Linux Command Line and Shell Scripting Bible Rating: 3 out of 5 stars3/5Supercommunicator: Explaining the Complicated So Anyone Can Understand Rating: 3 out of 5 stars3/5Computer Science: A Concise Introduction Rating: 4 out of 5 stars4/5CompTIA Network+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Exam N10-008 Rating: 0 out of 5 stars0 ratingsCompTIA A+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Core 1 Exam 220-1101 Rating: 0 out of 5 stars0 ratingsBeginner's Guide to Information Security Rating: 0 out of 5 stars0 ratingsThe Basics of Hacking and Penetration Testing: Ethical Hacking and Penetration Testing Made Easy Rating: 4 out of 5 stars4/5An Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5Data Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5Practical Ethical Hacking from Scratch Rating: 5 out of 5 stars5/5Handbook of Digital Forensics and Investigation Rating: 4 out of 5 stars4/5Inkscape Beginner’s Guide Rating: 5 out of 5 stars5/5Hacking Essentials - The Beginner's Guide To Ethical Hacking And Penetration Testing Rating: 3 out of 5 stars3/5Panda3d 1.7 Game Developer's Cookbook Rating: 0 out of 5 stars0 ratingsComputer Organization and Design: The Hardware / Software Interface Rating: 4 out of 5 stars4/5Health Informatics: Practical Guide Rating: 0 out of 5 stars0 ratingsCybersecurity for Beginners : Learn the Fundamentals of Cybersecurity in an Easy, Step-by-Step Guide: 1 Rating: 0 out of 5 stars0 ratingsWindows Registry Forensics: Advanced Digital Forensic Analysis of the Windows Registry Rating: 4 out of 5 stars4/5CODING INTERVIEW: Advanced Methods to Learn and Excel in Coding Interview Rating: 0 out of 5 stars0 ratingsSharePoint Designer Tutorial: Working with SharePoint Websites Rating: 1 out of 5 stars1/5How to Find a Wolf in Siberia (or, How to Troubleshoot Almost Anything) Rating: 0 out of 5 stars0 ratingsData Governance For Dummies Rating: 0 out of 5 stars0 ratings
Reviews for Drupal 7 Business Solutions
0 ratings0 reviews
Book preview
Drupal 7 Business Solutions - Trevor James
Table of Contents
Drupal 7 Business Solutions
Credits
About the Authors
Acknowledgment
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Planning our Site and Setting up Drupal
Artisan Bakers Collective
Plans for the Artisan Bakers Collective website
Selecting a foundation for the Artisan Bakers Collective site
Simple static web pages
Key advantages
Key disadvantages
Fully-customized site with PHP and MySQL
Key advantages
Key disadvantages
Drupal content management system
Benefits of building with Drupal
Disadvantages of Drupal
Deciding on Drupal
Getting started with Drupal
Artisan Bakers Collective on the web
Summary
2. Creating the Artisan Bakers Collective Website
The Core Drupal 7 look and feel
Checking the site's status report
Cron
Clean URLs
Drupal core content—basic pages and articles
Adding a Basic page
Editing a page
Security considerations
Adding users
Street presence, setting up the home page
Blog style home pages
Tags
Adding images to your content
URL path settings
Using path aliases
Creating multiple aliases for a page
Automatically creating page aliases
Publishing options
Creating a traditional home page
Deleting a page
Getting around—setting up navigation
Building menus
Types of menus
Adding a page to a menu
Setting the order of menu items
Enabling core modules and installing contributed modules
Installing contributed modules
Installing the Menu Block module
Using the Menu Block module
Summary
3. Adding Products and Services
Building a custom content type
Introduction to content types
Goal
Designing the menu item
Goal
Steps
Step 1: Determining how the content type will be used
Step 2: Determining what fields need to be included
Step 3: Determining what type each field should use, and what validation should be done
Step 4: Determine who will be viewing and editing the content type
Creating the content type
Goal
Steps
Adding a price to the menu item
Goal
Steps
Adding ingredients, dietary concerns and meals fields
Goal
Steps
Adding seasonal information to the menu item
Goal
Additional modules needed
Steps
Adding an image
Goal
Steps
Alternative solutions
Controlling access to the content type
Goal
Steps
Using taxonomy to categorize content
Create a vocabulary for Type of Baked Good
Goal
Additional modules needed
Steps
Adding terms to the vocabulary
Goal
Additional modules needed
Steps
Adding the Term reference field
Goal
Steps
Adding content with the content type
Creating a new Breads and Pastries item
Goal
Steps
Customizing the display of the content type nodes
Modifying the order of fields and the display of the field labels
Goal
Steps
Summary
4. Interacting with Customers and Visitors
Working with users
Allowing user registration
Goal
Steps
Extending the user signup form
Create a VIP role
Goal
Steps
Assign users to the VIP role
Goal
Steps
Working with comments
Enable comments for a content type and node
Goal
Adding new comments
Goal
Steps
Manage comments
Goal
Steps
Notification of new user comments on site
Goal
Additional modules needed
Steps for creating the e-mail action
Steps for creating the new comments trigger
Set up user ratings for content
Add Fivestar content ratings to a node
Goal
Additional modules needed
Steps
Adding a rate this node block
Goal
Steps
Change the display of the ratings
Goal
Steps
Working with polls
Create a poll
Goal
Additional modules needed
Steps
Adding the poll to the home page
Goal
Steps
Submitting a poll
Goal
Steps
Viewing poll results
Goal
Steps
Adding user surveys
Creating a user survey
Goal
Additional modules needed
Steps
Protecting the survey with Captchas
Goal
Additional modules needed
Steps
Answering a survey
Goal
Steps
Viewing survey results
Goal
Submissions view
Analysis view
Table view
Download view
Clear
Summary
5. Creating a Company Blog
Creating blogs
Setting up the blog system
Goal
Additional modules needed
Steps
Adding a new blog post
Goal
Steps
Adding moderation for blog posts
Goal
Additional modules needed
Creating the moderator role
Setting up moderation for the blog posts
Automatically moderating content based on keywords
Goal
Additional modules needed
Steps
Enabling customers to read your blogs
Displaying a list of available blogs
Goal
Additional modules needed
Creating a blog menu
Creating a blog block
Creating an RSS feed for newsreaders
Goal
Additional modules needed
Steps
Adding subscription buttons
Goal
Additional modules needed
Steps
Including information from other blogs
Allowing your site to read content
Goal
Additional modules needed
Steps
Viewing feeds
Goal
Steps
Automatically updating your feeds with cron jobs
Goal
Steps
Additional ways of setting up cron
Summary
6. Newsletters and Calendars
Creating newsletters
Creating a newsletter category
Goal
Additional modules needed:
Steps
Viewing your newsletter categories
Adding newsletters
Simplenews module settings
General and newsletter configuration
Subscription and Send mail configuration
Creating a new issue of the newsletter
Goal
Steps
Allowing users to sign up for the newsletter
Goal
Steps
Managing sign ups
Goal
Steps
Importing and exporting subscriptions
Goal
Steps
Adding a calendar
Tweaking our date and time settings
Goal
Additional modul
Steps
Adding an event content type and custom date/time field
Goal
Steps
Adding events to the site
Goal
Steps
Displaying events on a calendar
Goal
Additional modules needed
Steps
Summary
7. Sharing and Consuming with YouTube, Flickr, Google Maps, and Twitter
Integrating your site with other web content
Online baking class
Embedding a YouTube video with a filter
Goal
Additional modules needed
Steps
Creating a YouTube playlist and display a random video
Goal
Additional modules needed
Steps
Flickr integration: Another alternative for images and slideshows
Embedding media from Flickr
Goal
Additional modules needed
Steps
Using the Flickr module to insert photos using a filter
Goal
Additional modules needed
Steps
Flickr module blocks
Posting your site's content to Twitter
Twitter when you post
Goal
Additional modules needed
Steps
Posting to Twitter
Summary
8. Freebies and Downloads
Adding downloads and PDFs to the website
Controlling how files are downloaded
Goal
Additional modules needed
Steps
Allowing files to be uploaded to the website
Goal
Additional modules needed
Steps
Configuring files for secure private download
Sending the correct file types to a user
Goal
Additional modules needed
Steps
Forcing a file to be downloaded
Goal
Additional modules needed
Steps
Configuring Printer-friendly pages in Drupal
Goal
Additional modules needed
Steps
Automatically generating PDF files for a page
Goal
Steps
Summary
9. Online Orders and Payments
The Drupal Commerce module
Goal
Additional modules needed
Download and install Commerce
Setting up your Store with Commerce
Adding a content type in Drupal to display our Commerce product types
Adding Products using Commerce
Checking on orders as the site administrator
Commerce Store Configuration
Summary
10. Image Galleries and Slideshows
Using Views to build image galleries
Installing and Configuring the Views module
Goal
Additional modules needed
Steps
Add some photos
Configuring Imagecache
Configuring Image Galleries with Views
Setting up slideshows with Lightbox and Views
Goal
Additional modules needed
Steps
General settings
Slideshow settings
HTML content settings
Automatic image handling settings
Adding a Lightbox slideshow to our Photo gallery
Additional topics
Summary
11. Maintaining and Optimizing your Drupal Site
Website backups
Manually backing up a site
Goal
Steps
Setting up automatic MySQL backups
Goal
Additional modules needed
Steps
Restoring a site from a backup
Goal
Additional modules needed
Steps
Optimizing your Drupal site and its database
Optimizing the database tables
Goal
Additional modules needed
Steps
Using caching to improve performance
Goal
Additional modules needed
Steps
Creating content workflows and revisions
Creating content revisions
Goal
Additional modules needed
Steps
Comparing content revisions
Goal
Additional modules needed
Steps
Upgrading to new versions of Drupal
Checking for new updates to Drupal and modules
Goal
Additional modules needed
Steps
Upgrading Drupal contributed modules
Goal
Additional modules needed
Steps
Upgrading to a new major or minor release of Drupal core
Goal
Additional modules needed
Steps
Summary
Index
Drupal 7 Business Solutions
Drupal 7 Business Solutions
Copyright © 2012 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, nor Packt Publishing, and its dealers and 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 of 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: December 2008
Second edition: January 2012
Production Reference: 1090112
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84951-664-8
www.packtpub.com
Cover Image by Karl Moore ( <karl.moore@ukonline.co.uk> )
Credits
Authors
Trevor James
Mark Noble
Reviewers
Richard Carter
Adam Hill
Jeffrey Smith
Ravishankar Somasundaram
Senior Acquisition Editor
Usha Iyer
Lead Technical Editor
Dayan Hyames
Technical Editors
Apoorva Bolar
Priyanka Shah
Project Coordinator
Vishal Bodwani
Proofreader
Mario Cecere
Indexer
Hemangini Bari
Production Coordinator
Aparna Bhagat
Cover Work
Aparna Bhagat
About the Authors
Trevor James is a Drupal developer based in Middletown, MD, USA. Trevor has been designing websites for 15 years using a combination of PHP, HTML, XHTML, CSS, and ColdFusion, and has been using Drupal intensively for over five years. Trevor's focus is on building web applications and portals for education, non-profit, medical systems, and small business environments.
He is interested in best methods of integrating Web services with Drupal sites, optimizing Drupal site performance, and building custom Drupal content displays using Views, Panels, Display Suite and other contributed modules. Trevor develops front end Drupal-based interfaces that support data intensive websites. He loves teaching people about Drupal and how to use this excellent open source content management framework.
Trevor authored the Packt book, Drupal Web Services, published in November 2010. For more on this title visit: http://www.packtpub.com/drupal-web-services/book.
Trevor co-authored the Packt title, Drupal 6 Performance Tips, published in February2010. For more on this title visit: https://www.packtpub.com/drupal-6-performance-tips-to-maximize-and-optimize-your-framework/book.
Trevor created a 14 hour video tutorial series on Drupal 7 for VTC (Virtual Training Company) in 2011. The video is available via the VTC website here: http://www.vtc.com/products/Drupal-7-Tutorials.htm.
Acknowledgment
Thanks to the Packt editorial staff including Usha Iyer, Vishal Bodwani, Gaurav Mehta, and Dayan Hyames for approaching me originally about writing the second edition of this title. It's been great working on the updated version of the book for Drupal 7. As always the Packt editorial staff have impressed me with their professionalism and knowledge of Drupal and open source. They continue to contribute back to the open source community and to the Drupal community with their titles and as always contribute a percentage of the profits from this book back to the Drupal Association.
I thank all the reviewers of the book who worked closely with me to get this finished product out the door.
The authoring process takes a great deal of time and I thank my family for allowing me to devote countless hours to the writing process. Much thanks to my wife Veronica and our lovely twin daughters Francesca and Clare.
This book is for all the new Drupal users out there. I hope you are as inspired by Drupal as I am and this software helps you to build a rich and dynamic site for your small business. Drupal on!
Mark Noble has worked in software development and website design for over 13 years, in a variety of capacities including development, quality assurance, and management. He takes pride in developing software and websites to make businesses run more effectively, and delights in helping users to get their jobs done more easily.
Mark currently works developing websites, using a combination of Java and PHP, to help libraries to manage their collections. He also performs contract work for clients in a variety of industries, developing both traditional desktop applications as well as web-based applications, using Drupal and a variety of other technologies. When he isn't working for a client, Mark enjoys building sites using Drupal. His other hobbies include playing with his family, photography, hiking, travel, and geocaching.
I would like to thank my wife, April, and my kids, Zoe and Theo, for their support during the writing of this book. I know that at times when deadlines got short, I did too. I love you all and I'm looking forward to having some downtime and relaxation with everyone.
About the Reviewers
Richard Carter is the Creative Director at Peacock Carter Ltd (http://www.peacockcarter.co.uk), a web design and development agency based in the North East of England, working with clients including Directgov, NHS Choices, and BusinessLink.
Richard is the author of MediaWiki Skins Design, Magento 1.3 Themes Design, Joomla! 1.5 Templates Cookbook, and Magento 1.4 Themes Design. He has acted as a technical reviewer on MediaWiki 1.1 Beginner's Guide, Inkscape 0.48 Essentials For Web Designers, and the Definitive Guide to Drupal 7, and is a co-founder of the Drupal North East user group (http://www.drupalnortheast.org.uk).
He blogs at http://www.earlgreyandbattenburg.co.uk and tweets nonsense at http://twitter.com/RichardCarter.
I would like to thank the author of the book for dedicating time to helping others learn Drupal, which has changed beyond most recognition in the last few years.
Jeffrey Smith has 15+ years experience in the IT industry and about eight months experience as a .NET developer. He loves trying new things which is a blessing and a curse.
He loves technology and trying new things. He is currently ramping up his JavaScript and Ruby on Rails skills. He is a .NET developer by day and experiments with new things at night. He is working on projects that use ASP.NET MVC, C#, Coffeescript, Drupal, JQuery, MongoDB, PHP, Ruby on Rails, Rhomobile, Sproutcore, and the Strobe framework.
Ravishankar Somasundaram has over six years of experience in providing solutions to clients across multiple sectors and domains. Being more passionate about learning and teaching, he also strongly believes that the sole purpose of learning is to make our minds think in different perspectives and facilitates the same in his training sessions through a blended learning approach mainly focused on how to learn to learn
.
In his early schooling apart from winning several prizes in science projects, he was awarded the Title Junior Scientist
by a committee consisting of people from ISRO in an Inter school Science Fest for a model display on Evolution of Airplanes through Aerodynamics
, this is one of his childhood achievements.
His final year college project aimed at eliminating the scenario of English alone being the medium of programming in all programming languages, which restricts people who don't know English getting into the IT field and implementing their ideas, was selected and funded by MIT NRCFOSS and considered a landmark.
Being one of the seven people from India and the only one from Tamil Nadu as an official third party developer of Moodle code, he shares his knowledge by helping people on Moodles official forum and on IRC. He has also presented a paper in the ninth International Tamil Internet conference on Moodle: For Enhanced Learning
which talks about leveraging Moodle's capability to expand the user base for one of the oldest languages known to mankind—Tamil.
Ravi was a Freelance IT Consultant delivering solutions to firms irrespective of Technical, Non-Technical or Business domains. Currently he works for Thirdware Technologies as a Technical Analyst and Chief Architect heading the R&D Division.
Recently he represented his company at an International conference Yugma—Unleashing the Innovation potential
with an idea which uses Artificial Intelligence to empower the next generation enterprise mobile solutions.
I am thankful to all the people I have met till date, for they have contributed to the cause of my growth either by being an inspiration or personally guiding and pointing me to the right direction when facing challenging situations or throwing critiques continuously, making me recognize there is always an area for improvement in my career and personal life
Last, but the foremost, I dedicate all my accomplishments to my parents, sister and other relations for all their faith, hope, love, and support.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print and bookmark content
On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Preface
You can use the Drupal 7 content management framework to build a small business website rapidly. You may add blogs; images and image galleries; maps, e-commerce and shopping carts; social application integration including Twitter and Flickr, and more to your site to connect with your customers and make more money from your business.
Drupal 7 Business Solutions will give you hands-on practical tutorials on how to build a rich and dynamic website for your business quickly using one of the most popular tools in open source.
You'll start by adding blogs and images to your website. Then you'll learn how to add a VIP section to your site so that you can give your logged in users special discounts and other VIP freebies. Next, you will learn to send your customers e-mail newsletters and show them a dynamic events calendar.
The book will then teach you to add e-commerce to your site using the new Drupal Commerce module so you can sell your products online. You'll add YouTube videos, Google maps, and Flickr-based photos to help enhance your business site. You will then learn to incorporate feedback mechanisms for your customers.
The book also explains how to maintain your site, upgrade it, and continue adding dynamic content to it over time so you can market your business successfully with a professional, flexible and optimized website.
What this book covers
Chapter 1, Planning our Site and Setting up Drupal: In this chapter we plan for and map out our website and its content with the Drupal content management system as the backbone. We look at the advantages and benefits of using Drupal to build our site. We install Drupal and set up the website's initial basic configuration.
Chapter 2, Creating the Artisan Bakers Collective Website: In this chapter we continue configuring Drupal and learning how to run a cron task and check the Drupal status report. We enable clean URLs, and add some Basic Page and Article content to our site. We add users to our site and configure basic user permissions. We discuss the various types of home pages we can configure using Drupal. We configure path aliases, set up navigation menus, tweak the order of our menu items, enable core modules; and install contributed Drupal modules.
Chapter 3, Adding Products and Services: In this chapter we build a custom content type using Drupal. We configure the content type and add custom fields to the content type in order to post specific data to our site using the content type's form. We install and configure the Date module to handle adding fields to our content type to collect date and time information. We set up some basic access control to our content type. We also build some taxonomy vocabularies and add tags to