navigate site menu

Become a member and get unlimited access to every course in the library. Try it free for 7 days

Drupal 6 Essential Training

Drupal 6 Essential Training

with Tom Geller

 


Drupal is a free, open-source content management system (CMS) for a variety of platforms. It has a robust user community and easy-to-use administration features. Drupal Essential Training covers all the important aspects of installing, configuring, customizing, and maintaining a Drupal-powered website. Instructor Tom Geller explores blogs, discussion forums, member profiles, and other features while demonstrating the steps required to make Drupal perform. He also teaches fundamental concepts and skills along the way, including installation, backups, and updates; security and permissions; flexible page layouts and CSS; menu navigation; and performance monitoring and disaster recovery. He also discusses how to select and install the community-supported modules that further expand Drupal's capabilities, and gives experienced PHP programmers tips on customizing page templates. Example files accompany the course.
Topics include:
  • Understanding the inner workings of Drupal
  • Creating stories, pages, blogs, forums, and polls
  • Managing users and comments
  • Setting and customizing themes
  • Exchanging content via RSS
  • Stopping comment spam with a CAPTCHA
  • Launching a site and joining the Drupal community

show more

author
Tom Geller
subject
Web, CMS
software
Drupal 6
level
Beginner
duration
6h 52m
released
Aug 25, 2008

Share this course

Ready to join? subscribe


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:00Hello and welcome to Drupal Essential Training. I'm Tom Geller and I will be
00:05leading you through Drupal, one of the fastest growing content management systems on the web.
00:10I started using Drupal because I wanted to create promotional websites for my
00:13work that were bulletproof and easy to maintain.
00:16One such site is savemyhomebook.com, built entirely in Drupal. This course is
00:22designed for people who have a basic understanding of how the web works.
00:25No other knowledge is needed, and although you may find some chapters difficult at first,
00:30don't worry. I'll explain everything as we go.
00:33If you have created web pages in HTML, programed in PHP or managed SQL
00:38databases you are well ahead of the game.
00:41By the end of this course you will have all the skills you need to make a fully featured attractive website.
00:47Let's get started!
Collapse this transcript
Using the example files
00:00At certain points in this course, you will be working on a site that's already
00:03been built or importing text or graphics into your own site. If you're a
00:07premium member of lynda.com Online Training Library or if you are watching this
00:11tutorial on a DVD-ROM, you have access to the exercise files used throughout this title.
00:17However, there are no exercise files until late in Chapter 3 at which time you
00:22will have already installed MAMP or WAMP and the Drupal package itself.
00:26Most videos have only one exercise file, a text file that contains the MySQL database.
00:33You install this file into your Drupal site using the utility phpMyAdmin, which
00:37is installed as part of the MAMP package for MAC or WAMP for Windows.
00:42For details on that process watch the videos Installing MAMP or Installing WAMP.
00:48If you can't install the phpMyAdmin program or choose not to, you will have to
00:53populate the database using another method, such as other MySQL utilities or
00:58MySQL's command-line interface. But we'll show you how to do it using phpMyAdmin.
01:03To open phpMyAdmin, open MAMP or WAMP whichever you have installed on your computer.
01:10From there click on Open start page and then the phpMyAdmin link. If you have
01:17already installed an exercise file or if you started building a Drupal site you
01:21will have to drop your existing database. To do so, go over to the database
01:25pop-up menu, select Drupal and then click on Drop. It will give you a warning
01:31that you are going to destroy the entire database. Make sure that you want to
01:35do this and backup that database if you have any information in it that you'd
01:38like to keep. But we don't, so we will click on OK. The database has now been dropped.
01:44Now we are going to import the exercise file. To do so, scroll down to the
01:49bottom of the screen where you have this choice Import. Click on it, and then
01:53go up to Choose File and click on that button. From there navigate to the
01:58exercise file you'd like to use. We are going to go to Chapter 10, the first
02:03video and import that database. We click on the File and click on Choose;
02:09scroll to the bottom of the screen and click on Go.
02:14If the database import has been successful you will see a message up here that
02:17says so. If not, you will see a message that says that. The most common problem
02:21is for getting to drop the previous database.
02:24Now let's go back to our site and see what it looks like. We reload the page
02:31and we can see that our importation of the exercise file has been successful.
02:35Occasionally a video will have other types of exercise files. Graphics files
02:40are included whenever we add them to our sample site in the video. Of course,
02:43you are welcome to use your own. Although, I recommend you make them of the
02:46same size and file type as those provided. Text files are included whenever we
02:50create content on the site, so you don't have to do much typing. In either
02:55case, we will show you what to do with them during the course of the video.
02:59Once again before you use an exercise file keep in mind that dropping the
03:03database deletes nearly all the content on your Drupal site, including articles
03:07you have written, blocks you have laid out and modifications to the sites designed.
03:12If you have created anything that you want to keep be sure to backup the
03:15database first. We will show you how to do so in the video backing-up your
03:19Drupal site.
03:20If you are a Monthly Subscriber or Annual Subscriber to lynda.com, you don't
03:25have access to the exercise files, but you can follow along from scratch or
03:29with your own assets.
03:31Now that you can find and load the example files you will move through the
03:34course more quickly and completely. Refer back to this video, if you have any
03:37problems and just to reiterate watch the session about backing up a site and
03:41restoring it from backup once you start building a site whose loss would cause you problems.
Collapse this transcript
1. What Is Drupal?
Drupal is a CMS
00:00What is Drupal? Technically, Drupal is a Content Management System or CMS.
00:05CMSs are designed to give non-technical people such as writers, editors and
00:10publishers extensive control over what appears in their publications without
00:14having to understand the mechanics of production. So we know the Drupal is a
00:18CMS, but what exactly is that?
00:21As we said, it's a Content Management System, but when we say CMS we really
00:25mean Web Content Management System. You may see WCMS at some places outside of
00:31the Drupal community. When we say CMS, we really mean WCMS.
00:36So what is a CMS? Technically speaking it's a server-based set of programs;
00:41in the case of Drupal it's a PHP set of programs. It delivers information via a
00:46web browser so that anybody can look at it who has Firefox or Opera or any
00:51other web browser.
00:52Third of all, a CMS lets you concentrate on content. You don't have to worry
00:57about managing the server, changing permissions, generally speaking. People who
01:02don't know those things can just worry about the words and pictures and what
01:05goes on the website.
01:07There are certain characteristics that are shared by many CMSs. Whether it's
01:11Joomla, Drupal or any other CMS. One of them is that you can add, change or
01:16delete content via a web interface. You don't have to put files on and off the server.
01:21A second characteristic is that a CMS will automatically link content together
01:26so that if, for example, you set up a menu system that appears in the left
01:30column and then move it to the right column, it stays the same and all of the
01:33links stay the same; you don't have to worry about relinking everything.
01:37A third characteristic is that a CMS enforces site wide consistency, if that's
01:41what you want. So that every page has the same navigation system, it has the
01:44same basic feel and your entire site has a sense of consistency that might be
01:49missing if you try to build the site by scratch.
01:52A fourth characteristic is that a CMS allows multiple users to affect the
01:56site's content. You don't have to have a single web master who knows how
01:59everything works. You can set up different levels of permission so that one
02:03person for example writes the stories, another person or group of people can
02:07edit the stories and so forth. You have many people doing many different things
02:11and permissions allow them to do only those things they should.
02:15Finally, a CMS has extended content features that are easy implement. For
02:19example, as we'll see with Drupal, you can set up polls where you ask a
02:23question of your entire membership and get the results back in an easy way or
02:26you can set up forums for them to talk to each other and so forth. There are
02:30many different features that you can build into Drupal without having to do
02:33additional programming.
02:35But most importantly, CMSs let you separate content from presentation and
02:40I'll show you exactly what I mean by that by showing you a site that shows many
02:44different types of Drupal themes called themegarden.org.
02:48This is themegarden.org. At the top you have the name of the site, you have
02:52menus, Drupal 4.7 themes, Drupal 5 themes and so forth. You have columns here
02:57with additional navigation, and then in the middle you have what's really your
03:00main content. This article is written by somebody who probably was not the Site
03:04Administrator per se, but was just somebody who does the writing.
03:09Now let's go to another theme, this one called Glossy Blue and what you notice
03:14is it looks completely different but the content is basically the same. You
03:17have the same menus, you have the same content here, the article didn't change
03:22and the same basic navigational system. This one is interesting because it
03:26knocked out the left-hand column but actually the navigation system is the same in the right.
03:30Let's go to another one and there is the left- hand column, the right-hand column, the same content.
03:36So you can see that CMSs are good for many things, but they are not for every website.
03:40For example, a website that only has a few pages or a website in which
03:44there are many different pages would not really be appropriate for Drupal or
03:47really any other CMS. CMSs are best for websites that have multiple
03:51contributors, that require a consistent look and feel and that have advanced
03:55functions without lots of custom programming. In other words, you don't have to
03:59program in those polls and forums and other functions that you want on your website.
04:03You are probably already familiar with certain CMSs. Some of the more popular
04:08ones are WordPress, Joomla and MediaWiki, and we're going to show you a few
04:13examples of each of those and you can see what some of the similarities are
04:16amongst CMSs.
04:18This page is this Yahoo! blog called the Yodel Anecdotal and it's actually
04:22built on WordPress. You can see that it looks like many blogs that you have
04:26seen before. It has articles, which are arranged in reverse chronological order,
04:30it has a number of links on the side, it has this photo pool here and it
04:35also shows what the most recent posts are. So it does have quite a few
04:38functions and it's built on WordPress.
04:42This site, SeniorNet, is built on Joomla, which is very similar to Drupal.
04:46As with Drupal, it has menus at the top, it has a menuing system along the side,
04:50and once again, it has its content in the center here. It also has space for
04:54ads over here and it has a neat little feature which allows people to make the
04:59text size larger with just a click of a button or again make it smaller.
05:05A third type of CMS with which you are probably familiar is Wikimedia on which
05:09Wikipedia, the encyclopedia, is built.
05:12Wikipedia is one of the most popular sites on the Internet and it allows
05:16thousands and thousands of people to contribute to it. Here we have an article
05:20in the center- again which was done not by an Administrator but by a Writer- and
05:24along the side we have all of these useful links that stay the same from
05:28page-to-page and for each individual article we have these tabs, which again
05:32are consistent from page-to-page.
05:35Besides the three content management systems we just looked at there are many,
05:38many, many more, and if you go to Wikipedia's page, 'List of content management systems,'
05:43you can see a list of them.
05:45Starting from the top, each one of these rows is a different CMS. You can see
05:49just in free and open source software there are dozens and dozens of CMSs.
05:55Finally there are CMSs which are not available for you to use directly, that is,
06:00you can't download them and put them on your server. One example is
06:04Facebook.
06:06So now you have seen some CMSs other than Drupal, but what about Drupal itself?
06:10As it happens it's widely used on the web as well. One of the largest sites
06:14that uses Drupal is The Onion, a satirical newspaper, and as you can see it has
06:19three columns, it has individual articles, once again which are written by
06:23writers, not by site administrators, so it has multiple contributors
06:27contributing to the site. It has a menuing system up here and it has a few neat
06:32little features like down here as you mouse over one of these pictures it shows
06:36the related story. There is also space for advertising, space for rich media
06:42and so forth.
06:44Another site that's built on Drupal, the main page for Spread Firefox which if
06:49you downloaded the Firefox Web Browser you may have seen. This is a good
06:52example of a Drupal page because it's visually so different from most of the
06:56Drupal pages you have seen. It doesn't have any left or right columns or at
07:00least not such as we know them. It's very graphical, it has these nice
07:04gradients in here, even though this is plane text, it's on top of this nice
07:08gradient.
07:10A third website that's built on Drupal is this Yahoo! Research page. This is
07:14interesting because you noticed earlier that the Yahoo! blog is built on
07:18WordPress, but Drupal is used to build this page for Yahoo! Research. Once
07:23again it has a Tabbed Navigation System. Many, many links, but it's also very
07:27graphical.
07:29Now you know what a Content Management System is, and have seen some examples
07:32of what CMSs can do.
07:34We'll examine some of the benefits and disadvantages of Drupal when compared
07:38with other CMSs and help you decide whether it's the right CMS for you.
Collapse this transcript
Choosing Drupal
00:00Out of all the CMSs out there, is Drupal right for you? Here is a general
00:04overview of what Drupal does best, as well some things that are more
00:08appropriate for other website creation systems.
00:11First, let's start with Drupal's advantages. First of all it's somewhere in the
00:15middle between ultimate customizability and the out of the box ease that you
00:19get from some content management systems, that is, you don't have to program
00:22everything, but you can do a lot.
00:24Second of all, Drupal has proven insecure, it's been around for several years
00:29and it's been used by thousands of different sites. Although it does
00:32occasionally have security updates it is generally a secure enough system to
00:36use for pretty much anything.
00:38Third of all, Drupal has very strong community support and we will show you
00:41little bit of that community support now.
00:44First of all, Drupal has many pieces of software that are available as plug-ins
00:48to the main Drupal program. These are called Modules and they add additional
00:51functionality beyond what the core Drupal program provides. These are divided
00:57into many categories, for example, there are content categories which lets you
01:01display the things that you write and produce in different ways. There are all
01:04sorts of administration plug-ins, which let you change the way that you manage
01:08your site.
01:09All the way down to e-Commerce modules which lets you connect to existing
01:13systems you might have for credit cards for example or PayPal.
01:17Another part of the Drupal community is in its themes, themes let you change
01:21the way that your Drupal website looks, and as you go through this page which
01:25is at drupal.org/project/themes, you can see snapshots of many of the different
01:31kinds of pages that you can make your Drupal website look like. These are all
01:35provided by people from outside in the Drupal community and almost without
01:39exception they are available for free.
01:43Thirdly, the Drupal community is very active in talking with itself, so that if
01:48you have any problems with your Drupal installation or after your Drupal
01:52installation you can go in and you can get your answers very quickly for free
01:56from other people who have faced the same problems.
01:59Fourth, Drupal is an open source project, which means it's built by many people
02:03in the community. In this case it's built on two additional open source
02:07projects PHP as the programming language and SQL, which is the database
02:13language.
02:14Finally, there are numerous commercial companies out there supporting Drupal.
02:17One of those companies is Lullabot, which offers workshops and training, writes
02:22articles and blog posts that will teach you more about Drupal and so forth.
02:25They also do commercial support for Drupal.
02:28Another commercial support company for Drupal is Acquia. This is a company that
02:33was actually founded by the original person who wrote Drupal.
02:38There are numerous sites out there that are built on Drupal. Some of the
02:40largest ones are The Onion at theonion.com, Amnesty International at amnesty.org and
02:46Popular Science at popsci.com, so you can see a great variety there. The first
02:51one is a humorous magazine, the second one is an international organization and
02:55the third one is a popular magazine that's been around for dozens-and-dozens of
02:59years and has made the move online using Drupal.
03:03Now that we have talked about some of the good things about Drupal, let's talk
03:06about some of its disadvantages. First of all Drupal has greater technical
03:10knowledge requirements than you would have if you were just writing a website
03:14by scratch in HTML. You need to have access to the server and you need to have
03:19certain permissions on that server. In addition that server has to have certain
03:23programs already installed, most notably PHP and SQL database, preferably MySQL
03:29and the cron program.
03:31Finally although you don't need to know HTML or any of the other traditional
03:36web skills to customize your Drupal site, it does help to have HTML, CSS and
03:42certain graphics editing skills in order to bring your Drupal site to its full flower.
03:47Drupal has certain design biases. If you go and take a look at sites that are
03:50built under, well, you'll notice the very often there will be a left column and
03:54a right column and a content in center and a header at the top and it tends to
03:58be the same from theme-to-theme. The good news is that all of that can be
04:02customized; the bad news is you may have to do a certain amount of work to make
04:06that customization happen.
04:08So when shouldn't you use Drupal? First of all, if it's going to be overkill,
04:13there is no need to use Drupal. A site that doesn't change much doesn't really
04:17need Drupal, because what Drupal is good at is letting you bring in new
04:20information at any time and change what's already there.
04:23Sites that are just plain static sites that don't have any sort of community
04:27interaction don't really need Drupal. You can build sites like those in Drupal,
04:31but you don't need to.
04:33Drupal is also overkilled when you have solid simpler alternatives or once that
04:37are built more specifically to your purpose. For example, there is a Wiki
04:41plug-in, a Wiki module for Drupal, but if you are going to build just a Wiki,
04:46you might as well use MediaWiki, which is built specifically for that purpose.
04:51You shouldn't use Drupal when you don't have the technical help or abilities
04:54that you will need to install and run it, and we will talk more about what you
04:57need to run Drupal throughout the course.
05:00Finally you shouldn't use Drupal if it's going to be an extremely high-traffic
05:04or mission-critical site. If it's necessary to have this site online in order
05:08to save lives you should probably use something else or at least use something
05:12else as a backup. If you are going to run something that's going to have
05:15millions and millions and millions of page views probably Drupal is not the
05:19right solution. Although I should mention, Drupal does run very popular sites.
05:24I hope this video has given you a sense of when Drupal is best for you and when
05:27to look for a simpler or more heavy-duty solution.
Collapse this transcript
Checking Drupal's requirements
00:00Let's assume that you have decided that Drupal is right for you, but are you
00:04right for Drupal? Do you have everything it needs? Drupal isn't a demanding
00:08partner but it does require some technical knowledge resources from you.
00:12This video will show what those requirements are and how to get those that you
00:16don't already have.
00:18First let's start with those things that are useful to know. Not the things
00:21that you need to know but the things that are useful to know. HTML is first and
00:25foremost because you will be using it to post content. However, there are also
00:30rich text editors that are available, that make it less necessary for you to know HTML.
00:36The programming language PHP is also very useful to have, that will let you
00:41change themes that you have and perhaps eventually add your own functions via modules.
00:46Third, it's useful if you know the database language SQL. With SQL you will be
00:52able to go in and change things directly in the database in case your Drupal
00:55installation is starting to have problems.
00:58Fourth of all, it's helpful if you have some system administration abilities
01:02because you may have to move files to and from the server, you may have to
01:05change permissions on the server and so forth. But what you need to know to run
01:10Drupal? Not much.
01:12Aside from the four things that are useful to know Drupal is a pretty
01:15self-contained system and you can do everything that you need through its web interface.
01:20Aside from knowledge requirements Drupal does have some technical requirements
01:24for installation.
01:25First of all, if you are working on a remote server you will need an FTP
01:29program that is File Transfer Protocol. There are many of these available in
01:33the market and many of them are free.
01:35Secondly, you will need access to a server, which allows you to make
01:39directories. Because you are going to be putting your Drupal installation and
01:42it's reporting files into different directories or folders on that server.
01:47Third of all, you have to also be able to change permission levels on that
01:51server. So if for example, Drupal needs to write information to a certain file
01:55you have to be able to change that file so that Drupal is allowed to write to
01:58that file.
02:00Fourth of all, I recommend that you get some sort of server where you have
02:04access via the Shell. The Shell is the command line access system that lets you
02:08type things in instead of using a graphical interface. There are many things
02:12that are possible on the server only through a command line interface.
02:16There are four things that Drupal needs already installed on the server. First
02:20and foremost of these, and this should be obvious is a Web Server. Apache is
02:25the one that's preferred by Drupal, although it is possible to do using
02:28Microsoft IIS and it might be possible using other web servers.
02:32However, Apache is the one that's most discussed in drupal.org and within the
02:36Drupal project, so if you have any problems you will be better off running
02:39Apache since more people will be able to help you.
02:42You will need an SQL server. The preferred one is MySQL although PostgreSQL is
02:47also possible.
02:49Third, you will need certain other supporting programs, primary among them is
02:53cron. cron is a program available for the server that runs certain procedures
02:58at a periodic interval. So for example, every hour it might send out mail from
03:03the Drupal system or every hour it might fetch additional news from another server.
03:07If you don't have these three things, you may be able to get them all in one
03:11integrated package. This is known as LAMP, MAMP or WAMP. LAMP stands for Linux,
03:17Apache, MySQL and PHP. MAMP stands for the same thing but starting with Mac,
03:23and W stands for the same thing starting with Windows.
03:26MAMP is available from mamp.info and WAMP is available from
03:32www.en.wampserver.com. Although if you go directly to wampserver.com, you
03:38should be able to get there by clicking on the appropriate language flag link.
03:42If you don't have all these things there are a number of Drupal consultants out
03:45there and you can see a directory of these at drupal.org/drupal-services. You
03:51can see a directory of who's available to help you with your Drupal
03:54installation by going to drupal.org/drupal-services.
04:00If you are unable to install Drupal on a server, there are some Internet
04:03service providers who are already hosting Drupal or will let you install it
04:07very easily. There is a list of such services at drupal.org/hosting.
04:13As I said earlier, you don't really need that much to run Drupal, and what you
04:17don't have now is easy to get whether through a package like MAMP or in the
04:21most hands off way possible through the help of experts and hosted services.
Collapse this transcript
Understanding the inner workings of Drupal
00:00Drupal-based sites look somewhat different from those built in plain-old HTML.
00:05Now we are going to look at Drupal's inner workings to understand exactly what
00:09happens when visitors request a page from Drupal. It's actually quite different
00:12from the mechanism of an HTML site and understanding the differences is
00:16important as you go forward in building and maintaining your Drupal site.
00:21Let's start by taking a look at what happens when you try to get a page from an
00:24HTML site. There you are sitting at home, you ask for the page and your request
00:30goes to a web server. Usually it's going to be the Apache Web Server. The web
00:34server then delivers a page such as index.html, that page in turn will pull
00:40together all of the resources that it needs to present something to you that
00:43will be text and graphics files, and possibly other files in processes that
00:48might for example include PHP programs.
00:51Once the page has been created it gets sent back to the web server, which then
00:56goes to you, and you see it on your Web Browser.
00:58Let's take a look at some of the files that are inside an HTML site. In this
01:02case I used my own site, tomgeller.com. It's actually quite simple, all of the
01:08files that you can call from a Web Browser and an HTML in this case,
01:12clients.html, endorsements.html and so forth and the way that this site is
01:17constructed the additional things that you need are in sub-directories,
01:21graphics, portfolio and so forth. In addition there is a cascading style sheet
01:26here which ends with .css.
01:29Now we are going to take a look at what happened when somebody requests a page
01:32from a Drupal website. Once again there you are sitting at your computer and
01:36you make the same sort of request to an Apache Web Server. However, in this
01:40case, instead of going to an HTML file it actually calls up a PHP program. That
01:46program in turn calls together graphic files, but also data that are inside of
01:50an SQL database, and it might also call additional PHP programs or other types
01:56of programs. All of these things are taken and put together by the PHP program
02:02as a page, which again gets sent back to the web server and then goes back to you.
02:08If we take a look at the files in a Drupal site, we notice something very
02:12interesting. I am going to rearrange these by type here. None of these files
02:17end in HTML these, text files are really just Help files, but the main parts
02:22end in PHP.
02:24Let's open up this index.php file, which is what someone calls when they go to
02:28the main page of a Drupal website and here we are. If you know HTML, you will
02:33notice that this looks nothing like the HTML that you are used to because it is
02:36in fact PHP programming language.
02:39Let's look through this index.php file. All of these things at the beginning
02:44are just common. So the first real command in the PHP file is this requireonce
02:48./includes/bootstrap.inc, and if you go back to your file structure you can
02:55actually go into the folder called includes and find that file.
02:58So this one PHP program is immediately calling another PHP program, and if you
03:04go inside this you will find that it calls others and others, and say you have
03:07this whole cascade of PHP programs that eventually come together to create your page.
03:13At first this might seem like an incredibly convoluted and wasteful way to call
03:16a simple web page, but in practice it's not. PHP doesn't require very many
03:21resources to switch among files like this, and the computer quite naturally
03:25navigates among them according to logic.
03:27However, this computer-friendly structure can be extremely user-unfriendly if
03:33you are trying to figure out where certain commands came from or where to put
03:36files to change the way your site looks and acts.
03:39In brief the default location for your site's overall appearance called its
03:44Themes are in the themes folder, and you can see here these are different
03:49themes that show up in Drupal.
03:52Files that are specific to an individual site go into the sites folder and you
03:58have a choice to make certain files available to all of your Drupal sites or if
04:02you are just running one Drupal site, you could put into the default folder.
04:05I hope that you haven't been scared away by this description of Drupal's inner
04:08workings, which can admittedly be pretty intimidating. The good news is that
04:13you don't have to know most of this to run a Drupal site as most of the
04:17administration is done through a web browser based interface and a FTTP program.
04:22Still, understanding some of these points that your content is stored in a
04:26database for example instead of HTML files we will help you in putting together
04:31your Drupal site.
Collapse this transcript
Meeting the Drupal community
00:00One of Drupal's strengths is its extensive community of users and developers who
00:04use Drupal every day and are ready to help you through the tough spots.
00:08As Drupal is open source software its community is also a good place to gain
00:11experience, credibility and connections for your contributions to the project.
00:16Finally, the Drupal community can be a gateway to jobs, especially as Drupal
00:21grows in popularity in organizations, and in the enterprise market. This video
00:26will show you where to find these resources and how to take best advantage of them.
00:31But, first let's talk about how Drupal got to where it is today?
00:35Drupal started as a project of the Flemish-Belgian student Dries Buytaert. In
00:402000, he was a student at the University of Antwerp and he wanted a way for
00:44himself and his friends to transfer information back and forth, and so he
00:48created this Bulletin Board System and he called it Drop. And if you go to
00:52archive.org you can see the original drop.org website which we can see right
00:57here from 2000.
00:59He decided to make an open source project and gave it the GPL that is the GNU
01:03Public License in 2001. By doing so he is allowing everybody in the world to
01:08contribute to it, and to extend it as they like, and from there of course it
01:12took off as many open source software projects too and by the end of that year
01:17it already reached version 3.0 at which point he also renamed it Drupal.
01:21As I am making this video Drupal is at version 6.3, the oldest version that's
01:27still supported at this time is version 4.7 which came out in 2006. There are
01:32still people using version 4.7 and they are quite a number of people using
01:36version 5.
01:38Every year Dries Buytaert releases statistics of how many people have
01:42downloaded the Drupal project, and you can see that on his website it
01:45buytaert.net.
01:47In July of 2008, he released the statistics for this year and they showed that
01:52in the previous year there had been about 600,000 downloads of the Drupal core.
01:57In this year they were about 1.4 million and as you can see from change in
02:01color which represents a change in version number quite a few people have
02:05downloaded version 6, which is a good sign for the Drupal community.
02:10The first place that you should be going to is drupal.org. This is the site
02:14where pretty much everything happens. One of the advantages that Drupal has is
02:19that everything goes through drupal. org if you need contributed code to help
02:23make your site better, you can find it on drupal.org if you need help and so
02:28forth. More specifically let's take a look at some other things that are on
02:31drupal.org.
02:33Starting with documentation, there are Getting Started guides, so if you just
02:38need to get up and running very quickly, you can do that there. In addition,
02:41there are some very detailed installation and configuration help in this beyond
02:46the basics area. Once again, you can get there by going to Documentation and
02:52Detailed Installation Help here below Beyond the Basics.
02:56Additionally, there are more beyond the basics things here, which will give
03:00you, for example, contributed code that will help you add functions to your
03:04site without having to install an entire new module and so forth.
03:11The Download section has many useful things that can be brought to your
03:14computer. The two most important of which are Modules and Themes. Modules are
03:21little plug-ins that you can put into your Drupal site to give it additional
03:25functionality, and as you can see there are many categories of modules. All you
03:29need to do is grab them, put them into your Drupal folder and enable them and
03:34we will show you how to do that in another video in this series.
03:39Themes will change the way that your site actually looks; it will change the
03:42entire face of your site. If you have ever played with any games or used any
03:47programs that have skins it's very much like a skin to your site.
03:51For example, looking down the page you see screenshots of the different kind of
03:54themes that you can download and make your Drupal site look very much like
03:58these. From there you can of course, modify them as you like, and the thing
04:02about this is all of these themes are contributed and free and available for
04:07you from the drupal.org website.
04:10But let's say that you come across a problem that you're not able to solve.
04:14Well, that's what the support area is for. First of all they are all those
04:17Drupal handbooks that we mentioned earlier. There are also forums where you can
04:21go and ask your question directly.
04:23What I would recommend you do before going in and just asking a question
04:27blindly is to search the drupal.org site. drupal.org very often has a search
04:33bar up here where you can search the site, however, whenever the site is under
04:36a high load it will take off to make it possible to reach the site without
04:41weighing it down with a lot of searches.
04:43If you need to search for something and the search box is not there on
04:46drupal.org you can go to google.com. And I am going to do that right now. And
04:53do your search, but first add sites: drupal.org and then you might search for.
04:59For example cck, which is a certain kind of module in Drupal. And there you
05:03have it, it searches only the drupal.org website.
05:06Again, that's not necessary if the drupal.org search box is on the page and it
05:11will show up somewhere up here.
05:13Continuing on after you've gained some Drupal skills, you might want to give
05:18something back to the community, one way you can do that, is you could go into
05:22the forum and answers some of those questions that people have been asking.
05:26Another way is go to Contribute. The Contribute page shows a number of
05:30different ways that you can give back to the community. First and foremost as I
05:34say in the forums, second of all there are other ways to give user support,
05:38those are detailed here under user support.
05:41If you are coder of course you can do quite a lot in development. Both the
05:45Drupal core, which is the main program, and additional modules all need people
05:50to help maintain them and your contributions will be very much appreciated
05:53there.
05:54If you are not a coder however there are still many ways that you can
05:57contribute. For example, do you speak another language? If so, may be you can
06:01help translate the Drupal core so that people in another countries can help use
06:05it.
06:06You can do that under this link here for translations. If you are a Writer you
06:10might be able to help with Documentation or Marketing or Testing, no matter
06:15what your field is, there is a way for you to contribute to the Drupal project.
06:19So you can see that if you actively start creating sites based on Drupal you
06:24certainly will not be alone. A large and vibrant community of developers and
06:28fellow users is out there to help you find your feet and to build the best
06:32Drupal site possible. All that you need to do is reach out through the
06:36drupal.org website.
Collapse this transcript
2. What Can Drupal Do?
Learning key terms in Drupal
00:00As with any community the Drupal world has its own slang. Fortunately, there is
00:05not too much of it. But understanding the few Drupal specific terms there are
00:10will help you to communicate not only with others who use Drupal but also to
00:13understand some of the concepts you'll need again-and-again as you create your
00:17Drupal site.
00:18The first important concept is that of the node. In Drupal a node is any piece
00:24of information that you create as a single unit. For example, when we click
00:28here on the drupal.org website we see this page which is a node. It may link to
00:34another nodes as it does here, and it may appear as part of a page, a story, a
00:40blog post, anything like that. They are all nodes.
00:44The second concept is a content type. Content types distinguish one type of
00:49node from another. In that list I just gave page, story, blog post each of
00:54those is a content type and can be treated slightly differently in your Drupal
00:59site. You will see more of that as the course progresses.
01:02The third concept to know is that of the module. In Drupal a module is a piece
01:07of software that you can put into the Drupal to give it additional
01:10functionality. On the drupal.org website you get modules from Download and
01:16Modules and here as you scroll down, you can see a list of categories of module.
01:22Next to them is the number of modules that are available in that category. As
01:26you can see there are many modules in Drupal and we will be talking about
01:29several of them throughout the course.
01:32Another concept in Drupal is that of the theme. A theme is a unified graphic
01:37presentation for an entire Drupal site. I will give you an example. You see the
01:42blue area at the top of this site and the typefaces of a certain sort? If you
01:47go to the another Drupal site, in this case savemyhomebook.com, which is my own
01:53website You see that it has a completely different look, different typefaces,
01:58different colors, different layout and so forth, that layout stays the same as
02:02you go from page to page to page. And in fact the Theme is what defines the
02:09look of the entire site.
02:13The next word to know is Core. The Core is the basic set of modules that
02:17included with the default Drupal download. The Core is broken into two parts,
02:22Optional modules and Required modules. The Required modules are the very
02:27centerpiece of the Drupal project, without them, you can't run a Drupal site.
02:32Fortunately, they're all included in the download that you can get from the
02:36front page of drupal.org.
02:38The next word to know is Template. A Template is a file in the programming
02:42language PHP that defines how nodes of a certain content type will appear. For
02:47example, if your site was a catalog of products, you could create a content
02:52type called Product Listing and then build a custom product-listing template so
02:57that all products are presented in a distinct but unified format. Building
03:01templates is a very advanced subject and we will only touch on it briefly in
03:05the PHP chapter later in this course.
03:08The next term to know is Taxonomy. A taxonomy is how you put items into
03:13categories; you might know this from other websites as tagging.
03:16For example, let's say that you have a story about the election race for a
03:20local town's mayor that might be put into a politics category as well as a
03:25category that has the name of the town. These categories and the system that
03:29you set up to put that story into those categories is known as its Taxonomy.
03:34Drupal allows a very broad system of taxonomies and you will see how that works
03:39also in this series.
03:40The next term to know is Aggregator. An Aggregator is a program that collects
03:45information from various sorts and puts them in one easy to read place. It's
03:49also commonly known as an RSS Reader. Drupal has an Aggregator built into it,
03:54so you can display syndicated content from many places on your Drupal site, and
03:59if you return to my site savemyhomebook. com, and go back to the home page, this
04:05latest foreclosure news is actually using Drupal's aggregator, it pulls in new
04:11stories from around the web and posts their headlines here.
04:15Another term to know is Drupalcon, and you can see that on the home page of
04:20drupal.org, if we click on it, we go to its home page at drupalcon.org.
04:24Drupalcon is a semi-annual gathering of Drupal developers, and that gathering
04:29moves from city-to-city. As you could see the one coming up next as we're
04:33making this video is in Szeged, Hungary.
04:36Another part of the Drupal community whose name you should know is the Drupal
04:40Association. The Drupal Association is an organization dedicated to as the
04:45website says, Helping the open source Drupal CMS project flourish. Its
04:50President is Dries Buytaert, who is Drupal's original creator. You can go to
04:54the Drupal Association's website at association.drupal.org.
05:00The last word to know is an odd little word for an odd little item, Druplicon.
05:05The Druplicon is this little mascot up here that looks like a drop of water.
05:10And there you have it. While discussions on drupal.org can get pretty technical
05:14you now know enough jargon to understand most of what you read there.
Collapse this transcript
Touring Drupal's interface
00:00If you looked at several Drupal built sites, you have probably remarked on the
00:04amount of visual variety there is among them. But under the hood, there are a
00:08lot more similarities than differences. That's to your advantage because once
00:12you've built one Drupal site, it's easy to figure out how to manage any Drupal site.
00:16This video will show you some of those similarities. We will be working
00:20on a site that you can create by importing the database, that's in your example
00:24files. If you need to know how to do that refer to the other video in this
00:29series on working with the example files.
00:31We will be working with a site that you can create yourself by importing the
00:36database and graphics files that are included in your exercise files. If you
00:42need help doing that see the separate video in this series on importing the
00:46exercise files. In order to do this video you'll need to be logged in at the
00:50Administrator. We're already logged in the Administrator here.
00:54The first thing to know when you are administrating on Drupal site is your way
00:57around the Administer Menu, which is almost always found in the left-hand
01:01column of your Drupal installation. Click on it now, and you will see a list of
01:06different parts of Drupal that you could administer from within that menu.
01:10In the main section of this screen all of the different parts are listed
01:13individually. These are also in categories, which are separated in these blocks
01:18of gray or along the left-hand side in these individual links. If you click on
01:24Content Management for example, you'll see a list of all of the different
01:28things that you can administer from within Content Management. If we go back
01:32you'll see the same sorts of links that you saw in the gray box.
01:36When you are on the Administer screen I often found it easier instead of
01:40searching for a specific part that you want to administer by just using your
01:44browser's Find function. So for example if I want to say, oh! What are the
01:49permissions instead of scrolling down and looking for the word Permissions
01:52among all of these I'll just hit Command F or Ctrl+F if you are using a PC and
01:57type-in permissions, and there we go, once we are there we can just click on
02:03Permissions and go straight to that administration screen.
02:06Now, let's go back to the main administration page. After you have been working
02:11with Drupal for a while you'll realize that you don't need all of this
02:14descriptive text, and in fact, it makes you scroll down a lot to find things.
02:18You can hide those descriptions by clicking up here where it says High
02:21descriptions. That makes your screen much more compact. We are going to show
02:26those descriptions again, since we are not quite that good.
02:30Let's take a look at one of these administration pages. A fairly simple one is
02:34if you scroll down toward the bottom and look at Site Information, this is a
02:40place where you can change some of the basic things that make up your site. For
02:43example, the title when you type that in here it appears up at the top of the
02:47page on every page. There is also a place for a Slogan and a Mission Statement.
02:52These can show up on your page as well depending on what your theme settings
02:56are.
02:57At the bottom of virtually every administration page, you'll also find a Save
03:01Configuration and Reset to Defaults button. Obviously, this one cancels what
03:06you have been doing while the Save Configuration button saves it. Whenever you
03:11saved something or if there is an error you will see a message at the top that
03:15will tell you exactly what's happened. Be careful because it's easy to miss
03:19this message if you are not looking for it.
03:21As you can see, Site Information is only one of many administration pages and
03:27they vary somewhat in how they work. We will look at some other types of
03:30administration pages elsewhere in this series, but you can generally figure out
03:34what's going by using Drupal's built-in help system.
03:38For example, let's go up to this By module tab. This shows many of the
03:43administration pages in a slightly different form depending on function. For
03:47example, the Block administration page has the Blocks menu right here which is
03:53the same as on the previous page, but it also has a link to show how to set
03:57permissions which will allow you and your users to do certain things within
04:01that block module. On this page you'll also find a Get help link from any of
04:06these modules.
04:07When you click on that you will get additional information, and the amount of
04:11information that you get depends on the module. That's one way to get help. But
04:15there is one other.
04:16In the left-hand column under Administer you'll notice there is Help link right
04:21here. This will give you help pages for all of the modules that are installed.
04:26That's very useful especially when you are first starting out.
04:29At any time you can get to the front page of this site, by clicking either on
04:34the logo or on the title of this site. Both of those who will bring you to your
04:37homepage.
04:39Drupal stores its content in parts called Nodes and each node can be edited if
04:44you have the permissions to edit it. For example, this story up here at the top
04:48was created as what's called the Page. A Page is a type of node and you can
04:52edit it as with any other node by clicking on the title of the node, right
04:56here. If you have the permissions to edit it you will see this little Edit tag
05:00here, if you don't you'll only see the node itself.
05:03So now you have seen a few things about the Administrator's interface. Let's
05:07logout to see how an anonymous visitor to your site will see it.
05:10There, now you've noticed a few things, first of all, it no longer says Admin
05:14up here instead it has a place for the user to log-in.
05:19Also the Contact Us link is no longer up here, that's because anonymous
05:23visitors to the site are not allowed to contact the Site Administrator by the
05:27way that we set up our permissions. The administrator of a Drupal site actually
05:31has a lot of control over what an anonymous user can and can't do and can even
05:36segment registered users so some have certain permissions while others don't.
05:40So while Drupal's interface is pretty consistent overall, it changes quite a
05:44bit depending on how much you or the Site Administrator have given anonymous
05:48users and registered users.
05:50Are you starting to feel more comfortable with Drupal? If not, try going to
05:54some Drupal-built sites, such as drupal.org or amensty.org, and you'll start into
05:59it commonalities among them, and of course poking around the administrative
06:03interface if your own group of site is the best teacher of all.
Collapse this transcript
3. Installing Drupal
Installing WAMP and Drupal on Windows
00:00If you plan to run Drupal on a computer with Microsoft Windows and you aren't
00:04already a whiz at managing Apache, MySQL and PHP on your computer, then this
00:09video is for you. If you'll be running Drupal only on Mac OS X, go to another
00:14video in this series instead, Installing MAMP.
00:18To download the WAMP Server, which is free software, go to wampserver.com. Once
00:23at the site, you might find that it's in French. If so, click on the British flag here.
00:29The WAMPServer comprises three parts: Apache, MySQL, and PHP. When you are
00:35ready, go to the bottom of the screen and click on Step One; Download the
00:39latest release of WAMPServer 2.
00:42The download page gives you some important information; most notably, it warns
00:46you not to try to install WAMPServer over an existing installation. If you have
00:50downloaded it before, don't try to install it again.
00:54Once you ready, click on the Download link. We have already downloaded
00:57WAMPServer to our desktop. To show it, minimize your Browser window. Then
01:02double click on the icon to install. As with most installers, you will be
01:06walking through a series of screens. Click on Next if you agree with what the
01:10screens says. But first, you will be warned once again not to install
01:14WAMPServer over an existing installation of WAMPServer.
01:17In our case, we haven't installed it before, so we click Yes. This is the
01:22introduction screen. We click Next, and get the License screen. Read through
01:27it, and if you agree to accept it, change the radio button to I accept the
01:30Agreement, and then click Next.
01:32By default, WAMPServer installs at the top level of your C drive. We are fine
01:36with that, so we will click Next.
01:39You have the options of putting a Desktop icon and a Quick Launch icon on your
01:43computer. Regardless of what you enter here, an icon will be placed in your
01:47system tray; that's the main way to control WAMP.
01:50We are not going to select either of these, so we will just click Next.
01:55Finally, we get this installation screen. Click Install to complete the
01:58process.
02:01The WAMP files will install, this will take a few minutes. Once the WAMP files
02:07have installed, you will be asked to choose your default browser. Generally
02:11speaking, you can leave it as it is, and just click on Open, however if you
02:14like, you can look through your Windows files and choose a different web
02:18browser. In our case, we are going to leave it as Explorer and click Open.
02:24Finally, you will be asked for an Email address and the mail server. In our
02:28case, we are going to leave this as it is. However, Drupal will require this
02:32information and as you will see later, it can cause an error during the Drupal
02:35installation. In our case it doesn't matter since we are only installing on a
02:38local machine, and won't be sending email from it.
02:42Finally, you have an option to launch WAMP once its installed. We are going to
02:45leave that on and click Finish.
02:48Once WAMP has been installed, you will see an icon in your system tray. The
02:52first option is to put WAMPServer Online. Directly above that you have the
02:57option to Start, Stop, or Restart All Services. In this case we are talking
03:02about MySQL and Apache.
03:05You can also control those services along with PHP individually. Here we see
03:09MySQL; you can look at the Version information, Start or Stop the Service, or
03:15actually enter SQL commands in the MySQL console.
03:19In PHP, you can look at the version, you can turn ON and OFF many settings,
03:23along with many Extensions. We are not going to touch these, because that's a
03:27rather advance topic.
03:28You can also change the php.ini, which controls such matters as how much memory
03:33is available to applications.
03:35In the Apache selection, once again, you can look at the Version of Apache you
03:39are using, Start and Stop the Service itself, and look at some of the Options
03:43available for Apache, which are called Modules. Once again, we won't be looking
03:47at these in this course.
03:48You can Alias directories, so one directory actually points to another. You can
03:52change the httpd.conf file, which is again beyond the scope of this course, and
03:58look at the some of the Apache longs.
04:00The next option is to open up the www directory; this is the directory where
04:05you will actually be storing your Drupal files. We will return to it in a
04:09minute.
04:09SQLiteManager and phpMyAdmin are both used to control the MySQL database. We
04:15will be using phpMyAdmin.
04:18Finally, you can look at your home page as its being served up by WAMPServer.
04:21We will do that now.
04:24By default, WAMPServer installs this index page, which has some information
04:28about the server itself, and links to some of the tools you can use to control
04:32it. At the top of the screen, you can see the Apache version and the PHP
04:36version, along with some of the extensions that control these programs.
04:40Below that, you also see the MySQL version. Continuing on, you see some of the
04:45tools you can use to control PHP and MySQL. Clicking on any of these brings you
04:50to that page.
04:52Finally at the bottom, if you have created any aliases in your Apache
04:55configuration, you see them here and can go directly to them. For us though, we
05:00are going to go to phpMyAdmin and set up the database that we need for Drupal.
05:05phpMyAdmin is an administrative tool that lets you control your MySQL database.
05:10We will be using it throughout the course. To create the database that we need
05:14for Drupal, go to this Create new database area, and type in the name of the
05:17database you would like. We are going to use the name drupal and click Create.
05:21You don't need to change any other setting on this page.
05:25If the process is successful, you will see this information at the top,
05:29Database drupal has been created. Now we will switch back to our other browser
05:32window and download the Drupal Project itself.
05:35To do so, go to drupal.org.
05:39On the front page you will see links to the most recent version; in our case
05:43Drupal 6.3. By clicking on the version, we get a page of information about it
05:48and a download link. We have already downloaded Drupal to our desktop so we are
05:52going to click Cancel. However, you of course should save it wherever you would
05:56like to.
05:56We hide our browser window, and there we see our drupal file that we have
06:00downloaded. By double clicking on it, we get a folder very much like the one
06:04you see here labeled drupal-6.3; this contains all of the file that we need to
06:09run Drupal.
06:10Our next step is to copy all of these files into our www directory. To get
06:15there, we go to our Computer, which brings us to the C drive, open that up, and
06:21go to the wamp folder. Inside the wamp folder, you will see a folder called
06:26www. Open that up, and you will see the index.php file that created that page
06:33we saw earlier. To delete it, right click on it and select Delete.
06:39Finally, you will copy all of those files from your drupal folder over to this
06:43location. To do so, hold down Ctrl+A to select all the files. Then right click,
06:49and select Copy. Click in your www folder, right click, and select Paste. After
06:56a moment all of the files will be copied into this folder.
07:00You can now take a look at your Drupal installation through a web browser
07:03window. To do so, we will go back into our web browser and type in
07:07http://localhost, or just remove the phpMyAdmin from the URL you see here.
07:15There we are, Drupal is now ready to go through its installation process
07:18through the Web Browser Administration Interface.
07:21To start, click on Install Drupal in English. You will be warned that you need
07:25to create a certain file; this file is called settings.php, and it's in the
07:30sites/default folder. To create it, copy the file called default.settings.php
07:37and rename it settings.php.
07:43Then return to your Drupal screen and click the try again link. Now we can
07:49point our Drupal installation at the database we created earlier. The Database
07:54name that we gave it is drupal. The Database username for WAMP is root, and you
07:58don't need a password. You may wish to change this later for security purposes,
08:03look at the WAMP documentation for more information. Click Save and continue,
08:07and Drupal does some final steps in its installation.
08:11Now you are asked for some more information in order to personalize your site.
08:14We will put in our E-mail address, which in our case is admin@example.com, and
08:21create the first user in Drupal. This will be the superuser that has extra
08:26privileges over all other users. Don't forget this username.
08:30You will notice the E-mail address for that user is already filled in; it
08:35assumes that you are going to use the same as the administrative email. We
08:38enter a Password; for us that's booth.
08:42Drupal will warn you if it thinks that your password is not secure enough and
08:45give you suggestions on how to make it more secure.
08:48We can set out time zone, which Drupal will actually read from your computer
08:52and take a best guess as to what your time zone is.
08:55Then there are two things down at the bottom; Clean URLs is something we will
08:59be discussing in a separate video, and we will explain how you can change your
09:03servers so that it's possible to make clean URLs, and exactly what they are.
09:07Update notifications; I recommend that you leave on. This is something that
09:11lets Drupal check the drupal.org website and server to make sure that you have
09:15the latest versions of every thing, that's one way that you can keep your
09:18Drupal installations secure. Click Save and continue.
09:22If you didn't enter an E-mail address in the mail server when you first
09:25installed WAMPServer, you will see this warning. But don't worry, we can fix
09:30that later.
09:31Finally, click on your new site and you will see your Drupal site up and
09:35running. You are now ready to configure it and start creating your new Drupal
09:39site.
Collapse this transcript
Installing MAMP
00:00If you plan to run Drupal on a computer with Mac OS X, and you aren't already a
00:04whiz at managing Apache, MySQL, and PHP on your computer, then this video is for you.
00:09If you will be running Drupal only on Microsoft Windows computers, go to
00:13the other video in this series, Installing WAMP, instead.
00:17By the time we are done, your computer will have all the components you need to
00:20run a basic installation of Drupal.
00:23The first place that we need to go is to this website, which is at mamp.info.
00:28Once there, you will see that there are two versions of MAMP available; the one
00:32on the left is MAMP PRO, which is a for pay system, which has some pieces that
00:36we really don't need. We are good enough with the ordinary MAMP. You can read
00:39more about it by clicking on this button here, or you can just go to the
00:44Download page by clicking here.
00:46Once there, the latest version will be listed here and you can click on it to
00:49download. We have already downloaded it, so I am going to switch to the Finder,
00:54hide everything else, and unpack this file.
00:58On the Mac what you would do to unpack it is to double click, look through the
01:03License Agreement, and if you agree, which I assume you will, you click Agree,
01:09and the result is a disk image, which contains both MAMP and MAMP PRO. Again,
01:14we only need MAMP, so you will drag that into your Applications folder right
01:18there.
01:22The Copy will take a few seconds, and when its done you can see MAMP by double
01:25clicking on this alias to your Applications folder, like so. You can then close
01:30this window, and if you like, you can eject this disk image by dragging it down
01:34to the Eject.
01:35Once you in the Applications folder, scroll down until you see MAMP, and open
01:40it by double clicking on it.
01:42The first time you download MAMP, it will ask you if it's okay to open it since
01:45it was downloaded from the Internet. Since we trust our source, we are going to
01:48say Open.
01:51Two things will happen. First, the MAMP program itself will open, and second,
01:55it will open the start page. I am going to switch back to the MAMP program so
01:59we can take a closer look.
02:02In the left hand part of the screen, you see Apache Server and MySQL server;
02:06you can Start and Stop these servers at any time by clicking on this button.
02:12When the servers are stopped, the lights glow red, when they are started again,
02:16they glow green. In order to run Drupal, you will always have to have the
02:20Apache Server and MySQL Server running.
02:23The page that was launched when MAMP started is called the Start page, and you
02:26can launch that at any time by clicking on this button.
02:29From here you have many different options, such as controlling your MySQL
02:33database, using phpMyAdmin; we will be doing that a lot in this series.
02:38I am going to go back to MAMP right now, and look at the Preferences. We are
02:42going to change a few things in here. First of all, we want to change the
02:46folder that Apache is looking for its document root directory. The reason for
02:50that is right now it's stored inside the Applications folder. The problem with
02:56having your document root directory in your Applications folder is that many
02:59backup systems don't look there. Instead they look in your Documents
03:02directories. So we are going to put ours there.
03:05The first thing we want to do is create that document root, and we will do that
03:08by going back to the Finder, by clicking on it, go up to Finder, and Hide
03:12Others. Now I am going to go into my directory, which in this case is
03:18Users/tomgeller, and Sites. In here, I am going to create a new Folder, which I
03:23will call Drupal; this is where all of our Drupal files will live.
03:27I am now going to switch back to the MAMP application and change the document
03:33root so that it goes to that place. Again, that was Macintosh
03:38HD/Users/tomgeller/Sites/drupal, and then Open, and that chooses the correct folder.
03:46There is one other thing that we are going to do, which is to change the Ports
03:49that MAMP uses. Right now it uses these nonstandard Ports, 8888 and 8889. The
03:55reason we want to change this is, if we don't, whenever you look at the page in
03:59your Drupal site, it's going to have not only the name of local host, which is
04:03your local computer, but it will say local host:8888, which is a little bit
04:07inconvenient if you are typing out URLs.
04:09So I am going to Set to default Apache and MySQL ports, like so, and then click
04:14on OK. The servers will restart, and it will ask you for your Password. There
04:23we go. We now have MAMP running on the ports we want, and pointing to the
04:27correct folder.
04:28I am going to just say Open start page again to make sure it's working, and
04:32there we go.
Collapse this transcript
Setting up the database on a Mac
00:00Drupal stores all content in a database, which is accessed through programs
00:04written in PHP. If all went well when you installed WAMP or MAMP your PHP setup
00:09won't require any configuration. The database program however will need some
00:14additional attention. Specifically you need to set up a new database. There are
00:18several ways to do so such as through the UNIX command line and platforms
00:22specific programs but we are going to use the web-based program call
00:25phpMyAdmin, which comes with MAMP and WAMP.
00:29First, make sure that your MAMP or WAMP installation is running as we have
00:33here. Then, go to Open start page. Click on phpMyAdmin and in phpMyAdmin there
00:40is a drop-down on the left, this is just to show you what databases are already
00:44installed. You will see that when we first installed it, it automatically comes
00:47with three called information_schema, mysql, and test. We are going to create
00:51another one called Drupal.
00:53We do that by going down here, type in drupal, and we need to make no other
00:57changes. Just click Create. Now the database has been created and we can see
01:02that by clicking on this drop-down menu here. There are no tables in this
01:06database yet because Drupal will create those itself.
01:10Now this was a very easy procedure for us but I should mention that many times
01:14this can be a very difficult thing to do. If you are having trouble creating
01:18your MySQL database you can get help from the drupal.org website. But at
01:22drupal.org, in the documentation section, you will find this page creating the
01:34database. This will give you additional information if you are creating it
01:38through some other means or if you have trouble with phpMyAdmin.
01:41Most important to note are the permissions that you will need. Wrangling the
01:46MySQL database can be one of the hardest parts of installing and managing
01:50Drupal. If you got through this step okay everything else will seem easy.
01:54Congratulations on getting through a potentially difficult task, you are now
01:58ready to install the Drupal package itself.
Collapse this transcript
Downloading and installing Drupal on a Mac
00:00It's time to reach in and get our hands dirty by actually installing the Drupal core.
00:05It's a fairly simple procedure and if you have Apache, PHP and MySQL running
00:10already you will be able to get started right away with building your site.
00:13If not, other videos in this series will show you how to get those going by
00:17using WAMP on the Windows platform or MAMP on the Mac.
00:21Our demonstration will feature Drupal 6.3, which was released in July 2008, but
00:27the basic installation procedure was the same in previous versions and we don't
00:30expect it to change substantially in Drupal 7.
00:33This video also assumes that you have already installed the database that
00:37you need into MySQL.
00:38If you haven't done so already, watch the video on installing that database.
00:43The first place that we want to go in order to get our Drupal installation
00:47package is drupal.org.
00:52The front page of drupal.org includes links to those downloads.
00:56Here we have 6.3 and they sometimes also have previous versions for those people
01:00who haven't upgraded yet.
01:01We will go to 6.3 and say Download.
01:06Once the file has been downloaded to your computer, you can open it by
01:10uncompressing the file.
01:11On the Mac you do that by double-clicking like so.
01:14That creates a folder and if you look inside, you can see all of the different
01:17files that make up Drupal.
01:19We are going to take all of those files and drag them to where we have our
01:22document root directory.
01:24In our case that's in Macintosh HD/ Users/tomgeller/Sites, and drupal.
01:30So we will take all of these by hitting Command+A and dragging them in.
01:35Then you can close this window if you like.
01:37So we have actually just installed Drupal, all we need to do now is configure it.
01:41To do so go to http://localhost if you are using a different port you will have
01:48to add that here but we are not and start with Install Drupal in English.
01:54During the installation process, you may get some warning messages.
01:57The ones in red mean that you can't continue further.
02:00The ones in yellow suggest that you should do this before you continue further.
02:04We are going to take care of both of these things now.
02:07The first one said that the Drupal installer requires that you create a certain
02:10file as part of the installation process and then give it certain permissions so
02:14that Drupal can read and write to it.
02:16That file is located at dot, which means the Drupal root directory,
02:20sites/default, and the file is called settings.php.
02:24I am going to go back to my Finder and hide everything else so we can see what we are doing.
02:29Then go to that location at sites/default.
02:32Now the file itself was called settings. php and it's created by duplicating this
02:37default.settings.php.
02:39So we will make that settings.php and go back to this page and click Try Again.
02:47Good, we got rid of that.
02:48Now we are going to take care of the other part, which suggests that we increase
02:52our PHP memory limit.
02:53I think this is a good idea because certain modules require more memory and even
02:58the core installation does not do so well in 8 Megabytes.
03:02The file that we need to change is the Applications/MAMP/conf/php5.
03:08Let's go there right now.
03:10Once again I go to the Finder, Hide Others, I am going to go to the applications
03:15folder by clicking on Applications to MAMP to conf and php5.
03:23This is the file that we need to edit.
03:26We opened it up in a Text Editor and I am just going to search for 8M which is
03:32the default size of the memory in php.ini,
03:35and I am going to change that to 16 Megabytes, Save and then quit out of
03:42the program and then you will have to go to MAMP and restart your servers.
03:53By restarting your servers, you are making that change take effect.
03:57Now let's go back to our Drupal installation, we will reload this page and
04:01see if that error message goes away, I do that by hitting Command+R in most browsers.
04:07And now we are up to just entering the database information to tie Drupal to the database.
04:13If you are using MySQL you can leave this button here;
04:16if you are using pgSQL, you would change it here.
04:19Our database name is drupal, our username is root.
04:23I enter the password and if you are using a remote server or have some unusual
04:27settings such as the different port, you may have to change some Advance
04:30options, but we are not doing that so we will click Save.
04:36When that's done, you are given a page where you should enter information
04:39about the site itself.
04:40The first thing we will want to do is change the site name.
04:43Our site is going to be about how to buy and sale real estate that's underwater
04:48and we are going to call it Underwater Reality.
04:53For the email address I am just going to enter my own email address
04:55here, tom@tomgeller.com.
04:59Then we come to the Administrator account.
05:01Personally I always like to use admin but you could use whatever you like as
05:06long as you remember the name because this is going to be the super user that is
05:09the one who has access to everything in the Drupal system.
05:12If you forget this it can be difficult to get back into it although we will show
05:16you how to do that in the recovering from disasters video.
05:20Finally the password, Drupal 6 introduces a new interesting widget, which tells
05:26you just how strong your password is.
05:28If you were to add additional characters it would change to medium and then high.
05:32For now we are just going to leave it as it is because we are just using
05:36a development server;
05:37confirm the password, make sure that the time zone is correct.
05:41Then there are two things down at the bottom, Clean URLs is something we will be
05:45discussing in a separate video and we will explain how you can change your
05:49server so that it's possible to make Clean URLs and exactly what they are.
05:53Update notifications, I recommend that you leave on.
05:56This is something that lets Drupal check the drupal.org website and server to
06:02make sure that you have the latest versions of everything that's one way that
06:05you can keep your Drupal installation secure.
06:07Click on Save and continue and we are done, click on your new site and you are
06:13actually logged into your site.
06:15It has the name that you created up there, you are logged in as the administrator.
06:19And from here we are going to be going on to customization followed by adding
06:23functionality and finally adding content, but at this point you have a complete
06:28site sitting and waiting to become whatever you want it to be.
Collapse this transcript
Troubleshooting installation problems
00:00The best-laid plans of mice and men going oft awry, especially when it comes to
00:04software installations with lots of dependencies. In this video, we'll show
00:08you how to fix a few of Drupal's more common installation issues, and show you
00:12where you can go to get help for anything we didn't cover here.
00:16The first time that you might have problems is during the installation.
00:20Most commonly, the problem is that it can't find the database, and here there's a
00:24few things to check.
00:26The first one is that you have the correct Username and Password. The second is
00:30in that Advanced Option section at the bottom of the screen. Very often if you
00:35are using a remote Internet service provider, they will ask for you to use a
00:38different port from the one that Drupal is expecting, remember to click on that
00:42turn down triangle and look at the Advanced Options if you can't connect to the
00:45database, and check with your system administrator.
00:48The second problem that often occurs is if you can't bring up the Drupal site
00:52in a web browser; it appears to be running, but whenever you go to it, what you
00:55get is a blank screen. The first thing to check is that you actually have a
01:00root directory, that Apache is looking towards.
01:03One way to check that is to go into MAMP or WAMP, if you are running Windows.
01:07Go into Preferences, and take a look in MAMP at the Apache tab. Then you can
01:12Select the directory and make sure that your Drupal files are actually in
01:15there.
01:18Let's say that you have taken your site offline and are no longer able to get
01:21back into the administration pages. Well, there is a trick that advanced users
01:25of Drupal know how to do, by putting the URL in its most basic form for the
01:30administration page. That would be ?q= admin, which will bring you directly to
01:39the administration page, even if your site is offline. You maybe asked to log
01:43in at that point, but at least you will be able to get into your site.
01:46Let's say for some reason your administration goes wrong; some files are
01:50missing or something like that. There are a few special URLs you could use to
01:55get Drupal working again. The first one is simply your address, which in this
01:59case is localhost/install.php. What that does is it calls the specific file in
02:05Drupal's hierarchy that lets you install the program; we are going to do that
02:08now. It tells us that it's already installed. If it were having some problems,
02:13then it would give you some instructions on what you should do.
02:16Another useful file is update.php, which is very useful if you added some new
02:22modules, or let's say you have changed versions of the Drupal core. Here we did
02:27it, and we can see it gives us some options here, including a link to
02:32additional help on the drupal.org website.
02:34Let's click on that, and it will give you all sorts of information, for not
02:38only Drupal 6, but for previous versions of Drupal as well. In fact, the
02:42drupal.org website is where you should go if you have a problem that you can't
02:46answer.
02:47Let's say that you can get into the site, but you seem to be having other
02:50problems and want to find out where they are coming from. The Administration
02:54section has several links that will help you. The most useful of these is the
02:58Status report. This will tell you if there are any problems with your
03:01installation, as well as telling you what version of Drupal you are running,
03:05and what some of the other aspects of your Drupal installation are.
03:08Here for example, we can see that we haven't checked to see that we have the
03:11latest version of Drupal. It gives us some links that will allow us to do that.
03:15We do it, and everything is back up to date.
03:20Finally, we should mention that installation problems are sometimes the result
03:24of issues in the computer's Operating System or even in its hardware.
03:28Obviously, we can't cover all of those here. Most often the problems that will
03:32affect Drupal directly are in Apache or the MySQL configuration, but errors
03:36elsewhere, such as the file system could prevent Drupal from operating. Your
03:41best bet is to read any system errors you get, copy those errors into an
03:44Internet Search Engine, and see how others have solved the problem.
Collapse this transcript
Automating updates with cron
00:00During the installation process or while poking around Drupal's administration
00:04pages on your own, you might have noticed something like 'cron has not run' or
00:08'To check for updates you may need to run cron,' or you might have installed the
00:12module that fetches information periodically from the Internet such as the news
00:16aggregator but then find that it's not working. That's because Drupal has to
00:20run certain system level processes periodically but requires an outside program
00:25to do so with the permissions required. That program is called cron, and we'll
00:29show you how to configure it to make Drupal happy. We will also tell you
00:33about a handy Drupal module called poormanscron which we will learn to install
00:37later in the course.
00:39Essentially your goal is to force a visit to a certain Drupal page once in a
00:44while. That page is cron.php, which is spelled cron.php, and the file is
00:51located at the top of your Drupal directory. So by typing in your side address,
00:56in our case that's localhost followed by cron.php. We can visit that page;
01:03let's do that now. Looks like nothing happened, doesn't it?
01:06Well let's go back to our Drupal site and take a look at our administration
01:12pages and then go down to the Status report and we will see something here,
01:18cron maintenance tasks, Last run 12 sec ago. That was when we visited the
01:22cron.php page. So even though it doesn't have any interface back to us, it is
01:27doing something and what cron does maybe very important to your Drupal site.
01:32Your goal is to make that process happen occasionally and automatically. cron
01:36is your tool. For Drupal users, the number one place for instructions on how to
01:40use cron is drupal.org/cron. There you will see all sorts of information about
01:47how to configure cron. There are essentially three ways to make cron run. The
01:53three ways to run cron are first by running it on your computer that is to say
01:59on the server. Secondly by using an outside cron helper such as webcron.org and
02:05third by using the module we mentioned earlier which is called poormanscron. We
02:10will show you once again how to install that module in another video in the series.
02:14We will show you how to edit the cron in UNIX, for Windows users the task
02:20scheduler function is a good replacement for cron. A good explanation of how to
02:24use this function can be found at the drupal.org website. Follow the URL below
02:28for more information.
02:30In order to edit at UNIX, on the Mac you will have to go into a Terminal
02:34program, if you are using a Remote Server, you may have to use a Shell program.
02:40On the Mac we double-click on the Terminal program and from here we can enter
02:45commands as we like. The first thing that we need to do is find the program
02:49that's going to visit the cron page. In other words a text-based web browser.
02:53The two big ones are called lynx and wget and there is also a curl. We will try
02:59finding each of these. In UNIX, you can do so by saying, whereis lynx. We don't
03:06seem to have that. So let's try whereis wget. Finally whereis curl. Aha! We do
03:14have curl. We take a note of that location which in this case is usr/bin/curl.
03:21Now that we know how we will visit that cron.php page on your Drupal site, we
03:25need to make it happen periodically.
03:28cron is unusual, it relies on the precise configuration of a text file that you
03:32can't edit directly, and it's an obscure and obfuscated format. In UNIX you can
03:37figure cron through a command line interface which is called crontab. The way
03:42that we do that is by typing crontab-e which means edit and there it is. Right
03:50now our crontab is empty. I am going to tell you the exact keys to enter
03:55because we are now in a program called vi, you maybe using a different sort of
03:59editor on your server. Depending on which web browser you found whether it's
04:03lynx or wget or curl, you can find instructions on how to set up your crontab
04:09in the scripts folder which is inside your Drupal installation.
04:13So I am going to go there right now. Inside here you will find some sample
04:24scripts since the one that we found was called curl, I am going to open that
04:28up. So here we have opened up the sample curl command then I am going to go
04:32back to my Terminal and enter that command. It's curl --silent --compressed and
04:43then we need to put in the address of the server, in this case instead of
04:46example.com, we say http://localhost/cron.php.
04:54Now our job is not completely finished because although we have given the command
04:58we haven't yet set how frequently or when we want that command to be run.
05:02For that once again we can go back to the page on drupal.org, Configuring cron jobs,
05:08and it will give you a sense of how crontabs are setup.
05:12The way that it works is that there are five fields at the beginning, which
05:15stand for minutes, hours, days of the month, months of the year and then day of
05:20the week. We don't have to worry about any of those last four because we are
05:24going to want our cron to run at least once an hour.
05:27So in this first field we will say at which point after the hour we want it to
05:32run. In this example that's given on drupal.org, it runs at 45 minutes after
05:38the hour. Let's go back to our example and make it happen also at 45 minutes
05:42after the hour.
05:45So 45 ****, you can also make it run much more frequently than that, for
05:52example every minute if you were to replace the 45 with 0-59. For other
05:59information about the various kinds of ways you can control cron, look on the
06:03cron page on the drupal.org website.
06:06The second thing that we need to do is we have to tell our computer where
06:10exactly we are going to find that cron program. Now, you might remember that we
06:14had usr/bin/curl, well we enter that here /usr/bin/curl.
06:19So now we have entered when we want cron to run, what program we want it to
06:29run, what sort of options we want it to run with and again this was just copied
06:33from the text that's in that scripts folder and exactly where we want it to
06:38run. In order to get out of that we will hit Escape on our keyboard, then :wq
06:44if you are using VI. Again, if you are using a different editor you will use
06:47whatever commands you used to get out of that and hit Return.
06:51Now we are told that we have installed the new crontab, and we are ready to go.
06:55Now we have installed cron, so our Drupal website will be updated at least once
07:01an hour, in our case it will happen at 45 minutes after each hour.
07:06It's unfortunate that something so critical to Drupal's operation is so hard to
07:10configure but the good news is you have one other option. If you go to
07:16webcron.org, this is an outside service that would let you set up a cron system
07:23on your Drupal site from an outside place. This is somewhat complex to set up
07:28as well and we won't go into all the details. If you are like me, speak English
07:32as your first language, the first thing you will want to do is click on the
07:35British flag down here and then follow the instructions.
07:39The good news is once you have cron setup whether it's through webcron.org,
07:43poormanscron or the command line interface I gave you before; you pretty much
07:48never have to touch it again. Good luck!
Collapse this transcript
4. Perfecting Your Installation
Setting up clean URLs
00:00We are at a point here where Drupal is now installed and ready to go. At this
00:04point, you could simply start adding your content. You have a fully working
00:08Drupal website. But there is one little tweak I would like to recommend before
00:11going any further. While it's optional, it makes your site more friendly to
00:15both search engines and users. That is configuration for Clean URLs.
00:21This section can be somewhat difficult and technical and much of the
00:24information that you are going to need will be on the drupal.org website.
00:27I'll show you how to find that information, but I will also show you how to go
00:30through the process in one certain way. You might not be able to do this on
00:35your computer, but with any luck it will work just fine.
00:38When you first installed Drupal, you might have noticed those choices you had,
00:42to either use Clean URLs or not. If you can click those radio buttons at that
00:47point then you should turn them on, there is no reason not to. However, for
00:51most of us we weren't able to do that because there wasn't something on our
00:54server that needed to be changed. I'll show you how to change that now.
00:58You can also find out whether you can use Clean URLs once the site is already
01:02loaded. To do so go to Administer and scroll down until you find Clean URLs, I
01:08will click on there, oh it look likes I can't because I can't click those radio
01:12buttons. That's okay; I will show you how to do it.
01:16The first place to go is the drupal.org website, I will create a new window and
01:20go to drupal.org. To find the page that you want you will click on
01:24Documentation and then scroll down to Beyond the Basics. Then go to HowTos and
01:32finally to the Installation, Migration and Backup section.
01:36Once there, the second choice is Clean URLs. We will be coming back to this
01:42page frequently as there is a lot of information on it that we need. However,
01:45first I will show you where the file is that you will need to change in order
01:49to make Clean URLs work. I will show where it is on the Mac computer, although
01:53if you are on a PC, it will be in a different place, but it will have the same name.
01:57We will go to the Finder and hide everything else so we can see what we are
02:00doing. Create a new window by hitting Command+N on the Mac and go to the
02:05Applications and then to our MAMP installation folder. In the MAMP installation
02:10folder we go to conf, apache and there it is httpd conf. If you are on the PC
02:17again, you will have to search for that depending on how you did your
02:19installation.
02:20I am going to make a backup of that by hitting Command+C, copy and then
02:25Command+V for paste, again on the PC it's Ctrl+C and Ctrl+V. Remember that we
02:31have this copy in case anything goes wrong. We are going to open the original
02:35file, which is called httpd.conf. Once we have it open, we can make the window
02:41a little bit larger, so we can see what we are doing.
02:43We are going to look for something called mod_rewrite, I will do Command+F or
02:47Ctrl+F on the PC mod_rewrite. Good, we need to have this line uncommented. In
02:57some httpd conf files, you will find a # sign in front of it which means that
03:04it's turned off, you want to make sure that it's turned on by backspacing a few
03:08times and taking away that # sign.
03:11You can also find out if the mod_ rewrite module is turned on in Apache, by
03:16going back to MAMP or WAMP, opening up your start page and hitting phpinfo and
03:21then doing a search for rewrite there. There we are.
03:25We actually have mod_rewrite already turned on, if it isn't turned on in your
03:29installation, the place to go again is the Drupal page I mentioned earlier
03:35which will tell you a little bit about how to turn it on. So we have
03:38mod_rewrite turned on, why can't we use Clean URLs. It turns out that some
03:43additional changes have to be made to httpd.conf or to another file. I am going
03:50to make them to httpd.conf although again, there are few different ways of
03:54doing this and you can find out on the drupal.org web page.
03:58My favorite way though, is if you scroll down, you will find a little snippet
04:02of text here, you can copy, Command+C or Ctrl+C and then go back to that file
04:09and paste it pretty much anywhere in the file. I like to put it anywhere in the
04:12file. I will like to put it somewhere around the LoadModule part. I will paste
04:15it. Then one other change has to happen which is you have to change the path to
04:19your Drupal directory. For us that's Users/tomgeller/Sites/drupal. We save that
04:28file with Command+S or Ctrl+S. Then we have to do one more thing go to MAMP
04:34stop the servers. We need to enter our password for that, start the servers
04:43again and then let's see if it works.
04:46We will go back to our site, reload this page, and hurray! We can now use Clean
04:55URLs. I will show you what Clean URLs actually does, by turning it on and then
05:00saying Save Configuration. First you will notice how we have this ?q= blah,
05:05blah, blah, blah. Save configuration, it's all gone.
05:10Now we just have /admin/etcetera. That's true throughout the entire site. If we
05:16go to, let's say Administer instead of saying ?q= blah, blah, blah it just says
05:21admin.
05:23It can be very difficult to set up Clean URLs and believe me I feel for you. I
05:27have done this many times and had many problems doing it. Unfortunately, we can
05:32only show one path to troubleshooting this, since there are many different ways
05:36that it can go wrong. But it's well worth setting up Clean URLs as you can see.
05:40If you need any more help, cash in your, you owe me a favor chip with the
05:44system administrator friend you have down the street or once again go back to
05:48drupal.org and get help there.
Collapse this transcript
Backing up your Drupal site
00:00Once you have a Drupal site that you like, you'll want a quick and easy way to
00:03back it up for safekeeping or to save a copy to migrate to another server.
00:08Fortunately, the process is fairly painless, thanks to the MySQL utility,
00:12phpMyAdmin. But first, we're going to have to save the files that are in the
00:17Drupal directory. Drupal stores information in two ways, first as those files
00:23and second as the information in the MySQL database. First, we go up to where
00:29we have our Drupal directory, in our case it's in Users/tomgeller/Sites/drupal.
00:35Backing this up is amazingly easy, just Command+C or Ctrl+C. Go to wherever you
00:40want to back it up, Command+V or Ctrl+V on a PC. And there we are, we've made a
00:45copy of the entire directory. These files can also be backed up using a
00:49standard backup program such as Time Machine or Intego Personal Backup on the
00:53Mac, or as part of your regular computer backup discipline. If your files are
00:57on a server, you'll have to use an FTP program. In truth, you don't have to
01:02back up the entire Drupal directory, and if in fact you've built a Drupal site
01:06that has a lot of large movie files or large graphics. You might decide to only
01:11backup certain sub folders, inside there where things change frequently.
01:15But the default Drupal installation is extremely small; it's about five
01:18megabytes. So unless you start adding large files, there is no reason not to
01:22back-up the entire folder. Once you have the folder, I would suggest renaming
01:26it with the date of the backup and possibly any other information that you want
01:30to add. For example, I am going to say 20080714 and this is Underwater Realty.
01:38And I am just going to call it underwater-drupal. Good. That will be the name
01:41of our backup. I am going to give a similar backup name, to the MySQL file,
01:46which we are going to back up now. To get there, go up to MAMP or to WAMP if
01:50you are running Windows and click on OPEN Start Page or the similar button
01:54that's on the WAMP Administration Interface.
01:58Then go to phpMyAdmin and scroll down, until you get to Export. We are going to
02:04export the entire database. Once again, you don't really need to export the
02:08whole database if you are a very good MySQL administrator. You could just
02:12export individual tables, but why not do the whole thing. It will make a lot
02:16easier when it's time to restore. Click on Drupal, go down here. You have a
02:23choice of either just saying Go, which will bring up the SQL commands in a
02:28plain text file, which you can copy somewhere and put somewhere or more easy is
02:32to say, Save as File. We'll do that, say Go, once it's downloaded, you can go
02:37back to where it has downloaded, in this case to the desktop, and give it the
02:44name that you want.
02:45Again, since I use this name for the files themselves, I'll give a similar name
02:50to the SQL file. One last step as a good idea, when you have all of these files
02:59in a folder I would suggest one more step. Instead of leaving all of these
03:04files in a folder, I would compress it using whatever compression utility is on
03:07your computer. On the Mac, you can do that by holding down the Control key,
03:11clicking on the folder, and saying Compress.
03:14On the PC, you would right click and issue a similar command, and there you
03:19have it. You now have two individual files that you can use to restore your
03:23Drupal installation back to the point where you backed it up.
03:26We'll show you how to do that restore in another video in this series.
Collapse this transcript
Restoring your Drupal site from backup
00:00In another video, we showed you how to backup your Drupal site in two steps.
00:04First, by copying all the files in your Drupal folder, and secondly by backing
00:08up the database. For a backup doesn't do you any good if you can't restore from
00:12it. So we will show you how to do that in this video.
00:15You should create a backup of your site first, by following the instructions in
00:19that earlier video, since we will be using them here. To get started we are
00:24going to do something dramatic. We are going to go into our Drupal folder, and
00:28delete everything there. We go into the Macintosh HD, and Users, and tomgeller,
00:34this is where we happen to have our Drupal site, but of course, yours might be
00:37somewhere else on your computer.
00:40Go into sites, Drupal, and I am just going to let's say, get rid of some random
00:45files here. And they are gone. Now let's go back into our site, and see how
00:52well it faired. We go to http:// localhost, and we can't see -- you know, we can
00:59see the individual files that are left, but we don't see our Drupal site
01:02obviously. So let's go back to the Finder, hide everything, and restore from
01:08the file that we had saved.
01:09Fortunately I still have those files from when we had exported our database and
01:13saved the files earlier, here on our desktop. I am going to get rid of
01:17everything that's in our Drupal folder. My personal preference is to just get a
01:21clean slate and then start again from the beginning. That also means of course,
01:25that when you backup, you have to save everything from your Drupal folder.
01:29If you decide to only save certain folders, and certain files inside the Drupal
01:33folder, of course, your procedure will be somewhat different. But for us I am
01:37going to say Command +A or Ctrl+A if you are using a PC, drag it to the trash,
01:42and empty it, and it's gone. We had saved our files into a Drupal folder which
01:49we then compressed. I am going to uncompress that now, and to restore the
01:53files, all that we have to do, is take everything there, again Command+A or
01:58Ctrl+A, drag it back in, and puff. I'll reload this page, and it works again.
02:07What if something happens that destroys your SQL database? I am going to go
02:11into phpMyAdmin, and do exactly that. To do that in MAMP or WAMP, we go to our
02:16start page in phpMyAdmin. Go into our Drupal database, and let's just delete a
02:23few random tables here. And we selected, we just say, drop. Yes, I really do
02:33want to do that, I really do want to do it on my site.
02:35I'll create a new Window, and take a look and see whether our site is actually
02:38running, as a result. Now we have too many errors here. So we are going to do
02:42something very similar in the MySQL database that we did in the files. I am
02:48going to go into this database and just get rid of the entire thing.
02:51Fortunately remember, we did make a backup, don't do this obviously if you
02:56didn't make a backup. I do want to drop it, I will say, OK. Now, I am going to
03:01go back to the Finder, find where that SQL database is, it's right here on our
03:08desktop. Go back in here, and now instead of using export, we are going to use import.
03:15From here we can choose the file that we want to backup from, by clicking on
03:19Choose File, and there is my drupal.sql file, Choose, and then just scroll down
03:25to the bottom, and say Go. If everything goes well, you will get a message like
03:30this. If it doesn't, you'll see a red box appear, and it will explain the
03:34errors. In that case, you may have some troubleshooting to do. I would suggest
03:39the first thing you do, is try once again dropping the database, and try
03:42re-importing it. But let's take another look at our site, and see if it
03:45actually works. We just go to localhost, and we are back, our site is actually
03:51working. We can administer it, we can see all of our content, and everything is fine.
03:57You now know how to backup and restore your Drupal site, which will save you a
04:01lot of problems. The last step in this process is the one where most people
04:05trip up, which is the actually make those backups on a regular basis. I would
04:10suggest if you have a busy site, at least once a week, they don't take up very
04:14much space, and the trouble that you save is enormous.
Collapse this transcript
Wiping your Drupal installation clean
00:00It's easy to get Drupal off your computer for any reason. For example, if your
00:04Drupal installation sensitive data that you need to destroy. You just need to
00:09remove data in two places, the Drupal file system and Drupal's database. First
00:15the file system, that's easy enough to get rid of. Since all the files that
00:19Drupal uses are contained within the Drupal folder itself. Just move that or
00:23throw it away and it's gone. I'll show you how to do that on our installation.
00:27First, we go to the finder and hide everything else and here we see the Drupal
00:32folder, inside it or all of its files.
00:35To get rid of it on Mac, we'll just grab it and drag it to the Trash. And on a
00:40Windows machine, we would highlight it, right click, and select Delete. Then
00:45when we empty the Trash, it's gone. However, the database's content is actually
00:50still on the computer in a separate database file. For complete security,
00:55you'll need to get rid of that. In SQL jargon to delete a database, you drop
00:59it. We'll do so through phpMyAdmin. To get to phpMyAdmin you switch to MAMP or
01:06if you are on Windows, WAMP. You then click Open Start Page and click on the
01:13phpMyAdmin link; from there, go to Databases and select the database you use
01:19for Drupal.
01:20Ours is named Drupal; then just click on Drop and you'll get a warning because
01:25remember you are going to destroy all of the data in that database. That's what
01:30we want to do, so we'll click OK. Now your Drupal site is completely gone. If
01:36you want to remove all traces of it from ever having been on your computer, you
01:39would also need to undo changes you made in the file system in order to make
01:42Drupal run the way you want it.
01:44For example, you might have needed to change some of Apache's files, in order
01:48to make clean URL's work. But honestly leaving in such changes generally won't
01:53cause problems for others or give away any secret content. The password to your
01:58database was stored in the Drupal folder, so it's already gone. As is the
02:02database and all of your site's content itself.
Collapse this transcript
Updating Drupal
00:00Drupal Version 6 introduces some convenient features that allow it to
00:03essentially monitor itself to make sure the most up-to-date core program and
00:07modules are installed. We'll show you a typical update from version 6.2 to 6.3.
00:13We'll also show you how to update a module. However, we are not including any
00:17exercise files for this video, as the older version isn't as secure as the new
00:22one. So it would be a bad idea for you to install it on your own computer. By
00:26the way, all instructions for updating the core Drupal system are contained in
00:30a file in Drupal's word directory, entitled upgrade.txt.
00:35This video is largely based on that text from Drupal Version 6.3. As you've no
00:41doubt noticed, Drupal often reminds you to check for new updates, especially,
00:45whenever you install or remove modules. Sometimes, you'll see a different kind
00:49of message. As you'll see when I click on Administer; it's this red box that
00:54tells you one or more problems were detected with your Drupal installation.
00:57Fortunately, it tells you what to do. You click on the status report link, and
01:03you can see that there are two problems. One problem is that the Drupal core is
01:07not up-to-date. It tells us there is a new version available - version 6.3,
01:11whereas we're running 6.2.
01:14The other thing it tells us is that one of our modules is out of date. We'll
01:17come back to that in a minute. Before we do anything else we want to back up
01:21our site. To do so, we go back to the installation directory, where we first
01:26put Drupal. I am going to do that by going to the Finder and hiding everything
01:29else and then going up one level. On the Mac you do that by going Go to
01:35Enclosing Folder, whereas on the pc, you simply click on the Enclosing Folder
01:39icon. Once there, I am going to copy this Drupal folder; I do that on the Mac
01:44with Command+C, or on the PC, with Ctrl+C, and then bring it over somewhere
01:50else. I am going to put it on to the desktop and hit Command+V or Ctrl+V on a
01:54Windows machine and I'll rename it, drupal-old-backup.
02:02Now, I'll reopen my drupal folder and go back to the administrative interface.
02:07The first thing you should do is to take the site off-line. To do that, go to
02:12Administer and scroll down until you see Site Maintenance. Click on that link;
02:19the text in the box here is what ordinary users will see when the site is
02:23off-line, you as the administrator will still be able to get around the
02:26administrative pages, but nobody else will be able to get into the site, so be
02:30sure to do this during the low traffic time. You can change this text, but
02:34we're going to leave it as it is. Then you click on Off-line and Save
02:39configuration. What the ordinary user sees when they try to access the site
02:43now, looks something like this.
02:49We'll now return to the administrative interface. There are two additional
02:53things that you need to do - first, is to turn off any contributed modules. To
02:58do that, go to Administer and Modules and scroll down. There are two groups on
03:06this page - one is Core-optional, and one is Core-required. No modules in those
03:12folders need to be turned off; however, everything else should be. For example,
03:17at the top of this page we have CCK Content. We'll turn that off, continue
03:22scrolling down. Nope, nothing in Core -optional needs to be turned off and
03:27nothing in Core-required, so we click on Save Configuration.
03:32Finally, turn off any contributed theme that you are using. To do that, click
03:37on Administer and Themes. We are running one of the original themes that came
03:42downloaded with Drupal, so we don't have to do this step. If you are using a
03:46different theme however, change it to one of Drupal's default themes that would
03:51be either Garland, or Bluemarine, or anything else that came with Drupal. To do
03:56so, click in the button underneath Default, then go to the bottom and say Save
04:01configuration. Since we've made some changes to the Theme and Modules, we can
04:05check again to see if there are any updates; but, of course, we already know
04:09that there are. We'll go to the Available updates page. Now, we download the
04:14new version of Drupal by clicking on the Download link. You can close this
04:20window when you are done.
04:22We go to wherever it was downloaded. In our case, that's the desktop, so I
04:26click on the Finder and hide everything else. We then unpack the file that was
04:31downloaded by double clicking on it. That creates a folder. Now remember we
04:36have a backup of everything that was in our Drupal folder, so we can throw this
04:40all away. We will be replacing some files in the new installation with things
04:44from the old backup, but we'll show you how to do that when the time comes. To
04:49select everything, hit Command+A on the Mac or Ctrl+A on a Windows machine. And
04:53then on a Mac, you would drag it to the Trash, or on a Windows machine you'd
04:59right click and select Delete.
05:01Now, we take everything in that newly downloaded folder. Select everything
05:06again with Command+A or Ctrl+A and drag it back into your Drupal installation
05:10folder. You can then close this window since it is empty. There is one more
05:15thing to do. This Sites folder contains most everything that makes your site,
05:21particularly yours. Some Drupal installations also have a folder called Files
05:25at this top level. If you do, you should also pay attention to that one. We are
05:30going to replace this Sites folder with what was in our old Drupal backup. To
05:34do so, throw away this one and put in the one that was in the old backup. We do
05:43so, by copying it Command+C or Ctrl+C on the windows machine. Go into your
05:48other window where your actual Drupal installation is and Command+V or Ctrl+V
05:53on a Windows machine. There, we can close extraneous windows now.
05:59So now, we have a Drupal installation that contains the new version and we
06:03still have a complete old backup over here. Now, we go back to our
06:07administrative interface. We run this special page by deleting everything after
06:11the domain name and typing in update. php. Now, it tells us a little bit of
06:18information, which we've already gone over in this video. Click on Continue.
06:24You can take a look at Select versions. Although since we have already moved
06:27the files over, we don't have to actually put anything in here and click Update.
06:33Now, you can go back to your administration pages. Let's make sure that we are
06:38running the new version by going to Reports, and Status Report. As you can see
06:45we are running Drupal 6.3, if you want to check to make sure that everything is
06:49up to date, I would recommend that you run the cron job, by clicking on this
06:53link here, saying run cron manually.
06:56Now, we're going to go back to where our site was by turning on those
06:59contributed themes and modules. We'll turn on the modules first since we didn't
07:03actually change the theme. Go to Administer and Modules and you'll see at the
07:09top that CCK turn on Content which was the only one turned on before; go down
07:14to the bottom of the page, and say Save configuration. Once again, it warns us
07:20that we might need to check for available updates. Let's do that now, by saying
07:24check manually. Aha! Remember how, when we first started, we needed a new
07:30update to not only the core, but also to a module. Well it just discovered that
07:34fact. So we'll do the process again by going to Available updates and
07:40essentially, repeating the process.
07:42However, to replace a module you don't have to do all of those backups and
07:46moving files around. It's a much simpler process. Simply click on Download, and
07:52go to the place where the file was downloaded. Again, for us that's the
07:55desktop. We close this window, go to the desktop, and hide everything.
08:00Now, we'll go to the place in our Drupal folder where we would install that
08:03module, that's in Sites and Default in the modules folder. There is our old
08:10CCK. I am going to take that out of the Drupal directory by dragging it to the
08:15desktop. I am going to rename it cck- OLD. Now, I'll unpack the new version of
08:25CCK and drag it in. Then we can go back to our administrative interface and try
08:32refreshing this page to make sure that we have all available updates. Yes, we
08:38are all up to date. Let's go to Administer and Modules to make sure that it's
08:43turned on and indeed it is. So we are all updated.
08:48The last thing we have to do of course is to return the site to Online mode,
08:52remember to do this, or else your site can be done for a long time before you
08:56realize. Go to Administer, scroll down to Site maintenance and turn it online
09:02again, and Save Configuration. Now, just to be sure, we are going to go to our
09:07ordinary user and refresh the screen. There we are; the ordinary user is back
09:15online as is the entire site.
09:18Congratulations, you've just done a difficult process that is nonetheless very
09:22necessary. The Drupal project releases updates fairly and frequently. Typically
09:27every few months for the core with major updates only about once a year, but if
09:32you have lots of modules, you'll probably find yourself updating those ones
09:36much more frequently. If you need further help with upgrading, the Drupal
09:40project maintains extensive documentation at drupal.org/upgrade.
Collapse this transcript
5. Understanding Drupal Administration
Using the Administration menu
00:00Now we move on to the meat of the matter: configuring Drupal through its
00:03browser based administration menus. Except for those changes that require
00:07mucking about on the server, to add or remove files for example, pretty much
00:12every change you make to your Drupal site will happen through this interface.
00:16Fortunately, these menus are fairly self-explanatory and if you are feeling
00:20adventurous you could just start playing around with them, but here are a few
00:24tips and tricks to make your administration experience easier, safer, and more
00:28efficient. You will need to be logged in as the Administrator to go through this video.
00:33The first thing, that we're going to do, is to go to the Administer menu in the
00:37left hand column. If for some reason this menu isn't working, that is to say if
00:43your installation is having problems, there is another way that you could reach
00:46this menu, by typing ?q=admin. That will always get you back to this menu even
00:53if you're having problems with your Drupal installation, as long as Drupal is
00:57actually running. The administration page contains links to many different
01:01parts of Drupal that are available for you to change the settings; you can
01:05reach them through two series of links.
01:07The first one on the left side is by category. Each of these categories is then
01:12expanded in the main part of the screen here. If, for example, you click on
01:16Content management, you would see the same links that you see here in this box
01:21under Content management. Click on it, it shows you those and it also expands
01:25them here. Personally, I prefer to just go to the main Administer link and then
01:30use Find to find what I am looking for. Let's say, for example, I wanted to
01:35change the Site information, I will hit Command+F or Ctrl+F on a PC and if I
01:40wanted to, say, see Site information and there we go. It highlights down here,
01:46I can click on it, and go straight there.
01:48Another way that you could look at the links that are available for
01:51Administration - go back up to the top of the Administration page and click on
01:56By module. Each one of these blocks refers to different module, that's
02:01installed in Drupal. Drupal is actually a series of modules, the main one of
02:05which is called System and you can see its Administration here.
02:08We are going to look at the files that make up the Drupal installation and see
02:12what those modules actually are. We'll go to Hide Others and to our Drupal
02:16installation folder, which in our case is in Users/Tomgeller/Sites/Drupal.
02:23You can find modules in a few different places. The first one is in the
02:27Module's folder. These are the modules that came with the Drupal installation.
02:32If you have installed any additional one's they would be in Sites, all, and
02:37then there would be folder called modules or sites default and a folder called
02:40modules. If we look here, we see System and Taxonomy and if we go back to our
02:46Administration and scroll down we see System and Taxonomy. We'll discuss
02:53modules and how to add additional modules in other video in this series.
02:58For now, let's go back up to Administer by Task. After you've been using Drupal
03:03for a while, you might find that all of this extra text isn't necessary,
03:07because you know what Comments is and Content and Blocks and so forth. So, you
03:12can hide the descriptions to make that page much more compact. Many
03:16administration pages change as you alter the site's capabilities. For example,
03:22if you add a module, it may actually change, what another module's page looks
03:26like.
03:28Let's take a look at a few different types of administration page. Towards the
03:32bottom here, we have a special type called Reports. This actually shows all of
03:37the things that have been happening on your Drupal system. The most important
03:41of these is Status Report. This is just an informational report, it doesn't
03:45actually have very much that you can set. Although, it does give you links to
03:48various places that will help you in your Drupal administration.
03:54Another report that's useful is Recent Log Entries. This can be very helpful,
03:59if you have been having problems with your Drupal installation, because it will
04:02tell you exactly where the problem started to happen and what the cause was to
04:06some extent. After a while as you could expect, this list will become extremely
04:12long and you can filter it. For example, by the severity of the problem and
04:16also by the type, whether it was caused by user action or by an action of cron
04:20and so forth.
04:22Let's take a look at a more complex Admin page; going back to Administer we
04:26will look at Blocks. This is a list of different things that you could put on
04:30your Drupal site; for example, in this top area here, called the Header or in
04:34the two sidebars or at the bottom, what's called the Footer; or actually in
04:37this main area here, on every page, or on selected pages.
04:42Each one of these lines represents a different block and these could, for
04:45example, be moved around. Let's take this one, Who's Online, for example. We
04:51can click and drag it by that little arrow symbol and let's put it on top of
04:57Navigation here. You will notice the little asterisk, which says that it's not
05:01saved until you click on Save Blocks and there we are. Now we have this extra
05:06block up here for online users. In addition to being able to click and drag
05:11these blocks, you can use the popup menu, to change the where they appear or
05:15you can further configure them by clicking on the configure button.
05:19You can also change the way that you see the site beside when you are
05:22administrating it.
05:23Let's go back to Administer, there is a special link down here, called the
05:27Administration theme, this changes the look only when you're administrating it
05:30that changes what the Administrator see, from what the regular users see. To do
05:35that you just change the popup here and let's change it, let's say to Chameleon
05:41and go to Save Configuration. Instantly we have a different look for the
05:45Administrator.
05:46Now, if as we Log out as the Administrator, which we can do down here, you will
05:51see the original theme, which is different from the Administration theme. Other
05:55videos in this series will show details on some of these Admin screens in the
05:59Core Drupal installation and the chapter on Modules shows you how to configure
06:02some other more popular third-party modules. I urge you to just spend some time
06:07wandering through the Admin screens with all of Drupal's capabilities and
06:11options it's easy to forget where important settings are hiding. The more time
06:15that you spend in these Admin screens, the faster you will remember where they
06:19are.
Collapse this transcript
Setting site information
00:00By now you are probably itching to put your own fingerprints on this website to
00:04make it truly and unmistakably yours. You can make two basic changes that will
00:09quickly move you away from this generic default Drupal site. First, you will
00:14change some text that appear throughout the site to give it its identity. We
00:17will show you how to do that now.
00:19In another video we will also show you the second way to personalize the site
00:22by changing its visual theme. We will give you a little taste of that now as
00:27well, but first things first. We will change the basic text that appears on
00:31your site by going over to Administer and then scrolling down to Site
00:37information. You may recognize some of this text because we entered it when we
00:42first installed Drupal. Some of it however has been left blank; we will fill
00:46that out now. You may remember that our site is about living underwater. So we
00:51are going to make our slogan, 'Where damp basements are a feature, not a bug."
01:01Our mission statement is 'to give real estate parity with stock options,' not
01:07sock options, but stock options. 'underwater.' Yeah, it's a little bit of
01:13investment joke there and for our footer we will just say, Copyright 2008,
01:20Underwater Reality. Finally, there's a little bit of other information that you
01:25can enter at the bottom here. We generally don't need to touch that unless for
01:29some reason you wanted to change the name of an anonymous user to something
01:32else like anonymous fish or something. The Default front page- I would strongly
01:36recommend that you not play with it. It is somewhat of an advanced Drupal topic.
01:40We will Save Configuration here. Noting is changed on our front page except for
01:44adding this mission statement here - To give real estate parity with stock options.
01:49So how can we make the other information show up? Well we can do that in the theme.
01:53We will go back to Administer and down to Themes. Here we see a list of
01:58all of the different themes, which are available by default when you install
02:02Drupal 6.3. Right now we are on Garland, so we are going to configure that by
02:07clicking on Configure. On the Theme's page you see quite a bit of information
02:11of things that you can change to make your site look different. One thing you
02:15can change is the Color scheme and we will show you how to do that in the
02:18Themes video, but the information that we want is down towards the bottom.
02:22You can toggle display of various things and here we see the mission statement,
02:26which we entered before is checked. That's why we had that slogan there - to
02:30give real estate parity. The one that isn't checked is Site Slogan, right here.
02:35"Where damp basements are a feature, not a bug." So we will go down to the
02:39bottom and say Save Configuration. Go back to our front page and there it is.
02:44It's been added on to the end of our site name right there.
02:49Let's go back to Administer and Themes to take a look at few other options that
02:53are there for changing basic site information. We will scroll down to Garland
02:57and click on configure again. These settings are specific to only one Theme. If
03:03you have several Themes installed and enabled in the Themes Menu then you can
03:08change the behavior of all of them by clicking on Global Settings. Once again,
03:13we will discuss these more in another video on Themes.
03:15There is one other settings we can change to change the way that our site
03:19looks. Although, this will only change the way the site looks when it's
03:22off-line. If, for example, you have taken it off-line for administrative
03:25reasons. We go Administer, scroll down to the bottom, and Site Maintenance.
03:32Should you decide to take it off-line, it will just show a very simple screen
03:36with this text; we could say, Underwater Reality's offices have just been
03:43flooded. We should be back shortly. I am actually going take it off-line and
03:49show you how to put it back Online, just so that you can see that message. It
03:52goes off-line. Save Configuration. Now let's go back to our homepage and log out.
03:59This is the way that people will see the site, if it has been taken off-line.
04:03We can Log in again by going to ?Q=user and then Log in as our admin; and there
04:14we have it. We go back to Administer, click Site Maintenance, put the site back
04:22online, Save Configuration, and we are back in business with all of the new
04:27information that we had.
04:29As mentioned earlier, several other videos in this series go into much greater
04:34detail on how to customize your site, particularly, with Themes and CSS, but
04:40for the small amount of time it takes to craft a few descriptive phrases few
04:44actions that has much affect in Drupal as taking those steps that you saw here.
Collapse this transcript
Setting the theme
00:00So now your Drupal site is up and humming smoothly, but it still looks rather
00:05generic. In Drupal, presentation is controlled by a system of page templates,
00:10which collectively is known as themes. So all we need to do to change the
00:14entire site's appearance is to change its theme. Fortunately, that's easy to do
00:18in Drupal. Just as a reminder, none of the site's content will change in this
00:23process. That means you can switch back and forth among many different themes
00:27without losing your articles, graphics, users or site information. There are
00:33literally hundreds of themes available online with a variety of looks and for a
00:36variety of purposes. For example, to make your site look good on mobile phones,
00:41we will look at some of those in another video, but for now, let's stick the
00:44six that come with Drupal 6.3's default installation.
00:48I will show you how to change the default theme, that is, how the site looks to
00:52every casual visitor before they become a member as well as how to let your
00:56site's registered users select a different look that they like better. The
01:00first place that we go is over to Administer and then down to Themes. Here we
01:07see a list of themes that are available. By default, Garland is the theme. But
01:12we can change that by clicking in Default on any of these other ones. We will
01:18do that now and change the theme to Bluemarine. Scroll down to the bottom and
01:22Save Configuration. There, the entire look of the site has changed. One other
01:27thing has changed by the way, the Enabled box is now checked because obviously
01:31if this is the Default theme, it has to be enabled first. I am going to change
01:35it back to Garland now, Save configuration, and we are back at Garland, but
01:41notice the Enabled box is still checked. There are a few things that carry over
01:46when you go from theme to theme and some things that don't. For example, we
01:50have up here, 'Where damp basements are a feature not a bug.' That was
01:54something entered in site information as, I believe, the slogan.
01:59Let's switch to Chameleon, for example, Save that configuration and that slogan
02:04has disappeared. We can make it reappear by enabling it in this specific theme
02:10or by making this slogan appear in every theme. Let's just do it for this one.
02:15We click on Configure and we get many different options, one of them being,
02:19whether or not the site slogan shows up. Let's try clicking on that, go down,
02:25Save Configuration, boom, there it is, it now shows up. If we want to change
02:30what shows up in every theme, we can go to Global settings and then when we
02:35click Site slogan, and say Save configuration, no matter what theme we go to
02:41now, the site slogan will show up. If for example, we were to go to Marvin, the
02:51site slogan now shows up. Let's go back to our original theme, which was
02:56Garland. In the process, we have enabled four themes.
03:01I will show you how to make those themes available to each registered user now.
03:06First, we have to give them that permission by going to Administer, scroll down
03:10to Permissions and then scroll down to select different theme. Authenticated
03:19users are those who have become members of your site. Anonymous users are those
03:23who haven't. So we will say yes only to those people who have become members to
03:26the site, Save permissions. Now any user who goes to their local My account
03:32page over here and clicks on Edit, will be able to change the theme that they
03:37see. For example, this user wants to see Bluemarine, Save and, boom! That
03:44didn't change the theme for anybody else, only for this user. We are going to
03:48change back to Garland. Go back into themes and clean up what we did, just to
03:56make it clean. Garland becomes the Default theme, Save the configuration and we are done.
04:05So here we have talked about how to move from theme to theme and how to change
04:09some of the things that show up within a theme such as slogans and mission
04:12statements. There are hundreds of themes out there though, so you can do more
04:16than just switch among them. You can change the way that the typography looks,
04:20the graphics in them and the way that they behave by editing them.
Collapse this transcript
6. Managing Users on Your Site
Understanding security and permissions
00:00The best site should be protected with the best security. So let's take a look
00:04at some steps you can take from the very beginning to ensure that you have
00:06complete control over who can access and change your content. We won't go into
00:12how to configure user roles within Drupal in this video. We will do that in
00:15another video. But a little bit of planning now will save you a lot of meddling
00:19about when that time comes and could prevent some disastrous security errors.
00:24When you run a Drupal site, you will be concerned with security on three
00:28levels. First, the server, which contains all the core programs that run
00:33Drupal, any additional programs you have added, such as modules and any custom
00:38programming that you created. Server security is especially important because
00:43some configuration files store passwords in plain text. If your server security
00:48is bad, someone might be able to break in and look at those passwords without
00:52you ever knowing that it happened. MySQL contains virtually all of the content
00:58of your site. If your MySQL security is improperly set, an attacker could
01:03change the site's content, including matters relating to your user's
01:06identities. With full access to the MySQL database, the attacker can also
01:11change user passwords effectively giving them full access while removing yours.
01:17Finally, we have Drupal security, flaws in which can cause very similar effects
01:22to flaws in MySQL security because really, Drupal is essentially just a nice
01:27user interface for the database and the web server.
01:31So while it would take a MySQL expert to cause particular vandalism through
01:36MySQL security flaws, even a novice attacker with full Drupal access could
01:41change content and passwords easily and efficiently. So let's take a look at
01:45Drupal security. In short, here's what you need to know.
01:49As it's installed by default, Drupal security is user based, that is, you
01:54categorize users as being members of a group and set limits on what members of
01:59that group can do. Among the users, there is one super user. That's the
02:04administrator that you created when you first set up Drupal. That one has the
02:08ID of 1, if you go into the MySQL database. The second part of Drupal security
02:14is the two groups that are automatically built in, one is called Anonymous, the
02:19other one is called Authenticated.
02:20Authenticated users are all those who have signed up for your site, while
02:24Anonymous users are those who just happened to be browsing it without signing
02:28in. Finally, Drupal security allows you add more groups as you need them and
02:33you probably will do that if you have a collaborative site. So for example, you
02:36may have one group that's Editors and one group that's Writers and another
02:40group that's Graphic Designers each one of which can only affect their
02:44particular area. There are other ways to controlled user access. Most important
02:49however, is the permissions administration screen. You get to that screen by
02:54going to Administer and then scrolling down to Permissions. Here you see all of
03:00the different kinds of permissions that you can set. Each one of these lines is
03:04a different sort of permission and each one of the columns is a different sort
03:07of user. As you can see, you have your two built-in users here, Anonymous who
03:12have not signed in and Authenticated, who have. As we scroll down, there is a
03:16nice little trick here that Anonymous and Authenticated stays at the top, so
03:22you always know which column you are working with. That's new in Drupal 6 by the way.
03:26By default, all users can access content, however that's pretty much it. So
03:31anytime you add an additional module or want to give permission to your
03:35Authenticated users to do something, you have to give them that permission
03:39specifically by turning it ON with a checkbox and then click on Save
03:43permissions. Another way that you can change Permissions is to go in to
03:47Administer and then instead of seeing it by Task, see it by Module. In each one
03:53of these groups, you will see a Configure permissions, which will bring you
03:56specifically to the part of that permission screen that deals with that
04:00particular Module. For example, Block, let's click on Configure permissions and
04:04it automatically jumps down to the Blocks area, which has two different things
04:09that can be set. Besides giving you ways to control access through the
04:13permission screen, Drupal also offers some limited ways of looking at access
04:17logs, which can be useful for tracking attacks. For example, a series of failed
04:23login attempts in very close succession could be a sign that someone is using
04:27an automated program to guess at your users passwords. Let's go and take a look
04:31at some of those reports. Go to Administer and then scroll down to Reports and
04:38here you can see Recent Log Entries which is everything. If there have been any
04:42Access Denied Errors, you can see those and then if people happen to go to
04:46pages that don't exist, you can even see those. Let's take a look at log
04:50entries here. This is in a reverse chronological order, so the most recent ones
04:55are at the top. But you could change that by clicking on any of these
04:58highlighted columns. For example, to sort by type, click here and then to sort
05:03in the opposite direction, that is from Z to A, you would click again. Let's go
05:08back to date and then click again to see it again from most recent to least
05:15recent. In addition, you can filter these log messages, for example, only to
05:19show those things that were an emergency level or of another high level. If you
05:24hold down the Shift key, for example, we can see everything from warning on up
05:28and then click Filter. That cuts out a lot of the noise that might otherwise
05:33distract you.
05:35Finally, we should mention of some parts of Drupal that are particularly
05:38vulnerable to attacks. First of all, any third party modules, which were
05:43programmed by individuals, and then contributed to the Drupal project, they
05:47tend not to have as much oversight as the main Drupal project which of course,
05:51has dozens of people looking at it at any one time. Secondly, PHP and MySQL
05:57issues are always popping up and this is much larger than Drupal. It's a good
06:01idea for Drupal administrators to keep an eye on these matters as well
06:05although, if you follow the Drupal news, they will usually report any that
06:08affect Drupal. Finally, most important to watch out for is good old social
06:13engineering and by that, I mean getting e-mails that say, I am your
06:16administrator, give me your password or anything else that's basically tricking
06:20your users.
06:22As always, your main source of information about Drupal should be drupal.org
06:28specifically for security purposes, drupal.org/security. On drupal.org/security
06:34page, you will see a list of advisories in reverse chronological order. So the
06:39most recent show up at the top. This video briefly discusses measures to
06:43protect the very top level, that is to say, Drupal itself. But then again, your
06:49Drupal installation is available to everybody on the internet, if you make it
06:53public. Fortunately, a knowledgeable application of Drupal's user based
06:57security systems is enough to stop most attacks.
Collapse this transcript
Controlling site access with user management
00:00Drupal comes with one special superuser account that can access everything and
00:04two built-in roles. One of them for members who have signed up for your site
00:08and the other one for anonymous people who are just coming to the site and
00:12haven't signed up for it. But you can add as many more roles as you like and we
00:16will show you how to do that.
00:18First, go over to Administer, then scroll down to the area User Management. We
00:24are going to change Roles. And here you can see that it lists the two roles
00:28that come as part of the Default Drupal installation, anonymous and
00:31authenticated. It's very easy to add an additional one. Let's say that we are
00:36building a site where some people are allowed to contribute content, but others
00:40aren't, let's call them Contributing user and say Add role and there we are, we
00:47have added a new role, but we haven't actually given them permission to do
00:51anything, so to go there, let's click on edit permissions. Now we can see all
00:57of the permissions that, that new user can add. But there is a bit of a
01:00problem, we can't really compare what this user can do against all of the other
01:04users. So let's go back and instead of clicking on Edit permissions here, we
01:10will go to Administer and Permissions. There, now we see anonymous user,
01:19authenticated user and contributing user, all on one screen. In reality, we
01:25don't have to check these boxes because members of the Contributing user group
01:28are also authenticated users. I like to check them any way, just for visual
01:32clarity and then Save permissions.
01:39So, so far, this user is only on parity with the authenticated user. Since this
01:44is a contributor who is going to be writing things, we are going to give them
01:47access to create pages, and create stories. Now if we scroll down to the bottom
01:54and say Save permissions, we have created a new kind of user that has those
01:59additional permissions and any user that we have on our system can be made in
02:03to a Contributing user. We will show you how to do that in another video.
02:08So now we have created a type of user that has all the rights of a normal
02:11authenticated user, but with some additional ones. We can take any user who is
02:16already on the system and give them that role in addition to what they already
02:20have and in fact, if we continue adding roles, somebody could have one role or
02:24multiple roles simply by adding that from the administrative interface. As you
02:29add more roles, you have to be careful because these columns will keep getting
02:34wider and wider and at some point, it's going to go off the screen, that
02:37becomes very difficult to manage, not only from going from one to another, but
02:42also because it's going to become harder and harder to keep one type of user
02:47separate from another in your mind. So we recommend a lot of simplicity when
02:51you are designing user roles. Don't add any that you don't need to add.
02:55In addition to giving users a new role explicitly, some Modules will let you
03:00escalate user roles based on participation. For example, if somebody comments a
03:05lot or if somebody writes a lot of blog posts, there are modules that will
03:09automatically elevate that person's permission.
03:12Another type of Module lets you see certain types of content only if you are at
03:16a certain user role. So you can see that these user roles actually have a lot
03:20of use once you start mixing in modules that take advantage of them.
03:24Finally, I would advise everybody to plan out what roles are going to be needed
03:28on a site before you start implementing them. That will help you keep it
03:31simple, but realize that you may have to add more even beyond the plans you
03:36originally made as your site develops.
Collapse this transcript
Creating users
00:00Most of what you will do in this course looks at your site from the point of
00:03view of an Administrator. But now it's time to step across the threshold and
00:07see what the site looks like from the other side, that is, from that of a
00:10visitor. We will do this by going through the sign up procedure as it's defined
00:14in Drupal's default configuration and then we will look at some of the options
00:18that you as the administrator have, to change that membership process.
00:22First, we are going to log out, so we are no longer the Administrator. If I was
00:27someone coming across your Drupal website like this for the first time, I might
00:31be able to create a new account. Here I would put in my proposed Username,
00:36let's call me fishyjoe and my e-mail address fishyjoe@example.com and Create
00:44new account. You will notice this message up here that tells us that further
00:48instructions have been sent to that e- mail address. Now I am going to go in to
00:52my site as the Administrator to see what happens when a user tries to create an
00:56account. Admin -- to do so, we go to Administer, down to Users and here we have
01:09the member fishyjoe. Let's take a look at some of the options that we have to
01:13edit. We can change the Username, if for example, they have put in something
01:17obscene or unwanted, their E-mail address, we can change their Password, their
01:22Status, so if for example, we have some reason to block them, we can do that
01:25here. We can also give them a role. We had previously created this one
01:30contributing user, so let's say we know who fishyjoe is. We can say Oh! Yeah
01:35and we know that we want that person to be a Contributor, we can click that.
01:39They will automatically be an authenticated user because that's what all
01:42members become. And let's just say Save here.
01:46By default on Drupal, the user will receive an e-mail to the address that they
01:51gave saying, we understand you would like to become a member, please click on
01:54this special link to finish your registration process. The reason that's done
01:59is because so many people will enter false e-mail addresses and that's one way
02:03that abuse happens on websites. So this makes sure at least that the e-mail
02:07address is proper and true. If the person doesn't have that e-mail address,
02:12then they would never receive the message that would give them their secret
02:15link. So the users can create their own accounts but the Administrator can also
02:20add users as they like. It's on the same screen, which again is Administer and
02:24then Users by just going Add user. Let's add fishysue and the e-mail address
02:32fishysue@example.com. Once again, you would set a password. Oops! I didn't set
02:42it the same so let's try that again, password again. Good, the passwords match,
02:49although it's not a very high password strength. This is an automatic feature
02:52in Drupal 6, it checks to make sure, you are giving the best passwords
02:55possible. And again, you can set certain features, I don't know why you would
03:01set a new account that would be Blocked, but you have that option. Finally, if
03:05you like, you can notify the user of new account in which case, it will send an
03:08e-mail to that fishysue@example.com address in our example here. You might not
03:14want to do that, if for example, you have spoken to that person and said here,
03:17you are sitting right here, I'll just create your account there. You don't
03:19really need an e-mail to tell you that you have this. And then you just say
03:23Create new account, there. We have a new account created.
03:27You can also prevent people from entering certain types of user names or
03:31registering e-mail addresses from certain domains, say for example, your
03:35competitors. You can do that by going to Administer, Access rules. Let's add a
03:41rule that will let us see what sort of options we have to block. First you can
03:46choose to only allow addresses and user names and so forth that meet a certain
03:51pattern or by default, you can deny them. Let's say that we want to deny all
03:55people with user names that contain squid in them. These special characters
04:00down here let you block certain kinds of wild-card patterns. The % sign blocks
04:05all strings, no matter how long they are. So for example, if I didn't want
04:10squidsue and joesquid, I would say % squid% and then Add Rule. Now if I want to
04:20check to see what sort of names I can add, we will do Check rules. Say username
04:25jimmythesquid and check the username, Aha! It's not allowed. However if I were
04:31to do tomtheoctopus, and check that username, that is allowed. Let's go back to
04:38our list and just delete that one.
04:43You have many more options of how users register for your site. Let's go to
04:48Administer and User Settings to see exactly what those are. This is a very long
04:54screen. It has many, many options in it including long texts here that you can
04:58edit. But really, it's only broken down in to four sections. At the top you
05:03have basic registration settings, the first set of radio buttons lets you make
05:07it so that only you can create user accounts, it takes away that link that says
05:11create your own account. The second one, which is ON by default, lets visitors
05:15create their own account and you don't have to approve everyone. The third one
05:19lets visitors create accounts but only will become members if you say yes.
05:24Again we talked about e-mail verification and the third section lets you put
05:28some help texts. So for example, You can't use the word squid in your username,
05:38for example. That will appear above the form when people are signing up for
05:41their accounts. The user e-mail settings let you change what sort of e-mail
05:46people get when they sign up for the site. There are several different options
05:50here, one is if the user is created by the Administrator, that's a different
05:54message from if somebody has created their own account which is another
05:58different message from if somebody has created an account but it has to be
06:01approved by an Administrator. The third section, lets users put in Signatures
06:08at the end of their user profiles. Then for example, they could comment on
06:12forum posts and at the end of all of their comments, it would have some small
06:16block of text. By default, it's Disabled. Similarly, the picture section lets
06:21people put a little user picture next to their account, which can show up next
06:25to forum posts, for example or comments or just in their profile. We will say
06:30Save Configuration here. Now let's Log Out again and say Create new account.
06:36Remember how we said, you can't have the word squid in your username? Well,
06:41there it is.
06:41Let's log back in as the Administrator and let's take a look again at our list
06:50of users. One final thing that you can do here is once you have been online for
06:56a long time, you'll have a long, long list of users and you may want to do the
07:00same thing to all of them. For example, block several of them, or delete
07:05several of them. You can do that by checking them as I have just done and then
07:08choosing the option that you want from up here. You can also change the roles
07:13that they have, so let's say that fishyjoe and fishysue have been very good
07:16members and you want to say, yeah, I want to make them a contributing user, you
07:19can do that very easily that way and then click Update. Additionally, you can
07:24show only those people who are contributing users, by clicking on the role and
07:29then clicking on Filter with Contributing User selected and so forth with
07:33permissions and status.
07:35As you can see, Drupal gives you considerable control over how people register
07:39for your site and what they can do on it and there's further control available
07:43through third party modules that are available for download. Through these
07:47tools you can manage how users go from being an anonymous user to an
07:51authenticated user and then in addition, give them other permissions as is
07:55appropriate for them.
Collapse this transcript
Setting user profiles
00:00One of the ways that you can control what your users do is by allowing them to
00:04have their own identities in their profiles. For example, do you want them to
00:09be able to upload icons of themselves? Should their posts be able to include
00:13signatures? Should they be allowed to change their usernames? Controls for
00:18these options are hidden away in several parts of Drupal's administration
00:21interface. This video will show you where they are.
00:25We have set up two users already. We can see them if we go to Administer and
00:31then scroll down to Users. They are called fishysue and fishyjoe and both of
00:38them have contributing user permission. Some changes that affect user profiles
00:43are done by the Administrator while some are done by the user. Let's take a
00:47look at some that you, as the Administrator, can change. The first thing we
00:51will do is go to Administer and Permissions, and then go down to the user
00:57module. Now remember, the anonymous user is the person who has never signed in
01:02to your site. The authenticated user is the one who signed in to your site and
01:07became a member, while Contributing user is a level that we created. We are
01:12only going to work with authenticated user here. In the user module you have
01:16several choices. The second to administer permissions and administer users are
01:22usually reserved for Administrators. We don't want to give that to every
01:26authenticated user. Change your own username is something that some sites do
01:30actually use because it gives a little bit of fun to each person if they can
01:34change their username. But we are not going to allow them to do that. We will
01:37only give them permission to access other people's user profiles. So we click
01:42there and Save Permissions. That's one example of how the Administrator can
01:47give additional permissions to users.
01:49Another place is in User settings. Much of this page, which is shown in another
01:54video, has to deal with when people first sign up on to this site. User
01:59registration settings and User e-mail settings deal with when people first
02:03become members. The last two sections down here, give additional power to users
02:08in setting their own identity, Signature support and Pictures. By giving users
02:14Signature support, it means that every time they post on the site, it will add
02:18a little tag of their choosing. For example, this is the name of my company;
02:22this is where I am located. Under pictures, we have enabled it and you can
02:28choose where on the server those pictures are stored, we are not going to
02:31change that in this case. If there is a default picture, for example, if you
02:35want to show say, a little icon of a fish for all people who haven't chosen
02:39their own icon, and you can select how big the icons can be, by default 85 X 85
02:45pixels which is a fairly small icon.
02:49In addition, you can set the file size and give people guidelines. Let's just
02:53say, Keep it clean, keep it kind. Very good and we will say Save Configuration.
03:02Now you will see when you do that, it will save the options and then it will
03:06also create this additional directory to store those pictures. There's one
03:09other place that we can change the permissions we give users to set their own
03:13identity and to let other people contact them. That would be under Administer,
03:20Permissions and the Contact module. If you want to allow people to contact the
03:27site administrator, you would say yes, Access the site-wide contact form and
03:33then go down to the bottom and say Save permissions. Finally, there are certain
03:37changes that are affected by the user. These are, as I mentioned, the Signature
03:42and Picture, which the user can choose to include or not include and whether
03:46they give a personal Contact form.
03:48We have already seen, how you can allow users to include a Signature and a
03:54Picture. The personal contact form would allow users to open up their e-mail
03:59box to all of the other users on the system to a form that's created on the
04:03site. To turn this ON, you would go in to the Contact form administration link
04:09and then go to Settings. By default it's turned ON. That is to say, each user
04:15can send messages to other users. If you don't want that to happen, possibly
04:19because you want to avoid abuse, you could turn it OFF. But we are going to
04:22leave it ON.
04:24Now that we have made the Administrator settings, we can take a look at what
04:27individual users can actually do. To do that, I am going to sign in as an
04:32ordinary user while keeping this administration window open. Unfortunately, you
04:36can't do that in one single browser because the browser holds a cookie that
04:41says who is logged in at the moment. So you can't have more than one person
04:44logged in. One way I have found that works really well to keep more than one
04:48user signed in is to have more than one browser type on your computer. For
04:52example, here we are looking at Safari for the administrator. I am going to
04:56switch over to Firefox, a different browser, and go to my site. So I am going
05:02to login here as fishyjoe and let's say he set his password to booth. Login, we
05:10don't need to remember that. And there we are. Now let's go to his own account
05:15and see what sort of options are available to him as an ordinary user. Click on
05:18My account and then click on Edit. He can change his e-mail address if he
05:23wants. He can change his password and here, since we are allowing signatures,
05:27he could say, "Yarr, I be Fishy Joe!" He can also upload a picture and here's
05:36where he can set that personal contact form. It gives a little bit of help text
05:39here to explain to fishyjoe exactly what happens if he enables this. Let's go
05:44ahead and enable it though. He can change his time zone if he likes and click Save.
05:50So there you can see the user has certain powers to affect their own identity.
05:54You as the Administrator can give them additional powers and I will show you
05:57how to do that now.
05:59First, I am going to switch back to the Administrator interface by going back
06:02to Safari. We can give users additional powers by going to Administer, Modules
06:09and turning ON a Module that's called Profile. Click in there and then click
06:14Save Configuration and we will just check to make sure that's the most recent
06:18version and indeed, it is. To see what that Module controls, we are going to go
06:24to Administer and then down to Profiles, which is under User management.
06:30Profiles allow you to add additional fields. So if for example, you want to
06:34find out, how old the person is or what their favorite restaurant is or
06:38anything like that, you can do so. Let's add for example, a single line text
06:43field to the profile. This is going to be called Personal information, the
06:49Title will be Age, the Form name is an internal name that Drupal uses. You must
06:56make sure that you don't use the same name for more than one field. We will
06:59just call this profile_age and here we will explain, Please enter your age.
07:06Underneath that, you have several options, for example, you can make it a
07:10hidden field, which only Administrators could see. For example, you could say,
07:14this person is a troublemaker and the user will never see that. But
07:17administrators could tag each individual user with special information. You can
07:21make it a private field that only certain users can see. Public field. That's
07:25only shown in some places or a public field that's shown throughout the site,
07:29wherever it appears. We are going to keep it as a public field that's shown on
07:33the profile page only, which is the default. Page title is if you want to
07:38create a page, that has all of these fields for all of the users, for example,
07:43here's a page with the list of every body's age. We don't really need to do
07:47that. So we are going to leave that blank now. Finally, you can choose where
07:52exactly it appears, that is if it's the first thing, the second thing, and so
07:56forth, by changing Weight. We are not going to change that right now because we
07:59are only adding one field. But after you have to have numerous fields you may
08:03start playing around with which one appears first.
08:06In our case, we really want to know, how old somebody is. So we are going to
08:10force them to enter value and further more, we think, they should enter it when
08:15they first register for the site. So I am going to click Visible in user
08:19registration form. This form will auto complete while the user is typing, will
08:24look for other values that are already in the system and suggest the ones that
08:27match the first two letters that somebody has entered. We will click on Save
08:31field. There, we have created a new field called Age. Well, what exactly does
08:36that do? Let's go back to the user, fishyjoe and let's click Edit again. Now we
08:43are editing his personal account, but you will see a new addition here,
08:47Personal information. We click on that and we see, ah! They are requiring me to
08:52enter my age right now. So we will do that. Click on Save and there it is.
08:58As you can imagine, you could have quite a lot of information in the user
09:01profiles, for example, for a dating site, you might have age and gender and
09:07what you are looking for and so forth and all of that could then be used for matching.
09:11We have only just scratched the surface of what you can do with profiles. Other
09:15modules that you can download let your users apply information that they enter
09:19in their user profiles. For example, if you ask everybody for their location,
09:24one particular module collects all of that information and then can show a map
09:28that tells you where all of the users are and who exactly is near you. The user
09:33account information and profiles can be a very powerful way of building
09:37community on your Drupal site.
Collapse this transcript
Creating contact forms
00:00One sign of a professional quality website is that it gives ways for its
00:04visitors to provide feedback to the administrators and other members in a
00:07controlled and helpful way.
00:10In order to turn on contact forms, you first go to Administer and then to
00:15Modules. From there you will scroll down until you see the Contact Module,
00:19which is off by default. If you haven't done so, just click it like so, scroll
00:25to the bottom and save your configuration. Once you have turned on your Contact
00:31Dorm Module, you then administer it by going to Administer and Contact Form.
00:37Right now, we have no contact forms already installed. We will add them by
00:41adding a Category and then filling out this form.
00:46The Category describes what sort of form it is. For example, we will have
00:50Website feedback and that will go to the webmaster@example.com. You can also
00:58indicate an auto-reply, which will send e-mail back to the sender whenever they
01:02use this contact form. We are not going to do that now, so we will pass that.
01:07The Weight pop-up lets you reorder your contact forms so that some will appear
01:12at the top and others lower down in the list. We will leave it as it is now
01:15since we only have one contact form. Finally, the selected pop up lets you
01:20determine which contact form will be turned on by default. We will say Save and
01:25we have created our first contact form.
01:27But what exactly does that look like? To find out, we go to the page that's
01:32created within Drupal, which is your website address followed by /contact. And
01:38there we have the contact form. This is what somebody would see if they wanted
01:42to send an e-mail to the administrator. It already comes filled in with the
01:46sender's name, that is to say, their username on the Drupal site, which they
01:50can change if they like, their e-mail address, again they can change that and
01:55the subject and message which they would fill in. I will just say, Feedback on
01:59the site. It looks great! They have an option to send themselves a copy if they
02:05like so that they can remember exactly what they have sent to the
02:08administrators and then send e-mail and it's done. They get a message that
02:11confirms that their message has been sent. But we only have one contact form here.
02:16Let's say that you have a large organization and one person handles the website
02:20and another one handles enquiries in to the business and so forth. Let's go
02:24back and add one. Since we are a real estate company, we will add one for
02:28Property information. Go to contact form, Add another category, We will call
02:33this Property information. For recipients, we will add several people, we will
02:38say, it should go to admin@ example.com, but it should also go to
02:43properties@example.com. To add more than one address, you put a comma in
02:48between them and then in this case we will have an auto-reply that says, Thanks
02:53for your message. Again, we will ignore Weight, but we will say Selected as
03:00Yes. That's going to make this the default, that shows up when people go to
03:03that contact form and click on Save. Now we have two separate contact forms.
03:09Let's take another look at what the user would see. Here we are again. It has
03:14the name and the e-mail address of the sender. They enter a subject. Here you
03:17will see an additional choice, which is, which Category does this message fall
03:21into? Is it Website feedback or Property information? Since we had Property
03:26information as the default, it shows up as checked and then the person would
03:29enter their message and do exactly as they did before. So far, so good. But
03:34there is one more thing we have to do to make it so that members can actually
03:37use this form. Go to Administer, scroll down to Permissions and then scroll
03:43down to the contact module. We have to make sure that authenticated user is
03:48allowed to access the site-wide contact form. If not, it does no good; they
03:53simply can't reach it. You could also add other roles that are permitted to
03:56send e-mail this way by clicking in their boxes, in this case we added a type
04:00of roll called Contributing user. We could add them if we wanted.
04:04You could allow anonymous users to send e-mail via the contact form by clicking
04:08here. Personally, I would recommend that you not do that because that opens the
04:11door to abuse from people who haven't actually signed up on your site. If they
04:16to want to, they could send many, many messages or abusive messages and you
04:19would have no way of knowing who they are, since they haven't signed up. We
04:22will leave that unchecked for now. Once you have done that, scroll to the
04:26bottom and Save your permissions.
04:30Let's take a look at what this would like to an ordinary user. To do so, we are
04:34going to switch over to Firefox, where I have already logged in as fishyjoe,
04:39who is an ordinary user and not an administrator. Once again, they would go to
04:44Contact and they see pretty much the same thing that the administrator saw.
04:49There's the pop up. Send yourself a copy, all the other options. There is one
04:54other thing that happens to ordinary users though. When you turn on the contact
04:58module, they get an individual personal contact form, which allows other
05:02members to send e-mail to them. They can turn that off, if they like, by going
05:06to My Account, Edit and unchecking the checkbox Personal Contact Form. In this
05:15case, fishyjoe wants to receive e-mail from other members, so we will just say, Save.
05:19There is one more thing we could do to make this easier for all the members. We
05:23are going to put a link up in the right hand corner that says Contact Us, that
05:27leads back to the administrator's contact form. To do that, we will go back to
05:31our Administrator interface, go to Administer and then to Menus. You can add
05:37that link to any one of the menus, the Navigation menu is over here on the left
05:40hand side, Primary and Secondary links are up here in the right hand corner in
05:45this theme. We are going to add it to Primary links.
05:48There is another video about Adding menus, which goes in to this function in
05:52greater detail. But for now, we will just say Add item, we wanted to go to the
05:57contact page and the link title should be Contact Us. For description, let's
06:03just say, Tell us what do you think! We will ignore these other options for now
06:08and click on Save. There, we have added the link. Remember that description, if
06:13you hover above it, it gives you that description as a little tip. Now for
06:18anybody who clicks on that link, they go straight to the Administrator Contact page.
06:22Contact forms are great for providing a venue for customer service and
06:25increasing visitor engagement in your site. They have one other advantage over
06:29plain e-mail addresses that might show up in your site, which is that, if you
06:33that, it opens the door to abuse because many spammers will just scrape it from
06:37your website and send massive amounts of spam and abuse to that address. So
06:41Contact forms avoid that by forcing all members who want to send you messages,
06:45to go through this form interface.
Collapse this transcript
7. Establishing Your Site's Identity
Creating your site's basic info pages
00:00So we have a Drupal website that's up and running fine but we don't have any
00:04content on it yet. And in fact up until now we have just had this main page
00:09which says "Welcome to you new Drupal website!" on it. This page gives you a
00:13four step program of how to build your website and we have gone through many of
00:17these steps already. Now it's time to start adding content. To do so click on
00:23Create Content and you are given a choice between Page and Story. These two are
00:27very similar and we will discuss the differences between them but for now we
00:31are going to create the homepage for the site and that's going to be a page so
00:35we click on Page and enter all of this information.
00:39We have created some exercise files for you. If you are a premium subscriber to
00:43lynda.com or received this course on a disk, you have these exercise files. We
00:47are going to go there now and get the information that we need for this page.
00:51To do that we go back to the Finder, Hide everything in the folder Exercise
00:56Files, Chapter07, section 01, and here in basic-info.txt is the text that we
01:03are going to enter in this page.
01:04There is our title. I am going to copy it with Command+C or Ctrl+C on the PC.
01:11Go back to our browser and paste it in the Title area and go back and paste our
01:17BODY in. that's really all that you need to create a page, a title and
01:24something in the body and in fact the body is optional although usually you
01:28will have one of course.
01:29Let's look at some of the other options on this page as well. If you want this
01:34page to appear in a Menu that is along the left-hand side or up here on the top
01:38with the other menus, you can do so by clicking on Menu settings deciding what
01:42sort of title you want it to be. Up here for example, the title is Contact us
01:47and where you want it to appear. We will talk more about menus in another video
01:51and for this content we are not going to have a link so we will close that up.
01:56Continuing down, Input format changes whether it's being entered as Full HTML a
02:02limited subset of HTML or many other input formats that are available. One of
02:07the other formats is PHP, which I will also show you how to enter in another
02:11video. For now we are just going to use Full HTML.
02:16Revision information allows you to create a new revision every time you change
02:20this page. Personally, I recommend doing this and I recommend having that as
02:24the default setting. I am going to click it now, and in the Log message I will
02:29just say Created page.
02:31The reason I suggest this is that if you make many changes and especially if
02:35there are many people making changes on the website, you want to keep track of
02:39who did what and when something changed and then be able to roll back to those
02:42earlier changes if you decide to do that.
02:46Continuing down this is going to be our homepage and we don't really want to
02:49have comments enabled. That is we don't want our users to be able to say, oh
02:53yeah that's right, oh that's wrong. So I will click there and yes it's already
02:57on Disabled.
02:59Authoring information, if there are other users on the system you could change
03:03who wrote it or at least who appears to have written it. In this case we will
03:07leave it as admin. Similarly, you can change the date on which it appears to
03:11have been written. Finally, Publishing options. There are three options here.
03:16Published should always to be checked if you wanted to appear on your site and
03:20by default every content type has Publish already checked.
03:24Promoted to front page, lets you say whether it's going to appear on the
03:27homepage in addition to other places that it might appear on the site. In this
03:31case since we want it to be a homepage, piece of information we are going to
03:35say, promote it to homepage. Finally since this is really our center piece for
03:40our site that is it appears as the welcome page we do want it Sticky at top of
03:45lists.
03:46It might not be clear to you exactly what that means at that point but it will
03:49become more apparent as you add more content. Essentially it means that if
03:53there is a series of content on a single page, this one will always be at the
03:57top. And again since this is our homepage, we are going to say yes we want that
04:01at that top. Then we say Save, good. The page has been created as you can see.
04:06If you want to go back and edit it, all you need to do is click on Edit and you
04:10can go back and do the same sorts of things. This Split summary at cursor, we
04:14will be discussing at another point. It's really for a longer stories and not
04:18relevant here. Let's go back to View, we still see our piece of content there.
04:22Now remember how we promoted it to the front page, let's go back to our front
04:26page by clicking on the logo here and there it is. It's on our front page and
04:31the original text that was there that said here is how you create your site is
04:35gone. That text disappears whenever you first promote something to the front
04:40page.
04:41This page is still little bit boring. So I am going to add a graphic. After all
04:44it is our front page. To get there, I will go back to the Finder and hide
04:48everything. I will go into the Exercise Files and find the file I want which is
04:55this one called House-Underwater. Again, if you have received the Excise File
04:59it's in that folder.
05:00Now I am going to go to where I have my Drupal directory. For me that's in the
05:04Hard Drive, Users, tomgeller, sites and Drupal. Although of course your
05:10directory could be anywhere on your drive and for PC users, it's certainly in a
05:14different place. The directory we want to put this in since its specific to the
05:18site is sites, default, files.
05:22I will go back there and I copy that file over by hitting Command+C or Ctrl+C
05:28on the PC and clicking in this directory and Command+V or Ctrl+V on the PC,
05:34there. I am going to copy the name of this file by highlighting it and on the
05:39Mac I say Command+A, Command+C to copy it. That will just make it a little bit
05:43easier to enter when I go back into Drupal, which I will do now.
05:47Go back into Drupal and I want to edit this piece of content. To do so click on
05:51the Title and then go to Edit. Here we have to enter a little bit of HTML. The
05:56HTML to enter to add this graphic is (img src="/sites/default/files --and
06:09remember that was the path to get to that file, and then / the name of the file
06:13itself, end your quotes (") and end your bracket ()).
06:16Now let's go down and take a look and see if that took. Save it there it is.
06:21However it's not quite right. We are going to do one more small change to the
06:25HTML. To do so click on Edit and here we are just going to say align="right"
06:32hspace= "10". This will make the graphic appear to the right of the text and
06:41make the text wrap around it.
06:43Further it will add a little bit of space between the graphic and the text, so
06:46it will be a little bit more attractive. Let's scroll down to the bottom and
06:51there we have it. We go back to our front page just to see what it looks like.
06:55Looks a lot better. That's how you would set up the front page to your website.
06:59You could create other static pages just as easily and pepper them throughout
07:03your site. The main difference in this case is that you have promoted this page
07:06to the front page and then again made it sticky so it will always be on the top
07:10of the front page.
Collapse this transcript
Understanding page layout
00:01If you have looked through a number of Drupal sites you've probably noticed the
00:04amazing variety of appearance among them. But behind the scenes, they all
00:08conform to certain layout principles that are common to all of them. In this
00:12video, you'll gain knowledge about those principles that will help guide you as
00:15you plan your own site's design. To show some variety and similarities among
00:19themes, we are going to go to this site, themegarden.org. We start off here at
00:24the Garland theme; you recognize it because it's the theme that we have been
00:27using for our site.
00:29You'll notice a few things about this theme. For one, there is a column on the
00:32left, a column on the right, and a center content area. That's the typical
00:37setup for a Drupal site; however, there are some that have only two columns.
00:42For example, the next one on this site called GlossyBlue. Here you have only
00:46the one right hand column. However, it still has all of the same content as you
00:50had in Garland. Let's go back to Garland and see how that works. In the left
00:54hand column you have Previous theme, in the right hand column you have Next
00:58theme, and Random theme.
00:59Again, let's go back to GlossyBlue; here all of the information has been
01:03smooshed into one column. Which is Next Theme, Previous Theme and then down
01:07here we have Random Theme. That's one difference you have among themes in
01:10Drupal. There are three other main differences; the first one is fluid width
01:16columns versus fixed width Columns. To demonstrate this, we'll go back to our
01:20site, the underwater realty site. We are going to Administer, and from there
01:25into Themes. Right now we have only one theme turned on, that's Garland; this
01:30is a fluid width theme. However, there is a similar one called Minnelli, which
01:34is fixed with theme.
01:36We'll turn that on and make that the default to show you the difference. Save
01:40configuration and we're now in Minnelli. As we change the size of the window,
01:45you'll notice that the text in the middle does not change at all. This text
01:49here, it gets cut off, as you move the side of the window in. Now let's switch
01:54back to Garland. Go back to Administer and Themes. Change the default back to
01:59Garland and click on Save. Now as we move the window in and out that center
02:04part is fluid. That's what they mean by a fluid width column.
02:09The second difference among the Drupal themes is whether it's configurable in
02:13terms of color. We are on Garland right now, and this is one of the few themes
02:16that is configurable by color. More and more themes are talking advantage of
02:20this feature; let's take a look at it. Click on Configure and click on the
02:25Garland theme. Aha! We see this color wheel here. If we want to change the
02:30color of the entire site, all we have to do is change the color set to
02:34something we like better.
02:35Let's say Belgian Chocolate. Ah! And we get a preview down here. Scroll all the
02:40way down to the bottom and click on Save Configuration. There, our whole site's
02:46look has changed, just by color. You can also change individual colors; for
02:50example, the link color, let's change that to something more red like. Scroll
02:57to the bottom again and Save and you see how the links have now changed to red.
03:01We're going to go back to our blue lagoon default, and again scroll to the
03:05bottom, and Save.
03:08The final main difference among Drupal themes is whether they are table based
03:12or CSS based. You don't need to worry about this distinction generally. Fewer
03:17and fewer themes are table based, and the differences mostly have to do with
03:20maintenance and modification of the theme itself. If you are not going to make
03:24extensive changes to your theme, don't worry about it except to know that
03:28CSS-based or table-less themes are more in fashion these days and they tend to
03:33be somewhat more flexible and appear a little more consistently from
03:36browser-to-browser.
03:38The distinction is a source of long debates, and we won't get into those
03:41debates here. We've seen some of the differences among Drupal themes; now let's
03:45talk about some of the things that are the same in all of them. For one, as we
03:50go back to our homepage the title remains at the top, generally speaking. If
03:55there is a slogan or a mission statement, it has a place somewhere up near the
03:59top. Here we have the slogan showing up pretty much at the same parity as the
04:03title. If we change our theme, however, to Blue Marine, we'll notice that it's
04:08put in a slightly different place and at a slightly different level.
04:12See, it's smaller and underneath the title. We're going to switch back to
04:17Garland, just to keep everything clean. We're also going to uncheck these other
04:23themes, once again, just to keep our installation clean. And scroll to the
04:27bottom and click on Save Configuration and we're back at Garland. Finally, we
04:32should talk a bit about the layout of the page in general. To see this, we'll
04:35go to Administer and Blocks. In the blocks page, you can move things, for
04:40example, like the Administration Menu from the left column, to the right
04:44column, to the top, and so forth. The good thing about this block's page is it
04:48gives you a visual indicator of where the various areas of your theme are.
04:51Here in Garland we have a header up here. We have a right and left sidebar,
04:55which are indicated here, and we have two other areas as we scroll down. The
05:00content area, which is the main area in here, and the footer, which is where we
05:04have our copyright notice and so forth. Not every theme will have exactly the
05:09same areas. However, most of them have those five areas, unless it's a
05:13two-column theme with just content in a right or left column.
05:16So you can see that, Drupal is not, perhaps, as flexible and straight ahead
05:20HTML although, of course, it is easier to maintain. It insists on certain zones
05:25in the page, but these zones are quite flexible. Even if you don't get deeply
05:29into the complex world of theme development, a brief understanding of how
05:33Drupal uses these theme to layout it's pages, will help you design a page that
05:37flows the way that you want.
Collapse this transcript
Creating a flexible layout with blocks
00:01One way that you can change the look and function of your Drupal site without
00:04changing the theme is to use a feature called Blocks. Blocks let you put text
00:09or graphics, or even dynamic content at various points in the pages. For
00:13example in the left column, right column, top, or bottom. To use Blocks, first
00:18go to Administer and then Blocks. Here you have a list of various blocks,
00:23including those that are built into Drupal and are turned on by default. In
00:29this case, in the Left sidebar we see the User login and the Navigation Bar.
00:33The User login only shows up when somebody is logged out. So we'll log out here
00:38and see what that looks like, here is the User login and we are going to login
00:42again.
00:44Let's go back to Blocks now. As you go down, you see that the blocks are
00:48divided into various zones, the Left sidebar, Right sidebar, Content, Header,
00:54Footer. And as you look around the page, you see that these are graphically
00:57shown, Header up top, Left sidebar, Right sidebar, and so forth. At the bottom
01:02of the list of blocks are those that are not showing up on the page at all. You
01:06can move these into any of the above areas by either clicking on this arrow
01:10symbol and dragging it into the area. I am going to drag that back now or by
01:17grabbing this drop down menu and choosing the area where you want that block to appear.
01:22Whenever you make a change, even if you drag it back to its original place
01:26there is a note that says that the changes will not be saved until you click on
01:30Save Blocks. The block layout on a page is specific to the theme, let's go to
01:36administer themes and see how that works, Administer and Themes. Right now we
01:42only have one theme enabled - the Garland theme. But let's say we also have
01:46Blue Marine available to us, we'll enable that and click on Save Configuration
01:52and then go back to Administer and Blocks. Now you'll notice we have a choice,
01:56Garland and Blue Marine up here. If we make a change in Garland, let's say we
02:01disable the Powered by Drupal badge that appears at the bottom of the screen,
02:04by dragging it down here.
02:06Scroll to the bottom, click Save Blocks, and then we switch to Blue Marine.
02:11Aha! Powered by Drupal is still showing up in that footer. Let's go back to
02:16Garland and put it back. So remember, if you make a change in where blocks
02:19appear, you have to make that change to whatever theme is going to be active on
02:23your site. I am going to go down and just return this to the footer and click
02:29on Save Blocks. There are three types of blocks, which you can see in this list
02:34here. The first kind comes built-in automatically with Drupal. We already
02:39mentioned these - the User login block, Navigation block, the Powered by Drupal
02:43block, which you can see at the bottom of the page by default, is the one right
02:47down here.
02:48A second kind of block appears only when it's installed by a module, let's go
02:53ahead and do that. We'll go back up to Administer and Modules and then turn on
03:00the blog Module. As always, we go down to the bottom of the page, click on Save
03:04configuration and then we'll go back to Administer and Blocks. As we scroll
03:09down, we'll notice a new entry in this list, Recent blog posts. If we drag that
03:15up to the right hand side bar, then whenever somebody on the site has added a
03:19blog post that will appear in the right hang column. We don't have to do that
03:22now, so we'll just leave it at none and save our blocks.
03:26The third kind of block that appears in this list is that which you create
03:29explicitly by clicking on Add Block. I'll give you an example of this by going
03:33to my own website, savemyhomebook.com. Up in the left hand corner, we have a
03:38custom made block because I didn't like the way that it just showed, Admin and
03:41then there was a separate Logout link. I wanted to bring it all together into a
03:45one link. So I created this using some PHP code, so it says Logout Admin. This
03:50is a custom block out here, and we could actually go and take a look at the
03:54code to see how that works. By the way I got that code off of the drupal.org
03:58website, in the Code Snippet section, but let's go back to our site for now.
04:02If we want to add such a block, we would click on Add Block. The block
04:06description we'll call Promotions, the blog title is also Promotions and in the
04:12block body we'll say, Buy two houses, get one free. Now let's continue on and
04:17take a look at all the options you have when you add a block. First of all, as
04:21when you add content you can choose the input format that you use. We'll just
04:25use filtered HTML, since Plain Text works just fine there. You also can choose
04:31what users will see this block and on what pages that block will be seen. You
04:36can choose specific roles that will see that block. So for example, it might be
04:39a block that helps people edit pages, but you only want people who are able to
04:43edit pages to see that block.
04:45Well of course you could check or uncheck the roles that are appropriate. You
04:48can change whether or not users can choose whether to see that block or not. So
04:52for example, you could say they cannot control weather they see this block.
04:56That will always show the block, and they won't have any choice on it. If you
04:59say, show it by default but let them hide it or hide it by default and let them
05:03show it, then they can change that by going to their user page and change it in
05:07their profile with check boxes.
05:09Finally, you could decide on what pages you want that block to appear. For
05:13example, you might want a block to appear on every internal page but not on the
05:17homepage. In which case you would fill out the appropriate fields here and list
05:21the pages that you didn't want it to appear on here, including PHP code. We are
05:26going to have it show on every page, so we'll say Save Block. Now we look down
05:31our list of blocks and we see under disabled, we have our new block called
05:35Promotions. Whenever you create a new block, it always starts out as disabled
05:40that is, it's not automatically put on your page. We want that to be, let's say
05:44in the Right Hand column. So we'll do that and go back down to the bottom and
05:49click on Save; and there it is, it now shows up in the Right Hand Column.
05:54Let's go back to homepage to see exactly how that looks. Tada! We now have our
05:59custom made block in the right hand column and nothing else on the page has
06:03changed. Blocks are one of Drupal's most powerful features, especially if you
06:07use them to show dynamic content such as the latest comment or blog post. Like
06:11many powerful features, however, it's easy to overuse them and make your site
06:16hard to navigate by throwing every block on to the page, but judicious use of
06:21blocks, can really improve ease at navigation and improve user engagement.
Collapse this transcript
8. Keeping Your Drupal Site Running
Monitoring performance
00:01Even when your site seems to be up and running smoothly it's a good idea to
00:04take a look at a few things to now then to make sure that you are not missing
00:07an important software update or a broken site component. Fortunately, Drupal 6
00:12includes some handy ways to check for common issues through its administrative
00:16interface, specifically, under the Report section. We are going to go there by
00:20clicking on Administer, and then scrolling to the bottom, and Reports.
00:25The first one is Recent Log Entries. This will show you all of the unusual
00:30things that have happened on the site and by unusual, I mean it doesn't show
00:34you every time somebody accesses a page but rather if a cron run has completed,
00:39or if somebody searched for a page that wasn't there, or so forth.
00:44There are several things you can do to make this page easier to understand. For
00:47one thing, you can sort based all the various criteria in this table. Click on
00:52Type for example and it sorts according to the type of action that happened.
00:56Click on Date and it shows it to you either reverse chronological order or in
01:02forward chronological order and so forth; you can also sort by User.
01:06Secondly, you can filter based on the sort of log message that you want to see.
01:10I like to filter by Severity. In our case we don't have any emergencies that
01:15have happened on our site yet for which we are very lucky or alerts are
01:19critical, but if you look at the warnings and click on Filter, you will then
01:22see all the sorts of warnings we have gotten.
01:24This kind of thing can be useful if you want to see if there are patterns. For
01:28example, do people keep searching for certain things and getting bad page. Are
01:32they trying to reach pages that don't exist? That could be a sign of a link
01:36that doesn't work, for example. Let's go back and see our entire log though by
01:40clicking on Reset and there we are.
01:42You will notice that there is Operations column down here. Only some of the
01:46items in the log have this View link here. Click on it and you will get more
01:51information about the Operation that caused the log entered to appear and we
01:55can go back just by clicking on our browsers Back button.
01:58Finally, we can click on any one of these messages and get more information.
02:03For example, where exactly the person was and where they had come from. All of
02:07this information appears just on one page and again we can go back by clicking
02:11on our browser's back button. There are other reports available as well,
02:15besides this general log. Click on Administer and again we could scroll down to
02:20Reports or just click on Reports here and go to Top Access Denied Errors. In
02:25this case, we don't have very many, but we could see where somebody was trying
02:28to go and was denied access.
02:31The third kind of Report is the Page Not Found error. Again, we see what, sort
02:35of, page they were trying to reach; in this case perhaps somebody had their
02:38catwalk on the keyboard.
02:40The fourth kind of report is Available updates. Right now, everything that we
02:44have is up-to-date, but if it weren't instead of seeing green and up-to-date up
02:48here, you would see it in red and it would tell you exactly how to get the
02:51update that you need.
02:53You can check manually at any time by clicking on this link here. Incidentally,
02:57after you have installed some contributed modules they'll be included in this
03:01page and this page will get longer and longer as your site becomes more
03:04complex, but don't worry because it all appears in one place and by clicking
03:08Check manually, it checks for all of the modules you've downloaded.
03:11Let's also take a look at the Settings here. Drupal will automatically check
03:15for updates both for the core and for contributed modules on a schedule that
03:19you define. You can choose to have it check either Daily or Weekly and then
03:23have it tell you about All New Versions or only those one that are going cause
03:27a security problem if you don't upgrade. Further, if you want to, you can
03:31specify an email address to mail you whenever one of those updates is
03:35available. That's very useful for system administrators who are managing may
03:38sites. We'll just keep it the way that it is and click on Save Configuration.
03:43The last kind of report is the Status Report and this is perhaps the most
03:47useful page of all. It includes the status of all of the important parts of
03:52your Drupal system, whether or not all of the components are working, for
03:55example; the last time that cron was run and by the way if you have any trouble
03:59setting up cron, I strongly recommend coming back to this page once in while
04:03and making sure that cron is actually running because it will tell you how long
04:07ago it's has been since cron was run. It should be at least once an hour in my
04:11opinion depending on how you set it up.
04:13The Status report page includes several links that can also be helpful. For
04:17example, we see here that on MySQL database is this version 5.0.41. If we click
04:23on that version number, we get more information about that SQL database. This
04:28is probably more than you need unless you are an SQL administrator, but it's
04:31good to know that you have it.
04:33You have other means besides these pages to make sure Drupal is running well.
04:36For example, the logs on your system or a third-party monitoring system such as
04:41Google Analytics. Further, there are several Drupal modules available from
04:46drupal.org, which remains, as always, your best source for such information.
Collapse this transcript
Recovering from disasters
00:00The wise designer builds for the best, but plans for the worst. This video will
00:05show you a few tricks to get the site up in running if you encounter a few
00:08common, but very easy fix, problems. First of all, we have to repeat, your best
00:14defense is to back-up to both the Drupal files and the site database regularly
00:18and be sure you know how to restore from a backup.
00:21We will tell you how to do that in two separate videos in this series. Backing
00:24up your Drupal site and restoring your Drupal site from backup, but deleting
00:29and restoring your site is really an atom bomb, sort of, option; it destroys
00:32everything and then tries to recreate it. Let's look at some other ways to
00:36recover from disaster at times when you don't need to restore the entire site.
00:40The first one is let's say that you have taken the site off-line and I will
00:44show you how to do that by going to Administer, scroll down to the bottom, and
00:50click on Site maintenance, and then take the site Off-line like this, and Save
00:54configuration. Good and then let's say that you accidentally log out, oh! Oh!
01:00The site is off-line and there is no place that I can go to to log in. There
01:04are no login boxes here.
01:06Well, we can enter a little code up here which is ?q=user. That's the log in
01:14page and from there you can do admin, and your password, and there we are, we
01:21are back in. Now if you do that the first thing you should do is go back to
01:24Administer, and down to the bottom at Site maintenance, and put it back Online
01:29if indeed you want it to be Online for everybody; and of course Save
01:33configuration as always.
01:35Let's say you are having some other problems, like you feel that you should be
01:38able to get to a page but you can't get there. The first solution is the
01:41obvious one; are you logged in as the administrator or are you logged in as the
01:46correct person. If, for example, one of your editors has two or three different
01:50accounts, they have to make sure that they are logged into the account that
01:53gives them the permissions they believe that they should have, but it may also
01:56be an issue on the administrator's side and here I will give you an example.
02:00I am going to switch over to Firefox, where I am logged in as ordinary user
02:04fishyjoe and let's say that you have talked with fishyjoe and said, "Hey! Yeah
02:07I like your ideas, why don't you put them in a blog post?" and fishyjoe says,
02:11"Okay," I will go down to Create Content. "Wait, there is no place to create a
02:14blog post, it is just Pages and Stories why can't I do that? And you as the
02:18administrator say, "Well I know that I enabled that module". Let's go back and
02:21take a look. Go in to Administer and Modules and indeed it's enabled why isn't it working?
02:29Well let's find out by going Administer and By modules and we see Blog. Ah!
02:34That's right the Permissions. So let me check those Permissions, go back up to
02:38Blog, we didn't allow people of his user level to create blog entries. So we
02:43will check that. We scroll down to the bottom, click Save Permissions. Now
02:49let's go back and see if fishyjoe can actually create blogs. Click again on
02:53Create Content and there is our Blog Entry link.
02:57A third kind of error occurs when the administrator knows that they have
03:01downloaded the module that they want to enable, but has forgotten to enable it.
03:06Let's go back to our administrator interface and see what that looks like.
03:09Click on Administer and Modules and as you could see you first need to make
03:15sure that it's enabled. It may just be something as simple as checking a box,
03:19but once you have done it, of course, you go down to the bottom and you say
03:22Save Configuration, but there is more to it than that. Click on Administer and
03:26I will show, then go to By module.
03:29Some modules have more than just one configuration screen and in fact as you
03:33download more and more modules you will see that some have as many as four of
03:36five administration screens each with their own peculiarities and maybe even
03:41multiple permissions. You have to go through the module, read the manual, and
03:45see exactly what has to happen in order to enable that module.
03:50Finally, you might have a problem with an individual page and let's go back to
03:53our homepage to give an example of that. Here we have the front-page content
03:58and this is stored as a page. We are going to edit that page and it looks fine.
04:02We saw it on our front page, but let's say that while were publishing this we
04:07had an itchy finger and accidentally (ph ) unclicked Published and click on Save.
04:10Then we go back to our homepage it's disappeared; of course, it's disappeared
04:15because it hasn't been published. One way to find out what has and hasn't been
04:19published is to go Administer, Content, and then take a look along here. Click
04:24on it, it says not published. You could publish it again by just clicking there
04:28and clicking on Update and Publish there. And of course you can make other
04:32changes such as promoting it to the front page, demoting it from the front
04:36page, and so forth. What I would also recommend you do, if you are having
04:39problems with any sort of content is go into the content itself and Edit it and
04:45look at all of the turned down triangles; click on all of these little links
04:49and see the options available.
04:51Maybe something has been posted by the wrong author and you need to change
04:54that, or it's allowing comments when you don't want or something like that;
04:58just check them all and then click on Save. What if you have something that you
05:02can't solve through the administrative interface? Then you might need to poke
05:06around the database. We are going to open up our SQL database by going to MAMP,
05:12Open start page, and phpMyAdmin. WAMP has a similar setup but your ultimate
05:17goal is to get to phpMyAdmin.
05:20We will go to the Drupal database. The Drupal database has many, many tables.
05:26We won't talk about all of them because that's a very advanced subject, but we
05:29will talk about one table that's very useful to know which are users. We will
05:32scroll down to users, click on this icon to browse the users table; and as we
05:37scroll down we can see all of the different users were in the database. User 0
05:42is a system user that isn't an actual person who can log in, but all of the
05:45others are. The admin who is the superuser with user ID 1 and then the regular
05:50users, fishyjoe and fishysue.
05:52Let's say that the administrator doesn't remember the password and he has
05:56changed the email address so they can't receive the password. Click on the
05:59pencil icon and there is field here called pass. To set a new password we
06:05highlight that and delete it and enter something else. We'll just say door and
06:10then you need to choose a kind of encryption, which for Drupal is usually MD5.
06:15Scroll to the very bottom and then click on Go and we have changed our
06:20Password.
06:21If we go back and take another look at that password you will see it doesn't
06:25show up as door. It actually shows up as an encrypted string that's good
06:30because it means someone can't just go and look at the passwords if they get
06:33into your database. They can change them, but they can't look at them. I am
06:36going to change it back to booth and I am going to change this. So it's
06:40encrypting and then, of course, Save.
06:44The good news is you usually won't have to poke around in the database like
06:47this. If you forget your administrator password and let's Log out of our
06:52administrator, so we can see what's it's like. All you need to do is say
06:56Request new password and then enter your Username or email address admin, Email
07:01New Password and it sends you the new password. If that email address isn't
07:05working, however, you have to go into the database.
07:08Finally, some errors are very hard to figure out; for example, you call up a
07:12certain page and it simply doesn't appear. One common problem is that your
07:17php.ini file doesn't have enough memory. We showed you how to change that in
07:22the downloading, unpacking, and installing Drupal video. They say you can build
07:27a better mousetrap but nature will just build a better mouse. Obviously, we
07:30can't discuss all the ways your mousetrap could break, but these few tricks
07:34will get you out of lot of jambs.
Collapse this transcript
Improving administration skills
00:01Most of this course has addressed specific features of Drupal. Now, I would
00:04like to give you a few additional tricks, learnt from experience that will help
00:08you administer your site well. These are all optional, you can take them or
00:11leave them, but I found them to be helpful.
00:14First tip, for speed, I suggest getting used to the exact URLs of the
00:18administration pages. For example, we go to Administer and of course we know
00:22that is /admin. One of the more common ones that you might use is let's say
00:25Blocks that is /build/block.
00:29All of the administration pages are first by their category and then by their
00:33name and after you have done this a little bit you will see that your browser
00:37will auto complete. So let's try that I am going to localhost/admin/build, I
00:43could just use my arrows up and down to go to the one that I want. I find that
00:47saves me a lot of time.
00:48The second way that you could quickly to go an area of the administration
00:52interface is to click on Administer and then instead of scrolling up and down
00:56hit Command+F and just type in the name of the thing that you are looking for.
01:00For example, Contact form and in this browser, which is Safari, it lights up,
01:04so it's very easy to find and then you can click on it.
01:06The third tip is to sign up as another user and then leave that user logged in,
01:11in a different browser entirely. So here we are in Safari with the
01:14Administrator logged in, but I am also logged in as an ordinary user, fishyjoe,
01:20in Firefox. This is good because it shows you exactly what the site looks like
01:24from the outside. It's easy to get tunnel vision as the Administrator.
01:28The fifth tip is to follow the twin laws of sufficiency and necessity. By that,
01:32I mean add only those modules and features that you think you are going to use
01:36and then leave it alone. Try to avoid the temptation to overload your site with
01:40features that ultimately will complicate matters. However, if you do need a
01:44certain feature or a certain theme or something else like that don't be shy to
01:47add it.
01:48For my sixth tip we will have to go back to the Administration interface and
01:52from there to Permissions, which I'll find a way I just showed you by typing in
01:55Find and Permissions and there we are. Get to know this page and get to know it
02:00well. So many times when something is not working on your site it's because
02:04Permissions actually haven't been set correctly. It's a large page, but it
02:08could be made easier if instead of coming here you go to Administer By module
02:14and then go to the Configure Permissions you need for the particular module.
02:17However, I do suggest going and taking a look at the Permissions screen from
02:21time to time just to make sure that things are right. If anything goes wrong
02:25you know you can usually fix it here.
02:27My seventh tip, I have repeated time and time again in the course, but it bears
02:31repeating. If you ever have problems or you need more information or you want
02:35to stay in touch with the community go to drupal.org, it's the centerpiece for
02:39the entire community.
02:41Finally, I can't stress this enough, backup regularly and occasionally practice
02:46restoring from your backups. A backup is no good if you don't know how to
02:49restore from it. Administering any system can become a full-time pursuit for
02:53the obsessive person. Fortunately, Drupal doesn't usually require that much
02:58attention, but the more time you spend playing with it and touring the
03:02resources on drupal.org the better off you will be.
Collapse this transcript
9. Building Content Nodes
Understanding nodes
00:00More than design or structure, content is what brings people to your site. That
00:05content can be graphics, text, media files such as movies, or even just links
00:10to other sites. No matter what it is Drupal encapsulates all contents into
00:15units called nodes. We are going to look at a few node types and explain how
00:19Drupal handles them.
00:21A node can be defined as the basic unit of content in Drupal. For example, a
00:25story, a page such as we have on the front-page here on any other entry of a
00:30content type. All nodes require a Title such as this one here. They may require
00:36a Body although that's not always necessary and must have additional options
00:41such as a check box that lets you promote the node to your site's front page.
00:43Let's take a look some of the options in this node. We go to it by clicking on
00:48the Title and then clicking on Edit and we can go through and see there is our
00:52Title, our Body. Here are some options to make Menu settings. That's to create
00:57a menu choice that will go directly to the story. Going down further we can
01:02change the Input format.
01:04In this case we only have two options, but the addition of other modules would
01:07let you, for example, add PHP code and perhaps some other type of input format.
01:13Revision information, which will let you save a different version every time
01:16you make a change and so forth. Very important is down here in publishing
01:21options. If this Publish box is not checked then it won't show up on your site
01:25and it won't be public.
01:27Now this particular node is a page, but there are other content types. We can
01:31see them by going to Administer and then to Content types. We have three that
01:37are enabled Page and Story came built in with Drupal as part of the default
01:41installation. Blog Entry we turned on at another point in this series.
01:46Let's see what it looks like from an ordinary user's point of view. We are
01:49going to switch to our ordinary user who is fishyjoe and who has been launched
01:52into this other browser Firefox. If fishyjoe or any other user wants to Create
01:57content they go down to this link Create Content. They then have a choice of
02:02several different types of content. This is a list of all of the content types
02:06from the previous screen in the Administration interface that also have
02:09permissions allowing this particular user to enter that content type.
02:13So, for example, not every user will be allowed to enter a blog entry unless
02:17you specifically say that they can. In this case, let's have fishyjoe create a
02:21blog entry. If you are a premium subscriber to lynda.com or have received this
02:26course on a disk, you will find the Exercise file which has the text we are
02:29going to enter here.
02:30We are going to get that text now by going to the Finder, hiding everything
02:34else, and opening up our folder called Exercise Files. In there, you will find
02:38it in Chapter 9, video 1 called blog- post; double click on that and there we
02:44have it. I am going to copy this text and paste it into the Drupal interface.
02:49Command+C or Ctrl+C on the PC, switch to other program, on the Mac by the way I
02:53am doing that by holding down the Command key and hitting Tab. Clicking the
02:58Correct field Command+V or Ctrl+V to paste it and then do it again for the
03:02Body.
03:09So this user has put in everything that they really need to for the blog entry.
03:13As we scroll down, we see we don't have the all of the options we did in the
03:17administrative interface, that's because certain options are only available to
03:21the administrator. We click on Save and we have created a node, but where
03:27exactly does that node show up?
03:29Let's go back to the Administrative interface and find out. I am doing that
03:32again by holding the command key and hitting tab. In the Administrative
03:37interface you can see a list of all of the nodes. No matter what their content
03:41type by going up to Administer and Content and there you have it and we even
03:46have a little note here that shows that it's new node that the administer
03:49hadn't seen before.
03:51If we click on it, we see the node itself. As the administrator we can also
03:55edit the node and the superuser, that is User ID number one, the one you
03:59created when you first set up Drupal, can always edit all nodes. The
04:03Administrator, as I mentioned before, has additional options such as the input
04:08format, comment settings, authoring information, all of the things we discussed
04:12earlier. I am going to just click Save.
04:15So then I'll ask the question is every page on a Drupal site a node, not
04:18necessarily. Some types of pages that aren't are the user pages. If you go up
04:23to your site and then go to /user this shows me the admin user page and if you
04:29go back to the other person and say user this is Fishyjoe's user page.
04:34These are not actually nodes they are built in to Drupal and are not handled
04:38the same as Stories and Pages and blog- posts. A second kind of page on Drupal
04:43that's not a node are those that are created through some process. For example,
04:47Drupal has a module called aggregator which will pull in news from other
04:50websites throughout the Internet and those news pieces are put into a page.
04:55That page does not have a node ID. That is to say it's not edited in the same
04:59way.
05:00Finally, pages that are created by Drupal itself or are installed by modules,
05:05those aren't nodes either, we will go back to our administrative interface and
05:09go to Administer this page that you see here is not a node, again, it's built
05:13directly into Drupal.
05:15All nodes can be viewed as stand alone pages and we'll see that by going to
05:19Administer and Content and take another look at this, "Can you help me find a
05:24lender?" The post that fishyjoe just put up. You see up here the URL is
05:28localhost/node/3. All that, that means is it's a node and it has ID number 3.
05:34If you go into the database itself, you can actually see the IDs. We are going
05:39to do that now.
05:40We will go to MAMP or if you are on a Windows server, you will go to WAMP.
05:44Open start page, phpMyAdmin, select your Drupal database and then go down to the
05:50table called node. There is also one called node_revisions. The difference
05:54between the two is if you have turned on revisions, sometimes you have to look
05:57in both. We are going to click on this icon, which is the Browse icon in
06:01phpMyAdmin. Scroll down a little bit and we'll see a list of all our nodes in
06:06the Drupal site and there is our blog post.
06:09If you as the administrator wanted to change it within the MySQL database, you
06:13could actually do that by doing it here or, of course, you can change it in
06:16Drupal's interface. I am just going to scroll to the bottom here and click on
06:20Go to make sure that we save anything that we might have changed and then go
06:24back to our administrative interface.
06:27As you develop your site you may add node types that didn't come with Drupal's
06:30default installation either explicitly or by downloading modules that create
06:35new node types. Some of these nodes will be very complex even having dozens of
06:39fields beyond Title and Body but your basic understanding of nodes, how they
06:43are stored, and how to control them will serve you well for all of your content
06:48types.
Collapse this transcript
Creating basic content: Stories and pages
00:00We have already created one node on this site, this main page that you see
00:04here. Now we are going to add two more, one will be another page that describes
00:08our company or About page and the other will be a story, which is slightly
00:12different from a page and we'll show you what those differences are. First,
00:16let's create that page, but before we do that, we are going to turn on one more
00:19module at this point, the path module. To do so, go to Administer and Modules,
00:27and scroll down until you get to Path.
00:32Once you do that, scroll to the bottom and click Save Configuration. What the
00:37Path module allows you to do is to rename the URL. So instead of saying,
00:41/node/3, it will just be /aboutus.
00:44Now, we are ready to create our content. Go up to Create Content and then Page.
00:51We will be entering the Title and Body from a text file that's included in the
00:56Exercise Files that you received if you're a Premium Subscriber on lynda.com or
01:00have this video on a disk. To get there, we'll go to the Finder, and then hide
01:05everything else, open up our Exercise Files. We already have it open to Chapter
01:099, in Video 2, the file is called basic content.
01:14Now, we can just copy and paste our text. The title is, About Underwater
01:19Reality, we copy that with Command+C or Ctrl+C on a Windows machine, go back to
01:24our Drupal interface in the web browser. I am using Command+Tab, paste it there
01:29with Command+V or Ctrl+V, and then do the same for the Body. For this page, we
01:39are going to want people to have a single link to get there.
01:42So, we'll go up to Menu setting and we'll call it, About Us and its parent item
01:48is Primary links, that's this group of links up here. We are not going to mess
01:52with the Weight yet, because we only have two links up there. Later on we might
01:55want to do that, if we want to rearrange the order in which they appear.
01:59Continuing down, we have entered the Body, of course. The Input format can
02:04remain, Filtered HTML. We'll create, this is a new revision and just say,
02:09Created page.
02:13Since, this is a page that tells about us we don't really want to invite
02:16Comments. We just make sure that the Comments settings are Off. This is one
02:19difference between a Page and a Story. A Page by default doesn't allow
02:24comments, whereas a Story does. This little dropdown, URL Path Settings, was
02:29added by that Path module that we just added to our Drupal configuration. Click
02:34on it and we add a URL. Let's call it about, scrolling down further, we are not
02:39going to change the Author, we will just check the Publishing options, we do
02:42want it published. It's not going to be promoted to the first page and it
02:46doesn't matter if it's Sticky at the top of the list, because it's the only
02:49thing on the page.
02:50Now, we click Save, you will notice that it creates a node and a node number
02:55here. However, since we added that URL path, we can also just say about. So you
03:02can see how that makes your site a lot more friendly than having node/ and then
03:06a random seeming number.
03:07Since, we added a menu earlier, we can now click on that menu, about us and it
03:13goes to that page and you know what, we can go back and Edit that menu as well,
03:16just by editing that node. Go in to Edit, down to the Menu settings, and I am
03:21going to give that about us, a capital A ; scrolling down, all we have to do is
03:27click Save and boom, you see it's changed.
03:31Now, let's create the other type of content, the Story. We go to Create Content
03:36and Story, just as we did before. For creating a Page, click on Story and it
03:41looks very much the same. Once again, we are going to go back to our Finder,
03:47open up our text file and get our text. We go down and once again, we copy the
03:53Title, copy it and paste it and the Body, copy it and paste it. This particular
04:04Body has some features you haven't seen elsewhere in the course; in particular,
04:08it has some special HTML here <ul> which stands for unordered list and <li>,
04:12which stands for list item. The person who wrote this particular story decided
04:16they wanted a bullet point list, because it would bring out certain points
04:19within the story.
04:20If you want to learn more about using HTML, see the lynda.com course, HTML
04:25Essential Training. We continue to scroll down and we see in our Filtered HTML
04:32we are actually allowed to do the tags that we did <ul> and <li>. So we don't
04:36need full HTML. Although, of course, if we turned it on, it would also work.
04:41Continuing down, we just check the Revision information. We don't really need a
04:45new revision, it's a Story which usually only gets revised once, Comment
04:48setting, we make sure that Read/Write is enabled.
04:52This is, once again, one of the differences between stories and pages. URL path
04:57settings, we could set them if we want, we don't really need to. Authoring
05:00information, we'll leave alone. Publishing options is the other big difference,
05:04between pages and stories. Stories get promoted to the front page, whereas
05:08pages don't. We'll click on Save and there we are, we have our Story here with
05:13our bulleted list.
05:14Now, let's go back to our front page and we'll see it, because remember, we
05:17promoted it to the front page. We have this, which is Sticky at the top, and
05:22going down further, there is our Story.
05:24There is one other thing that we can do. Let's say that we don't want to have
05:29quite as much text showing up on that home page. We can click on Contract
05:32amendment, which is, of course, the Title that will bring us to editing this
05:36particular Story. Click on Edit, we only want this top section to show up.
05:41So we put the cursor there and say Split summary at cursor. That puts in some
05:46special Drupal code, which will only show this on the front page, but then when
05:50you click through. It will show the full Story, go down and click Save and just
05:55to be sure that that's true, go back to our front page, scroll down to the
05:58Story, yup, it cut off where we expected and it added a Read More tag. If we
06:03want to read more, we either click on Read more here and there we have the full
06:08node, go back a page, or we can click on the Title to get the full node and as
06:14we said before, stories get comments.
06:16So, if we wanted to add a new comment, all that a user would have to do is
06:19click there, and there we go, they enter a comment and add their own ideas to
06:23the Story. We'll go ahead and add a comment. The subject will be, Great
06:28information! And the comment will be, I really appreciate it and then just
06:34click on Preview, that's what it is going to look like, scroll down to the
06:38bottom and save. There we have it.
06:42This is now the node page, if we go just to that node page from the top. We see
06:47there's the story and the Comments underneath it. Incidentally, that preview
06:50requirement is something that you as the Administrator can set and we'll show
06:54that in the video on Comments. You now know everything you need to start
06:57populating your site with stories and pages, which is all that many sites need,
07:02but if you want to go further with Blogs, Polls, and Custom content types we'll
07:06show you how to create those.
Collapse this transcript
Enabling other content types
00:00Drupal 6 enables two content types by default, Stories and Pages, but it
00:05actually installs four others, leaving them disabled, probably to avoid
00:09confusion by Drupal newbies. We'll show you how to turn them on.
00:12So, you can start creating Blogs, Polls, linked articles called Books, and
00:17message boards, which Drupal calls Forums. In fact, we are going to go and turn
00:21on Forums first. Go to Administer, and then go down to Modules, and, of course,
00:28as always, you see a list of the modules that are available. We already turned
00:32on one Content type called Blog.
00:34Now, we are going to turn on Forum, just by clicking in here and scrolling to
00:38the bottom and clicking Save. You will also notice Book and further down Poll,
00:44we leave those Off for now, but we click Save, so that we have Forums.
00:50Now, when we go to Create Content, we will see four things listed, Blog Entry,
00:55Forum Topic, which was from the new module that we just added, Page, and Story.
01:00Page and Story again are default, built into Drupal. Let's go to Administer and
01:06then to Content type so that we can see all of those and change some of their
01:09criteria and the way they behave.
01:12Again, we see all four; interestingly, Page and Story can be deleted, even
01:17though they were installed by default. Blog Entry and Forum Topic, however,
01:21cannot. That's because these are created by Modules and the only way to turn
01:25them Off is by going back and turning off the Module in the opposite way that
01:29we have just turned them on. Most content types are quite similar and if we go
01:32to Create Content and click on any one of these, you will notice the
01:36similarities. They have a Title, a Body, and then perhaps some other fields.
01:40Once again, we go to Create Content and Create Forum Topic, still it's called
01:44Subject, but it's basically the same thing. Now, let's go and create our own
01:48custom Content type. To do that, we go to Administer, Content types, and Add
01:56content type here at the top. We are going to create a content type that's just
02:00going to be a test and we are going to delete it before we are done, and in
02:03fact, we'll show you some of the effects that happen if you accidentally delete
02:06a content type and how to get back, if you do so; because doing so, when you
02:10have content, that's in that Content type can cause a lot of problems.
02:14For our content type, we'll call it Test content type; under Type we are going
02:20to simply enter Test. This is the machine readable name of the Content type.
02:25It should be as simple as possible and you can see from the text underneath, it
02:29limits the sorts of characters that you can use in this name, I always just
02:33enter with lowercase, very simple, just enough so that I know what it is,
02:37because again, I don't have to see it. What I'll be seeing mostly is Test
02:40content type, what the machine is going to see is Test. Under Description, just
02:44to make sure that we don't accidentally put any content in that we really want
02:47to keep, I'll say, "This is a test content type. Don't put anything you really
02:55want to save in it!" And then at the bottom, you will notice some settings that
02:59are very similar to when you Create Content.
03:02In particular, this is Workflow Settings. The thing is this is going to be the
03:06default. So that, whenever you click Create Content and choose this test
03:10content type. This is what's going to show up unless the person changes it.
03:14Since, I like to create a new revision every time I create some content, I am
03:18going to check this; that will force the person to uncheck it, if they want to
03:21create a new revision.
03:23There are two other dropdown menus here, which are a little bit different. One
03:27is Submission Form Settings. Let's click on it. This really just let's you
03:31change what the field labels are; in other words, instead of Title you might
03:35want to say, Address of Property and in Body, you can say Description of
03:41Property. Again, this is a test that we are doing, so we'll be deleting this
03:45later. Of course, if you create your own Content type you could put in whatever
03:48you like. Minimum number of words is a nice little thing. If you don't want
03:52people to just be posting and saying, " I agree with that," then you can say,
03:57you know, you have to write 100 words or it's not going to go up, we are just
04:00going to leave it at zero for now.
04:01Finally, you can have submission guidelines, for example be bold, be brave or
04:06whatever you like, of course. Scrolling down there is one other thing, Comment
04:12settings. These are quite complex, they let you determine whether or not you
04:16are going to allow people to comment in here, not only that they'll also let
04:19you determine how the comments will be displayed - if they'll be showed in a
04:22threaded list, if they'll be sorted oldest first or newest first, and so forth.
04:26We are going to disable comments on this content type. We do discuss comments
04:30more in another video that's specifically about managing comments. Scroll to
04:34the bottom and Save Content Type.
04:37Good, so we've created, as you can see, this Content type called Test content
04:43type. Now, let's switch to an ordinary user and see if that person can create
04:48some content in that Content type, switching over by holding down the Command
04:51key and hitting Tab on the Mac keyboard. We already have a window opened in
04:55Firefox with our ordinary fishyjoe. Click on Create Content; wait, we don't see
05:01our test content type, that's because we didn't give permissions to create that
05:06Content type.
05:07Let's go back to the Administrative user, go in to Administer and our old
05:12friend Permissions. Click on that and you'll notice as you scroll down in the
05:21node module there is a new choice, create test content. Since I know fishyjoe
05:27is a Contributing user, I am going to say, "Yes, he can do it." Ordinarily,
05:30authenticated users can't, but he can because I trust him as a contributing
05:34user. Scroll down to the bottom of the screen, click Save, and now let's go
05:40back to fishyjoe.
05:42Now, click Create Content again and there it is, test content type. You'll
05:47notice that when you hover over test content type, it gives you that little
05:51help text that we mentioned before. Let's click on it now and actually create
05:55something, Address of Property, we will say at 819, 15th Street, Description of
06:00Property, "Boy, this is place is swank !" Scroll down a little bit further and
06:09we can see it's forcing revision information. So we'll say, Created new story
06:16and Save; and there we are, we have our new piece of content in test content
06:21type. You may remember that we also had, Promote to front page checked.
06:25So, let's go to the front page and see if it's there; click here, remember we
06:30had this as sticky at the top of list. So, it will show up underneath and there
06:34it is, we had Comments turned off, let's make sure that's true, by clicking on
06:38the Title - nope, no place to add comments, good, it's all working exactly as
06:42we wanted.
06:43Now, here is a tricky thing. We go back to the administrative interface, click
06:47on Administer and Content Types. We notice that we can actually delete that
06:52Content type. What happens if we do though? Say Delete, this is going to be
06:58tricky, don't worry we will come back to it and we'll make everything all right
07:01again. We are going to delete this Content type.
07:05So, we have deleted the test content type, but is it still there? Is the
07:10content that was in that Content type still on the site? Let's go back up, take
07:14a look at our front page, yep, it's still there. We click on it and we see it's
07:18still viewable. When we click on Edit however, it doesn't work. It doesn't work
07:25because we've deleted the Content type and so as you can see Drupal doesn't
07:28know what to do what to do with it. This is a node which has no Content type
07:31attached to it and we can prove that by going to Administer, Content which
07:36lists all the content on our site. See how all of these have types, this story
07:40doesn't have a type.
07:42So, we can't edit this particular story. Let's go back to it and we can't even
07:46delete it, there is no place to delete this story. I am going to click Back, to
07:49go back to our list.
07:51There are a few things that we could do however. We could go in and we could
07:54copy the text and just post it as a story or page or something else. There is
07:59one other way that you can make this content editable again, which is to change
08:02it to a different type. To do so you will have to go into MySQL, through the
08:06phpMyAdmin interface. We are going to that by switching to MAMP or WAMP, if you
08:12are on a Windows server, open start page and, of course, phpMyAdmin. From there
08:17you will choose your Drupal database which we've named Drupal and then scroll
08:21down until you get to node. Click on this little icon, which let's you browse
08:27the node that is all the content in your site and scroll down until you find
08:33the node that you want, but notice that as a type, it's still test which
08:37doesn't exist anymore, we are going to change it to Story
08:40To do so, click on the little pencil icon and then simply type in Story, scroll
08:46back down to the bottom, click on Go, then we are going to switch back to our
08:51Drupal interface and reload this page and there we are, it's now a story and we
08:58can actually edit it again.
09:00Just to clean everything up, we are going to delete this piece of content, you
09:07might ask yourself, 'why would I want to define a Content type anyway?" It's
09:11not really apparent from the way, Drupal set up by default, by development of
09:15good Content types leads to tremendous flexibility in both Content creation and
09:20display.
Collapse this transcript
Adding blogs
00:00One of the most popular features of social online media is the ability to
00:04easily keep journals, commonly known as Blogs.
00:08By default, Drupal installs software that allows every registered member of
00:11your site to maintain a Blog and presents those Blogs in a convenient and
00:15familiar way. As you are site's Administrator, you have complete control over
00:19which members, if any, may keep Blogs and you might decide to only allow
00:24yourself that privilege, but first, you have to turn on the blogging module. To
00:28do so you go to Administer and Modules.
00:32Now, we've already turned it on, but if you haven't, you would make sure that
00:36this is clicked, so that it's checked, go down to the bottom of the page and
00:42say, Save Configuration. Once you have done that, there will be an additional
00:47type of content under Content types. To see that go to Administer and Content
00:52types and there you have it, Blog, but your job isn't done there, because you
00:57have to give permission to allow certain people on your Drupal site to create
01:01and edit their Blogs. To do so, go to Administer, and scroll down to
01:06Permissions.
01:08Again, we have already done this, but if you want to allow everybody to keep a
01:12blog, you would check anonymous user. If you only wanted your members to create
01:16Blogs, you would check authenticated user. We also have an additional group
01:19called Contributing user. That's next to Create Blog Entries, we however not
01:24given them permission to delete their own blog entries or edit their blog
01:28entries. In other words, once they have started them, they have to keep them. I
01:32am going to give Contributing users that additional ability to edit their own
01:35blog entries. Whatever changes you decide to make, go down to the bottom of the
01:39page, and click Save permissions.
01:44So, now we've allowed certain users to create and edit their blogs. I am going
01:48to switch to one such user. The one we have logged in, on the separate browser
01:52called Firefox and that user's name is Fishyjoe. Fishyjoe clicks on Create
01:56content and then Blog Entry and let's just add an entry here; how about, "I've
02:02decided to take the plunge. I'm going to buy some underwater property. Does
02:14anyone have tips to help me?" And we will go down to the bottom here and click
02:20on Save, that's very much like creating a story, or page, or any other Content
02:24type.
02:25By default, all Blog posts go to the front page and if we click on the icon
02:30here, we will go to our front page, scroll down and since these are kept in
02:33reverse chronological order; it will be at the top.
02:36Also, Blogs allow Comments, you can comment directly by clicking on Add new
02:41comment or if we go back to that page by clicking on the Back button we can
02:45click on the Title of the Blog and see the entire Blog and then say, Add New
02:50Comment. You will also notice an additional link here, which will give us a
02:54list of all of the posts that Fishy Joe has made in his Blog, let's take a look at that.
02:58We had earlier added one Blog post, " Can you help me find the lender?" So, here
03:02we have the most recent one at top and then again in reverse chronological
03:05order, the next one. If you want to see everybody's blog, you could just say
03:10localhost or whatever your website is, localhost/blog and that gives you
03:15everybody's Blog at once.
03:17Since, Fishy Joe is the only person who has created Blog post, that's all that
03:21shows up on this page. Of course, you could create a menu that would go
03:24directly to this page and we'll show how to that in the video about menus.
03:28Blogs are a great way to get people involved in your site, but there is a
03:31downside, they get people involved in your site in unregulated ways that could
03:36go against your interests.
03:37So they are best, if you either limit blogging to those site members who you
03:41can trust, such as employees of a company or for community sites where you are
03:45not trying to enforce a particular point of view.
Collapse this transcript
Adding forums
00:00One of the earliest functions the internet served when first developed 40 years
00:04ago was to permit conversations among likeminded people. Nowadays, one of the
00:08most popular venues for such conversations is the web-based bulletin board.
00:13Drupal includes functions that let you create such bulletin boards and control
00:17how your members use them.
00:18In Drupal we call them Forums. The first thing to do is to turn on Forums by
00:22going to Administer, Modules and Forums. We've already turned ours on, but you
00:31haven't, just make sure that this box is clicked, go down to the bottom of the
00:35page and click Save Configuration.
00:39As with blogs, this adds another content type, if you go to Create Content,
00:44you'll see Forum Topic. But before we go any further, we should talk about
00:49exactly what a forum is. A forum is first and foremost a place for threaded,
00:54open, multi-participant discussions. Historically speaking, these are
00:58extensions of mailing lists, bulletin board systems and the Usenet system of
01:02new stories.
01:03In Drupal, these are organized in a multilevel hierarchy. The hierarchy is as
01:09follows. First is the Forum module, which contains all of the forums. Inside
01:14that module there can be Containers, so for example, you might have a container
01:18called Cars which would have multiple forums for Scion, Toyota, Honda and so forth.
01:24Inside each of those forums, individual users can enter topics. For example,
01:29"How do I get more mileage out of my Scion?" And finally to each of those topics,
01:34other users or the original user can enter comments such as, "Well, here's what
01:37you do to get more mileage." We'll see what this looks like when we start to
01:41build our forum.
01:43To see how this works, we're going to add a new forum that's going to be called
01:46Tips for underwater living. To do so, we go to Administer and Forums. As you
01:53can see, we've no containers or forums, we'll add a forum here and call that as
01:58I said, Tips for underwater living. We'll also enter a description, Help for
02:06those who are livin' la vida mojada! Or for those of you who don't speak
02:14Spanish, Living the wet life.
02:16We're only going to have one forum at this point, but if you had more, you
02:20could set it up in a hierarchy, so to use our earlier example in the San forum,
02:25there might be a subcategory for XA owners, XP owners and so on down the
02:29different models. But for now, we're just going to ignore it and keep its
02:32parent at root. That is the basic place where all forums go.
02:37Weight as with other screens determines which one is listed first. We're going
02:41to leave it on 0 since we only have one and we click on Save. There we've
02:46create our first forum, I'm going to create one more forum called Buying
02:53property and I won't put in any description just to make it concise. I'll
02:58create one more called Selling property and again just save that.
03:05If we want to see all of these, we go to our website/forum and we see a full
03:11list of all of our forums and as you can see, we've our description right here
03:15where is these two which don't have descriptions are just given by their
03:18titles. Let's go back though by going to Administer, Forums and let's set up a
03:24container. We'll add a container, which is going to be called Trading property.
03:30Again, we'll leave that at the root and save it. Now, we've this container and
03:36we can put buying and selling property into it by grabbing it by this arrow
03:39icon and dragging it down like so. Incidentally, you can also put forums as
03:47subgroups of forums like so by moving it in and out of the hierarchy. I'll
03:52click on Save and then we'll take a look at what exactly that looks like by
03:57going to /forum.
03:59As you can see, categories show up here, but you can't actually post anything
04:03in them, there are only containers for holding other forums. So, we've these
04:08forums, but how exactly do we add information to them? First, if we want to
04:12make them available to all of our users, we're going to have to give the
04:16permissions as always. We go to Administer, scroll down to Permissions and then
04:24go down to the Forums module.
04:28The main permission that we want to give people is whether or not they can
04:31create forum topics. We'll give that to our authenticated user, incidentally we
04:36don't have to give it specifically to the contributing user because they're by
04:40their nature also an authenticated user. We're not going to allow anybody to
04:44delete or edit their forum topic, although of course you're welcome to do that
04:48if you like. We scroll down to the bottom of the page as usual and click Save
04:53permissions.
04:54Now, let's switch to our ordinary user, fishyjoe. Now, fishyjoe can add
04:59something to the forums by going to Create Content, Forum Topic and then
05:04entering whatever information he wants, let's say Seeking equity partner and he
05:09could say, "I'm seeking a $20K equity partner for my property in Soggy Acres.
05:21Comment here for more information." Now, there's one other field that we don't
05:27see in other content types which is which forum do we want to put it in.
05:30In this case, we'll put it into Selling property, but if you look at the list,
05:34you can see how the hierarchy is shown. Remember Trading property is a
05:37container, you can't post there, but it shows these subcategories, Buying
05:42property and Selling property. We'll put it in Selling property, if you were to
05:46try to post it in Trading property, let's see what happens.
05:49Scroll to the bottom and say Save, oh ! Tells you, you can't do it. So, now
05:55we'll go to Selling property, go down to the bottom, Save, terrific, we've
06:02created it. Let's go, take a look at it by going to directly to Forum and there
06:07it is, we see that we've one topic with one post. The other way he could have
06:11posted was by clicking on the forum itself and saying, Post new forum topic.
06:16Let's say somebody else comes along and wants to read that. They go through
06:19here, click on the topic and then they can add a new comment if they want just
06:24as they could in other places in Drupal. But for now, we're just going to go
06:27back to our homepage. As with blogs, forums are a double-edged sword. On the
06:34one hand they can increase participation in your site, but on the other, they
06:37can result in some unpredictable and sometimes offensive content in places that
06:41you don't want it.
06:43If you decide to enable forums, I recommend that you budget ongoing time to
06:46monitor them to keep out not only flame wars, but also spam, regardless forums
06:51are well worth the time for increasing participation in your site.
Collapse this transcript
Adding polls
00:00Drupal's poll module gives you a way to present simple multiple questionnaires
00:04to visitors and then tabulate their responses in useful ways. You can limit how
00:08long a poll will run which is useful for making group decision and who can vote on it.
00:14As elsewhere in Drupal, we turn on polls by going into Administer, Modules, and
00:21then click to turn on the Poll Module. There we go, and then we will go down to
00:28the bottom and say Save Configuration. Now we have turned on polls, but there
00:34is one other thing we should do as we do with many other modules when we turn
00:37them on, we have to make sure permissions allow people to vote on them.
00:40So we go down to Permissions in the Administration interface and then scroll
00:47down to Poll Module. The most important one in here is whether or not people
00:54can vote on polls. I am going to let all authenticated users do that, and
00:59remember contributing users are also authenticated users. You can also allow
01:03people to inspect votes to see how everybody has voted or to cancel one's own vote.
01:08The other poll permission options are for creating polls and of course you can
01:12turn those on and off as you think is right. We will scroll to the bottom of
01:15the page and click on Save Permissions. So now we have turned on and allowed
01:20all of our regular users to vote on them. But how do we create a poll? Well, a
01:25poll is really just content. So we go up to Create Content and Poll. We are
01:31going to create a poll that's relevant to our site.
01:33So how about, which condo developments do you prefer? First choice is going to
01:41be let's say Soggy Acres. The second one will be Mildew Point and then we will
01:46add another choice right here. You can keep on adding choices as much as you want.
01:52The third one is Hudson Mews, and the forth one is Mark Twain's Riverboat
01:59Graveyard. Now, you will notice something unusual on this right-hand side,
02:04which is that you can actually cheat on the poll. That is you can have it start
02:08with Soggy Acres having 13 votes, Mildew Point having 25 and so forth. We are
02:13going to do that just so that we have some votes in the record and you can see
02:16how it tabulates responses.
02:19As we go down, here are the time settings. We decide has the poll actually
02:22started or not? This is very useful if you want to design the poll first but
02:26not actually launch it until a certain event is passed. Like let's say a
02:30primary or midnight on a certain day. But for us we will say it's active and we
02:34are going to have it go just for one week. Scroll down further and you will
02:39some settings that you have seen in other content types.
02:41For example you can make this menu selection that shows up in the upper right
02:45hand corner in the screen or in navigation menu on the left hand side. You can
02:49set it so that each time you revise the poll, it keeps a copy of the old one.
02:53Let's actually give this one a path setting. We will call it poll_condos.
02:59Comments, do you want people to be able to comment on this? For polls, that's
03:02usually turned on to for read and write because people not only want to say yes
03:06or no to an issue, they want to talk about it. Finally, authoring information
03:10can be changed as usual and publishing options, by default it is promoted to
03:14the front page. Let's save that and see what it looks like.
03:18There we are. If we go to the front page as the administrator and scroll down,
03:23it becomes like a story at the top of our nodes. Of course this one up here is
03:27sticky, so it's stays at the top of everything.
03:30Now I should mention, that Drupal polls give a lot of power to the
03:33administrators. The administrator can for example change the poll questions
03:36after the poll has started which can be of course quite dangerous in making
03:40people say things they don't mean to. The Drupal administrator can see how
03:43people voted. However, the Drupal administrator cannot directly change the vote
03:48of the individual members.
03:50If you want to make your polls more open, what should do is check that
03:53permission that allows members to see everything about who has voted. In that
03:56way they can say, "Hey, did you really vote that way? Hey wait. I didn't vote
03:59that way." And they can complaint if they want to leave the site or anything
04:02like that.
04:03So we have created our poll. Now let's try voting on it. As the administrator,
04:07I am going to vote for Mark Twain's Riverboat Graveyard. There we go and it
04:12tells me that my vote was recorded. Let's scroll down again and you will see
04:16something interesting. We can't vote again. See, it shows us the results, but
04:21doesn't give us the choices. Even if we click here to show the node, we can't
04:25change the vote.
04:27Furthermore, let's go back to our ordinary user, fishyjoe, who I have running
04:32in another browser. We will reload this page so that fishyjoe also sees the
04:36poll and we scroll down. Now you will notice fishyjoe can vote this even though
04:43the administrator voted and saw the results, fishyjoe can still vote. Well, I
04:48see Mildew Point is the best. So there we go.
04:51Now of course fishyjoe sees the results.
04:55In short once you have voted once, you can't vote again. The only other way
04:59that you are forbidden from voting is if you have not being given permissions.
05:02Typically that's done for anonymous users, because otherwise anonymous users
05:06would just come and vote from different computers would clear their cookies,
05:09might really stack the desk.
05:12As with other content types such as forums and blogs, you can see and of the
05:16polls that have been posted by going up here and using the URL Poll. Once you
05:21have learnt how to use menus, you can create a menu selection that will go
05:25directly to that page, but let's take a look.
05:27There we are, we have a list of polls and of course if we had more polls they
05:30would all show up here. It tells us how many votes and whether it's still open.
05:34If we were to come back to this page in eight days, it would say closed,
05:37because we only set the time limit to be a week. Click on it and again, we see
05:42the node itself.
05:43One other thing happens when you enable polls which is that a block is
05:46automatically created that you can move to different parts of the site. Let's
05:50switch back to our administrator's interface and see how that works.
05:53We will go to Administer, Blocks and scroll down until we see most recent poll.
06:03Here it is, let's put that in the right-hand sidebar and say Save. There we
06:10have it. If we hadn't answered this poll, of course we would be asked the
06:14question and it would look just the same as it did on our main page. This is a
06:18very good way to keep content on our site fresh. That is put the most recent
06:22poll or the most recent blog post, the most recent comment in that right hand
06:26column or somewhere else on the page where it's obvious. It gives your site a
06:30sense that it's always fresh.
06:32Let's see what that look like on an ordinary user's page. So we will switch
06:35back to fishyjoe, click on the logo, which brings us back to our homepage. And
06:40there you have it, polls are especially good for encouraging interaction,
06:44because voting is much easier for visitors to do then writing a blog post or a
06:48forum comment. In addition, polls frame issues by giving limited choices and
06:53their collective nature creates a sense of a common goal.
Collapse this transcript
10. Managing Site Content
Exploring content categories
00:00If you'd tried building a forum in Drupal, you've already encountered a way of
00:04defining content with categories known as Terms. In that case, each term you've
00:09defined became the name of a forum, but Drupal system of categorization has
00:13uses well beyond that simple example and in fact, is essential to advanced
00:17functions you might want to add later to your Drupal site.
00:20Before we go on, let's take a look at what exactly categorization does for a
00:24site. We'll do that by looking at Lynda.com. On Lynda.com, you can see the
00:31videos that are available according to product or vendor, the number of other
00:34categories or you can look at All Courses. Let's do that now. On this page, you
00:41can see that Acrobat 9 Pro Essential Training shows up in the Acrobat 9
00:45category, which makes perfect sense. That's because this video has been tagged
00:49Acrobat 9. But you'll notice it also shows up under Acrobat. So, it has two
00:54tags to it; Acrobat 9 and Acrobat. The good thing about this system is nobody
00:59has to maintain this page specifically; all they have to do is to add the
01:03correct tags and then build a system that will collect all the ones that have a
01:07certain tag and put them in one place. So, for example, if we go down to
01:11Product, Acrobat, we see only those that have the Acrobat tag. But enough about
01:17the Lynda.com site, let's go back to our Drupal site.
01:20To start categorizing content, we go to Administer and Modules and make sure
01:26that the Taxonomy module has been turned on. It's automatically turned on if
01:31you've turned on the Forum module as we have done. In fact, you can't turn it
01:35off but it's required by the Forum module. If, however, it's not checked, you
01:39would check it here and then go down to the bottom of the page and click Save
01:43Configuration. Once you've done that, you are ready to administer your
01:48taxonomies. To do so, go to Administer and scroll down until you get to
01:53Taxonomy. Because we have already created forums, we see one taxonomy down
01:59here, which is Forum Topics. We are going to add one that's going to be
02:02specific for blog posts, so that when somebody posts something in their blog,
02:07they are forced to say exactly what category it falls into. We'll do that by
02:11clicking on Add vocabulary and we fill in the fields below.
02:15For us, that will be name is Blog post categories. The Description will be Tags
02:22to categorize blog posts and for Help text, we'll just add, Help others find
02:29related blog posts. Continuing down, we can say what sort of content type we
02:35want this to apply to. We are only going to categorize our blog entries, so
02:39we'll click there but we could do multiple content types. At the bottom of this
02:43screen, we have three settings that are specific to taxonomies. One of them is
02:47Tags. The difference between Tags and an ordinary taxonomy is that with a
02:51standard taxonomy, the user can only choose from categories that you've already
02:56defined. With Tags, they can enter their own categories. We'll show exactly how
03:00that works in a moment.
03:02Multiple select, as might imagine, allows people to include several categories
03:06in their posts and finally, Required will force them to enter at least one
03:11category in their post. We are going to turn on Required here and click Save.
03:16Very good, now let's see how this affects an ordinary user. To do that, we are
03:20going to switch to Fishy Joe's account. He is logged in, in the Firefox
03:24browser. And let's take a look at all of the blog posts. We do that by going up
03:29here and going to /blog and we can see that here is one that Fishy Joe has
03:33posted. Let's go into it and edit it. You'll notice a new option, Blog post
03:39categories, in that little orange star means that it's required. If Fishy Joe
03:43decides not to add on, we'll see what happens.
03:46Ah! He is one that he has to. So, now he would have to choose something here
03:52but for right now, he doesn't have anything to choose, let's go back to our
03:55administrative interface and give him some options. So, we are back Administer
04:01and Taxonomy and at the bottom, we have Blog post categories. Now, we list the
04:06terms and see there's nothing there, we need to add additional terms and these
04:10terms will be what Fishy Joe will be selecting from. Let's call a term Buying.
04:17For Tags, I suggest that you only have single words to avoid confusion.
04:22Under Advanced options, we can choose whether that term is the child of another
04:26term or the parent of another term and create a hierarchy of terms. We can also
04:31say, whether it's a synonym for another term. We won't get into any of those
04:34advanced options at the moment, instead we'll click Save and you'll notice that
04:39it leaves you on the Add terms screen. That's because typically, when someone
04:42is creating a taxonomy, they create several terms at once. I am going to add
04:46Selling and I'll create Properties. I think that's enough terms for now. Well,
04:56let's add one more. Lifestyle. Very good. Now, let's go back to Fishy Joe's
05:02account and view this note again and edit it again.
05:07Now, when we go to Blog post categories, we can see that there are several
05:11choices there that he can choose from. In this case, he is talking about buying
05:15properties, so we'll select Buying and say Save. But here's the thing; he is
05:21talking about buying but he is also talking about properties. Maybe we should
05:25let him select more than one. Well, let's go back to our administrative
05:28interface and make that so. To do so, we go back here and Administer and
05:35Taxonomy. From there, we can edit our vocabulary, scroll down to the bottom and
05:42allow a multiple selection. Scrolling down further, we save it and then let's
05:48go back to Fishy Joe and see how that affects the ordinary user. Click again on
05:53Edit. Now, you'll notice it's a different sort of menu and if you hold down the
05:57Command key on the Mac or the Ctrl key on a PC, you can select more than one.
06:02In fact, you can hold down the Shift key and select all of them by selecting
06:06the first one and then the last one, but we are just going to have Buying and
06:09Properties.
06:10Scroll to the bottom and save. Very good, you'll notice that those tags show up
06:16after the post. So for example, by clicking on Buying, we would show all such
06:20posts that were about buying because they had been tagged as Buying. There is
06:25one last thing we are going to do by switching back to the administrative
06:28interface. Let's got back to that taxonomy, edit the vocabulary and scroll to
06:35the bottom again. This time, we are going to let it be free tagging and we save
06:41it and see how it affects an ordinary user by going back to Fishy Joe. Let's
06:46edit it one more time and you see that instead of having a drop-down menu, it's
06:52this list into which he can freely add tags. There's something interesting
06:56here, which you see in this little circle. Let's just try typing Buying. Ah! It
07:02notices once you start typing that there is something in there already called Buying.
07:06If I do comma and do another one and we can start typing the next one. Ah!
07:11Properties, it recognizes that. So, we'll click on that. We'll then scroll to
07:15the bottom and say Save and there we have it. We have tagged our Blog post as
07:20Buying and Properties. If we want to see all the properties tagged to blog
07:24posts, we would just click there and there we are. Of course, we only have one
07:28at the moment but we could have many as the site grows. As with any other part
07:32of your site that's open for user interaction, taxonomies can be abused. One
07:37way to avoid such problems is to limit categorization only to those
07:41pre-determined tags that you have defined.
Collapse this transcript
Exchanging content via RSS
00:00One way that websites exchange information is via a format called RSS or Really
00:05Simple Syndication. Drupal has a feature built-in that let's you both publish
00:09information from your website and subscribe to information from websites
00:13throughout the Internet. Before we get into talking about how Drupal publishes
00:17and subscribes to RSS feeds, here's a brief description of what RSS is.
00:22RSS is typically a format for publishing serial material such as blogs,
00:27periodicals, and community sites. It's used for publishing information that's
00:32updated frequently, for example, a newspaper would publish its news stories
00:36through RSS. It doesn't make much sense to publish static information through
00:40RSS since the newsreaders grab it and then replace the old information with new
00:44information. If your information doesn't change frequently, it would quickly be
00:48pushed to the bottom. In RSS, content is syndicated through a feed or a
00:54channel. You may hear both words. That content is then viewed through either a
00:58reader or an aggregator. A reader usually refers to a piece of software such as
01:03Apple Mail, whereas an aggregator usually refers to a website. There are many
01:08websites that will actually let you look at RSS content including Google and
01:12LiveJournal and in fact, any Drupal site will let you aggregate RSS feeds from
01:17throughout the Internet. So, that's the theory, but what is RSS in practice?
01:22Let's take a look at few sites to see how it works. We'll start with
01:26Drupal.org, which makes a lot of information available as an RSS feed. For
01:30example, if you wanted to see all the stories that appear on Drupal.org's front
01:35page, but you don't want to have to keep checking the website, you could
01:38subscribe via RSS. To do that, you would click on the little RSS symbol in your
01:43web browser and it would show you the page that you would need to include. In
01:47this case, it's drupal.org/node/feed. You would put that in your RSS reader and
01:54it would then feed these stories in as they became available. That little RSS
01:58symbol shows up on many, many websites.
02:00Here's another. This is the page groups .drupal.org/bayarea and it keeps track
02:07of all of the Drupal related activity in the San Francisco bay area. One again,
02:12if you wanted to subscribe to it, you would clear here and get your feed here
02:17in the address bar. This would then be copied into your RSS reader. There's one
02:21other place that provides RSS feeds that I found very useful for running a new
02:26site that's Google. Let's search Google .com for waterproofing. Now, we don't
02:34see it from the search results here but if you go to Google News, this is all
02:38of the most recent news for which the word, waterproofing, has appeared in the
02:42title or the body of the story. We click on RSS, subscribe to the RSS feed
02:48instead of the Atom feed, since there can be many different kind of feeds on a
02:51particular site and we get our URL. We are going to come back to this later and
02:57subscribe to this in our Drupal site.
02:59First, we have to turn on the module, Aggregator. So, we'll go back to our
03:03website and do that. We do that through Administer, Modules, scroll down until
03:11we get to Aggregator, click on Enabled and as always, go to the bottom of the
03:15page and click Save Configuration. As with most modules, we are going to have
03:24to change the permissions to give our users the rights to see everything that
03:28comes through that news feed. So we go to Administer, scroll down to
03:32Permissions and we see the aggregator module. We are going to give
03:39authenticated users and anonymous users the right to access our news feeds.
03:43Again, Contributing user is also an authenticated user because this is a group
03:47that we added before. Scroll down to the bottom and Save permissions.
03:54Now, let's take a look at how we can actually add feeds to that aggregator. We
03:57go to Administer and search for aggregator and there it is. Click on it and we
04:03have a choice of adding feeds at the top. We can also add categories, which we
04:08won't discuss at this moment. Let's just add ourselves a feed, click on it, it
04:12asks for the title and the URL. We are going to go back to that one that we
04:17found earlier which was about waterproofing from Google's News search. To
04:22subscribe to this feed in our Drupal site, we go up here, select all of it by
04:26doing Command+A on the Mac or Ctrl+A on the PC and then Command+C to copy on
04:31the Mac or Ctrl+C on the PC. We'll then switch back to our Drupal site, go to
04:37Administer, Feed aggregator and Add feed.
04:43For a title, I am going to call it News from Google - Waterproofing. And for
04:50the URL, I'll use Command+V or Ctrl+V on the PC to paste it in. Now, there is a
04:56problem with this URL, which has to do with our particular browser. If we go
05:00back to the beginning of it by hitting Command+A and then Backspace or Ctrl+A
05:04and then Backspace on the PC, we see that it starts with feed. This has to
05:09start with http. Most browsers don't have this issue and in fact, Firefox
05:14doesn't. If you are using Firefox, you won't have to take this additional step.
05:18The final option we have here is the Update interval. This determines how
05:22frequently we'll be fetching news from this URL. Because it is only updating
05:26once every 15 minutes, we are allowed to do no faster than that because if we
05:31were allowed to and everybody did, then it would overwhelm the servers.
05:35However, we can't do it less frequently if we like. I recommend keeping it on
05:3915 minutes because that's no too frequently to overwhelm the servers but at the
05:43same time, it's frequently enough that somebody, who checks your site several
05:46times a day, will generally find new information whenever they go back as long
05:50as there is that new information.
05:52Then we'll click on Save. If you want to pull it in immediately, we'll click on
05:57this link here, cron maintenance task that takes us to our status report and
06:02then you say, run cron manually. Now, when we go over to Feed aggregator, we'll
06:07see all of the stories on our website. Let's go to our ordinary user, Fishy
06:12Joe, who we have logged in on the Firefox browser. If we refresh this page, we
06:18see that he now has a Feed aggregator and when he clicks on it, he can see all
06:22of these stories. There are a few links he'll notice. One of then is he can
06:26click on the title of the story itself and that takes into the original story
06:32directly. We'll go back and if he clicks on News from Google - waterproofing
06:37and remember, that's the feed that we set up, we see all of the news items that
06:40were fetched by that feed.
06:42Finally, we can look at Sources here. So, here we can see all of the news
06:46stories that came in through our Google waterproofing feed. If we had other
06:50feed setup, we'd see them listed below with all of their items. There's one
06:54other thing that we can do with RSS feeds and we are going to switch back to
06:58our administrator interface to show you. Here in the administrator interface,
07:03we can take this feed and put it in a block and we'll put that in the
07:06right-hand column along with our other blocks. To do so, go to Administer and
07:12then to Blocks. Whenever you create a feed like this, it shows up as a separate
07:17block. As we scroll down, we see it here, News from Google - Waterproofing
07:25feed. We'll bring that up into the right side bar and save it and voila! We
07:33actually see it here in the right- hand column and indeed, we don't see the
07:36entire story; we only see the headlines, which is yet another way that you
07:41could make your site look fresh and new.
07:43As with any other block, you could move that around within the column or you
07:46could move it to the left-hand column. I think I'll put it above the most
07:49recent poll. Scroll to the bottom again, Save blocks and let's switch to our
07:56ordinary user just to see how it looks. And there you have it, we now have
08:01Google's waterproofing news followed by the poll just as we expected.
08:06As with most Drupal topics, there is a section on the Drupal.org site
08:10specifically for aggregation tricks. It's at
08:13drupal.org/handbook/modules/aggregator. So, we have learnt how we can subscribe
08:21the information in your Drupal site but you can also publish information that
08:24appears on your Drupal site. To show that, let's go back to our home page by
08:30clicking on our Drupal icon up here. Now, let's move to becoming part of the
08:34grand pool of RSS publishers. In Drupal, you actually don't have very many
08:38options for how you publish your content in RSS. If it appears on your site and
08:43is visible to anonymous visitors, it can be subscribed to via RSS.
08:47So somebody, who goes to your site, would see this RSS tag up here. In this
08:52case, we are running on a local machine, so we see localhost. But of course,
08:55somebody, who was looking at it on a public web server, would see, for example,
09:01www.example.com. When they click on RSS, it adds that rss.xml and they would
09:06subscribe in their reader exactly as they would in any other site. There's one
09:10thing that I want to point out here though. One of our stories, we added to
09:14teaser that is text that shows up before you click Read more and then
09:18additional text that shows up after your click Read more. That carries over
09:23whenever you do an RSS feed. The first Read more showing here, shows where the
09:27teaser cuts off. The second Read more shows up at the end of the content
09:31itself, so you can actually cut off content before the end by adding a teaser break.
09:37Being able to subscribe to RSS feeds tremendously increases the amount of
09:41content on your site and can beautifully compliment your own content.
Collapse this transcript
Using input filters
00:00One way that vandals attack Internet- based systems is through a trick called
00:04code injection. They find places where the system's designer has allowed the
00:09outside world to provide input and then put programming code there, instead of
00:13entering information in a format that the developer expected at the least. Such
00:18tricks can lead to ugly posts. At most, they can lead to the attacker
00:22completely destroying or gaining control of your site. In Drupal, you have
00:26control over the sort of information users can enter into posts and comments
00:30through a system of input filters. Drupal includes three such filters, two of
00:34which are turned on by default and you can add your own as you like.
00:38To understand input filters, first we'll create content as the administrator by
00:43clicking on Create content and we'll just say Blog entry. As we scroll down,
00:48we'll see a very familiar part where it says Input format. Click on that and
00:52you see the two that are included and turned on in Drupal by default, Filtered
00:57HTML and Full HTML. I am going to switch now to an ordinary user, Fishy Joe,
01:02who is logged in under the Firefox browser. When Fishy Joe creates content,
01:07once again, we'll make it a blog entry, he actually doesn't have those options;
01:13he is only allowed to enter his content as Filtered HTML. Let's take a look at
01:18how that works. We'll switch back to the administrator. To see the input
01:23filters that are available, we go back up to Administer and then to Input
01:29formats. Here, we see we have options for Filtered HTML and Full HTML. Let's
01:38take a look at how Filtered HTML is configured.
01:42You can change the name but you can't change what Roles can use Filtered HTML
01:47that's because in Drupal, Filtered HTML is the basic input format allowed and
01:52every user is allowed to use it. Going down further, you can see a few options;
01:58the HTML corrector corrects faulty and chopped off HTML in postings. So, let's
02:02say that somebody who were to enter a bulleted list, but forgot to close the
02:06tag, this would correct that. The HTML filter makes Drupal take out some
02:11certain tags. It also takes out CSS styles and Java Script events that could
02:16hurt your site. The Line break converter turns ordinary text, which has
02:20ordinary line breaks in it, into the HTML that Drupal expects, so somebody
02:24doesn't have to say, <p for a paragraph tag; they can just hit the Return key.
02:30Finally, the URL filter will turn any sort of URL into a clickable link and
02:35again, you can turn these on or off as you like. Continuing down, we see the
02:39guidelines that are printed in front of the user whenever they enter using this
02:42filter. We'll see more of this in just a moment but for right now, we'll just
02:46say Save Configuration. The other filter that's built in is Full HTML. Let's
02:51take a quick look at that by clicking on the configure link.
02:55In this one, you can choose which Roles are allowed to enter as Full HTML. If
02:59you want to allow a particular role to use that filter, you would obviously
03:03click on it and then save at the bottom of the screen. If none are clicked then
03:07none can use it although, of course, the super user, you as the administrator
03:11can use any filter that you like. Continuing down we see that the options are
03:16the same as for Filtered HTML except that the HTML filter is turned off as you
03:21might imagine. Again, Drupal automatically gives you these formatting
03:24guidelines, which are given to the user when they enter in this format.
03:28I am going to go back up and allow authenticated users to enter in Full HTML.
03:33Go back down to the bottom, and click on Save Configuration. There is one more
03:38filter type that is built into Drupal. It's called PHP. To turn it on, we'll go
03:43to Administer, Modules and then down to the PHP module. This is turned off by
03:51default because PHP in content can be extremely damaging. If you allow PHP to
03:56be entered into content and interpreted by Drupal, it could allow somebody to
04:01write malicious PHP that could destroy pages or even take over parts of your
04:05site. But we'll go down and we will turn it on, I'll show you how to use it
04:09responsibly and click Save Configuration.
04:14Now, let's go back to our Input formats by going up to Administer and back down
04:24to Input formats. Now you see we have one more option, PHP code. Let's take a
04:29look at some of the options for writing PHP code. Click on Configure, first of
04:35all, we are going to make this available to authenticated users, also
04:38contributing users even though that group is included in authenticated users.
04:43Down here, you'll notice an additional option, PHP evaluator. This is what lets
04:48Drupal actually interpret the code that somebody has entered. I am going to
04:51turn this off for now for a reason I'll show you in a moment. We'll go down and
04:56say, Save Configuration and the Input formats settings have been updated.
05:00Now, let's go back to our ordinary user, Fishy Joe, and see how that affects
05:04him. He is logged in the Firefox browser. Let's say, he wants to create
05:09content, a blog entry. We'll just call this Test and it's in the Buying
05:16category and Body is Test. We continue scrolling down and we see something we
05:22didn't see before, Input format. Here, we see we can enter Filtered HTML, Full
05:27HTML because we turned that on and PHP code. We'll try PHP code and then we'll
05:33go back up here and we'll enter some PHP code just to see what happens. Don't
05:37worry if you don't understand this code, we'll show you in a minute what it
05:40does. It does something very ugly, not really destructive but something you
05:44really don't want somebody to be putting into your site. It's going to be <?php
05:52phpinfo() ?>.
05:59Just to make this a little more obnoxious, let's add <font size="+7">. That is
06:06going to make that Test appear really big and ugly and </font>. Now, let's go
06:12down and save it. Ah! We see that big Test, however, we don't see the PHP code.
06:19We need to see the code; we neither see the code nor what it does. Now let's go
06:23back to the administrator and turn that PHP evaluator back on and then re-look
06:27at this. So, we go back to the Safari browser where the administrator is logged
06:32in, go back to PHP code to configure, scroll down, turn on the PHP evaluator,
06:40scroll down further and save the configuration. Are you ready? It's going to be
06:44ugly. We switch over to the Firefox browser and let's reload this page.
06:49Ah! Look at what we have. This is what that phpinfo function does. Let's go
06:56back and turn that off because it is really ugly and as you can see, somebody
07:00who is allowed to use the PHP filter can actually do quite a bit of damage very
07:04easily where at the very least, they can create some very ugly posts. So, we
07:09are going to go back and turn that off. We go into PHP code and just remove the
07:14roles that are permitted to use PHP code. If you wanted to be extra careful,
07:19you would also take off the PHP evaluator if you didn't want, for example, the
07:23administrator to be able to do such a thing.
07:26Go down to the bottom and click on Save Configuration. Now, if we go back to
07:30that post and refresh,
07:35we see once again, it's like that. Not quite so ugly but not really great.
Collapse this transcript
Managing comments
00:00All societies face troublemakers from time to time and the anonymity the
00:04Internet provides encourages people to display their worst behavior without
00:08fear of discovery. Trouble often comes in the form of abusive or spammy comments.
00:13Fortunately, Drupal includes several features that not only let you
00:16control who can comment but also let you decide which comments should be
00:19published and hide or delete comments that have already appeared. On the
00:24lighter side, you can control how comments appear by default and whether or not
00:29your site's members can change those settings.
00:32To start off, we are going to create content as the administrator in the forum
00:36by clicking on Create content and Forum topic. If you are a Lynda.com premium
00:41member or have the series on a disk, you have an exercise file that has the
00:45text for this Forum topic. We are going to go there now by clicking on the
00:49Finder and hiding everything else. Go to the Exercise Files, Chapter 10 and
00:56it's 10_04. The name of the file is forum-post.txt. Here, we'll copy the title
01:04by hitting Command+C or Ctrl+C on the PC and go back to our Drupal interface
01:10and paste it in the Subject, Command+V or Ctrl+V on the PC. We'll do the same
01:16thing for the Body.
01:23Finally, we'll decide which forum we want to put this in. The question is what
01:27do you love most about living under water. The most appropriate forum for that
01:31I think is, Tips for underwater living. We'll scroll down to the bottom and we
01:36don't have to change anything else; we'll just say, Save. Very good, we've
01:40created our forum topic. Now, let's go and take a look at what that looks like
01:44from the point of view of Fishy Joe, an ordinary member. We'll go to the forum
01:48by typing forum next to our URL and there we are; Tips for underwater living.
01:55That's the name of the forum. Go in and there is the post that the
01:57administrator just made. Click on it and there it is. Now, let's say that Fishy
02:01Joe is in a rambunctious mood and decides to add a new comment and do it all in
02:06caps and say, I HATE THE IDEA OF LIVING UNDERWATER!!!!1111. And the Comment
02:15says, Who Would Be So Stupid To Do That?!?!?! Fishy Joe previews it, says,
02:23yeah, I like saying that and says, Save, and it appears on the site.
02:28Let's go back to the administrative interface and see what we can do if we see
02:31that and decides, you know, we don't want that on the site. So, we'll switch
02:34back and in here, we go to Administer and Comments. This shows all of the
02:40published comments and we see that at the top and we'd say, we don't like that;
02:44there are few things we can do. One is we can click in the checkbox next to it
02:49and then either un-publish the comment by leaving this as it is and then
02:53clicking Update or we could delete it by selecting that and clicking Update. A
02:57second way we can affect this comment is by going to the Edit link here and
03:02then go up to the Administration link at the top and here, we could just
03:05un-publish it by clicking on that radio button and going down, saying Preview
03:10and then save. We are just going to leave it alone for now.
03:14We'll go back to Administer, and Comments. I want to show you another way that
03:20you can stop comments from appearing. We can do this by going to Administer,
03:24and Permissions, and then down to Comments. Now, you'll notice, we have
03:32permissions granted for all the authenticated user and contributing user to
03:36both post comments and post comments without approval. Let's say, we just want
03:40them to be able to post comments but we want to be able to approve all the
03:43comments that comes through. We'll uncheck these post comments without
03:47approval. Go down to the bottom of the screen, and say, Save permissions. Now,
03:54let's go back to Fishy Joe.
03:57Let's say that he sees that he has made a little stink here and wants to add
04:00another nasty comment. He says Add new comment. He says I hate you all!!! You
04:07bottom dwellers!!! And then says Preview, goes down to the bottom and says
04:14Save. This time, however, his comment hasn't appeared on the site because we
04:19don't allow comments to appear without approval and in fact, he gets this
04:23message which must make him feel really bad, your comment has been queued for
04:26moderation.
04:27Now, let's go back to the administrator site and see exactly what that means.
04:31We go to Administer and Comments and this link up here Approval queue. This
04:37shows all the comments that haven't yet been published on the site because they
04:41haven't received our approval. We could look at it, of course, by clicking on
04:45it. I don't like that, I am going to go back and say, Delete the selected
04:51comment. But right now, we are gong to publish it and I'll show you why in just
04:55a moment. So, we have these two abusive comments, which for some reason we've
05:00decided to leave. Let's say, the administrator decides to go into the forum and
05:03try to make peace. Goes to that same post, goes to one of the comments and
05:11says, you know I am going to reply to that and say, Why so much anger? Breathe
05:17in, breathe out... Try to calm down, Fishy Joe. And then we'll just say Preview
05:25and once again, Save.
05:29You'll notice something here. When you reply to a comment, it indents it in
05:33this way. We'll show how you can change that sort of display, but enough about
05:37abuse. Now, let's change how member see comments including how this is
05:42indented. To do that, we stay on our administrative interface and go to
05:47Administer and Content types. Now remember, this was a forum post. So, we are
05:53going to change the way people see comments in the forum posts by going to
05:57forum topic and clicking on Edit. We are going to take a close look at all the
06:01comment settings that are possible in the forum topics. We click on comment
06:05settings and we have a lot of options.
06:09First of all, whether or not we allow comments at all. If we don't want to
06:12allow comments in forums, we could just click on Disabled or Read Only, which
06:16would only allow administrators to post there. Secondly, we can change how they
06:20are displayed and when you saw that indenting, it's because it was a threaded
06:24list. I am going to say, Flat list - collapsed and we'll go back and take a
06:28look at how that looks. Let's scroll down, Save content type, then go back to
06:34Fishy Joe's account, reload the page. So, you can see that we've changed the
06:41way that comments appear instead of being expanded and in a threaded format,
06:45they are now flat for most recent to oldest and to see any one of them, you
06:49have to click and then you see the comment.
06:51Going back to the administrative interface, let's edit more ways that people
06:56comments in forum topics by clicking on Edit and Administer, Content types,
07:01scrolling down again to the Comment settings and clicking on that link. So,
07:07let's turn it back to Threaded list - expanded. You can change whether the most
07:11recent or oldest are at the top. You can change how many comments appear on a
07:15page, if more than this many comments are on the page, there will be a link at
07:19the bottom that says More, which users can click on to see the older or newer
07:23comments.
07:25Finally, we can change Comment controls. I am going to turn these on above the
07:29comments so you can see what a difference it makes. Scroll down and say Save
07:34content type. So, we have changed whether for not Fishy Joe can affect how he
07:39sees comments. Let's go back to his account and click on that forum topic to
07:45see if the change is good. And indeed, he can now whether or not he sees that
07:49as a flat list or he sees it as a threaded list - collapsed, how many comments
07:54per page he sees and so forth. If he clicks on Save settings, then there you
07:58see it. There is this collapsed list, which is threaded just as he wanted it.
08:03There's one more thing we can do as the administrator to display comments in an
08:06interesting way. Let's go back to the administration interface, click on
08:09Administer and then to Blocks. There is a block that is installed by default
08:15when you have the Commenting module turned on called Recent comments. We are
08:20going to move this into the right side bar along with those other things we
08:23have by clicking on that drop-down menu and moving up to right side bar and
08:28then scrolling to the bottom and Save blocks. Now, if you scroll down the side
08:33here, you'll see all of the other things we had to have before in addition to
08:37Recent comments, it shows only the title of the comment and how long ago it was added.
08:42If we go to Fishy Joe's, we'll see that the same it true. Scroll down the
08:47right-hand side and you'll see the recent comments. If you click on any of
08:51these comments, you'll go directly to it. Here's that why so much anger. Now,
08:56before we finish this video, I am going to go back and clean up all of those
09:00abusive comments by going once more into Administer, Comments and selecting the
09:07ones that I don't like, these two, and delete them. Yes, I really do. Finally,
09:14we'll look at the Approval queue and make sure that we have nothing there that
09:17was waiting for approval.
09:19As you can see, you have many options for controlling how comments appear on
09:23your Drupal site, including whether or not they appear in the first place. In
09:27addition, there are modules that will extend these features but Drupal's
09:31built-in features for handing comments should be able to handle pretty much
09:34everything that you need to do.
Collapse this transcript
11. Customizing Your Site's Appearance with Themes and CSS
Configuring your theme
00:01As a Drupal administrator, you'd have several levels of control over the theme
00:04that affects the general appearance of your site. In fact, you can do quite a
00:08lot with the six themes that are built into Drupal. Some of the things you can
00:12change, include the information shown at the top of every screen besides logo,
00:16the shortcut icon that's in the browser's address bar and whether member icons
00:20are included in posts and comments.
00:22The first thing that we're going to do is we're going to change to a completely
00:25different theme and you'll notice some very big changes when that happens.
00:29First of all, you may remember that blocks are actually theme per theme. So,
00:34all of the blocks that you've in this right hand corner are going to disappear.
00:38Let's do it now by going to Administer and Themes and then down to the theme
00:45we're going to use.
00:46Right now we're in Garland, but I think I want to change to Bluemarine. It
00:49seems appropriate for underwater realty. So, we click on Enabled to turn it on
00:54and then we click on Default, which makes that the one that shows up for
00:57everybody. Scroll down to the bottom and Save Configuration. Bang! Just as I
01:02said, the right hand column is disappeared because all of those blocks are gone.
01:06Also, you'll notice that the text up here which used to be very big Where damp
01:10basements are a feature, not a bug has actually become small and onto the next
01:14line. But basically, all of the content has stayed in the same place, we have
01:18this sticky story up here at the top, the poll that we had and so forth, all of
01:23the stories are there. If we go to the forum, we see that the forum poster is
01:28still there. They may look a little different, but the content is exactly the
01:32same.
01:32I want to return this to somewhat the same functionality as we had previously.
01:36So, I'm going to go to Administer and Blocks and now, you'll notice that
01:40Bluemarine is underlined. That's the theme that we're in right now where as
01:44before we were in Garland. If we want to see what blocks we were using in
01:48Garland, we'd just click on here and it will change the screen temporarily, so
01:53we can see exactly what it looks like with the blocks in place.
01:56We could then make a list here if we wanted to. Well. What order were they in,
02:00where did they appear and so forth, but we're not going to do that. We're just
02:03going to switch back to Bluemarine and we're going to rebuild the site as we
02:06want it. We'll scroll down and take a look at all of the different blocks that
02:10are available to us. Let's put our Active forum topics up in the left sidebar
02:15towards the top.
02:16So, we move that popup that way and as you can see, it popped it up into the
02:20place where it's going to go. Go back down to all of these disabled blocks and
02:24decide what else do we want. We still have recent comments on the right side
02:28bar. Recent blog posts as well on the right sidebar and we've decided we're no
02:33longer running that promotion we were running before. So, we'll leave that
02:35disabled.
02:37We'll put the poll in the right side bar as well and then News from Google at
02:41the bottom there. If we scroll up here, we can rearrange exactly where those
02:46blocks appear by grabbing these icons and dragging them as we like. I'm going
02:49to put the News at the bottom and make sure that the poll is at the top,
02:53because I like the way it looks. We'll move the Active forum topics down below
02:57our navigation menu.
02:58Again, I'm just playing around here; you can setup the site however you want.
03:03We'll scroll down to the bottom and Save Blocks. There, now we'll go back to
03:07our homepage, I like the way that looks. We'll keep it that way. But there's
03:11much more that we can do within the theme itself, to find out, we click on
03:15Administer and Themes once again. Now remember, we're in the Bluemarine theme.
03:20So, I'll click on configure next to that theme. From here, there are many
03:24changes that we can make. One of them is we could put user pictures in posts.
03:28You may remember from the Profile settings that individual users are allowed to
03:32upload pictures of themselves if we permitted them to as we did. Let's put that
03:37in posts and in comments. Now, this search box is not available.
03:42First we're going to go down and save this and then I'm going to make that
03:45search box available by turning on the Search module. So, we click Save
03:49configuration, Administer and back to Modules. As we scroll down we'll see,
03:57indeed, there's a Search module that we can turn on and save. But you'll
04:02notice, it still hasn't showed up in this theme and I'll go to the front page
04:06to see you can see that.
04:07It doesn't show up anywhere on that page because we've to make it appear in the
04:11theme, again we go Administer and Themes and configure Bluemarine which is our
04:18current default theme. Now, we can click on the search box and make it
04:22available. Scrolling down further, we're going to add a couple of things. One
04:27of them is the default logo up here, this is actually the Drupal default logo
04:33and much as I love it, it's not appropriate for our site.
04:36The same goes with this little thing in the address bar, which is known as the
04:39shortcut icon. I've prepared two icons, which will fit in those places, and
04:43you'll find them if you're a subscriber to lynda.com as a premium member or if
04:47you receive this course on a disk in the Exercise Files. Scrolling down to the
04:52bottom, we're first going to change the custom logo. We'll choose a file by
04:57clicking on Choose file. In our case, it's in Chapter11, in the first video and
05:03it's called 11_01-logo.jpg, click on that and then click Choose.
05:09We also want to make sure we don't use the default logo since we're uploading
05:13this one. So far with added user pictures to posts and comments, we've added a
05:18search box and we've changed the default logo. That's a lot to do at once, so
05:22let's save the configuration and see how that looks. Aha! There's our new logo
05:28and there's our box. One more thing we're going to do is to change that little
05:32shortcut icon, so it's no longer what's called the Drupalicon. Instead it will
05:36be something that we like.
05:38So, we'll scroll down and do the same thing for the shortcut icon settings.
05:42Again, we choose a file and it's in 11_ 01-shortcut.jpg. This file should be 16
05:50pixelsx16 pixels and while it doesn't look like much here, you'll see when it
05:55shrunk down, it looks very much like our logo. We click on Choose, remember to
06:00take off the default shortcut icon and Save Configuration and there it is, it
06:05echoes our main logo.
06:07What about that other setting we made which allows people to show their user
06:11pictures in posts? Well, first of all let's go back to the main page and see
06:15where such a thing would go. Here we have a post by admin, here is one by
06:20fishyjoe, here is another one by admin. We've a lot of posts on this site by
06:24admin. So, in some admin, I'm going to upload my picture so that we'll see it
06:29next to all of those posts. To do so, I'd go to my own accounts and edit it and
06:36scroll down to the bottom where we have a place where we can upload a picture.
06:39Choose the file and once again in our Exercise Files, we've something called
06:44Admin icon. Yes, that is me. Sad I know. We'll choose it and save it. Now,
06:55let's go back to the front page and we'll see my picture next to all of my
06:58posts, it looks good. Now, there is one feature on some themes, which isn't
07:03available on this one, but I'm going to show it to you. If we go back up to the
07:07top of the page and go to Administer and then back down to Themes, let's choose
07:13the Minnelli theme.
07:14The Minnelli theme has an unusual feature which is based on some programming
07:18called farbtastic that lets you change colors. Scroll down, Save Configuration
07:24and let's take a look at the configuration options for Minnelli by clicking on
07:28Configure. If you see this color wheel, we can actually change the color set
07:34that appears. This one is called Cold Day and it has all sorts of blues, there
07:38is a sort of green theme here.
07:40Let's leave the green one on, just to see what it looks like. Scroll down to
07:43the bottom and Save Configuration. There we have it. As we go through the site,
07:48you'll see that everything has changed, the colors of the links and so forth
07:52based on that theme. However, since we didn't upload our special icon here or
07:57move the blocks over, everything else has been removed. I'm going to go back to
08:00Administer and Themes and switch back to Bluemarine, just so we can get back to
08:06where we were.
08:07Scroll down to the bottom and save configuration. Finally, we will take a look
08:11at what it looks like in our friend fishyjoe's account. He's logged in the
08:16Firefox browser. Click on the icon to bring us back to the homepage, boom! He
08:22sees it pretty much the way we do. Finally, let's say you want to make changes
08:26that will affect all of the themes on your site, so that people can move from
08:29one theme to the other and still see for example this slogan, Where damp
08:34basements are a feature.
08:35We'll go back to our Administrative interface, go to Administer and Themes once
08:41again and click on Configure. You'll notice we've Bluemarine, Garland,
08:46Minnelli, the three themes we turned on, but we also have this Global Settings.
08:50If we wanted user pictures in post to appear in every theme including themes we
08:54add later, we'd check this here and that would apply to every new theme that's
08:59added to our system. We're not going to do that, so we'll just scroll down to
09:03the bottom and say Save Configuration again.
09:07On second thought, I don't like having my picture on every post; it's a little
09:11too repetitive. So, we can go back at anytime and make any changes we want by
09:15going to Administer, Themes to whichever one is the default, in this case
09:20Bluemarine and let's remove that in posts, but we'll keep it in comments.
09:24Scroll to the bottom again and save configuration. Back to the homepage and
09:29there we go.
09:30Finally, when you're done messing around with the configuration, I'd like to
09:34encourage you to look once again at your site and see if it looks as good as
09:38you really wanted. When I look at this site for example, I see it's not
09:41perfect, but I know I can make it better with just one or two small changes.
09:45The one change I can make very easily is to get rid of this dark blue block in
09:49here. You might remember, this is the mission statement and we can just take
09:53that out of this theme by going to Administer, Themes, Bluemarine, Configure
10:00and remove the mission statement.
10:02Scroll down to the bottom and say Save Configuration. Now, that's something
10:06that only shows up on the homepage. So, we'll go back to the homepage here and
10:11good, it's gone. I rather like that better because then the most important
10:14thing in the page is this title up at the top which is what we really want to
10:18say to somebody. Let's go and take a look at how it looks on fishyjoe's account.
10:22Once again, we switch to Firefox, click on the logo and it's gone, good. I want
10:27to show you one other thing. We've been switching back and forth between Safari
10:31and Firefox for a while and if you switch back and forth, you'll notice that
10:35they look very slightly different. You see it especially in the type, look at
10:39the type Welcome to your new home as I switch. It grows in shrinks and the
10:44layout sort of grows in shrinks as well.
10:47Your site will look slightly different depending on several factors. For one,
10:51which browser you're using, for another, the computer you're using, whether
10:55it's a Mac or PC or some other platform, third, the resolution of the monitor.
11:00So, I'd recommend that everybody take a good look at their site on several
11:04different monitors in several different computer configurations and several
11:08different browsers.
11:10The options you've to change a theme through its configuration windows really
11:14only scratch the surface. For more profound changes, you can change a theme's
11:18graphics or Style Sheets or just download a whole new theme. But as you can see
11:23you can do a lot with the themes that are built into Drupal.
Collapse this transcript
Changing your theme's graphics
00:00Drupal's web based interface lets you change a few basic bits of your site's
00:03appearance through the theme administration page. But sometimes, you want to
00:07keep a theme's basic layout and typography, but just change a few of the
00:11graphics it came with. I found that's often the case when I download third-party themes.
00:16Note that you'll need right level access to your server folder where the Drupal
00:20installation is location. If you don't have that already, talk with your system
00:24administrator before going forward. The first thing that we're going to do is
00:28we're going to switch to another theme. We'll go up to Administer and Themes
00:34and the one we'll select is called Pushbutton.
00:37We're going to use this one because I happened to know that it contains a lot
00:41of additional graphics including some that we can change. Go to Save
00:44configuration and there we are, this is the Pushbutton theme. You see at the
00:49beginning of every block, we have this little arrow up here and I want to
00:52replace that with something a little bit more colorful. So, that's what we're
00:55going to do.
00:56To do so, we have to go to the Drupal installation directory. I go over here,
01:01click on Finder and go down to hide others, so I can see my desktop. I already
01:07have my Drupal folder open here. For me, that's in the Sites directory, but for
01:11you, it will be wherever you first install Drupal. I also have opened the
01:15folder that contains the Exercise Files. This is the graphic that we're going
01:19to use in place of the one I just pointed out.
01:21Let's go back to our Drupal installation directory and find all of the files
01:25that make up that theme. You'll find them in themes, Pushbutton. Then to make
01:30this a little bit easier to figure out, we'll sort by type of file, right up
01:34here. Make the window a little larger, so we can see everything. Since it's
01:39sorted by type of file, all of the cascading Style Sheets for example are in
01:43one place, all of the graphics are in one place and all of the PHP files that
01:50describe pages within this theme are in one place.
01:53Looking around, I just graphically see, ah! That looks like the one that I
01:57want. Let's see if there's any other that looks like that. No, that appears to
02:02be the one I want. We could just do this by trial and error, by dragging this
02:06into its place. But I'm going to show you another way to figure out, if that's
02:09actually the graphic that you want.
02:11To do so, we go back to our Drupal administration. On the Mac, I'm doing that
02:16by hitting Command+Tab and going back to the web browser. We're going to look
02:21at this page in its source, we know that this graphic is right next to the word
02:25Admin which is right above the phrase My Account. We go up to View and View
02:30Source, wherever it is on your browser and then I'll just quickly do a find by
02:34hitting Command+F or Ctrl+F and search for that phrase, My Accounts.
02:39Aha! Now we see here that admin is between some H3 tags, I'm going to guess
02:46that that's actually the tag that controls whether or not that little graphic
02:50appears. If you're good with CSS, you may want to dig further as it happens,
02:54I've researched this one already and I know that that's the place. We'll close
02:58that out and then go back to our Finder. Hide everything else and take a look
03:04at the CSS files that make up this theme.
03:07Scroll down until we find it, there they are at the bottom. In every theme,
03:11you'll have one main CSS file called style.css. In this particular theme, you
03:17also have style-rtl. That means right to left, for when people are using an
03:22alphabet that goes from right to left such as Hebrew. We'll open this up in a
03:26Text Editor and now I'm going to search for that H3 tag and see if that's where
03:30the graphic actually is.
03:32I hit Command or Ctrl+F, type in H3 and find the next one. Well, we don't see
03:37any graphic showing here, so let's find the one after that. We don't see any
03:41graphics there, so we keep going. Aha ! Here we have a graphic showing up,
03:48icon-block.png. Is that the same one we identified before? Scrolling up to see
03:54it, yes it is. We throw that away either by dragging it to the trash or on the
03:59PC, right clicking and choosing Delete.
04:02We then go down to the graphic we have and give it the name that we need, in
04:06this case icon-block.png. Very good, now let's go back to our site and see if
04:12that change actually took place. All we need to do is reload the page and
04:18Walla! We've changed the little graphic. The same is true for the other
04:22graphics on the site. It may take a little bit of detective work to figure out
04:25what the graphics are, but once you can do that, you can change pretty much
04:29anything you see in any theme on Drupal.
04:32Before we finish, I'm going to go back and change our theme back to Bluemarine.
04:39We save the configuration and we're back where we started. The last step in the
04:43process is to play with the results until you like what you see. Ultimately,
04:48you might decide that you need a completely different base theme or a different
04:51configuration of the theme you have.
04:53But now you have all the tools that you need to change your theme and its
04:57graphics.
Collapse this transcript
Finding and installing a new theme
00:00Let's say you have played around with the four basic themes and two variations
00:04that were installed with Drupal, but still aren't satisfied. There are many
00:07other themes that you could find on drupal.org and themegargen.org that are
00:11free and available for download.
00:13Once you found a theme you like, you will need to download it to the themes
00:16folder in the Drupal installation on your server and on packet from it's
00:20compressed format. You will need right level access to that folder. If you
00:23don't have it already talk to your system administrator before proceeding.
00:27Once there, a few touches in Drupal web -based administration pages makes the
00:31theme available and further tweaks/ configure it to your liking. To take a look
00:35at themes we are first going to go into Administer and Themes. From this page
00:40of course you see a list of all of the themes that you have available to you
00:44that is the ones that are installed in your Drupal folder.
00:46You will also notice this line here: To change the appearance of your site a
00:50number of contributed themes are available. That link goes directly to the
00:53drupal.org web page, which has a list of themes. If you are logged into the
00:58site, you can filter those themes by the version of Drupal that you have and I
01:02recommend that you do that because the earlier versions of Drupal themes won't
01:06work with your current version and in fact there may even be versions after yours.
01:10For example 7.whatever while you have 6.whatever.
01:14Besides the drupal.org site, there is another sites that has many themes. It is
01:19themegargen.org. themegargen.org has one advantage which is that you could see
01:24the theme very easily simply by clicking on it. It reloads the Theme Garden
01:29site itself into that theme. Wherever you go to find your themes, I recommend
01:34you spent a lot of time going from one to the other and become familiar with
01:38the similarities and differences among them as well as what might work best for you.
01:42Try to ignore the large graphics that you see because of course those can be
01:46changed very easily and we will tell you how to do so elsewhere in the series.
01:50Let's talk a little bit about qualities that differentiate themes. This one is
01:54a two-column theme with the side bar on the left. That's the more common format
01:59although you do sometimes find them with the column on the right as in this
02:02theme Andreas. Here is that column on the right.
02:05In three column themes, there is still some variations as to where the columns
02:08can go. We have already seen the three- column theme which has a left column and
02:12a right column but that's not always the case. For example, the Marinelli theme
02:17has both columns on the right and the main content area on the left. One other
02:22thing that differentiates themes one from the other is whether there are fixed
02:26or fluid columns. I can show you what I mean by going to a theme called
02:30lightfantastic. As we change the size of the window, we can tell that it's a
02:34fixed column theme because as we bring the window in, the right column just
02:38gets cut off and the center column eventually gets cut off as well without any
02:42change to the layout.
02:44On the other hand a fluid column theme such as nista will change the way it
02:49looks as you move the sides of the window in and out. So that everything stays
02:52on the page, just like that.
02:56Some other features that differentiate themes or whether or not the theme is
02:59re-colorable. We have already seen that and in fact our default theme garland
03:04is re-colorable. If you go into configure garland you will see a color wheel
03:07that will let you change the color of, for example the header area and the
03:11links and so forth directly from the theme. You don't have to go and change the
03:15CSS or Cascading Style Sheets document as you do with other themes.
03:19Finally, there are themes which have additional areas. One example of that is
03:24this one called ability which I am showing in the drupal.org website. The site
03:28is having, it's three columns down here. It has two additional columns up here
03:33and in fact this one has more at the bottom. You can actually have many, many
03:37layout areas in a theme and in each one of those areas you can move blocks or content.
03:42Finally you may decide to go beyond drupal.org and themegargen.org and in fact
03:47there are commercial companies that offer Drupal themes, some of them for pay.
03:52To find them go to google.com and do a search for Drupal Themes. There you will
03:58find not only readymade themes but also service providers who will create and
04:02adapt themes for you.
04:04Okay, so we have decided that we want to get a new theme but how exactly do we
04:08get it. Well, that's actually very easy. We go to any of those places and we
04:13simply download it. I have decided that the theme I want to use is called
04:16Andreas 02. It was designed by Swedish designer Andreas Viklund who has kindly
04:21released the design for free for all users including commercial sites. And in
04:25fact many of these themes are released under the new public license or some
04:29other source license. So you are free to download and use them without paying
04:33any royalties and you are free to change them as you like.
04:36To find them, we are going to go to drupal.org/project/themes and in this case
04:43I know it's on the first page, I am just going to search for andereas02 and
04:48there we are. Now, we get to the fun part. Downloading and actually installing
04:52the theme. You download it by simply clicking on the Download link. There are
04:57small files typically less than 200k, so it shouldn't take long to download
05:01them. Once it's on you computer, go to your Desktop. On the Mac, I am doing
05:04that by clicking on the Finder and then hiding everything else and simply
05:08double-click on the Archive.
05:10That gives you a folder. That folder can go on one of two places on your site.
05:14You may think that new theme goes into that themes folder. But that's actually
05:18only for themes that came downloaded with Drupal. If you put it in there it
05:22won't be updated properly with Drupal 6's automatic updates.
05:26A better place to put it is in sites, default, assuming you are only running
05:31one Drupal site on your Drupal installation and in here in a folder called
05:35themes. However, the installer will lock this folder. On the Mac you can see
05:39that by this little cannot write symbol down here.
05:42So let's go back one and unprotect that default folder for a moment. On the
05:47Mac, you will do that by going up to File and Get Info. On the PC, you will
05:52right-click and get Properties. Then go to Sharing & Permissions. You have to
05:57unlock it and enter your password and change Read only to Read & Write. We are
06:03going to be changing this back though, so remember that you did that. As a
06:06reminder, I like to leave this window open.
06:10We can then go into that default folder, create a New Folder which we will call
06:14Themes and put Andreas02 into that folder. Now just as reminder we are going to
06:21go back, take default and make it Read only again and then close that window.
06:27All right, so we have installed the theme, but we haven't yet turned it on. So
06:31I am going to go back to my browser, close out this window and go to my site.
06:37To my case it's simply localhost. Go to Administer and Themes and there we have
06:44it. It shows up in our Themes List. I am going to make that the default. Scroll
06:50to the bottom and Save your configuration. We have a new theme that we have
06:55downloaded.
06:56As always when you switch to a new theme, the blocks that you had set up don't
07:00necessarily carry over, we do still have out Poll block here but you will
07:04notice the Navigation menu which we were used to having in the upper left-hand
07:08corner right handy is now at the bottom. So we will have to go back and do
07:12Administer and Blocks and change the blocks around however we want. We are not
07:18going to spend time doing that now, because we are eventually going to move
07:20back to the Bluemarine theme.
07:22Now just to check this theme, I am going to look at it as an ordinary user. You
07:26might remember our user fishyjoe. His account is open in Firefox. So I will
07:30switch to Firefox by hitting Command+ Tab on the Mac and reload the page. As a
07:36last step, I am going to go back and clean this all up, because I decided I
07:41really like the Bluemarine theme and I am going to stick with it. So I switch
07:44back to my administrative interface, going to Administer and back down to
07:49Themes, change to Bluemarine. Now there is one other thing, I am actually going
07:53to throw away the files that I just downloaded.
07:56So I click enabled to make sure that's it not enabled. If it is enabled then I
08:00throw away the file that could cause some problems, especially if for example a
08:05user has switched to that theme as their own personal choice and then found it
08:08wasn't working. I go down to the bottom and Save Configuration.
08:13Then I go back to my Finder, Hide others, open up that folder again, open up
08:19themes and I can just take this and throw it away. On the Mac that's done by
08:24dragging it to the Trash and on the PC by right-clicking and selecting Delete
08:28and then just to make sure I am going to go back and take a look at the site in
08:32fishyjoe's view by reloading the page.
08:35Yup, it looks exactly as before. For all the difference the theme makes, it's
08:40amazingly easy to download and install themes in Drupal and you can't do much
08:44damage to your site by trying them out one after the other. So when you are
08:48developing a site, get used to installing themes and be prepared to modify
08:52those themes so that they work best for you.
Collapse this transcript
Understanding Cascading Style Sheets (CSS)
00:00Drupal makes extensive use of Cascading Style Sheets or CSS to control such
00:05matters as type style, bulleted list, graphic placement and column width. We
00:10will show how a small style sheet change can have a big affect on your site's
00:14appearance, because CSS is so powerful we recommend you tread lightly when
00:19playing when playing with CSS files and always keep a backup copy so you can
00:23return to where you started if you make a mistake.
00:26CSS is a big subject and lynda.com offers much more information on both its
00:30technical side and using CSS for design. Visit the lynda.com site for several
00:35courses to continue your CSS studies. For this video we are going to be using
00:40the Firefox browser because we are going to be looking at a tool that only
00:44installs into Firefox and isn't yet available for safari at the time that we
00:48are making this video.
00:49The tool that we are going to be using is called Web Developer and you can get
00:53it chrispederick.com/work/web- developer. Once there, you would click to
01:01download and install it as you would any other add-on for Firefox. There is one
01:05other tool that is similar to Web Developer called Firebug, which also runs on
01:10Firefox. We won't be looking at it, but if you would like to check it out, it's
01:13at getfirebug.com.
01:16Okay, so let's take a look at our theme. We will close out this window and go
01:20back to our drupal folder. This will be in the same place as where you
01:23installed Drupal in the first place. For us, that's in our sites folder and we
01:28already have it open. The theme that we are going to be working on is the
01:32Bluemarine theme, which was installed with Drupal. So it will be in the themes
01:35folder as opposed to in one of the sites folders. We will open it up and open
01:40up bluemarine.
01:41The actual file we will be looking at is called style.css. In Drupal style.css
01:47is the main CSS file. However, it may call many others and you will see that
01:52when we look at this file in Web Developer. In this case style-rtl means right
01:57to left. Drupal supports many languages including those that read from right to
02:01left and often there will be separate style sheet for those languages.
02:05Generally speaking they will be labeled -rtl. Since we are going to be playing
02:10around with this style, we want to back it up. I am going to highlight it and
02:13press Command+C or Ctrl+C on the PC and then just paste it on our Desktop by
02:17hitting Command+V or Ctrl+V.
02:20Great! Now we can play around with this style sheet. To do so we are going to
02:24switch back to our interface here and turn on Web Developer by going up to
02:29Tools, Web Developer and CSS. There are two particular options here that I have
02:35found very useful. The first is View Style Information. With that turned on,
02:40when you point at any part of your website, you will see that it highlights the
02:43structure of the website and above in this little bar it tells you a little bit
02:48about the CSS that affects that part of the website.
02:51When something is highlighted and you click, Firefox opens a little window in
02:56the bottom, which is resizable. Inside that window, you will see information
03:00about the CSS that controls the part that you clicked. That's very helpful in
03:05figuring out exactly what you want to change, in order to change a specific
03:08part of your site.
03:09But there is another tool in Web Developer that will help you even more. Let's
03:13close this out first, go back up to Web Developer toolbar, turn off View Style
03:19Information and go down instead to Edit CSS. Again that opens up a little
03:26window at the bottom, which lists all of the CSS files that affect this page.
03:31Now you remember I mentioned style.css, but there are all of these other CSS
03:35files that helped to build this page.
03:38Some of them are called in by modules. For example, the forum module calls in
03:41forum.css and the styles that are listed in here only affect the forums. Going
03:48back to style.css, I am going to make this window just a little bit bigger so
03:51we can see some more. Here we can actually change specific CSS on this side.
03:56Now we are not making permanent changes. These are just temporary changes to
04:00show us what's going to happen if we make changes permanently.
04:03So for example, let's change background color. Instead of #fff, we will change
04:07it to #ooo. Wait a second and you will see that this is the part that would be
04:12changed. Another way that you can bring up that information quickly is let's
04:16say that it is not refreshing quickly enough for your taste. Type it in and
04:20then click on this little button here Apply and that will very quickly bring it
04:23up. To return your CSS files to normal, just click on this Reset All.
04:28Finally, once you have made the changes that you like, you can go up to this
04:31disk icon and say Save. Now make sure that you have the correct style sheet
04:36selected, it will tell you up here the name of the style sheet you are editing.
04:39Sometimes Web Developer will switch from tab to tab, especially when you do a
04:44Reset All. CSS switch to Aggregator, you will have to go back to style.css.
04:49We are going to save this style.css file as style-NEW.css, just so that we can
04:54keep it distinct from the old one and then click on Save. We will go back to
04:59our Desktop and hide everything else. Now let's say we want to apply this new
05:04style into our actual site. Well, to replace the style sheet, we would throw
05:09away the one that's in our theme folder. Remember, we did save a backup.
05:13I will drag that to the Trash. Of course on the PC you would use right-click
05:16and Delete. Drag this into the folder, rename it as the old one, style.css and
05:23there. We have been able to play around with style sheets and see exactly what
05:27in the CSS file affects the page and then installed a new style sheet.
05:32This video only touched on the very tip of the iceberg that is CSS, by changing
05:37one small attribute and in fact we have changed it back. So by replacing the
05:41file we didn't make any changes. But the truth is style sheets can affect
05:45Drupal theme appears much more profoundly than just about any other facet of
05:49Drupal development. For a Drupal webmaster, time learning CSS is time well
05:54spent.
Collapse this transcript
Deciphering CSS files
00:01One of the most effective ways you can customize a Drupal site to make it
00:04distinctively yours without installing a new theme is to tweak the theme CSS.
00:09However, a theme CSS or Cascading Style Sheets are typically contained in
00:13several files in a complex hierarchy that can be hard to understand.
00:18We will show you how some of your options for changing themes appearance
00:21through CSS are done through the Firefox plug-in tool, Web Developer, which we
00:26downloaded previously. To make these changes we are going to go into Tools, Web
00:31Developer, CSS and Edit CSS. This is taking CSS directly from the website that
00:38we are looking at and the changes that we make would not be permanent until we
00:42save them by clicking on this disc icon.
00:44In addition if we decide we want to go back to the original appearance we can
00:48do so by clicking on this Reset All button. Finally the page will update
00:53automatically after a few seconds, but if it is not or would like it to do more
00:57quickly we can click on this little icon to apply them immediately. As you look
01:01at the Web Developer interface you will notice all of the CSS files that are
01:05affecting this page are listed in tabs. The main one is style.css. Whenever you
01:11revert this using this icon it will switch back to aggregator and make sure go
01:16back to style.css so that you can edit the correct file.
01:20Now let us take a look at the file itself. The main part of any page is the
01:24Body tag, which you see here at the top of the CSS file. Things that you change
01:29within the Body tag will change pretty much the entire page. For example, let
01:33us change this font size from 76 to 90. Wait a second and you will see that all
01:39of the text on the page has changed. That is because the Body tag drools over
01:43most everything else on the page. Changing it will have some very severe
01:46repercussions. So let us change that back.
01:49Again I am hitting Command+Z or Ctrl+ Z on the Windows machine. Going down a
01:52little further let's be a little bit more specific. We are going to just change
01:57these links. You will notice right now there are certain colors and when you
02:00hover over them they become underlined. That is done through CSS. We are going
02:04to scroll down and here we have the A tag, one called a: link, one called a:
02:10visited and one called a: hover.
02:12The a: hover one, if you look at the CSS, you can see that that is where the
02:16underline is coming from. Let us change it to blink. Now let us see what
02:21happens. We have given it a second to apply, we go up over a link and you can
02:25see when you hover over a link now it blinks. That is ugly; I am going to undo
02:30that by hitting Command+Z.
02:32Continuing further down the page you can see how CSS affects the way that blogs
02:36are actually laid out on the page. We will scroll down until we get to this
02:41Page layout blocks/IDs. Let us scroll a little bit further and see what we can
02:46change. There we go header background color. Let us see what that changes. We
02:50will change it to something very different. Let's say 333. And we can see
02:55immediately it changes this top area.
02:57That is good to know because the color and dimensions of various layout parts
03:01of the page can have a big effect and differentiate your site from the original
03:06theme, but we are going to just change it back for now. I mentioned something
03:10about the dimensions of blocks and in fact that is something that CSS also
03:14controls. See this padding; let us take a look at what would happen if we were
03:18to change one of these to let us say, 6em instead of 1.2.
03:22Take a good close look and I will you give you a hint. This has to do with the
03:25Primary, Navigation links up here. We will change it to 6 and you see it
03:31changes the padding around those links. Of course we did not change it into
03:35anything more attractive so we will change it back. Finally I should mention
03:39something at the very bottom of the CSS sheet. We will scroll down. We have
03:43these Module specific styles. That is because Drupal comes with several modules
03:47built-in, as you know for example the Feed aggregator and the Blog module.
03:52As a result everything theme designer can count on them being there and
03:55sometimes they will add there own styles so that those modules will match the
03:58rest of the site. However they can be over written as you can see with these
04:02other modules specific style sheets such as poll and aggregator.css.
04:07Let us say that we have made some of these changes and in fact let us go back
04:11to our style CSS scroll all the way up to the top and let us actually change
04:15our font size, let us say that we do not like it being quite that big through
04:19out the entire site. I am going to change the font size from 76 to let us say
04:2570. It is a sudden change, but it allows you to put more content on your site.
04:29Now I am going to save that out. Now here is something important. Do not save
04:34it to the same place as the original style.css file unless you have already
04:38backed it up. If you do so of course you are going to loose your original
04:42backup and I recommend that you backup your CSS file. So I am going to save it
04:45to the desktop in this case and then I am going to apply it by dragging it by
04:49into my Drupal folder. Click on the Finder, hide everything else. If you are
04:53working with a downloaded theme you probably put it inside of sites and then
04:57either in all or default.
05:00I tend to put them in default and themes right here. In this case we are
05:04working with a theme that came by default with Drupal, so let us go back to our
05:07Drupal folder and just go into themes folder. Remember the ones by default are
05:12at the top-level themes folder. The ones you download should go into a
05:16subdirectory of your sites folder. Open up themes, open up our theme, which is
05:20bluemarine. I am going to make a backup remember. Call this one style-BACKUP.
05:24Then I will just drag this new style CSS in and let us see if that font size
05:33change occurred.
05:34We are going to switch back to Firefox, we can this up if we like so we can see
05:39the whole page and now reload by clicking on the reload icon here. As we can
05:43see our font change took, but we are going to revert it back by simply going
05:47back to the Finder, Hide Others throwing away our new style sheet either by
05:51dragging it to the Trash in the Mac or right click delete in the PC.
05:56Change this back to style.css then go back to Firefox, reload one more time and
06:03we are back to normal. We have only touched a little bit of CSS. If you want to
06:07learn more Lynda.com offers much more information on both its technical side
06:11and on using CSS for design. Visit the Lynda.com site for several courses to
06:16continue your CSS studies. Besides the Wed Developer plug-in there are many
06:21other ways to work on CSS files.
06:23Once you are good enough at understanding them you can use a plain text editor
06:27or you can edit them graphically in a general web developing tool such a
06:30Dreamweaver or Adobe GoLive or you can download a specialized tool such as Coda
06:35for the Mac. However you do it, until you become you CSS expert remember to
06:40respect its power and complexity. Keep your changes small and controlled and
06:44always make a backup first.
Collapse this transcript
12. Expanding Your Site's Capabilities with Modules
Finding modules
00:00If you have been impressed by Drupal's default installation, hold on to your
00:04seats because there is a lot more available for Drupal to extensions that are
00:07known as Modules. The central repository for all Drupal Modules is, like some
00:12many other things for Drupal, at drupal.org. Once on the site click on the
00:18Download tab and then on Modules. Hundreds of Modules are available here all for free.
00:23Let us take at some of the ways they extend Drupal's functionality. When you
00:28first arrive at the Modules page you will notice a list of categories for the
00:32different modules. The number next to them tells you how many of that
00:36particular category there are. However I should mention that these are for all
00:40versions of Drupal and a module that is written for version four or five would
00:43not work for version six.
00:45However, most modules that are built for 6.1 will work for 6.2 and continuing
00:50on up. I would be sure to filter by Drupal core compatibility however. You can
00:55do that up here, but first you must log on. I am going to do using an account
01:00we created. I suggest that you do the same by creating an account. You can do
01:04so by clicking on this Create New Account link, but for right now we are going
01:08to log in ourselves.
01:13Now we are logged in and as you can see we can filter by Core compatibility. I
01:17go down to 6.x and say Filter. You will notice the number of modules available
01:22has changed. I should mention that some modules fit in more then one category.
01:27For example, a module that protect against user abuse, might be find in both
01:31Security and User management. You can find a specific module by going up to the
01:35search box bar and searching for it.
01:37Let us look for bitcache, which I happen to know is the name of one of the
01:40modules. And there it is however we should mention that sometimes drupal.org
01:46will turn off the search box when the load is too high. So we will go instead
01:50to Google search for bitcache and if you want to search just on the Drupal site
01:56you can do site: drupal.org.
01:59And there it is. If you want to be even more specific you can say, search for
02:03drupal.org/project. That will leave out some of the pages that might be for
02:10example in documentation. But let us go back to the drupal.org page and take a
02:14look at some of those categories. To get there again we go to
02:17drupal.org/project/modules. Most of these categories are self explanatory. I am
02:26going to talk about some that are not quite as clear to the first time user.
02:29The first one is CCK. This refers to something called the Content Construction
02:34Kit which lets you create your own Content types with special type of fields
02:39for example, for location or time or date. We will be talking about that more
02:43in a separate video. A second category whose name is not completely obvious is
02:48Organic Groups. Organic Groups allow members to create their own online clubs.
02:53For example individual members of a site about cars might set up affinity
02:57groups for owners of electric vehicles or thunderbirds.
03:00This is a common feature of such popular non-Drupal sites such as Facebook,
03:05Myspace, triab.net and Live Journal. Another category that is not completely
03:11obvious to the first time user is paging. Modules in the paging category change
03:16the way the pages are displayed and many of the modules in here are also in the
03:20content display category. The RDF category stands for Resource Description
03:26Framework. This is a very geeky system for data sharing and you almost
03:30certainly would not be using these modules unless you are already an Advanced
03:34Developer or Data Manager.
03:36Finally there is a category called Views. Views offer different ways to display
03:41information from multiple nodes in an organized way. We will be showing you how
03:46to use views in another video. Let me show you an example of what a module can
03:50do. For this I am going to go to my own web site, savemyhomebook.com and from
04:00there I am going to go to Events.
04:03On this site a keep a calendar of upcoming events and as you scroll down you
04:07can see that I have a speaking engagement on the 23rd. When you click on that
04:11it goes to a note that describes more about that speaking engagement. This
04:14entire calendar was created using a module. The module itself is called
04:19calendar. Let us go there now. We will go back to our Modules page and find it
04:25in Content display. As we scroll down on this page, there it is.
04:34We can find out more about the module by clicking on Find Out More or of course
04:38we could download it directly from that download link. I do recommend that you
04:42read up on the module before you download and install it because unlike themes
04:46modules can actually cause some real problems with your site. Further some
04:50modules are not completely obvious about how they work, that is they do not
04:54have a clear interface within Drupal.
04:56You may have to download other modules to expose what that first module does.
05:01So reading up is a good idea. Finally for any of these modules you should
05:05scroll down and make sure that the compatibility is what you want, what you are
05:09looking for is an up to date module that is not still in development that is it
05:12is been released it is been tested by the people who have programmed it and by
05:16it user.
05:16We will scroll down on this one and make sure and this one in fact is in beta.
05:23There are few different levels there is beta, alpha, RC which stands for
05:28Release Candidate and DEV which stands for Development. As a guide the
05:32Developers will put a check mark if they feel that it is ready for prime time
05:36that is if it is safe to download and install. If they are not really sure they
05:40might put one of these warning triangles and if they feel that this it is not
05:43supported any more or might be dangerous to use they will put it in red. So be
05:47careful of those.
05:49When you are looking at modules you might be overwhelmed by the selection that
05:52you have. So, which one should you use ? Well there are two ways to find out.
05:56First you can look for modules only when you have a specific problem that you
06:00want to solve. Second you could consider the most popular out there and those
06:05that are recommended by the other people and for that I recommend the web site
06:08drupalmodules.com. There you will find a directory of top favorites that is the
06:13once that people have said I like this the most and those that have been
06:17downloaded the most.
06:18But for now let us go back to our web site. Once you start dipping in to the
06:24pool of modules you will come to see Drupal's default installation as being
06:28only a very bare bones plot of lands on which to build your castle.
06:32I encourage you to experiment with modules but, and I have to emphasis this, only
06:37on a test site. Some modules can conflict which each other and in any case
06:41adding lots of unnecessary modules will complicate your site both from the
06:45users prospective and from yours. But on your test site be bold and make backups.
Collapse this transcript
Unpacking and installing modules
00:00While modules vary tremendously in function, dependencies and configuration options,
00:05they all get on to your server in the same way. You need to download
00:09them to a modules folder and your Drupal installation on your server, which
00:12means you will need right level access to that folder. If you do not have it
00:16already talk to your system administrative before proceeding.
00:20First let's go and take a look at some of the different stages of modules
00:23because we need to get those only that are secure and reliable. At the bottom
00:29of each module description you will notice a list of releases this one has only
00:33one, but you will also notice it has a suffix. That suffix will either be
00:37alpha, beta, def or RC.
00:41This one, for, example is alpha. Alpha is the stage before beta, and an alpha
00:45release means that it might be okay but we are really not sure about enough
00:49about it to release it to the general public even for testing. So, be careful
00:53with alpha releases. The second kind is beta, beta stage means that it is not
00:58quit ready for release, but the developers believe that it is secure enough to
01:02be tested by the general public.
01:04The third stage is known as dev. In this case the version is at dev. That means
01:10that it is still in its development and they do not recommend that you use on a
01:14production site. In fact it's only intended for the developers to use so that
01:18they can fix problems. Be extremely careful when using modules that are this stage.
01:25Then we have RC. That means release candidate. It is the last stage before
01:30something becomes stable and release to the public as though it were a product.
01:34So the stage is go dev, alpha, beta, RC and then the final. Now that was gone
01:41through that, let's look at its specific Drupal module. To go to it we go to
01:45Durpal.org of course and then to Download Modules.
01:52We have decided to protect user by preventing online robots from easily
01:56collecting their email address. So even if a user types in tom@example.com, it
02:01will appear on the site and in an obfuscated way. The module we want to add is
02:05called Spamspan. I'm going to just find it quickly by searching here and we
02:12find everywhere on the site where the words Spamspan appears. I am going to
02:15click on one and eventually I found the module.
02:18I happen to know that this one is also in the security category. Once you get
02:22to a modules home page you will notice several things. First there will be a
02:25description of the module appear. The second thing is releases, as we
02:29described, and as you scroll down further you see quite a few resources,
02:34documentation, the license that governs the module and sometimes you can even
02:38try out a demonstration. Clicking on that will go to an outside web site
02:42where the module has been installed and you see actually how it works.
02:45I do recommend looking throughout the page, especially if you have any problems
02:49with the module. Very often you will find information that will help you through it.
02:52Once you have read all of that all you need to do is download the module.
02:56You go up to the download link that is next to the version that you want, in our
03:00case the one for 6.X. Click on Download. Usually does not take very long,
03:04they are very small files, and then go to where ever you downloaded the file.
03:08In our case it is on the desktop.
03:10I will click on the Finder and say Hide Others and there is our file. I will
03:14double click on it and it expands into a folder. The next question is where do
03:19we put this folder? The obvious place is modules but that is not actually the
03:24best place to put third party modules. That location is reserved for modules
03:29that were installed by Drupal itself. If you put them in there, then they won't
03:33be undated when Drupal does its update process.
03:36Instead, as with themes, you go into sites and then put it in either All, if
03:41you want it to be available for all sites on a multi site installation, or for
03:45our purposes we only need to put it into default. We will open that up and we
03:49will put it into a folder called modules. I should mention that you need to
03:53call this folder modules with a lower case M, just as you needed to called the
03:57themes, with the lower case T. There is one problem though.
04:01We cannot create that module folder until we make this directory writable. It's
04:06not at the moment because Drupal has locked it in order to protect the settings
04:10file. So, we are going to go up one level. Again, see we can see the default
04:14folder there, we will select it and then we will get info on that. On the Mac
04:18you go up to File > Get Info. On the PC you would right-click and select
04:23Properties.
04:25You may have to enter your password in order to unlock that folder. We will do
04:29that here and then change Read Only back to Read and Write. We are going to
04:34change that back to Read Only before we are done. So, I am going to leave this
04:37window as a reminder. Now we go back into default. I will create a new folder
04:44and call it module and there we will put out Spamspan module.
04:51Very good. Now again I am going to go back and change that to Read Only and
04:56close it. Now, we go back to our Drupal interface, I will hit Command+Tab to go
05:01back to our browser. We can close our Download window, close the other windows
05:06we have open and switch to our site. As with any other module you would go to
05:10Administer and Modules and scroll down.
05:15You may have noticed that there are these groups. This one is called Core Optional.
05:20This group of modules when you first install Drupal but they are necessary for
05:24installation. You can close this group if you like by clicking on the link.
05:29Core Required those that were installed by Drupal and you can not turn off
05:33because otherwise Drupal won't run. We will close that and we have our Spamspan
05:37right here. We still more information and this is very interesting. It tell you
05:41what it depends on, what other modules have to installed.
05:45Sometimes you will download a module and it will say, depends on such and such and it
05:49will say missing or disabled. You will have to obviously get that module or
05:53turn it on before this one will work. In this case we do not have to turn down
05:57any thing else. So, we will just click Enabled, Save Configuration and it is
06:02been turned on. The next step of course is to configure which we'll do by going
06:06to Administer and By Module, but we will get into that in another video.
06:11When you see all that modules can do you will have to resist the temptation to
06:15just grab a bunch and enable them all. I sure know I do. But I recommend you
06:19download, install and then thoroughly test only one at a time before going on
06:24to another one. That will keep your site safe, stable, and secure.
Collapse this transcript
Configuring modules
00:00There is a wide variety of modules available to extend Drupal's functionality
00:04and they all have different configuration process. Some have no obvious
00:09interface within Drupal administration interface while others require extensive
00:13tweaking both in admin Interface and on the server. We will show you a typical
00:17configuration process using a module we already downloaded and installed called
00:22Spamspan. If you have not installed it and would like to follow along your own
00:26Drupal installation download it now from Drupal.org.
00:30Just to give you an idea of the different types of configuration we are going
00:34to look very quickly at some other modules and describe how they are installed.
00:38The first one is called Guest Book, this one is as simple as it comes you put
00:43it in to your modules folder and it has a single page where you can configure
00:47everything that you need. Second module is called Weather, this one is similar
00:52to Guest Book and that you just add the permissions and then change one page,
00:56but here is the thing once you have done that you might wonder well, where is
00:59evidence that the module is installed.
01:01What it actually does is create a block that you then have to put on your page
01:05in one of your page's zones. The third module is the token module and this one
01:10is widely used, however it has not interface of its own other modules rely on
01:15the token module in fact we will force you to download it before you can use
01:19those other modules.
01:20However it has no permission of its own and no interface. Finally we come to
01:26Spamspan which is comparatively simple but it does have its own quirks that
01:30require reading the documentation. We are going to walk through this one. To
01:35configure this we go back to our site and click Administer Modules. Make sure
01:42that is turned On we can do so by closing up this to hide all of the core
01:46modules and there we see our Spamspan module and we have already turned it on.
01:51We do not have to turn it on again but if you have not you should do so here
01:55Then we go up to administer again and we can look through here for the Spamspan
01:59module. I am going to search for it on this page by hitting Command F on the
02:03Mac or Ctrl+F on the PC. I search for spam, find nothing. Let's go into By
02:09module and scroll down. We do not see it there either. We better go back and
02:19read the documentation, so switch back to SpamSpan page and as we scroll down
02:25we see Read documentation.
02:26Let us take a look. A quick read of this shows okay, the first two steps are
02:31the things we have already done. Download it, and put it in the correct place.
02:35But here is something you have to actually configure input formats to enable
02:40the filter, so after it installs you do not administer it directly but rather
02:43by administering input formats.
02:45Let us switch back and try that. So we will go back to top of the page,
02:52Administer, scroll down to Input, right there Input Formats and then what the
03:01documentation said was to enable it in which ever filters you want. I am going
03:06to put it into Filtered HTML by clicking Configure as the instructions told me.
03:10As I scroll down I see this new check box Hide e-mail addresses. This is the
03:18thing that SpamSpan actually added, but you would not have known that if you
03:22did not read the documentation.
03:23I will do that now and save configuration. In addition to the four types of
03:29configuration we described here there are also modules that require signing up
03:33for outside services, modules that require several downloads and modules that
03:38require substantial tweaking on the server itself completely out side of
03:41Drupal's Administrative interface. As always you will gain the info you need
03:45and confidence by reading the modules documentation.
Collapse this transcript
Implementing complex modules
00:00This video will give you an introduction on how to install some of Drupal's
00:03more complex modules. These generally require installation of several modules
00:08and some require considerable additional tweaking. We won't discuss their
00:12configuration at lent but we will instead give you an overview of such modules
00:16just to give you peak into some of the amazing things Drupal can do, if you are
00:20willing to spend sometime learning about these modules and the ecosystems that
00:24have grown up around them.
00:25The first module we will be showing is called Google Analytics. The Google
00:29Analytics service allows you to keep track of who is visiting your website and
00:33what page is they are going to before and after they reach a particular page,
00:37it has many features that are extremely useful for web administrators
00:40especially those who want market their sites and improve the efficiency and
00:44effectiveness of their sites.
00:45We have already downloaded this so we are going to install it. So we will
00:49expand it and drop it into our folder, then we go back to our Administrative
00:54Interface. To administer we will first of course go to Administer, Modules and
01:00turn it On and then click Save Configuration. Now we will go up to administer,
01:08but what is this we see in error. Let us take look at the status report as it
01:12suggests.
01:14We go down and notice that it says about the Google Analytics module it hasn't
01:17been configured yet. This is unusual for a module, usually if it hasn't been
01:21configured it does not tell you it just sits there and does not add any
01:24additional functionality, but this one is decided its important enough that you
01:27turn it On. So let us go to the setting page and here it shows that it requires
01:33us to enter an account number.
01:35For this particular module you must already be signed up for the Google
01:38Analytics service, which is at google. com/analytics, before you can use this
01:43module. We wont take you to the whole configuration instead we are just going
01:47to go back to administer, modules and turn it Off. But of course if you wanted
01:55to use it you would go through the complete process of turning it On and going
01:58to Google Analytics and entering your code.
02:03The second module that we are going to show is called Pathauto. Pathauto will
02:08automatically add user friendly URLs to any nodes that you create. It will look
02:12to through content of the node and try to figure out what it is about and then
02:16it will change the node's name to whatever it decides. We have al ready
02:20downloaded this so we are going to unpack it and install it and then of course
02:28go back to our administrative interface.
02:30Refresh our module list or go to Administer and modules, scroll down to the
02:37bottom or close up the core ones at the top so that we can see what is at the
02:40bottom and there it is Pathauto, but we can not check it to turn it on and why
02:45is that? If we look at its dependencies down here, we will see it depends on
02:49path, okay that is enable that is part of the core, but it also depends on
02:52token and we never downloaded that, okay we will have to go back to the
02:56drupal.org web site downloaded and turn it On.
03:00So, here on drupal.org we go and find the token project downloaded, un pack it
03:05by double clicking and install that one, of course we now have to turn it On so
03:10we go back to our web site and then have to enable it. So, we will go back up
03:14to administer, modules, close up the course so we can see what the bottom of
03:21the screen and there is token. Now, this is interesting even though we
03:25installed one module it adds two check boxes.
03:28I am going to check both of them for now but of course you would read all of
03:31the documentation to understand what the different check box is mean, click on
03:36Save Configuration. Now, let us take another look and see if we can turn on
03:40Pathauto, close up the core appears, scroll down and now we can check Pathauto,
03:47scroll down to the bottom and save the configuration.
03:50Finally we have the Ezmlm module. This is a module that requires tweaking on
03:55the server completely out side of the Drupal interface, further it requires
03:59installation of an additional program, we are not going to go through the whole
04:03process because as I say it is quite complex.
04:06Finally there is one more thing that we need to do we been playing around with
04:10a lot modules in this video and we should turn them Off and un install them, to
04:14do so go to your module's page by of course clicking on administer and them
04:19modules, scroll down or close the core box at the top so that you can see what
04:25is at the bottom and then just turn them Off, but you will notice that you can
04:29not turn Off the tokens one until you have turned Off Pathauto, because
04:33Pathauto relies on tokens.
04:35So, we will turn these off say save configuration and then turn off SpamSpan if
04:41we had left it on. And token, click Save Configuration again and once all of
04:49those are turned off you can go back to your Drupal installation folder and
04:53throw away all of the folders that contain the modules that is in your module
04:57folder.
04:57We are getting in to some pretty deep territory with these complex modules but
05:03believe me some are even more complex, for example CiviCRM is a complete system
05:09for non-profit and advocacy groups. Digg is a Drupal based invitation of the
05:13famous digg.com site and organic groups allows member to create their own clubs
05:18and all of these require quite a lot of configuration. But do not be afraid,
05:22the bases that you have got in here will provide you a firm base to implement
05:26any such system.
Collapse this transcript
13. Identifying Must-Have Modules
Ensuring automated updates with poormanscron
00:01Drupal requires the server to do certain things periodically, for example send
00:05out mail, poll other sites for RSS feeds and so forth. Part of the installation
00:09process solves this problem with the program cron on Drupal's host server, but
00:14what if you do not have access to the server? Fortunately there is a solution
00:18in the form of a module called Poormanscron. As with all modules you will need
00:22right access to the modules folder on the server.
00:25Here we are at the Poormanscron webpage, which is
00:28Drupal.org/project/poormanscron. We have already downloaded and install this
00:33module so we will go straight to our administrative page to turn it On. And
00:41just check the check box here and save configuration, from here we can go to
00:45the Administer page and if we do a search for Poor we will see there it is. We
00:51will click on that to configure it.
00:54As with the cron program you can choose how frequently the cron program runs,
00:58however you do not get the opportunity to choose at which minute it runs as do
01:02with cron tabs. We will just say we wanted to run every half hour. To Retry
01:07interval is in case the cron program is not able to run. It will keep trying
01:12after 10 minutes has passed if you leave it in the Default. You have a choice
01:16of whether to log successful cron runs and to log Poormanscron progress.
01:21I recommend that you leave these in their default settings, log in successful
01:25cron runs means a little show up on the reports page, where as log in the
01:28progress really adds a lot of information that you do not need to that page. We
01:32will click on Save Configuration and we are done, the configuration options
01:36have been saved.
01:37There is one other thing that you should do though which is to turn off the
01:41cron tab that you turned On earlier if you have done so. On the Mac what you
01:45would do is go back to the finder hide everything, you will find a program in
01:51the applications folder. Down at the bottom in utilities called Terminal that
01:59lets you enter the command line interface. If you are running on a Windows
02:02machine you simply say run and then cmd, which will bring up your command line interface.
02:07For Windows users, the task scheduler function is a good replacement for cron.
02:12A good explanation of how to use this function can be found at the Drupal.org
02:16website. Follow the URL below for more information. We are going to edit this
02:21cron tab again. To do so you type crontab and then -e for edit. And there is the line
02:27that we entered earlier. If you are using a Macintosh in its default
02:31configuration you will be using an editor called VI.
02:34The command in VI to delete that line is Shift+D, and then the command to get
02:39out of there is :WQ for write and quit. When you do this it tells you that it
02:47installed a new crontab and you are all set.
02:49Poormanscron is one of the simplest modules out there but it also essential for
02:54anyone who does not have access to a cron application and who does not wants to
02:58use an outside cron service such as webcron.org. In fact I use it on all my
03:03sites, even though I do have access to a cron application, because it is so
03:07much easier to manage then running crontabs.
Collapse this transcript
Defining custom content types with CCK
00:00Drupal's default installation comes with only a few basic content types that,
00:05truth be told, do not differ much one from the other. A Blog post is very much
00:09like a story which in turn is very much like a page. The Content Construction Kit,
00:14or CCK Module, is your gateway to expanding content types tremendously,
00:19incorporating not only plane text, but also email address, dates, durations and so on.
00:25We have already downloaded and installed this module. If you need help doing so,
00:29 see the video in this series entitled 'Unpacking and Installing Modules'.
00:34CCK is indispensable for anyone who wants to build a specialized Drupal site.
00:39For example, a catalog or a resource directory, but it takes a little getting
00:44used to. The first thing that we are going to do is to create a new content
00:48type. That is the one that we are going to be playing with, when we use CCK.
00:52We will go to Administer, Content types and Add Content type. The Content type
00:58will be called Property Listing. The Type will be property_listing. Remember
01:05the type is machine readable, so you have to limit exactly what characters go
01:09into it and the description will be, Underwater properties offered for sale.
01:16Scrolling down further we click on the Submission form settings, change the
01:21Title field label to Headline and the Body to Description of property.
01:28We will also change the workflow settings, so that a new revision is created
01:32each time and note that it is promoted to front page, so everything we create
01:35as property_type will show up on the front page. And under Comment Settings we
01:39will disable them, so that people cannot comment on property listings.
01:43Scroll down to the bottom and Save content types. Now we are ready to start
01:48adding CCK fields, but first let us take a look at exactly what CCK does. We
01:53will go into Administer and Modules. We have installed the Modules, but we have
01:57not turned them on. Let us see what they look like. At the top you see this
02:01group CCK. Just by installing that one module we have all of these different
02:07parts that we can turn on or off.
02:09The only one that is necessary is Content. We are going to turn on only that
02:13one, then scroll down to the bottom of the page and Save Configuration. We are
02:20going to edit the Content type called Property listing. To do so go to
02:23Administer and then to Content types and down to Property listing, but you will
02:28see that there are two new fields here called Add Field and Manage Fields. We
02:32want to add a field, so we will click on add field.
02:36It did not work; the reason is that although we added the CCK Module and the
02:40content part we have no specific CCK types that we can add. So we will go back
02:45to Administer and Modules and in our case, we are just going to add two more,
02:50Number and Text. The other options in the CCK area define either CCK types such
02:57as Number or Text or they define certain things like Permissions or how CCK
03:02fields can be grouped on the page.
03:04You can read more about these in the documentation for CCK. In addition you can
03:08download other CCK types at drupal.org in the Modules download area. But for
03:13now, we will just go down to the bottom of the page and save our configuration.
03:19Now we will go back to Administer, Content types and Property listing and we
03:24will try adding a field. Now we can add a field. The first field we are going
03:29to add is bedroom since obviously if you have a property listing you want to
03:33know how many bedrooms it has.
03:34We will call it field bedrooms; the label will be Number of bedrooms. Here we
03:41have a choice, what sort of field we want it to be? The reason we have these
03:45four choices because we turned on the Number and Text CCK types. The first
03:50three obviously are numbers. Decimal means with a decimal point in it, like
03:543.5. Float means a floating-point number, which is used in computing. Integer
03:59is a whole number; 3, 6 negative 5 and Text obviously would be a plain text
04:04field.
04:05Since you can only have a whole bedroom, we will change it to Integer and then
04:08click Continue. Depending on what we selected in Field type our next options
04:13are going to vary. Under Widget type we only have option of Text field. Again
04:18as you add more CCK types you may have other choices. We click on Continue and
04:24have several options. The first is Help text. We can say to people, "Please put
04:29the number of bedrooms in this area." We do not really have to do that because
04:33it should be clear, number of bedrooms is the number of bedrooms.
04:36You can also enter a Default value. For example, let us say that you live in a
04:40condo development in which everything has to two bedrooms except for five or
04:44six properties. Then you might have a default value of two and then let people
04:49change it to something else when that exceptional case occurs. We will click on
04:53that and you can see, you can enter your default there. You can also enter PHP
04:57code depending on circumstances that you can interact with in a PHP program
05:02that is well beyond the subject of this course though.
05:05Going down you can require that field to be entered. If it is not checked then
05:10people can just leave it blank. We are going to require it. You can indicate a
05:13Number of values, so people have to enter five different types of bedroom,
05:17obviously that does not make sense here, so we will not include it. You can
05:21have a Minimum and a Maximum and a Prefix. We will show you what the Prefix
05:25means in another field that is coming up.
05:27Along with the Prefix, you can have a Suffix and finally you can limit the
05:31values to a list that you define. For example, let us say, that you never deal
05:36with properties of more than five bedrooms, but you also never deal with
05:40properties of three bedrooms. You could limit it to one, two, four and five
05:44bedrooms by typing in 1, enter, 2, enter, 4, enter, 5; one per each line. Again
05:51you can enter PHP code for that as well. We are just going to save the field as
05:55it is now.
05:56Now we see a list of all of the fields and something interesting is here. We
06:00see the Headline and Description of property. Those were built-in to the
06:04Property listing even before we installed CCK. We change the names that were
06:08titled in body but CCK exposes the fields that are already built into Drupal.
06:14Similarly Menu Settings is one of the built in fields that CCK exposes.
06:19Continuing on we are going to add a few more fields by clicking Add Field. This
06:24one is going to be bathrooms -- number of bathrooms. For Field type, we are
06:30going to leave it as decimal because you can actually have half a bathroom, if
06:34there is a toilet and sink and no shower for example. We click on Continue and
06:39again we have this Widget type which at the moment the only choice is Text
06:42field, so we will just click Continue.
06:43We will scroll through here and for this, we do need a Help text to explain to
06:48people exactly what half a bathroom is. So we will type in, use decimals to
06:55show partial bathrooms, 0.5=toilet and sink but not bathing. 0.75=sink and
07:08bathing facilities but no toilet. Again we do not have a default value; we are
07:16going to require this field. We only want one field to be entered. No minimum
07:21or maximum.
07:22The Precision popup comes into play, if you are dealing with math mostly. The
07:26minimum precision is 10, which is more than enough for most purposes. We only
07:31need three places of precision since we can only have 1 or 1.5 or 1.25, we will
07:37never have 1.333. In any case 10 is more then enough. For Scale we know we will
07:42never need more then 2 to the right of the decimal, so we can leave it at 2.
07:46You have a choice of what sort of decimal marker you want. This one is
07:50depending on what country you are in. Some places in the world use a comma or a
07:54space instead of a decimal point. Since we are doing this site for US audience
07:58we use the decimal point. Again Prefix and Suffix, Allowed values we showed
08:02you. Click on Save filed settings.
08:04All right, we are getting there. The third field we are going to add is going
08:09to be Price. We will just call it price, the Label is Price and the field type
08:15is Integer. We are not going to let people charge pennies on there houses.
08:19Click on Continue, again Widget type is Text field, Continue. We do not need a
08:24Help text. We are going to require this and we are going to require a minimum
08:28of 1, so that people can say this property is whatever you decide to pay me. We
08:33are going to make them name a price. For Prefix, we are going to put in the $
08:37sign, so that every time somebody enters the number it will come out with a $
08:41sign ahead of it.
08:43Skip Allowed Values and Save field settings. There is just one more field we
08:47have to add and that is the Address field. Go up to Add field, we will call it
08:52address. Under Label we will call it Address and for Field type, we will say
08:57Text and Continue. Now this Widget we have multiple selection for the first
09:01time. We can either have text field, which is single line, or text area, which
09:06is multiple rows. You would use the second if you wanted to allow users to
09:10enter an assay for example.
09:12But one line is good enough for us and we will click Continue. We do not need a
09:16Help text; we do not need a Default value. We do want to require a value. Keep
09:22scrolling down and you will see an additional option, Plain text or Filtered
09:26text in which case you could say for example, choose whether this it should
09:30HTML or PHP or something, but we are just going to use Plain text. Once again
09:34we do not need to check Allowed values and save field settings.
09:37There, now we have our new CCK content type. Before we start working with it, I
09:43would like to point out a few things and adjust it a little bit. First for each
09:47field that you create you will notice links at the top of this page. If you
09:50click on anyone of them you can go back and edit certain characteristics about
09:54that field. There are some that you cannot edit however, for example, the
09:57Widget type, unless you click on change basic information in which case you
10:01back a little bit earlier. We are not going to do that now though.
10:04We are just going to go back and click on Manage Fields which the screen we
10:07were on before. From here as in other places in Drupal, you can change the
10:12order in which these appear. I think I want to have the Headline up top, then
10:17the price. You do that by clicking and dragging on that little arrow icon, the
10:22Number of Bedrooms, the Number of Bathrooms, the Address and then the
10:26description of property and we do not need the Menu settings until the end and
10:29in fact that is really just for Administration anyway. The ordinary user would
10:33not see that.
10:34You will notice that this does not take, until you click on Save, so now we do
10:37that. Terrific we have created our Content type. If we want to allow ordinary
10:42users to able to enter it however, we have to go up to Administer and
10:47Permissions. On the Permissions page, you have to allow authenticated users to
10:52enter information in that Content type. You can search that whole page or you
10:56can just a find and do a search for the name of the content type which in this
10:59case is property. Property and there it is, property_listing.
11:03We are going to allow them to enter their own properties by clicking here.
11:08Scroll to the bottom and say Save permissions. Now we are going to switch over
11:13to our ordinary user fishyjoe and he is going to add a property. We switch by
11:17holding down Command Tab to get the Firefox in which we have already logged in
11:22fishyjoe. Fishyjoe can go up to Create Content and he sees this new content
11:27type called Property listing. He clicks on it and he gets a form exactly as we
11:32would expect it to appear.
11:33Let us make a property here, Beautiful home among the coral reefs. The price is
11:42$35000. Well it is not very expensive; it is full of water. Number of bedrooms
11:47is 2, number of bathrooms is 1. The address is 1572 Briny Deep, Sandy Beach, CA
11:58(offshore) and for description we will just say, a lovely little starter home,
12:05very few barnacle.
12:06You will notice that that Help text that we entered earlier about number of
12:11bathrooms shows up underneath the field itself. So anything you enter while
12:14defining that field will show up in this way. We will scroll to the bottom and
12:19say Save. There is our Property listing. You may remember that we had this as
12:24promoted to the front page, so we will go back to the front page and see it
12:29there. CCK really opens up Drupal to all sorts of applications.
12:33For example, I want to prototype a dating site on Drupal and its centerpiece
12:37was of course personal ads. The Personal Ad Content type was created with CCK
12:42to include all sorts of relevant information and that allowed people who they
12:47were and what they were looking for. Similarly you can use CCK for fulfill
12:51unusual needs in Drupal.
Collapse this transcript
Stopping spam using a CAPTCHA
00:00Spam and site vandalism are a problem for anyone who runs a publicly accessible
00:04website. There are a several Drupal Modules that give you ways of combating
00:08such problems. We are going to examine one of the more popular, the CAPTCHA module.
00:13A CAPTCHA forces posters to prove they are human and not an automated
00:17posting box by challenging them with human readable questions.
00:21This module as with all modules will change as new versions are released. As a
00:26result the interface and features you see here might not match what is on your
00:29computer. We have already downloaded and installed this module. If you need
00:33help doing so, see the video in this series entitled 'Unpacking and Installing Modules'.
00:39By the way CAPTCHA is a sloppy acronym for Completely Automated Public Touring
00:44Test to Tell Computers and Humans Apart and it is spelled CAPTCHA. The first we
00:52are going to do is go to Administer and Modules. To turn on CAPTCHA we will
00:58click to close the CCK and all of the other groups up here, so that we can get
01:03to the bottom of the page quickly and there is our CAPTCHA module.
01:06You need to enable the main CAPTCHA modules and then these other ones extended.
01:10I am going to click on both of them. You can also download additional Extenders
01:15from the drupal.org website. Once we are done we click on Save Configuration.
01:19From here we would administer CAPTCHA, by going to Administer and by doing
01:24Command+F or Ctrl+F on PC and to find it easily I will search for 'capt' and
01:30there we are CAPTCHA and click on that.
01:32We will get back to the General settings in a little while but first we are
01:37going to tackle Image CAPTCHA, by clicking on Image CAPTCHA at the top of the
01:41screen. You will note this warning at the top, which tell us that a CAPTCHA
01:46module works best for the TrueType font file installed. You can get this on
01:50your computer. On the Mac that is in Library, Fonts from the top level and on
01:55Windows it is in Control Panel and then the Fonts folder.
01:59We have already taken one and put it on our desktop. I am going to go to that,
02:03by going to the Finder and hiding everything else and there is our Font file.
02:08You put this inside the Captcha folder, which you have installed in to Modules
02:13and then inside image_captcha and fonts. So we will just drag that in and then
02:18go back to our Administrative interface. Now when we refresh the page you will
02:23see that this bitmap will change into something a little bit prettier using a
02:27font that we just installed which incidentally was Georgia.
02:30The reason that it is done this way is that the makers of the CAPTCHA module
02:33are not permitted to distribute the fonts. You can use the ones that are
02:37installed on your computer and it is possible to download free TrueType fonts
02:41from throughout the internet, but they cannot distribute them so you need to
02:44make this small adjustment. We are going to reload this page. So we have taken
02:49care of the font issue.
02:50Now let us go through some of the options you have. You can choose what
02:55characters are in the code. If for example, you decide you do not want to use
02:58any capital letters, you can just knock those out of here. You will notice that
03:02some of the letters are missing that is because a capital I looks very much
03:05like a lower case l. I prefer to leave the settings in here and they are given.
03:10You can choose how long you want to the code to be. If you want to make it
03:14easier for humans then you would make it two or three or four characters, if
03:18you want to make it harder obviously more characters. Of course the harder you
03:21make it for people, the harder it is also for spammers to use robots to read
03:26your CAPTCHA.
03:27Scrolling down further we've installed another font, so we are going to select
03:31it from Font. And Character Spacing we will leave on normal. You can play
03:35around with this once you are down, to see which works best for you. Color
03:39settings and Text color, we will leave all of this alone although again, what
03:43you will want to do is play with it to see which one works best for you to give
03:47you the best balance between difficulty and ease for a person to read.
03:52Finally you can define several types of Distortion that will affect that
03:56CAPTCHA. I am going to leave it as it is, it is default just so that we can see
04:00what that looks like and then adjust from there. Click on Save Configuration.
04:05Now we see an example CAPTCHA. I will not say that is pretty good. For example
04:10I can read that, it is + ! t # F.
04:11Let us change a few of these settings just to see how it affects things. We
04:18will make the Code a little longer. We will make the Font size larger,
04:23Character spacing smaller. So we will have larger and more letters, but crushed
04:27together. This is going to make it harder for the CAPTCHA to be read by a
04:31computer, but also harder for people. Continuing on, we will leave the
04:35Background color and font color the same although of course if make them very
04:39similar that is going to lower the contrast between the two.
04:44You can also change the amount that the text varies from letter to letter. You
04:48might have noticed up above that the letters do vary in color. This one is sort
04:53of a green brown and this one is sort of a purplish. You can change the amount
04:57of that variation. Finally Distortion, this one is really fun. Let us turn on
05:02Double vision just to see what it looks like and Smooth distortion. Leave the
05:06Noise level at normal and Save Configuration.
05:10There that is an example of slightly more difficult CAPTCHA, but I can still
05:14read it and I think this is a pretty good setting. So we are going to go back
05:18to Administer now and scroll down to CAPTCHA and let us take a look at the Text
05:25CAPTCHA by clicking on Text CAPTCHA at the top. Text CAPTCHA actually has far
05:30fewer options. It can generate nonsense words or you can define a list of words
05:35and again you can select how long the CAPTCHA should be.
05:38I am just going to leave it in its default configuration, but you do not know
05:42what these are going to look like. Do you? At least in the Image CAPTCHA you
05:45saw an example. Well do not worry about it because back at the main CAPTCHA
05:49page we have an option of seeing examples. Let us click on that now. The main
05:55part of CAPTCHA includes a math option, which will ask you a question as you
05:59can see up here. Let us see some more examples of this challenge.
06:03And you can see there are simple math problems that most people would be able
06:06to do. Going back to Examples, we see another example of the Image CAPTCHA. If
06:12we want to make sure that they generally are readable and want to have a large
06:15enough sample size to tell that, we will click on 10 more examples of this
06:18challenge and there we have. That is what it would like. Of course each one
06:22will be different when the user sees it.
06:25Going back to our Examples, let us take a look at some of the Text CAPTCHA
06:29challenges. These are all what is the nth word in a certain phrase and then you
06:34would type in whatever the nonsense word is. The problem with Text CAPTCHA of
06:39this sort of course is it may be difficult for people who do not read English
06:43because they would not be able to read this what is the third word in the
06:46phrase section of the sentence.
06:48So now you know about a few of the basic CAPTCHA options, but how does this get
06:52applied in your site. To find out go to General settings and you scroll down
06:57you have an option to put different types of CAPTCHA in different parts of your
07:01site. For example if you want to make sure everybody entering a comment is
07:05really a human you might say, oh! I think I want a difficult Image CAPTCHA. Let
07:08us say for contact_mail you do not expect vandals to really hit that page as
07:13much. Let us try an easier Math ( captcha) and so on. And then of course you
07:17would save the options at the bottom.
07:19One option that you can add is to Add CAPTCHA administration links to forms.
07:24That lets anybody who has the permission that lets them administer CAPTCHA,
07:27change what is being shown in a certain area. That is good if you set these
07:31settings down here and then really want to see what they look like on the site
07:34and change them on the fly.
07:36Down towards the bottom you can change the description of a CAPTCHA by changing
07:41the text in here. That is good if for example, you think your users already
07:45what a CAPTCHA is and you do not feel this is needed or alternatively if you
07:49think they need more explanation or if they are using a different language.
07:53Finally you can force a CAPTCHA every time the person visits the page or only
07:57at certain times. You can set it so somebody only have to answer the CAPTCHA
08:01challenge once and from then on they will also be able to enter comments and
08:05mail and so forth.
08:07And finally you can add Log entries whenever somebody has a wrong response. We
08:11will click on Save and we are done. We have set up our CAPTCHA. Now before this
08:16becomes useful to users in general we have to go back to Administer and as
08:21usual go down to Permissions. On the Permission page you will scroll down to
08:28the Captcha module and see that you have two settings. We already discussed
08:32administer CAPTCHA settings a little bit.
08:34The other one is skip CAPTCHA. Let us say that you have a special level where
08:39somebody has already proven themselves how good user they are and you trust
08:43that they are not going to abuse your site. You could for example, give them
08:47permission to skip the CAPTCHA. I think we are just going to leave this the way
08:50it is for now though we will go down to the bottom and click Save permissions.
08:55Now let us see how this looks to an ordinary user by switching to our old
08:58friend fishyjoe. You might remember that fishyjoe has a penchant for adding
09:03abusive comments. Let us see if he can do so now. Click on seeking equity
09:07partner. Oh! I think this is stupid, I add a new comment and I say, oh! That is
09:13-- now he has to enter the CAPTCHA. If fishyjoe is actually a person he will
09:17still be able to get pass this. He will enter his subject. Let us say, "That's
09:21stupid! I do not like this subject at all" and enters the CAPTCHA and let us
09:30just say that he enters it incorrectly.
09:33Click on Preview and he gets a warning. The answer you entered for the CAPTCHA
09:38was not correct. But generally speaking of course users will be able to read
09:42this. So this is not good for stopping abusive users. It is however good for
09:47stopping abusive robots who will not be able to this as easily. Well just leave
09:52this comment behind and go back home.
09:54Finally I should mention MOLAM. MOLAM is a system that takes submissions to
09:58your site passes them through an external server which then checks it against
10:03an algorithm to make sure that it is not spam. It is some what more effective
10:07then an anti-spam system on your own computer because it is aggregating
10:10information from many spammers on many different sites putting that all
10:14together and learning exactly what sort of spam hits Drupal sites. It is
10:18incidentally a company that was founded by the fonder of Drupal itself, Dries Buytaert.
10:22CAPTCHA like other schemes to beat online vandalism is only a partial solution.
10:28Computers might be able to figure out your CAPTCHA especially if you have
10:32configured the module lightly for better human comprehension. So it is not a
10:37perfect system, but it will still catch a lot of troublemakers and help keep
10:41your site clean.
Collapse this transcript
Using a WYSIWYG text editor
00:00If you are tired of having to write HTML code just to create style text,
00:05FCKeditor is for you. It is free open source editor that works well with
00:09Drupal. It is name by the way comes from the initial of its originator for
00:14Federico Cole Derrick Nobin. There are other reach text editors as well notable
00:19among them being something called tiny MCE. And partisans on all sides will
00:23argue and their editor is the best. You can see them all in the Filters and
00:27Editor section of the module part of Drupal.org.
00:31This module as what all modules will change as new versions are released. As a
00:35result the interface and features you see here might not match what is on your
00:39computer. We have al ready downloaded and installed this module. If you need
00:43help doing so see the video in this series entitled Unpacking and Installing
00:47Modules.
00:49To turn On the module you have to Administer and Modules as with any other
00:53module. You will then hide the once at the top just to get to the bottom
00:57quicker and there you have it FCKeditor. We'll enable it and Save our
01:02configuration. Now, let us go and administer by clicking on Administer and
01:08searching for FCK by hitting command F in the MAC or Ctrl+F on a PC.
01:15There it is so we click on that but wait a second we cannot actually administer
01:20it because we are missing some parts. We note this warning that says it is not
01:23installed correctly. You have to go and download the FCKeditor from its home
01:27page. Well let us go there. Once there you can download the editor either by
01:33clicking on this zip link or the .gz link depending on which one is appropriate
01:37for your platform. The reason is for this is that the FCKeditor module for
01:41Drupal is really only an interface between the FCKeditor program and Drupal
01:45itself. The program has to be downloaded separately.
01:49We have done that already. So let us go to our finder and hide everything else
01:53to expose it. To install it into the FCKeditor module, you will open the module
01:59and put it in this folder here called FCKeditor. If you open that folder in
02:04fact you will see a text file that just says Copy Here. We will overwrite this
02:09folder by dragging this one in to the fckeditor 2 folder like so. And yes, we
02:14do want to replace it.
02:16Now, let us go back to our administrative interface and reload this page.
02:22Terrific! FCKeditor is now working, however it does warn us that the only
02:27person who can use it is the administrator. No other roles have access to use
02:31the FCKeditor. We will fix that right now by going to administer and scroll
02:35down to Permissions. Once there go down to the FCKeditor module.
02:42There are permissions here that are important. The first is Access FCKeditor. I
02:47think I will let all of our regular users that is authenticated users, use that
02:51editor. You can also decide whether not to allow people to upload files through
02:56the FCKeditor, I think I will leave that alone and, of course, administer
03:00FCKeditor let somebody turn it On and Off and change with the pages that
03:04appears on in so forth.
03:05I would like the way we have it now, so I will scroll down to the bottom and
03:09then click save Permissions. Then go back to administer scroll down a little
03:17bit and FCKeditor. I have to warn you that FCKeditor is very hard to
03:23administer. It has many settings and is extremely configurable. But let us take
03:27a quick look at exactly what happens in its default configuration.
03:31Let us go to Fishy Joe's account. Fishy Joe is an ordinary user who we have
03:35logged in. In Firefox he might go up to Create Content and then to Blog Entry.
03:41And you'll notice something very different. The title in blog post categories
03:44are normal but under the body you have all of these options to enter style
03:48text. Let us enter little bit of text just to see what it can do. I think this
03:53is great.
03:54If we highlight great we can then make it bold or italic as you can see it
03:59works very much like any word processor you might have used. It has other
04:02features as well for example you can add Links and Anchors if it is a long
04:08document. You can even add Images or Flash Movies. It also has a Smiley Editor
04:15so you can enter all sorts of emoticons in to your message. I am not going to
04:18do that right now.
04:20FCKeditor has one major drawback for users that is it overwrites some of your
04:26Command key combinations- that is, the things that happen when you hold down the
04:29Command key on the Mac or the Ctrl on the PC- so they do not work the way you expect.
04:33For example the Cmd+L usually goes up to the address bar and lets
04:37you do to the different webpage, but if you hit that while you are in FCKeditor,
04:41it does something completely different.
04:43Let us go very quickly back to the administrative interface. As I mention
04:48before FCKeditor is extremely difficult to configure. However there is good
04:53news, there is web site that tells you specifically how to administer it within
04:57Drupal. That web site is at drupal. fckeditor.net. FCKeditor is touchy both for
05:06the user who might loose the post by hitting the wrong keys, and for the
05:09administrator who has a maze of options to way through.
05:13But those who demand style text on their sites love it for the number and
05:17variety of options that it has. And for how it can make your site more fun and
05:21color full for your members.
Collapse this transcript
14. Building a Navigation Framework
Getting around with multilevel menus
00:00They say that well organized person can be comfortable anywhere, even in hell.
00:04Along those lines a well-planned menu system makes a world of difference to the
00:08comfort of your site's visitors. Drupal comes with three built-in menus and
00:12allows you to create new ones. We will show you how. To change your menus, go
00:17up to Administer and Menus. As I mentioned Drupal comes with three menus
00:22built-in, Navigation that is the menu along this left hand side, Primary links
00:28which is the menu up here and Secondary links, which is another level that goes
00:32right near the Primary menus.
00:35Menu links only appear if you have permissions to use the links. For example
00:39here is the Administrative user; we see this link called Administer. However
00:43the ordinary user fishyjoe does not. We can take a look at that by switching to
00:47Firefox where we have fishyjoe logged in. To change the programs we hold down
00:51the Command key and hit Tab on the Mac and you see there is no Administrative
00:56menu here. We will switch back to your Administrator now.
00:59Let us take a look at how these Menus are constructed by clicking on the
01:03Navigation link here. As you can see it is a hierarchical menu. So for example
01:09we have a link for Blogs and then inside it My blog. Now that particular link
01:14is disabled. We will be enabling it later, so you can see how that affects the Menus.
01:19You can move these items around, so for example right now we have Feed
01:23aggregator underneath Create content, but let us see want to put it top. We
01:27will go down and find Feed aggregator, there it is and grab the little arrow
01:32icon and drag it above Create content like so. That little asterisk tells you
01:38that it would not take effect until you hit Save. We do that by going to the
01:41bottom of the page and clicking Save Configuration.
01:49There, now you see exactly as we expected Feed aggregator is above Create
01:53content, but what about the Blogs item here. We click on enabled if you we want
01:58to turn it on and scroll down to the bottom and save one more time. And now we
02:06see Blogs up here. You will notice that Blogs is different from My Account
02:11because has this little turned down triangle next to it. What that means as
02:15when you click on Blogs you can see an item underneath it.
02:19But what if you always want to see that item underneath it? Let us go back to
02:23Administer and Menus and Navigation to affect that menu. This item here
02:30Expanded means it will always appear open so you can see its child items. We
02:34will click on Expanded, scroll to the bottom again and click Save Configuration.
02:42There now no matter where we are in the Menu we see My Blog underneath Blogs.
02:47Let us go and edit that menu item by clicking on edit under Operations. As it
02:53happens Blogs is one of the menu items that is built-in and in fact all of the
02:57items under Navigation are built-in since we have not added any of our own
03:01custom menu items. You can also tell a built-in item because you cannot change
03:06the path. It is hard coded in to Drupal.
03:09However you can change other item such as its weight that is to say, where it
03:13appears in the hierarchy whether the top or bottom. Its description, which is
03:18text that appears when you hover over the link, and some other things, again
03:21Enabled and Expanded. You can also change its Parent item. If for example we
03:26wanted to put Blogs underneath My account, we would click on this drop-down
03:30menu, go down to My account and click on Save.
03:34We do not actually want to do that. So we are going to change that back to
03:37Navigation and click Save. While we have this hierarchical structure in the
03:44navigation menu we do not actually have the same thing in our Primary links.
03:48Let us take a look at that. We will do that by going back to Administer Menus
03:52or just this little shortcut here Menus, then click on Primary links. Here we
03:58see the two items that we added earlier. Let us say that we wanted Contact us
04:02to be underneath About Us.
04:04What we would do as with other screens in Drupal where you can drag and move
04:08things about is grab that arrow icon move it inward a little bit, so it creates
04:12a hierarchy. Click on Save configuration and because we do not have a hierarchy
04:18in the Primary links, it simply disappears. You cannot reach it. We are going
04:22to move it back out again, so you can see it. The changes that you make here
04:28will affect all users.
04:30So let us switch again to fishyjoe and take a look at what his menus look like.
04:36To do so we reload the page by going back to the Home Page and you could see
04:40now he has Blogs and My blog and of course clicking on those take you to the
04:44places that you expect. Let us switch back to the Administrative interface
04:48again. There is another place that you can enter items to put into Menus and
04:53that is when you create content. I will show you how to do that.
04:56Click on Create content and then let us say, a Blog entry. You have the Title
05:02and Blog post categories. Let us just create a very simple thing here. My
05:07thought about the recent election and we will have that under Lifestyle. And we
05:16would enter in the body whatever it is that we are going to enter there. But
05:19first let us take a look at Menu settings. We want this to be in a menu that is
05:24up at the top. That is why I think it is very important that is goes up here,
05:27but instead of being at the same level as Primary Menus we want it in the
05:31Secondary links.
05:32So we will change this Parent item to secondary links and let us say election
05:37thoughts. We will leave the Weight alone for now. Go down to the bottom and
05:42click Save. Now we have our Election thoughts link right up here and clicking
05:47on it goes to the page as we expected to. I am going to go back and edit that
05:52up. We can edit any menu item by going back to Administer and Menus. That one
05:59since it is in the Secondary links will be under here and then of course it is
06:03easy to edit or delete by clicking there.
06:06As with everything else on Drupal it asks us to confirm before we delete. We
06:11say, yes and as you notice it is gone. There is one another thing to cover. In
06:17Administer and Menus and that is this little tag up here, Settings. As you can
06:23see it is a very short page and the second two items Primary links and
06:27Secondary links here are usually not changed because of course you want Primary
06:31links to go to Primary links and not Secondary links or Navigation unless you
06:34are doing some custom theming.
06:36However this first one is the place that the Menu will automatically go unless
06:40you change it when you create new content and decide that you want to put it
06:43into a Menu. I will show you that by going Secondary links and Save
06:48configuration and then Create content again, Blog and Menu settings. See now
06:54the default is Secondary links. Menus are especially helpful when you are
06:59building authoritative content driven sites when you want specific content very
07:03accessible to members in a Menu.
07:06Menus are great for helping things on your site stand out, but as with all neat
07:10toys in Drupal be careful not go overboard. If you put too many menu choices on
07:15your site they all blend into a gray mass and nothing stands out, but with
07:19restraint a few judiciously placed menus make important information and your
07:23site much more accessible.
Collapse this transcript
Building custom menus
00:00As much as I love Drupal I disagree with its some parts of its design. One of
00:05those parts is the default Navigation menu, which makes use of every part of
00:08the pig except the squeal. So on my site I replaced with it a custom menu that
00:13was shorter and discover just how useful custom menus are in general whether
00:17you use them to replace the Navigation menu as I did or for some other purpose.
00:21Let us go to my site and take a look at that. One of the things I did was I
00:25combine the name of the person logged in with the log out command here. I did
00:30this through a PHP code snippet that I got from drupal.org. We will show you
00:34how to do that in another part of this series. If we switch back to out
00:37original site you will see that the name of the person logged in and log out
00:41are in two different places and I thought that took up too much space.
00:45Let us built a similarly simple Navigation menu for our site. We are just going
00:49to have two items in it; blogs and feed aggregator. Of course you can put in
00:54what ever items you like. The next thing to do is to figure out what URLs we go
00:58to when we go to click on those items. So, let us do it. Click on Blogs and we
01:03go to \blog. Remember that because we are going to be using it in minute.
01:07Click on Feed aggregator and we go aggregator. Once again we have to remember
01:12that. Another way to tell what the links are is to look in some browsers which
01:16have information area, for example in Fire Fox when you hover a link at the
01:21bottom of the screen down here, it tells you what that link is where you are
01:25going to go. I am switching back now to Safari so I can look at my
01:29administrative interface.
01:31To add our custom menu we go to Administer and then Menus. From here we go to
01:37Add Menu. First, the menu name. This is going to be the machine-readable name
01:43of this menu. When you enter a machine- readable name it is best not to have any
01:46underscore or spaces because the machine won't understand them. The specific
01:50details about what machine-readable is are given underneath the entry field,
01:55but we will just keep it simple and call it new Navigation.
02:00For the title we will just call it Your menu and will leave the description
02:04blank for now. This part at the bottom about the ID for excluding and including
02:08this element is actually an advance topic, which we won't be covering in this
02:12course. We click on save, good. Now, let us take a look at all of the menus by
02:17again going to Administer and Menus. There it is there is our menu. We click on
02:23it and now we can start adding items to it.
02:25You remember we wanted to have two things there, the blog and the aggregator. I
02:29will add an item and here we enter the path. This is going to be the URL where
02:36we go when we click on it. You do not have to put that leading slash so we just
02:40put log for the blog and then in the menu link title I am just going go say
02:44logs.
02:46For description we will enter what we are thinking now. We will have it enabled
02:51and we won't have it expanded because I do not want to show that my blog. It is
02:54just going to be a simple menu. The parent item tell us where this menu items
02:59going to go, since we created it coming from the Your menu choice it decides of
03:03course we are going to put it in Your menu, but we could decide at the last
03:06minute, oh no, we want to put it in the Navigation menu underneath Site
03:10Configuration in which case we will change the pop up menu to there. But we are
03:13not going to do that.
03:15Weight controls are how high or low the items appears on the menu and we are
03:19just going to click Save because we only have one item here. Good! We have
03:23created out first item now we will create our second one, that feed aggregator,
03:28we do the same process again add an item. Remember the path we were going to is
03:32aggregator and the Menu link title, I do not like Feed Aggregator no one knows
03:36what that means, so I am just going to say News, and for description I will say
03:40all that fit to feed.
03:44Again we will leave that enabled but not expanded same here same here. Leave it
03:48as it is and click on Save. And our menu has been created. But where is it, we
03:54do not see it anywhere up here. That is because when you create a menu it is
03:58created as a block and you have to enable it some where on your page.
04:01Let us do that now we do so by going to Administer and then over to Blocks. You
04:08see the Navigation menu is right here, if we scroll down we see that menu that
04:14we just created called Your menu is down in a disabled area. We are going to
04:18move that up to the left sidebar and Save it. Now, we have both the Admin menu
04:24here and Your menu down here at the bottom we do not really need both. So I am
04:29going to get rid of the Navigation menu at this point. Go to None and that gets
04:34rid of that and then I am going to move Your menu up to the top.
04:38Once again we go to the bottom of the page, Save Blocks, there we now have a
04:43very simple menu up here instead of the Navigation menu. I am actually going to
04:47change it back. To do so we just reverse the process. Take Your menu, make it
04:52None, scroll down to the Navigation menu, make it left sidebar. Save your
04:59blocks and then move it around to wherever you wanted, it. It was originally
05:02underneath user log in which only shows up by the way when you are not logged
05:06in.
05:07Scroll to the bottom, Save Blocks and we are back where we began. A lot of what
05:13makes the site attractive is having a clear Navigation path and being able to
05:17create customize menus makes that goal possible. In designing menus I recommend
05:22that you be as spare as possible but be prepared to invest time in figuring out
05:27which menus are really important. The best way to do that is with user testing,
05:31watch where people actually go the most and make menus so they can go there
05:35easily.
05:36Less is more, and to repeat one of my favorite quotes, making it easy is hard.
Collapse this transcript
Creating easy-to-navigate books
00:00Drupal's built-in page and story content types are fairly straight forward,
00:04each single page of contents stands on its own but Drupal includes another
00:08content type that lets you combine a series of pages into a sort of online book
00:12with single click links to go back and forth just like turning the pages of a
00:16real life book. This content type is especially handy for sequential,
00:20instructional material and is in fact used on the drupal.org web site to
00:24presents its tutorial handbooks.
00:26Let's take a look at that site now to understand how books work. We have gone
00:30straight to the Drupal 6 handbook, which you can see at getting-started/6. The
00:35book itself is divided into two sections Install Drupal and Administer Drupal;
00:40if you click on either of these you will see the chapters that it contains, if
00:45you click on up you will go back to your original page. This is like going into
00:50the pages of a chapter, if that chapter is subdivided into sections, you can
00:54see how there is a multilevel hierarchy. You can also page through the book by
00:59going to the right like this and this and so forth. I am going to go up again
01:09and up one more time and you can also add additional pages by adding child
01:14pages. Once again in the hierarchy, the child is the one that's immediately
01:18below the level that you are looking at. This will become clear as we go along.
01:23The big difference between Drupal
01:24books and the way you think of real life books; is that in the real world books
01:29have a variety of parts, there is a cover, a chapter title, subtitles and body
01:34text. Some of those parts don't actually have any content, for example the
01:37cover doesn't tell you anything expect the name of the book, it doesn't contain
01:41a lot of information just the name. In a Drupal book every part is equal and
01:46has both a title and the body. I know that doesn't make much sense now but you
01:50will see what I mean in a minute. Let's switch back to our site; to make books
01:55you first have to turn on the module book, to do so we go up to Administer and
02:01Modules and then scroll down until we see Book. Turn it on by clicking it;
02:08scroll down to the bottom and Save Configuration.
02:13As with most modules there are permissions associated with the book content
02:16type, lets go to Administer and Permissions and search for the word book by
02:24hitting Command F on the Mac or Control F on a PC and we see that it creates
02:31its permissions inside the book module. We could for example allow our users to
02:36add content to books if the drupal. org site allows and then we could have
02:39contributing users be able to create new books and so forth. We are not going
02:44to change any of the default Permission, so we can just go back up to the top
02:47of the page if we like. Okay, so let's create our book, to do so go to Create
02:53content and then click on this new link, Book page. For our Title we are going
02:58to say Home Repair.
03:00One thing that maybe confusing is that you see a Body here and that might make
03:04you think that you have to enter it but it doesn't have the red asterisk; this
03:07is not a required part of the page, you can just leave it blank. We scroll down
03:12further and we see have a new choice here Book outline. The main part that we
03:18change in the Book outline is what Book it belongs to. In this case we are
03:21going to create a new book; this will be like the title page or the cover of a
03:25real life book, create a new book and then say Save. Great, now that we have
03:32done that, we are going to add four sections to our book; these will be called
03:36Roof, Foundation, Electrical and Plumbing.
03:39We do all of these as children of the book that's called Home Repair, as though
03:43these are chapters. To do so click on Add child page, the Title is going to be
03:49Roof and again we don't need any Body; going down a little bit to Book outline,
03:55we want it to be in the book Home Repair, now the reason it shows up by default
03:59as Home Repair is because we clicked on Add child. So it automatically filled
04:03in this field and this field; click on Save and we will do that three more
04:08times. First we have to go back up to Home Repair and add another child page,
04:15title will be Foundation. Once again we scroll down, make sure that yep it's in
04:19Home Repair, Save. Go back up so that we are at our Home Repair page, add a
04:25child, Title Electrical, Save that. Go up to our book, add a child page and
04:36Plumbing; go down and Save.
04:41Great, now if we go back up we see that we have this book Home Repair which has
04:45four sections but where is this book, how can we actually look at it? As it
04:50happens when you turn on the book module a page is created at /book, there. Now
04:57we see our book; if we had created more than one of course we would see a list
05:00of books. Click on it and we go right back to where we were. As I look at this
05:06book, I think I want to divide this into sections, I think Electrical and
05:10Plumbing should be in Systems whereas Foundation and Roof should be in
05:14Structure, lets do that. It may be natural to think oh well how do I create a
05:18container for those two things but remember everything in a book is a page.
05:23So we are going to go ahead and just add a another child page here and we will
05:27call this Systems and once again go down make sure its in the right place, yep
05:32its in Home Repair and Save. Once again we will go up, create a child page, and
05:39call that Structure and Save it. So now we have six pages that are really all
05:46on the same level and we want to create a hierarchy; to do so go to Administer
05:51and Books. Now we see our book with this Operation, edit order and titles;
05:57click on it and you see that familiar little icon with the arrows. We are going
06:01to put Electrical into Systems like this, by dragging it down and then in a
06:06little bit so you can see the hierarchy. We will move Plumbing into the same
06:10area, not as the child of Electrical but as a child of Systems. Roof of course
06:15goes into Structure and Foundation also goes into Structure like that. Click on
06:20Save Book Pages.
06:22Now we have given our book some structure, lets take a look at how that looks
06:26by going back up to /book. Click on Home Repair, now we only see the two top
06:33levels, we click on either one of them; say Structure, now we see the two ones
06:38that are underneath it. There is one big weakness about this structure though.
06:42You don't really see a hierarchical list ; you just have to go in drilling down
06:46and drilling down. You can also use these forward and next pages but its still
06:51not very clear, for example this Foundation section, we see Roof comes next and
06:55Structure comes previous but that doesn't tell us about the hierarchy.
06:59In order to see the hierarchy we are going to add this book as a block. To do
07:03so go to Administer and Blocks; you see every book that you create, creates a
07:09page that is some place that you can go by going to /book and then clicking on
07:13the link. It also creates a block, which I am about to show you, and it creates
07:17a menu, we will go through both of those now. We are now in Administer, Blocks,
07:22if you scroll down to the bottom you will see Book navigation block. We will
07:27take that and we will put it in the Left hand sidebar and Save Blocks. As with
07:34other blocks it gets put at the bottom and we can move it up if we like, let's
07:38do that just for the moment, we move it up and Save Blocks, there. Now we see
07:44our Home Repair book and of course if we had other books we would see those as
07:47well.
07:48When we click on it, now we can see the structure a little better, click on
07:52Structure, there is our hierarchy. Let's go back to Blocks and take that one
07:57out, so I can show you menus. Go to Administer, Blocks and turn off Book
08:03navigation by going to none and saving. Now we will go to Admin and Menus. Once
08:13you are in the Menus page, click on Navigation and we see all of the things
08:17that are in this Navigation menu. If you scroll to the very bottom, you will
08:23see this- Books (disabled). Let's enable it by clicking here. You can see
08:27it's in the Enabled column and saving the configuration. Now at the very bottom
08:33of your Navigation menu you see Books, when you click on it, it just goes to
08:37that book page, not as useful.
08:39In my opinion Drupal's book structure really needs the Block to make it
08:43worthwhile and once you are in a book, it's not as easy or obvious as it could
08:47be. But you do get some nice benefits from books, for one numerous people can
08:52create book pages with one editor rearranging them as needed, in short books
08:57are best for content that's intended to be part of a cohesive whole with
09:00multiple contributors and central moderators that's why drupal.org is built on
09:05books and if it's good enough for the Drupal project, its good enough for me.
Collapse this transcript
15. Advanced Tips for PHP Programmers
Changing page templates with PHP
00:00If you want complete control over how your theme behaves and in particular how
00:04it handles custom created content types, you need to hack at the PHP that's
00:08contained within the sites page templates or use a module called Content
00:12Templates or Contemplate. We will show you both methods but we are not going to
00:17go deeply into how to actually code the changes, that could be an entire course
00:21in itself. Instead we will get you started by explaining the template systems
00:25logic, where to find the files and the basics of how to play with them.
00:29The first we are going to do is we are going to look at the files that make up
00:32the theme; we go to the folder where we first installed Drupal. For us we click
00:37on the Finder, go to Finder, Hide Others and that exposes the folder where we
00:41installed Drupal. Since we are using a theme that came with Drupal, we are
00:46going to find it in the themes folder. If you are using a theme that didn't
00:49come with Drupal you will probably find it inside the sites folder, either in
00:53the all or the default folders. Our theme is Bluemarine, so we open up themes
00:58and Bluemarine. We sort by Kind or Type and we see all of the templates
01:03together, they are the ones that end in .tpl.php. The one we are concerned with
01:09is page.tpl.php; before we do anything else I want to back this up. So I will
01:15highlight it, hit Command C or Control C on the Windows machine and then paste,
01:21which is Command V or Control V on a Windows machine; that creates a copy.
01:25I am just going to label that, tpl.php- BACKUP. Now let's go in and play with
01:34this code by opening it up in the Text Editor. As you can see the page template
01:39is a mixture of PHP code and plain old HTML. We are going to change this so the
01:45left column in our site disappears entirely, that is if we go back to our site,
01:50we will see none of the stuff over here. Don't worry we will change it back by
01:54reverting to our backup; this is only an example of what you can do with your
01:57page template. Of course to do more complex things you will need to know PHP;
02:03if you are a lynda.com premium subscriber or you are watching this series on a
02:07disk you can open up the Exercises File 15_01. Here we have opened up that
02:13exercise file which explains what exactly we are changing.
02:16Again don't worry if you don't understand this, I am just showing that you can
02:20change things not how to change them. So we are going to search for this text
02:25in here, php if left etcetera, etcetera. To find that I am going to search for
02:31that $left, so I do Command F or Control F in your PC and there it is, php if
02:40left etcetera, etcetera. Let's compare, to make sure it looks the same, yep
02:45very good and we will replace the entire bit between this and this. Now we go
02:51and take the text that we want to change it to, copy it with Command+C or
02:55Control+C if you are using a Windows machine and paste it in and save it. We
03:03will close that file and go back to our site, now we reload the page by
03:08clicking on reload; there it is we have removed that left column.
03:12Let's change it back though because of course we don't want to leave it this
03:15way but you can see how much you can change a page with just a little bit of
03:19code. To change it back, we go back to our Finder, first we will get rid of
03:23that page.tpl.php file that we just changed; by dragging it to the Trash if you
03:28are using a Mac, or by Right-clicking and selecting Delete if you are using a
03:35PC. Then we will rename our backup, back to its original name and if we go back
03:42to our site and reload we see everything is back to normal. But what if we want
03:48to change the layout of a specific content type, that is, have the blog look
03:52different from the way it is now. Let's take a look at what the Blogs do look
03:55like, we have a title and we have this submitted information and then we have
04:00additional stuff down here.
04:01Let's say we want to get rid of this additional submitted information. To do
04:05that we go back to the folder that contains those templates and again I go to
04:09the Finder and hide everything else on the Mac and we take the node file,
04:14node.tpl.php, copy it and paste it to make a backup, call that one BACKUP. Then
04:25we are going to copy it and paste it one more time, that second copy we will
04:30call node-blog.tpl.php and there we go. Drupal looks for a file that has this
04:41particular sort of name and it uses the machine-readable name for the content
04:45type. Let's go back and see how we can see those machine-readable names; in
04:49your administrative interface you would go to Administer, Content types and
04:54it's this, this blog, or book or forum.
04:57So if you wanted to change the way that forum topics look we would change it to
05:03node-forum.tpl.php. Let's open that in the Text Editor, as you can see the
05:10Content types are actually quite simply defined, there is not a lot of code in
05:14here. As it happens, I know that the part that I want to comment out from doing
05:18some research is this right here, span class = "submitted" etcetera, etcetera,
05:22everything between the open span and closed span tags. I am going to use an
05:26HTML comment to do so and again if you don't know HTML don't worry about it too
05:30much because the point is not to learn how to do this but that you can do it
05:34and if you want to learn more about how HTML works, you can watch the Essential
05:38Training video from lynda.com. We will close out that comment tag and save it.
05:44Now lets go back to our site, go to the Blog and you notice we no longer have
05:50that submitted information. We have effectively changed the way that, that
05:53Content type appears on the site. If we click on it, it still doesn't appear. I
05:58am going to return our blog to the way that it was by replacing it once again
06:02with just the simple node template. To do so we go back to our Finder and hide
06:06everything and then we just throw away this file we created, node-blog. We can
06:13also throw away our backup since we didn't end up using it. Now if we go back
06:19to our site and reload the page, there we have our submitted information again.
06:25If you want to learn more about how you can affect Content types in this way,
06:29there is page on the drupal.org site, drupal.org/node/44699 and there you have
06:40it. But let's go back to our site; there is one other way you can make such
06:46changes without having to muck around in the PHP file, that's where the module
06:50called Contemplate or Content Templates. We have already downloaded it, so now
06:55we are going to turn it on by going to Administer and Modules. Contemplate
07:00works with CCK type, so you also have to have the CCK module installed. It's a
07:05little bit tricky to find on this page however because it's inside the CCK
07:09group and here it is as Content Templates, go to the bottom and Save
07:15configuration. Now we go to Administer and we have a new choice, Content
07:21Templates, if we go to a Blog Entry and Create Template. We will see that we
07:27have a lot of options of what we can do to change the Teaser, the Body and even
07:32the RSS feed if we are feeding this out to outside sites.
07:35We are not going to go into all of the ways you can change it because it's
07:38quite complicated and in fact is its own programming language. But believe me
07:43it's much easier than programming the PHP by hand. But for right now we are just
07:47going to go back to our home page. As you can see these are all tools that
07:51should be used with a very light hand and I can't stress how important backups are.
07:56While preparing this video, I commented out one too many lines from a PHP
08:00file, literally just a few characters, and my entire site disappeared.
08:05If you can get done what you want with Contemplate, stick with that but for
08:09really profound changes don't be afraid to backup and reach straight into
08:12Drupal's template files.
Collapse this transcript
Using PHP in content
00:00We are now going to discuss an incredibly powerful part of Drupal, the ability
00:04to use PHP code within a page's content. PHP has access to many of the
00:09inner-workings of your Drupal site allowing to essentially rewrite the site on
00:13the fly. However its power can also lead to unbelievably huge security holes
00:18and a relativity small error could make your entire site unavailable or even
00:22destroy critical information. The example we will give was taken from the
00:26drupal.org site and has been shown to be safe.
00:29The first thing that we need to do is to turn on the PHP filter module. To do
00:34so go to Administer and Modules and then scroll down until you see PHP filter,
00:44turn that on. Scroll to do the bottom and click Save Configuration. The second
00:50thing you will need to do is to turn on the Input format call PHP and make sure
00:55that the PHP evaluator is turned on within that input format. To do so go to
00:59Administer, scroll down to Input formats, click on it and go to the PHP code
01:07choice and click configure. I scroll down here and turn on the PHP evaluator
01:13just in case it's not on. Usually it will be but sometimes you might turn it
01:17off for safety, go down to the bottom and click Save Configuration.
01:21Now we are ready to enter PHP code, but first we need a place to enter it. I am
01:26going to create a block that I will put in the top right-hand corner showing an
01:30endorsement, explaining how wonderful it is to live underwater. To create that
01:34block, we go to Administer and Blocks and then add a new block. We will call
01:41the block Endorsements and the Block title as well will be Endorsements. If you
01:49have a Rich Text Editor, such as FCKeditor turned on, it's best to turn it off
01:53before you start playing with PHP code. You might end up entering styled HTML
01:58that could interfere with your code. But first we are just going to enter plain
02:02text, if you are a premium member of lynda.com or received this course on a
02:06disk you have an Exercise File 15_02 which includes a text document containing
02:12all of the text you are about to see.
02:13I am going to go there now so I can copy and paste the text. For the
02:18Endorsements Block, I just copy, Command C on the Mac or Control C on a PC and
02:25paste it in there with Command V or Control V on a PC. In this case we have
02:30HTML code in here so we are going to make sure that our Input format is Full
02:35HTML, scroll to the bottom and save the block. Now we have to enable that block
02:42by bringing it into that right column and then move it up to the top. So we
02:46scroll down, there it is Endorsements; I will move it into the Right sidebar
02:51and save the block. Then in the Right sidebar once again I will bring it up to
02:55the top, scroll to the bottom and save the block, and there it is. Now we are
03:02going to turn that into dynamic content, thanks to PHP; we have three
03:06endorsements and we are going to rotate among the three.
03:10To do so we will go back to that block and edit it, again we have the
03:13Endorsements block right here and click configure. Now I am going to go back to
03:18our example file and copy and paste the PHP code. Here's the code. I copy it,
03:26switch back to my site, erase what's there and paste it. Don't worry if you
03:33don't understand this PHP code, although of course if you are working with PHP
03:36code in your site you should know exactly what it does and how it does it. We
03:41also have to make one more change, which is to change the Input format to PHP.
03:45We will open up this turn down triangle and click on PHP code. Then go to the
03:50bottom of the page and save the block, there. We now have a random endorsement
03:57up here, we can show that it's random by repeatedly reloading the page.
04:01Let's go Home for example, that's the same one but if we Reload, there is a
04:07different one. One more time and again there is the other one, of course you
04:14might get two of the same ones in a row because that's the way random numbers
04:17work but you can see its dynamic content. If you need help for how Drupal
04:21handles PHP code you can always get it by going to any Create content page like
04:27create Blog entry, go down to Input format and then click on the More
04:31information about formatting options. Up here it gives you information about
04:35all the HTML that shows up in Drupal and if you scroll down to the bottom, you
04:40will see all of the details on how it handles PHP code.
04:47You can use PHP for content pretty much anywhere Drupal accepts inputs using
04:51Input formats filter, that is, wherever you are given a choice of Filtered
04:55HTML, Full HTML or PHP that includes blocks as well as the body fields of most
05:02node types. There are dozens of bits of useful and interesting PHP code on the
05:06drupal.org web site, where they are called snippets. Just be sure you remember
05:11to turn on the PHP module and PHP Input format to make them work and more
05:15importantly be extremely careful about the code you use.
Collapse this transcript
Implementing PHP snippets
00:00The main method for extending Drupal's functionality is through modules. That is,
00:04downloadable packages of code that add specific abilities to your site. But
00:08some tricks don't require an entire module. Small passages of PHP code called
00:13Snippets by the Drupal community will do the job just fine.
00:17We'll show you where to find such snippets, how to implement them on your own
00:20site and some traps to watch out for. The place to go for snippets is, as with
00:25everything else in Drupal, drupal.org. Once you're on the Drupal site, go to
00:31Documentation, scroll down and go to Beyond the basics.
00:38Beyond the basics is of the book type, so you see you can page back and forth
00:42through it. We're going to go directly to the chapter on Snippets. There are
00:47two main types or snippets, the first one is for themes and this is the biggest
00:50area. If you click on it, you see numerous tricks that you can perform on your
00:55own site.
00:56You could of course click on any of these that look interesting to you or page
00:59through them as this is a book. Let's scroll to the bottom and then go back up,
01:05so we see all of the snippets. The other kind of snippets is for content- that
01:10is, to change small bits of your site as we did on our site for our
01:14endorsements block.
01:16In addition, there are SQL snippets, which let you change things in the
01:20database. There are so many of these and they're implemented through a
01:23different method. You can learn how to implement SQL snippets by clicking on
01:27this link, How to use an SQL snippet.
01:29But we're only going to focus on the PHP ones. Finally, some snippets happen
01:35outside of the Drupal interface. That is, it's PHP which is placed on your
01:39server for one reason or another. These are also contained in the PHP snippets
01:43chapter. If you click on it and scroll down, you'll see an example of this PHP
01:50snippet that happens on the server, this Remote posting and administration.
01:54We're going to show you how to implement one of these PHP snippets. We'll go
01:58back up and enter Theme snippets. The one that we're going to implement is
02:04called Add an "Edit" Tab to Every Block, we scroll down to find it and there it
02:09is. Click on it, when you get to this page, read the instructions of how to
02:14implement it.
02:15In this case, it gives us a link to an earlier post, which we'll want to read.
02:19But let's pretend that we don't at this point. We look through and see here's
02:23the code that you'd include in your theme's block.tpl.php file and now we know
02:28the file we're going to affect.
02:30Before we do anything else, we're going to find that file and make a backup of
02:34it, in case anything goes wrong with this snippet. We go back to our finder and
02:37hide everything else and then go to our Drupal installation folder. This will
02:42be the folder where you first put Drupal when you started out.
02:46We're using a theme that came installed with Drupal. So, our theme will be in
02:49the Themes folder. If you're using a theme that wasn't installed with Drupal,
02:53yours will be in the Sites folder either in All or the Default folder. But for
02:57us, we're going into Themes and then into bluemarine, which is our theme.
03:01There's the block.tpl.php file. We'll highlight it, copy it either by hitting
03:07Command+C on the Mac or Ctrl+C on a Windows machine and just paste it somewhere
03:11else. I'm going to put it on the desktop. And then I'm just going to add a
03:15little bit of text here, so it's clear that this is the backup, call it BACKUP.
03:21There, now we're ready to work on this file. We open it up in a Text Editor. If
03:26this is the first time you've opened this file, you may get a warning because
03:29you downloaded this file from the internet. Because we know where it came from
03:32and we trust it, we're going to say Open. So, now we've the file open that we
03:38want to affect. We also have a backup made of that file for safekeeping.
03:42Now, we go back to that snippet. We'll copy the text by hitting Command+C on
03:49the Mac or Ctrl+C on a Windows machine, go back to our text file and then click
03:55in it and since it didn't mention where we've to place it, I'm just going to
03:58put it anywhere, I'll put it at the end of the file by hitting Command+V on a
04:02Mac or Ctrl+V on a Windows machine and save it and close it.
04:08Let's see how that affected our site. We go back, we reload the page and now we
04:14see a little Edit box here, right underneath the endorsements. We also see what
04:18would be edited. Wait, I thought that would add the edit capability to all of
04:22my blocks. Let's go back and take a look. Aha! Maybe there are some tips in
04:27here.
04:30Indeed, if we go back to the earlier conversation, we see that it only affects
04:34custom blocks. This just highlights why you've to read all the documentation
04:38when you use a snippet. But in this case, it looks like the snippet did exactly
04:42what we wanted. Let's try it out. Click on Edit and there we're, we can edit
04:46that particular block.
04:47I've decided I didn't like the change to my site, so I'm going to go back to
04:51the earlier version where we weren't able to edit those endorsements. I go to
04:55the finder, hide everything, throw away that block.tpl.php that we just
05:03changed. On the Mac you do that by dragging to the trash, on the PC by right
05:07clicking on the mouse and selecting Delete.
05:11Now, I put that backup back into that folder. I drag it in and change the name
05:16back to what it was before, delete the extra PHP and Backup and let's go back
05:23to our site to make sure that took. I reload the site and indeed the Edit box
05:28disappeared. I've to give you a few caveats though when you use snippets.
05:32First of all, there is no central testing authority for testing snippets, where
05:36as the Drupal core project itself goes through a lot of quality control, there
05:40really isn't any for snippets except for those people who have used it and then
05:44commented on it. That leads us to the second part, read the documentation very
05:48well and be sure you understand it and read all of the comments.
05:52Very often, somebody will submit a snippet and then the comment will say, you
05:55know there's a bug in it, I discovered it this way and then somebody will
05:58contribute a patch to it, so it works correctly. So, do read all of the
06:02comments. Next, make sure that you understand the code as best as you can. I'm
06:06not a programmer myself, but if you look through it enough times, you can start
06:09to see the logic of what's happening.
06:12Finally, always backup the effected files first. I can't stress that enough. If
06:17something goes wrong with the snippet, you want to be able to rollback to your
06:20situation before you applied it. I love Drupal Snippets, of course I like that
06:25they improve my sites, but just as importantly, they help me learn PHP and my
06:29SQL. I've come to understand how Drupal works from the inside out because I can
06:33see how programmers use some of its internal variables.
06:37And I feel empowered by seeing how one can just reach into the code and make
06:40big changes with very small tweaks.
Collapse this transcript
16. Launching Your Drupal Site
Launching your site
00:00So, you've been working hard on making your Drupal site look and feel the way
00:04you want. It has all the functions you think you'll need, at least to start.
00:08Now, it's time to launch. As it happens, Drupal requires little or no
00:13additional work to go from development to public use. In fact if you've been
00:16secretly developing your site on a public web server, all you need to do is
00:20announce its existence and wait for the hordes to arrive.
00:23But here are a few tips that could help ease that transition. First of all, if
00:28you're moving from one server to another or from your home computer to a
00:32server, review the requirements that we outlined in the video, checking
00:35Drupal's requirements. If you have any questions or can't get the site to work
00:39properly, contact the system administrator.
00:42Secondly, check all the permissions. The best way to do that is to go through
00:46the registration process yourself the way that everybody else will and see what
00:50parts you can and can't see. Is it the way you expected? If not, go back as the
00:55administrator and make the appropriate changes. Third, have a beta period.
01:00Invite your friends to check out the site. See what complaints and compliments
01:04they may have.
01:05You'll be surprised when you've more eyes looking at your site. Fourth, before
01:09you launch, make sure that your backup routine is perfect on your new system.
01:14You may have to change some things. For example, if you were developing on a
01:18desktop computer and are now on a server, you'll need to use an FTP program to
01:22get your files to and from that server.
01:25Don't just practice backing up; actually restore your site from a backup at
01:29least once to make sure that that works. Remember, a backup is only as good as
01:33your restore routine. Finally, here is the procedure to move your site to a
01:37server. Go back to wherever you first installed Drupal. I'm going to do that by
01:42clicking on the Finder and hiding everything else.
01:44I've the Drupal folder here, but I actually need to grab the entire folder. So,
01:49I'm going to go up one level, on the Mac you go to Go and Enclosing Folder. On
01:54the PC, you'd just click on the icon that goes to the Enclosing Folder. This is
01:59the folder that goes to your server, typically be an FTP program. We named our
02:03entire folder Drupal. You may have named it something else such as the name of
02:07your site.
02:08Whatever you named it, the entire folder has to go. You may also need to speak
02:12with the system administrator of that server. Inside the Drupal folder, there's
02:16one folder in particular that may have permissions problems, that's the Sites
02:20folder. Inside here, all and default maybe read only and that may cause
02:28problems if they're not copied to your server correctly.
02:30If so, Drupal will tell you. Once that folder has been copied to your server,
02:35you also need to upload and SQL database. I'll show you how to export it now
02:40through phpMyAdmin. If you've phpMyAdmin installed on the server, you can
02:45import it the way that we show you in the backing up your site and restoring
02:48your site from backup's videos.
02:51To launch phpMyAdmin on your local computer, go to MAMP or WAMP if you're on a
02:55Windows computer, go to Open start page and then click on phpMyAdmin. To export
03:02the database, scroll down and choose Export and then choose your Drupal
03:06database. Scroll down to the bottom of that screen, select Save as file and
03:12then click Go. You can then take that file and bring it to your server to
03:18phpMyAdmin or whatever other MySQL administrative tool you use.
03:23That covers the technical points, but there are also social points to look out
03:27for when you launch a site. First, assume that people will try to abuse the
03:32site. You can always give people more freedom, but it's hard to take it away.
03:35So, start with very little permission given to the ordinary user and then add
03:40more as you start to trust them more.
03:41We've shown you several ways of protecting your site and controlling
03:45permissions, but I also recommend that you look through a part of the Drupal
03:48site which has security modules, that's drupal.org, then go to Download,
03:59Modules, scroll down and Security. Remember to filter according to Drupal core
04:08compatibility. To do that, you need to sign up for the drupal.org website and
04:12log in.
04:14Next, have realistic expectations, remember, you may have been working on this
04:18site for weeks and months and it maybe your entire world, but to somebody who
04:23doesn't know about it, it's just another site on the internet. Things may start
04:26slow, don't be disappointed, just work on making it bigger and better.
04:31Next, make sure that you've a feedback loop, so that when people see something
04:35that works wrong or right on this site, they'll tell you and you can improve
04:38the site further that way. I recommend in fact that you add a forum that's
04:42specifically for feedback in the site. I'm doing that now by going to
04:45Administer and Forums, adding a forum and just call it Website Feedback of
04:52something like that.
05:02With this forum, you'll not only have feedback, but it will be public feedback
05:06which other users can comment on and then based on public feedback, you can
05:10decide what changes to make. Finally, expect to be surprised, there's such an
05:15enormous diversity of people in the world and they all have access to your
05:18website.
05:19You might be surprised that exactly who comes, perhaps a different age group
05:22than you expect or a different interest group than you expect. Try to follow
05:26the crowd, but still remember, it's your site and make it what you want.
05:31Launching a site involves a major switch in the skills you use everyday, up to
05:35this point, you've had to focus on design, configuration and of course, content.
05:40Those skills are still needed after you launch. But now, your primary job is to
05:45be a social manager. Unlike in the world at large though on your Drupal site,
05:49you make the rules.
Collapse this transcript
Joining the Drupal community
00:00Like other successful open source projects, Drupal has coalesced into a
00:04community of people who both develops sites in Drupal, and develop the Drupal
00:08software itself.
00:09Such communities are tend to be programmer heavy and marketing light and Drupal
00:13is no exception. However, the Drupal project has been fairly successful at
00:18giving less experienced members ways to get involved. Here are some ways you
00:22can get involved regardless of your level technological skill.
00:26As always the place to go to become involved in the Drupal community is
00:30www.Drupal.org. Once there you will notice one tab that's especially important,
00:37the Contribute link. Let's click on it and see what's here.
00:40This is an overview of several ways you can contribute to Drupal project. Of
00:44course, you could donate, but also even if you are not a developer, if you
00:48don't know how to program. You can help with documentation and translations. If
00:53you are a graphic designer, you can help out with themes, and each one of these
00:56links will lead you to more information about how those projects are running.
01:00Finally the testing part is very important, and they need less experienced
01:04Drupal developers. The problem with such project is that they tend to attract
01:08people who already know Drupal well and don't really remember what it was like
01:12for a new user. If you're that new user, they need you for both testing and
01:17especially for usability.
01:19Let's go back up to the top. Once you start looking around the Drupal site, you
01:24will want to get a user login. You do so by clicking on Create new account. I
01:29already have an account so I am going to log in now. Once you have logged in,
01:35you will notice this link here, My Account. When we go there we can edit many
01:40different things that will help others to determine whether we might be right
01:43for their projects and then they can contact us directly.
01:46We can also change the way this home page looks to us by adding and subtracting
01:50certain blocks. I recommend that you take a good look of all the different tabs
01:54up here and fill out as much as you can and start showing your face within the
01:59Drupal community that way.
02:01Another way that you can get to meet other people within the community is by
02:04taking part in groups. Some of them meet face-to-face while some are special
02:08interest groups that take place only online. The place to go for that is
02:12www.groups.Drupal.org. Notice that this has a separate log in, so you will have
02:18to create an account here, if you want to take part in discussions and so forth.
02:23Incidentally, when you do start taking part discussions, records of the
02:27comments that you make and the contributions that you make to the software and
02:30documentation projects attracts.
02:33Let's go back to Drupal.org site and see how that works. When you go to My
02:37Account you will see this link here, Track. If you have made any public posts,
02:43it will show exactly what they were and it will show if there have been any
02:46replies. Through this tab you can keep track of all of the different things you
02:50are doing and how is talking to you as well as what groups you have taken part in.
02:55Another website you should know about is the Drupal Association. This is
02:59not-for-profit group based in Belgium whose goal is to build and promote the
03:03Drupal community. It's at association. Drupal.org. The first thing that the
03:10Drupal Association does is it accepts donations. So even if you do nothing
03:15else, you can give a small donation which we will go a long way. Since there is
03:18a no paid staff in the Drupal project all of your money will go towards hosting
03:23and other infrastructure points that are necessary to keep the Drupal project going.
03:28Let's go back to the Drupal.org website. Finally there is one document that I
03:33recommend that you read. It's under About Drupal and Welcome. It's this, how to
03:39enact change within the Drupal community. It gives several tips about the
03:43Drupal community. Read this see what's being done already and then jump in.
03:48While the Drupal community can seem overwhelming now, it's started under the
03:52direction of just one person. The Flemish student Dries Buytaert who, by the
03:56way, is still at the helm. It grew beyond his circle of friends by accretion.
04:00Like a pearl it added layer upon layer rather than through any sudden explosion
04:04of growth. It's a lopsided prowl to be sure. The software side is particularly
04:09heavy, but on the whole the community has gone through these seven or so years
04:13remarkably well without splits or major acrimony.
04:16It's a diverse community and it appreciates the contribution of its members. I
04:20know that I will appreciate yours.
Collapse this transcript
Conclusion
Goodbye
00:00Thanks for watching the lynda.com Drupal Essential Training course. I hope your
00:04experiences with Drupal are both fruitful and enjoyable and I look forward to
00:08seeing you on drupal.org, at Drupal events and in the Drupal community at large.
Collapse this transcript


Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 100,984 instructional videos.

start free trial learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 1,943 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.


site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked