
Transcription
BeginnersGuide ToDrupalYour first step towardspublishing with themost powerful opensource web contentmanagement system.Robert J. SafutoUpdated on 01/07/2011. You can always find the latest downloadable version ofBeginner’s Guide To Drupal at .
Beginners Guide To DrupalTable of ContentsBackground . 3What You Can Do With Drupal . 4Why You Should Use A System Like Drupal . 5Technical Requirements . 6Drupal Knowledge . 6Drupal Community . 8Drupal Primer . 9Spam Prevention. 17Managing Media . 19Commerce . 24Statistics . 24Social Networking . 25Hosting . 26Service Providers . 28Getting Started With Drupal . 28About Awakened Voice . 30This document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 2 of 30
Beginners Guide To DrupalThis very basic guide is intended to give beginning Drupal developers information tohelp them get started with the platform. It is barely possible to provide all theinformation necessary to excel at Drupal in just a few pages so I recommend that youdedicate some time each week to searching out new resources and tips on how toimprove your knowledge of the platform.This guide is a living document. As the Drupal platform changes I fully intend to update the document.This guide can also benefit from reader feedback. If you see inaccuracies or think that a particular pieceof information should be added to the guide please email me with the details of your input.BackgroundThe Drupal project was started in 2000 by a student in Belgium named Dries Buytaert. The code wasoriginally designed for a site called Drop.org. In 2001 the source code for this project was released asDrupal. More information on Drupal history is available at http://drupal.org/node/769. In 2007, Driesannounced the launch and venture funding of Acquia. Acquia is a commercial project that aims to“provide value-added software products and services” for Drupal.Major Release History Drupal 4.7 - May 1, 2006 Auto-complete Forms Multiple Block Regions Free Tagging Aggregator Enhancements Drupal 5.0 - January 15, 2007 Web-based Installer Updated Admin Pages URL Filtering Custom Content Types Drupal 6.0 - February 13, 2008 Open ID Support Localization Features Actions and Triggers Drag-and-Drop Admin Drupal 7.0 – January 5, 2011 Improved image handling More secure scheduling of tasksThis document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 3 of 30
Beginners Guide To Drupal Better what you see is what you get (WYSIWYG) editor supportRedesigned administrative user interfaceNew default themeWhat You Can Do With DrupalDrupal is an extremely flexible system that allows you to create a wide variety of websites, some ofwhich are summarized below.Website with Static ContentDrupal is a great tool for creating traditional websites that have a relatively static set of content. Thecore release of Drupal allows you to create as many unique pages as you like. Drupal also gives you theopportunity to set any particular page you create as the home page.Website with Dynamic ContentIn addition to static pages, the core Drupal release allows you to create a blog, upload file attachmentsand aggregate content from other sites. It's easy to add a blog or news updates to your static content.You could upload and share press releases or other company documents. You can pull in news thatrelates to your site from an RSS feed by using the aggregator module. People can subscribe to yourdynamic content by utilizing one of the many RSS feeds made available by the system.Single or Multi-Author BlogThe Drupal blog module allows each site user to have a blog. Even if the site has only one author,Drupal contains great features that allow you to get the full experience. Each blog has its own RSS feedfor easy subscription via a feed reader. Drupal allows you to freely add tags to each post, which youcan display as a cloud using the tagadelic module. Good spam protection is available as well. You canrequire that visitors sign up before commenting. Or you can use the Captcha, Mollom or Spam modulesto provide stronger spam protection.Community WebsiteDrupal contains a wide variety of features that make a community publishing site possible. The Drupalcore release includes a user account system. This allows users to register for an account with your site.Drupal core also includes a custom profile module that allows a site developer to set the types ofinformation they would like to capture in a user's profile. Users may also upload a small photo torepresent their profile. Modules such as Organic Groups allow you to create a full-featured communitywebsite.This document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 4 of 30
Beginners Guide To DrupalOpen Data PlatformDrupal can be used to import and serve data from the database in the form of tables, file downloads andcharts. Contributed modules such as Charts and Graphs, Data, Feeds and Views Bonus Pack go a longway in helping you to build this type of site.Drupal also contains robust user access features that allow a site administrator to specify the types ofcontent a user can create on the site. Site administrators can create various user access levels so thatsome users can have access to different features than others. A wide variety of contributed modulesextend the community experience with private messaging, user relationships, content ratings, contentforwarding and a lot more.Why You Should Use A System Like DrupalNotice that the title says, “a system like Drupal.” There are a wide variety of community and contentmanagement platforms available today. After you perform a detailed analysis you might decide thatDrupal is not for you. That's ok but you shouldn't settle for a system that doesn't have the characteristicsof a Drupal-based site.EconomicsSince Drupal is an open source project you don't have to pay any sort of license fee to access thesoftware. You may want to pay someone to help customize features and theme your site. But if you'rewilling to dive in and learn about the system you can do it all yourself.ExpandabilityA Drupal site can start out as a single author blog, migrate to a multi-author blog and then expand intoa user generated content community without changing platforms. You simply make the switch byturning on and configuring new features and defining new access roles.FeaturesBetween the core and contributed modules the Drupal platform allows you to do almost anything youwill need to do with your website. And if Drupal doesn't excel at a particular function it probablyintegrates with a service that can provide the function for you. One very good example of third-partyservice support involves integration with Google Analytics for advance statistics on your Drupal siteactivity. Drupal also integrates with anti-spam services like Akismet and Mollom, allowing the dataintensive task of content filtering to be handled by another server.This document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 5 of 30
Beginners Guide To DrupalCommunityWith many commercial systems you have to rely on the company that built the system to providesupport. With Drupal and other open source systems you can have the opportunity to get help from avery large community of developers and users of the system. The main Drupal community website atDrupal.org contains community generated documentation and a lively forum section where you canfind answers to your questions about the platform.Technical RequirementsBeginners should know some important information about Drupal requirements before they get starteddeveloping a site. You're going to need a web hosting account in order to get a website based on Drupalup and running. This will cost you anywhere from 7.95 to 50 per month depending on the features ofthe account. You can do more research in the hosting forum at Drupal.org. Whichever host you choosethere are two hosting features that are essential to building a Drupal site.1. MySQL Database - The database stores all of the essential information about the configurationand content on your site. MySQL version 4.1 or higher is highly recommended. Drupal 7requires MySQL 5.0.15 or higher.2. PHP - PHP provides the necessary functions for the Drupal software code to run on yourwebsite. PHP version 5.2 or higher is recommended, although PHP version 4.3.5 should workwith Drupal version 5 or 6. Drupal 7 requires PHP 5.2.5 or higher.You will also need FTP (short for File Transfer Protocol) access to your site. This is a standard featureof all hosting accounts and allows you to upload or download files between the web server and yourlocal machine. If you are new to FTP then you will need to install a program that allows you tointerface with your web server. Filezilla is a free FTP program that I use and recommend for you aswell.More detailed information on Drupal technical requirements is available at drupal.org/requirements.Drupal KnowledgeOne of the great challenges of a system like Drupal is the fact that universe of features, which is largeto begin with, is always expanding. As such, the many sources of knowledge about the platform arevery important to anyone researching or implementing the system.This document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 6 of 30
Beginners Guide To DrupalDrupal.orgThe official hub of the Drupal community is always the best place to start when searching for Drupalknowledge. The forum section contains active discussions on just about every Drupal topic that you canthink of. The Drupal Handbooks are a source of relatively static documentation about the platform. Thehandbooks also contain a section for listing Drupal videocasts. Videocasts allow you to watch step-bystep tutorials on customizing your Drupal install.BooksAs Drupal has grown in popularity the system has gained the attention of technical writers, some ofwhom have published print and e-books about Drupal. Here are some of the books available as ofJanuary 2011.Foundation Drupal 7Drupal 7 Module DevelopmentDrupal 6 Java ScriptDrupal MultimediaDrupal 6 Site Builder SolutionsPro Drupal DevelopmentSelling Online with DrupalUsing DrupalDrupal6 ThemesThis document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 7 of 30
Beginners Guide To DrupalNote: The above images contain affiliate links which help to compensate me for the time spent keepingthis document up to date.Enthusiast WebsitesA very large community of Drupal enthusiasts has chosen to share knowledge and provide support forDrupal via their personal websites. Here is a list of just a few destinations where you can findadditional knowledge and support on the platform. Drupal Dojo - Drupal lessons and videocasts. Forty-two lessons available as of April 2008.Lullabot Podcasts - Audio and video discussion and instruction focused on the Drupal platform.Mastering Drupal - Blog posts, interviews and videocasts about Drupal.Drupal Ace – Online Drupal administration manual.Drupal Planet – An aggregation of Drupal blog posts from many sources.Learn By The Drop – Drupal learning videocasts and blog posts.1Mustardseed Media – Drupal learning videocasts.Other ResourcesSlideshare is a site that enables the sharing of slide presentations on the web. Searching on the Drupaltag provides a wide variety of presentations. Some of the popular presentations are Introduction ToDrupal, Drupal 6 Theming and Drupal Best Practices. A wide variety of Drupal videos can also befound on YouTube. Some Drupal videos currently popular on YouTube are Implementing Drupal,Drupal Taxonomy and Drupal Overview. Scribd is a document hosting site that has many Drupaldocuments.The CommunityThe Drupal community is a large, vibrant one that represents a great resource for anyone who getsinvolved with the platform. I've already mentioned the main community website at Drupal.org whoseforums are a great way to introduce yourself to the community experience. There are several otheropportunities for you to connect with the Drupal community as indicated below.Drupal GroupsDrupal groups is a place where you can get involved with existing groups or organize your own. Youcan search the Drupal groups website to find Drupal events, knowledge and even Drupal-related jobpostings. If you're interested in meeting local Drupal users in person then consider searching DrupalGroups for a local group in your area. The groups feature eases the process of entering and engagingwith the community. Each group has its own RSS feed. I recommend subscribing to the feeds of any1I am the maintainer of author of posts on Learn By The Drop.This document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 8 of 30
Beginners Guide To Drupalgroups for whom you want to get regular updates without having to visit their web page. Drupal groupsare powered by the Organic Groups module, which means that you can have the same functionality onyour site that you experience on Drupal groups.The Drupal AssociationIf you want to take your involvement with the Drupal community to the next level then considerbecoming a member of the Drupal Association. The Drupal Association is a non-profit entity whosemission is to help Drupal flourish via funding, events, infrastructure development and more. TheDrupal Association accepts donations and those who desire to support the association can sign up for amembership. If you find yourself benefiting from Drupal you should consider becoming a member.Subscribing to the Drupal Association staff blog is recommended for those who want to keep up withwhat's happening and what's important in the world of Drupal.Drupalcon EventsMeet members of the Drupal community (also known as Drupallers) in person at Drupalcon. Accordingto the official Drupalcon website, "Drupalcon is the twice-yearly gathering of Drupalers to learn about,discuss, and advance Drupal, and to network with other Drupal community members. There, you willhave the opportunity to meet Drupal community leaders, top developers, your favorite modulemaintainers, dojo trainers, members of the Drupal association, potential business partners, and futureemployees!"Local EventsIn addition to the occasional major Drupal events there are also many local Drupal oriented eventsoccurring each month. Some of these events are informal meetups. Others are mini-conferences calledDrupal Camps. And others are specifically geared towards developers who are working on softwarecode. You can find out about these events by utilizing a variety of websites that list events and meetups.Drupal groups can help you to find local groups that may or may not have regular meetings.Upcoming.org is an events site where Drupal event planners sometimes list events. Meetup.com isanother good resource for finding local Drupal events.A PrimerNow that you know a bit about Drupal it's time to take a closer look at the system. The goal of thissection is to provide you with an understanding of some of the key elements of the platform. Drupal isvery similar to other popular open source publishing platforms, but also has its own unique terminologyto describe features and functions. Here are some of the key terms, features and functions that you needto know about.This document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 9 of 30
Beginners Guide To DrupalNodesNodes are the basic building blocks of all Drupal sites. Every item of content that you add to a Drupalsite becomes a node. When you create a page you have created a node. When you create a blog postyou have created a node. A basic node has a title and a description just like you're used to if you've everposted to a blog.One differentiating feature of Drupal is the fact that you have the ability to create custom node types byusing the Content Construction Kit (CCK) module. CCK allows you to build a node type that meetsyour exact specifications. So instead of just the standard title and description you can also add fieldsspecifically for an address, a web link, an email address, a file upload and much more. Custom contenttypes allow you to streamline your workflow and also create forms that allow users to submit differenttypes of content to your site. CCK node types can be displayed on your Drupal site in almost any wayyou want by using the Views module. You can find more information on the standard Drupal nodetypes on Drupal.org.TaxonomyDrupal comes with a built in taxonomy system. The taxonomy system allows you to categorize thenodes on your site. The taxonomy system allows you to define vocabularies which consist of one ormore terms. Vocabularies allow you to organize your terms into groups. Each term is essentially acategory. There is no limit to the number of vocabularies you can create. There is also no limit to thenumber of terms that you can include in each vocabulary. Your vocabulary can also have free tagging.So instead of entering specific terms ahead of time users may enter tags freely at the time the post iswritten and those tags automatically become terms in that vocabulary.Vocabularies and Types of Nodes They Are Assigned ToThis document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 10 of 30
Beginners Guide To DrupalTerms For Vocabulary Shown AboveThis taxonomy system makes Drupal very flexible and very powerful because you can use yourcategories and terms to display the content on your site in a variety of different ways. For example, acontributed module called Tagadelic allows you to display categories as a tag cloud. You can also useyour site categories to generate custom views and RSS feeds.Tag Cloud by TagadelicThis document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 11 of 30
Beginners Guide To DrupalRSS FeedsDrupal generates a wide variety of RSS feeds. RSS allows site administrators and visitors to keep trackof new content by subscribing in a feed reader. Some popular feed readers are Google Reader, MyYahoo and Feed Demon.Every Drupal site has a site level RSS feed that shows at the address www.yoursite.com/rss.xml. RSSfeeds are generated by each category you create as well. When viewing a particular category look forthe feed icon ( ) at the bottom of the page. The feed icon will link to the feed for the categorycurrently being displayed.The types of feeds that I just mentioned are generated automatically by Drupal. You also have theoption to generate custom feeds by using the Views RSS module which is included in the previouslymentioned views module. Views RSS allows you to generate an RSS feed for each custom content typethat you create using Drupal. A little more information on generating RSS feeds for views can be foundon Drupal.org. Also see Understanding RSS On Your Drupal Site.ModulesModules add functionality to your Drupal site. The core installation of Drupal includes several moduleswhich are known as core modules. There are several key core modules that you should considerenabling on any Drupal-powered website. A list of the core modules that I recommend activating formost basic sites follows. Path - Allows you to manually set the path for any node that you create. For example, if youcreate an 'about' page for your site you can set the path to yoursite.com/about oryoursite.com/about-us. The choice is yours.Menu - Gives you control over the menu system for your site.Blog - A must if you are using Drupal as a blog site. Also very helpful if you're building apersonal or corporate website and want to have a blog as part of the final product.Comments - Gives you the power to allow comments on any type of node.Search - Provides site visitors with the ability to search for content in nodes published on yoursite.Upload - Allows you to attach a variety of different files types to nodes of your choosing.Many people choose Drupal because of its powerful user generated content features. If you areconstructing a website that aims to provide social networking or user generated content features thenyou'll probably want to activate a few more modules from the list below. Forum - Allows site users to create threaded discussions.This document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 12 of 30
Beginners Guide To Drupal Poll - Create polls and get responses from your community.Profile - Adds the ability to customize the information that users can add to their accounts.Tracker - Creates a view that allows users to see a list of the latest posts from the entirecommunity or for an individual user.A detailed list of the modules included in the current core release of Drupal can be found athttp://drupal.org/handbook/modules.Drupal features a vast array of modules that are contributed by the community. Modules contributed bythe community are known as contributed modules. Contributed modules allow you to extend Drupal byadding almost any feature you can think of. I mention a number of contributed modules throughout thisguide. I recommend clicking through to view the details on any that interest you. I also recommend thatyou spend some time checking out the module repository on Drupal.org. Once there you can viewmodules by category, name or date added. The module repository should be your first stop if you desirea feature for your site that does not exist in core.Contributed Module On Drupal.orgThis document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 13 of 30
Beginners Guide To DrupalSince the Drupal module pool expands daily, I suggest that you subscribe to the module repository RSSfeed so you can keep track of the latest updates as they occur.Installing ModulesDrupal modules are very easy to install. Any contributed modules should first be un-zipped onto yourcomputer's hard drive. Once un-zipped you should upload (using your FTP program) the module folderto the 'sites/all/modules' directory. If this directory doesn't exist then you should create it. It isconsidered a best practice to keep the contributed modules separate from your core modules.Once the module is uploaded you can activate it via the Drupal Administration section of your website.Click on the Modules link (in the Site Building section) and you will see a list of every moduleavailable along with a checkbox. Search for the title of the module you uploaded. Click the checkboxfor that module. Then scroll down to the bottom and click the Save Configuration button. Keep an eyeout for any error messages. Error messages aside, your next step will be to configure the module asindicated in the developer's instructions.Developing ModulesIf you have PHP and MySQL skills and want to make Drupal do something different or better then youshould consider developing a contributed module.Released in May 2008, Learning Drupal 6 Module Development provides apractical tutorial for creating your first Drupal 6 modules with PHP.Keeping Track of ModulesModule development for Drupal is typically fast and furious. New modules and updates to existingmodules are added daily. You can keep up with new modules by subscribing to the Drupal modulesRSS feed at http://drupal.org/taxonomy/term/14/0/feed. This field only gives updates on brand newmodules. If you want release updates for a particular module you can subscribe to the module RSS feedwhich will be linked on the module page.One of the great features added to core in Drupal 6 is Drupal module status updates. Any module thatyou have uploaded to your site should be listed on a dashboard which can be found at„admin/reports/updates’. If a new version of the module is available you will get a notice on the Drupaladministration section and can also configure notifications by email.This document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 14 of 30
Beginners Guide To DrupalModule Admin View (Drupal 6)Other Module ResourcesAn alternative place to find and research Drupal modules exists at drupalmodules.com. The DrupalModules website is an un-official resource that provides search tools and allows registered users todownload, rate and comment on Drupal modules.ThemesThemes create the visual experience for your Drupal site. The standard theme that you will see whenyou first install Drupal is called Garland. The Garland theme is unique because a user can easily changethe color scheme of the entire theme via a color wheel. An example of the wheel can be seen in theimage below.This document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republishall or part of this document please include my name and link to www.awakenedvoice.com. Drupal is a registeredtrademark of Dries Buytaert.Page 15 of 30
Beginners Guide To DrupalThe Garland Theme and Color WheelFinding New ThemesMany people feel that the Garland theme is too pedestrian for their needs. Thankfully you have theoption to very easily switch to another theme. You can make the Drupal Theme Repository your firststop when searching for a new theme for your site. Once there you will find a list of themes contributedby the community. One shortcoming of the Drupal Theme Repository is the fact that themes are listedin a way that is very similar to modules. The listings there are heavy on text and short on experiencingthe themes.The Drupal Theme Garden is an un-official site that allows you to experience many Drupal themeswith a few clicks of the mouse. If you find a theme that you like on the Drupal Theme Garden you willneed to go back to the Drupal Them
Drupal 6 Themes Selling Online with Drupal Using Drupal . Beginners Guide To Drupal This document is distributed under a Creative Commons Non-Commercial Share-Alike license. If you republish all or part of this document please include my name and