navigate site menu

Start learning with our library of video tutorials taught by experts. Get started

Drupal 7 Essential Training
Mark Todd

Drupal 7 Essential Training

with Tom Geller

 


Drupal 7 Essential Training shows how to get the most out of Drupal, the content management system (CMS) that powers over a quarter million web sites. The course demonstrates how to download and install Drupal, add content and graphics to a site, change layout and design elements, control visitor interactions, and expand the site's capabilities beyond what’s available in Drupal core. Discussion of established best practices in each step to ensure that a site remains streamlined, secure, and up-to-date. Exercise files are included with the course.
Topics include:
  • Comparing Drupal with other content management systems
  • Understanding nodes
  • Creating basic content
  • Adding blogs, discussions groups, and polls
  • Subscribing to RSS feeds
  • Creating new content types
  • Managing users, roles, and permissions
  • Creating and modifying block regions
  • Adding menus
  • Extending site capabilities with modules

show more

author
Tom Geller
subject
Developer, Web, CMS
software
Drupal 7
level
Beginner
duration
7h 23m
released
Jan 14, 2011
updated
Nov 10, 2011

Share this course

Ready to join? get started


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:04Hi, I am Tom Geller, and this is Drupal 7 Essential Training.
00:08Version 7 makes Drupal even easier, with better content handling, expanded user
00:13management, an improved administrative interface, and a new installer that gets
00:18you up and running faster than ever.
00:21This course starts you off at the very beginning, and guides you through to a
00:25completed and launched site.
00:27I'll start off by helping you decide whether Drupal is right for you.
00:30Then we will move quickly but thoroughly, through installation, configuration,
00:36layout, content, and user management.
00:42Finally, I'll show you how to update your site, so it will run reliably and
00:45securely for years to come.
00:48Drupal took me way beyond what I could create with other web tools.
00:52Let's get started making great web sites with Drupal 7 Essential Training.
Collapse this transcript
Getting a Drupal site up fast
00:00You've probably looked at the dozens of videos in this course and said,
00:03"Whoa, wait a second. I just want to get my site up."
00:05This video gives you only the most bare instructions to get a Drupal site
00:08running, and then tells you which videos to watch for more help.
00:11There are basically three steps.
00:13First, we will download and install the Acquia Drupal Stack installer,
00:17also known as DAMP.
00:18Second, we will download and import core Drupal--
00:22that's the Drupal you get from Drupal.org--into that DAMP.
00:25Third, we'll run Drupal's browser-based installer. And that's it.
00:29Then we'll be ready to add content and administer our site.
00:32Now, along the way I'm going to do this very, very quickly--and in fact, I've
00:36already downloaded some of these files and uncompressed them.
00:39If you have any problems with these steps, see the Computer Literacy courses by
00:42Garrick Chow, also on lynda.com.
00:45But let's get started.
00:46Our first stop is at acquia.com/downloads.
00:50Here we grab the DAMP by looking over here for the platform we're on.
00:54In our case, we're on Windows, so I just click Download Now, and save it.
00:58That will take a few moments.
01:01We then go to our download location, which in my case is the Desktop,
01:06and double-click the file that's been downloaded there.
01:09Your computer may throw up a window that warns you about installing a
01:12program from the Internet.
01:13In this case, I know we want to do it, so I'll click Yes.
01:17That launches the Drupal Stack installer.
01:19I'm just going to click through this.
01:21You really don't have to change any of the defaults.
01:23I'll explain what they are in a later video about installing the Drupal Stack installer.
01:33Finally, we come to what we want to name our site.
01:36We're actually going to be replacing the version of Drupal that's installed by
01:40the Stack installer, so it doesn't really matter what we put here.
01:43Still, for consistency, I'll say username is "admin" and password, as it is
01:48throughout this course, is "Drupal".
01:49You of course will use whatever password you prefer.
01:53And an e-mail address, and then click Next.
01:57We get a confirmation screen. Click Next again, and then one more time to
02:01install the Stack installer.
02:03This process will take a few minutes. And we're done.
02:07When we click Finish, that launches the control panel for Acquia Drupal.
02:12So that's our first step completed.
02:13Now we want to grab core Drupal and import it into this stack.
02:17To do that, we go back to our web browser and go to drupal.org/project/drupal.
02:24Scroll down on this page until you get down to the Downloads area.
02:28Now, I'm making this video before the official release of 7.0, so I'm going
02:32to download this one.
02:33However, by the time you see it, you'll probably see a 7.0 version or 7.something
02:38version up here in the green area, and that's the one that you should download.
02:42I click here to download.
02:43I've already done it, and my download is on the Desktop.
02:46So I'll go back there, and I'll start the import process.
02:50So there is our drupal folder after it has been uncompressed.
02:53If you have any problems with that step, watch Garrick Chow's videos on Computer
02:57Literacy, also on lynda.com.
02:59I'm going to rename that folder to 2trees.
03:03That goes along with the site that we're going be building throughout the
03:06course, which is about a fictional olive oil company called Two Trees Olive oil.
03:10Once we've renamed the folder, I go back into my control panel, go to Settings
03:15and Sites and Import.
03:18I find that folder and click OK. Create a new database.
03:24I'll call that 2trees as well, and call the server 2trees, and click Import.
03:31Doing so launches our browser and starts the third step of our process, where we
03:35go through Druple's own installer. Click Save and continue, and continue on.
03:40Again, I'll go through all of these steps individually in a later video.
03:45Finally, we add a little bit of information about the site, including the
03:48primary, what's called the super-user.
03:51I'll call this Two Trees Olive Oil.
03:54Put in a little bit of other information.
04:06Finally, click Save and continue, and that takes us to our completely
04:09installed Drupal site.
04:11Click on Visit your new site, and we are done.
04:14Now you can start adding content to your site, changing the design, managing
04:17users--basically doing everything it takes to make this site your own.
04:21If you're just seeking a quick and dirty way to get started, see the video
04:24"Learning Drupal's Basic Workflow."
04:27Then once your site is ready on your laptop or desktop computer, you can move
04:30that installation to a server, which you'll learn about from several videos in
04:34the section on Installing Drupal on a Server.
Collapse this transcript
Using the exercise files
00:00You have access to this course's exercise files if you are a premium member of
00:04lynda.com, or if you receive this course on a disc.
00:07These files bring your Drupal site to the state it would be in if you had done
00:10all of the previous exercises.
00:13This video assumes that you already have the Acquia Drupal Stack installer
00:16running on either Mac or Windows, and that your site is called 2trees.
00:20If you need help with that, watch the section of this course about installing
00:24Drupal on Mac OS X or Windows.
00:27Finally, the technique I'll show you assumes that you're running a recent
00:30version of Drupal 7.
00:31There is a longer method that involves deleting your entire Drupal installation,
00:35but this method should work fine.
00:37When you bring in your exercise files, you'll have to replace two things:
00:41the site-specific folder full of files and the site's database.
00:45We'll start with the files, which includes such things as the graphics.
00:49On the Desktop, I have the folder which contains our site, 2trees.
00:54Inside here is another folder called sites.
00:57This is the information that goes with our site, and that's what gets replaced
01:00with the exercise files.
01:02I also have a test exercise file folder right here.
01:06It contains the database, which ends with .sql.gz, and the sites folder here.
01:12We start with the sites folder.
01:14On the Mac, to uncompress it, you simply double-click it.
01:17On Windows, you might need to download a utility such as WinZip or 7-Zip.
01:21For more help, see Garrick Chow's courses on computer literacy.
01:30There is our sites folder.
01:31We now drag that into our live site folder to replace the other sites folder
01:35that was there--and yes, we really do want to replace it.
01:39If you're concerned about this process and would like to be able to go back to
01:43your earlier version, make sure you save that sites folder in another location
01:47before you replace it with the new one.
01:51Next, launch the Acquia Drupal Stack installer and click the Manage my database button.
01:58On the phpMyAdmin screen that you see here, click the Import tab.
02:03Then browse to find the file ending in .sql.gz.
02:08That's the database file.
02:12Then click Open and Go.
02:16This will take a little while,
02:17but if it works, you'll get a message at the top that the import has been
02:20successfully finished.
02:22Now I have to tell you that this is the part that's most likely to break, and
02:26I'm afraid I just can't offer any good advice.
02:28There are too many things that can go wrong.
02:30But with these exercise files, it should work just fine.
02:33Our new site is now up and running.
02:35If we go back to the site and reload the page, we'll see some of the changes.
02:40There is just one thing:
02:41Some of the later videos assume that you've installed additional modules.
02:45I decided not to include those in the sites folder, since they'd be obsolete by
02:49the time you got them.
02:51So instead, you'll have to download and install those separately.
02:55Don't worry about it, though.
02:56It's not difficult, and it doesn't take long.
02:58To determine which modules are needed, after you've uncompressed your exercise
03:02file, go into the folder sites/all/modules.
03:07If you find a file there labeled lyndareadme.txt, and that will tell you
03:12which modules you need.
03:13If there is no such file, you don't need to install any extra modules.
03:17Instructions on how to install those modules are in the video on finding
03:21and installing modules.
03:22There is one last step that you have to do.
03:25To show it, I'll go back to our site.
03:27You'll notice that bringing in new exercise files logged us out of the site if
03:31we were logged into it before.
03:33So first, I have to log in again as the administrator.
03:35Once again, in our exercise files, the username is "admin", and the password is "drupal".
03:41If you don't see the login boxes in the left column, go to the login page on
03:44your site by typing /user after your site's domain name.
03:48In our case, that would be http://2trees:8082/user.
03:56If the screen doesn't look right, try refreshing your browser.
03:59Once we're logged in, go up to the URL and change the end to "update.php".
04:06The reason for this is that the exercise files were created with a version of
04:10Drupal that I have is on making these videos.
04:12But when you're watching it months from now, you may have a later version of
04:15Drupal, and there may have been some structural changes in the database.
04:19This program will take care of them. Click Continue.
04:22If there are any, it will give you further instructions.
04:25In this case, there were no other instructions.
04:27So we're all set, and that's it.
04:29I know it seems like a lot to remember, but that's because we went through it step by step.
04:33Once you've done it a few times though, I guarantee you will fly through it with ease.
04:38Now having said that, I need to make a disclaimer: these instructions should work,
04:42but it's possible that future versions of Drupal 7 will break the process.
04:46I'm afraid there is nothing I can do about that here.
04:48So if you get an error message and you're sure you followed the procedure
04:51correctly, contact customer support at lynda.com.
Collapse this transcript
1. Defining Drupal
Managing content with Drupal
00:00Drupal is one of a class of software called web content management
00:04systems, or CMSes for short.
00:06The best way to understand what Drupal does, and how it's different from other
00:10CMSes out there, is to look at the field as a whole.
00:13We'll also look at how Drupal specifically handles content while we build this
00:17site, Two Trees Olive Oil.
00:18But first let's talk about CMSes generally.
00:22A CMS has several characteristics.
00:24First of all, it's multiuser:
00:26That is, you could sign in as the administrator, and you could give permissions
00:29to other people to create content and do other administrative tasks. Or you
00:34could have it just yourself as the administrator if you prefer.
00:37It has multiple permission levels to allow that.
00:39For example, on a newspaper site, you might have editors, writers, and publishers;
00:43while on a sales site, there is a manager, data-entry person, and
00:47order-fulfillment-person.
00:49Meanwhile for a design firm, there are designers, coders, and project managers.
00:54A CMS treats content as individual pieces.
00:57You'll see this in Drupal in what are called nodes.
01:00These nodes can then be moved around and combined in interesting ways.
01:04Let's talk a little bit more about those content pieces.
01:08They can appear by themselves, or they can be collected together.
01:11In Drupal, they are called views, when you collect them together.
01:14I'll show you how to do that later on in this course.
01:17They can be distributed in a variety of ways.
01:19Most commonly, that's through a computer screen, but it could also be in
01:22print or through some sort of feed in RSS or viewed on portable devices, such as phones.
01:28CMSes will not only feed out the information, but will take it in and interpret it.
01:33We talk a little bit about something called Resource Description Framework,
01:36or RDF, in this course.
01:38One major characteristic of CMSes is that it treats all of this content equally.
01:43It takes it in, and it presents it back in a consistent manner.
01:47You can override that consistency if you like, but this way you don't have to
01:50worry about styling headlines differently from one to the other.
01:54It'll all just come out looking the same--or at least looking the way that you want it to.
01:58Finally, these nodes are separate from the design.
02:02If you have a hundred articles on your site and you change the design, every
02:05headline and every body text will change its look.
02:09It'll do so, once again, in a consistent manner.
02:12Finally, I just want to mention a few technical aspects of CMSes, and again this
02:16is true of Drupal as well as other CMSes, such as Joomla! and WordPress.
02:20They are server-based, which means that you take your files and you put them on
02:24a remote computer that then hands those files off when people request them.
02:29The software itself doesn't live on your computer;
02:31it lives on the server.
02:33It doesn't require people receiving the information to have anything more
02:36special than a web browser.
02:38CMSes do this magic by combining the files that make up the program with
02:42a backend database.
02:44In Drupal, that's usually MySQL.
02:47CMSes are generally extensible.
02:49So although you can download the core Drupal software from Drupal.org, you can
02:53also add on to it for many new functions.
02:56CMSes usually separate the way that you administer the program from the way that
03:01people casually view it.
03:03That's especially true in Drupal 7, where the look of the screen is different,
03:07as well as of course the things that you can access as the administrator.
03:11Let's take a look at some other examples of CMSes, and then we'll understand
03:15better how Drupal compares.
03:17The first one on our list, and on many people's lists judging from its
03:20popularity, is WordPress.
03:22Our first WordPress site is CSS-Tricks, which is by lynda.com author Chris Coyer.
03:28You can see that some of the things I described are true for this site as well.
03:32Here is a specific piece of content.
03:34In Drupal, this would be a node, and here is another one over here.
03:38The whole site looks consistent as we go from page to page--or at least as
03:42consistent as the author and creator wants it to be.
03:45Another big CMS is Joomla!
03:47The Latvian government publishes its main public relations site using Joomla!
03:52Once again, we see a specific piece of information here, what again would be a node in Drupal.
03:57We see menus.
03:58If we go from one page to another, we see that it actually keeps its consistent
04:02look, and all of those other things that I described earlier.
04:06To find out more about WordPress, go to wordpress.org. For Joomla!,
04:10go to joomla.org.
04:13The last CMS I want to mention is MediaWiki, which runs Wikipedia.
04:18You can get to Wikipedia at en.wikipedia.org for the English language version.
04:23Once again, it looks consistent from page to page.
04:26It has separate pieces of content, menus, and all these other things we discussed.
04:31So those are the three most popular CMSes.
04:33By the way, all three are free and open-source software.
04:37Let's take a look again at our Drupal site.
04:40What I have here is our site sort of midway between the course.
04:44Once again, it has a consistent look as you go from page to page.
04:48It has individual pieces of content.
04:51You can click on any of these links and see that content itself.
04:55It has multiple users, and we can see those users' profiles by clicking on their names.
05:01Finally, it does have a separate administrative interface from the viewing
05:04interface, as you can see by clicking on an administrative link.
05:08I hope that gives you a sense of what CMSes have in common.
05:11I only talked about three besides Drupal,
05:13but there are literally hundreds and hundreds more.
05:16If you're interested in learning some more about those, here are some resources
05:20that'll let you plunge deeper.
05:23Wikipedia has a list of content management systems that includes dozens
05:27and dozens of them.
05:28It's really amazing how many there are out there besides Drupal.
05:31CMS Report is a commercial site that keeps up on the doings of all of them.
05:35CMS Matrix compares them one to the other.
05:38I didn't even mention the many web sites that offer hosted CMS-like services,
05:42such as Facebook and LiveJournal.
05:44But I think that they're in a different class, really.
05:47In comparison, with Joomla!
05:48and MediaWiki and WordPress are much more apt.
05:52Those like Drupal live on your own computer, which you control, and you have
05:56much more power with them than those hosting systems could ever give you.
Collapse this transcript
Comparing Drupal with other content management systems
00:00Whenever someone mentions Drupal, two other names are sure to be in the air:
00:04WordPress and Joomla!
00:06These certainly aren't the only three content management systems out there, but
00:10they are the biggest--at least when you look at statistics, such as the one on
00:14the site backendbattles.com.
00:17On the front page, you see a comparison of all of the backend tools:
00:20that is, things that are installed on the server to help support web sites.
00:24And by far the most popular one is Google Analytics.
00:28In fact, Google Analytics is often used on Drupal sites.
00:31If you look down these first seven, you don't see Drupal at all.
00:34But if you look at only the CMS category, you see that it shows up as number one.
00:40Now, quite honestly, the only reason that that's so is because this particular
00:44site classifies WordPress as blogging software.
00:48There you see that there is over 140 WordPress sites in the top 10,000 as
00:53compared to just a mere 39 for Drupal.
00:57In practice though, the three are really quite similar.
01:00This video talks about some of their differences.
01:03To make this easy to remember, I've broken up the differences into four
01:07categories, which are easy to remember with the letters A-S-U-M, a sum of four qualities:
01:12the CMS' abilities; support for the CMSes;
01:16their usage in the world;
01:17and their Maturity, how long they've been around and how stable they are.
01:22We'll look at these one at a time. First, abilities.
01:25Drupal has proven itself as being able to support even the most busy web sites out there.
01:30There was one case where 20,000 requests per second were hitting Drupal, and
01:35it worked just fine.
01:36Drupal gets a lot of high praise from developers, and it's generally considered
01:39to be a complete CMS. Joomla! is very similar.
01:43It hasn't proven itself with as high-traffic sites, but I haven't heard
01:47complaints that would suggest that it wouldn't be able to do the same
01:49capabilities as Drupal.
01:51Whereas Drupal is favored by developers, Joomla!
01:54usually gets a lot of attention from designers, who find it easier to make
01:58visual impact with their sites. And like Drupal, Joomla!
02:01is considered a complete CMS.
02:04WordPress is best known for being easy to set up and easy enough for
02:07beginners even to use it.
02:09The only thing is it doesn't have nearly as many capabilities as Drupal or Joomla!
02:13However, because it's so popular, there are so many people developing for it.
02:17It's growing fast, and I wouldn't be surprised to see it start to meet, or even
02:21overtake Drupal and Joomla!
02:23I should really mention that these are all arguable measures.
02:26There are designers who prefer Drupal, there are beginners who prefer
02:29Joomla!, and so on. Next, support.
02:33Both Drupal and WordPress have a single authority who is considered to be the
02:37one who runs the community:
02:39Matt Mullenweg for WordPress and Dries Buytaert for Drupal.
02:42These were the people who wrote the original software and still have a strong hand in it.
02:47Joomla!, on the other hand, doesn't have a central authority, and that's
02:50actually caused it some problems. Joomla!
02:52itself is a split from an earlier project called Mambo, and this lack of
02:56leadership has caused some infighting within that community.
03:00If you come across problems that you can't handle and you want to hire somebody,
03:03you'll see that Drupal, Joomla!
03:05and WordPress all have a large number of consultants available.
03:09It's worth noting that Drupal has quite a few companies with more than ten employees.
03:13That's good if you have a large site and you want to be sure that they can
03:16dedicate enough firepower to your problems.
03:18On the other hand, both Joomla!
03:20and WordPress seem to have more individual consultants.
03:24Next, we come to Usage.
03:26In this regard, there is no comparison.
03:28Going back to that site I showed you, backendbattles, WordPress is by far the
03:33most used of the three CMSes.
03:35There are allegedly over 25 million sites using WordPress, although of
03:39course how often those sites are updated or how active they are generally is under debate.
03:45But you can't argue with the number of top sites that are using WordPress:
03:48140 or so, as compared to 40 or so for Drupal and 20 for Joomla!
03:53That's of the top 10,000, as is rated by Alexa.com.
03:58Finally, we can compare the CMSes by maturity.
04:01Drupal is the one that's been out longest as a single project.
04:04I mentioned earlier that Joomla!
04:06broke off from Mambo in 2005, so you could arguably say it goes back as far as
04:11Drupal, or not, depending on how much you think Joomla!
04:14is similar to the earlier Mambo.
04:16Another way to consider the maturity is by looking at the number of
04:19themes available for them.
04:20Drupal has about 500.
04:21Now, that's for Drupal 6.
04:23Many of those will be modified, so that they'll run with Drupal 7, but of course
04:27it's too early to tell yet. Both Joomla!
04:30and WordPress have over 1,000 themes.
04:32Now, that's only one measure of course.
04:34You should also consider how many people are contributing code, how many people
04:38download Drupal or Joomla!
04:39or WordPress per month, and so on.
04:42On the code contributor side, Drupal is extremely strong.
04:46Hundreds of people are contributing code to Drupal every week and making it
04:50a stronger project.
04:52Finally, I just want to mention some resources, if you'd like to take a look at
04:55the whole world of CMSes, to decide if Drupal is right for you.
04:59First, a simple search online for Drupal versus Joomla!
05:02or Drupal versus Joomla!
05:03and WordPress will tell you a lot.
05:05One article that I like in particular is this one here on theopensourcery.com.
05:11Finally, it's a good idea to look at sites that are running the three CMSes.
05:15A big Drupal site is examiner.com, which just switched over to Drupal recently.
05:20It's one of the top sites on the web, at #505.
05:23ubuntu.com is another one running Drupal, and there are many more that you can
05:27see at the URL here on buytaert.net. Joomla!
05:31doesn't have quite as many big sites.
05:33The biggest one that I could find is this dnsstuff.com, at Alexa 4,000 or so.
05:38There is a site thatguywiththeglasses.com, which looks very good.
05:42WordPress, as I mentioned earlier, has many sites.
05:45The top one, amusingly enough, is perezhilton, which is Alexa 560, or so.
05:51failblog.org is another one, and you can find many more by going to
05:54backendbattles.com/backend/ WordPress, or Drupal, or Joomla!
06:00If you go through many of those examples, you'll quickly realize that all three
06:04are ready to tackle pretty much any web-site-building challenge.
06:07They are all free, so there is no cost to try them all.
06:10So that brings us to our next question. Why choose Drupal?
06:14We'll cover that in the video about deciding whether to use Drupal.
06:18If you want to get more of a sense of what's been done with Drupal, see the
06:21video about looking at Drupal-built sites.
Collapse this transcript
Deciding whether to use Drupal
00:00The decision of whether to use Drupal is based on three things:
00:04first, the kind of site you want to build;
00:07second, what resources you have available to you;
00:11and third, what alternatives are out there, and whether one of them might be a better fit.
00:15Let's look through each one of these.
00:18First, consider what kind of site you're building.
00:21Drupal is especially good for sites that go a little bit beyond the basics, or
00:25that have to be updated frequently.
00:27So if you have frequent updates, you won't have to upload files and rewrite
00:32text on the server;
00:33you'll just bring it into the CMS, and it will be done.
00:35Drupal is also good if you have multiple contributors, because it automatically
00:39handles user accounts.
00:41Drupal is good if it's a membership site for the same reason.
00:44You can set different levels so that some people contribute to the site and some
00:48people simply have more access to read the site.
00:51Drupal is good if it's going to be interactive.
00:54You can post a story, for example, and then allow people to add their own
00:58comments to it, and add comments to the comments.
01:01There are some things that Drupal is not as good for.
01:04First of all, if you have any special design requirements, it's a lot easier to
01:08do in other systems, specifically in plain HTML.
01:12It's possible to make any kind of design you want in Drupal, but it's a
01:15little bit complicated.
01:17If you want to learn how to do that, watch Chris Charlton's course on lynda.com
01:21about creating Drupal themes.
01:23Drupal is also a really overkill if your site doesn't require any maintenance.
01:27If you just want to put up something that announces your business or announces
01:31your family, and you don't expect to have people coming there and leaving
01:34comments, and you don't expect it to change very much, Drupal is probably going
01:38to be more than you really need.
01:40Secondly, consider what resources you have available to you.
01:44Technically, you need to have an Internet service provider that will give you
01:47the sort of access you need in order to run Drupal on their web hosting service.
01:53That means that they either set up Drupal for you or they allow you to set it
01:57up yourself by giving you enough access to put the files there, change
02:00permissions, and do things of that sort.
02:03Drupal does also have some specific server requirements.
02:06I don't go into those very much in this course because they're low enough that
02:09most web hosts already have those taken care of.
02:13If you do have any problems with your web host, however, check the
02:16documentation on Drupal.org.
02:18In addition to these technical resources, there are some things that you
02:21personally also have to be able to do.
02:24First of all, you have to be able to move files between your computer and the server.
02:28You have to have enough knowledge to get around the server itself, as well.
02:32You also need to have the time and willingness to perform maintenance from time to time.
02:36There are two kinds of maintenance.
02:38One is the human maintenance, where you look over the comments people are
02:41leaving to make sure that they're not things you don't want on your site.
02:45You also have to update Drupal every once in a while.
02:48The third resource that's good to have is some knowledge of the languages
02:51that make up Drupal:
02:53that is, PHP, CSS, and JavaScript.
02:56Now, I can tell you personally, I'm not very good with any of those, and
02:59I manage okay, so you don't really need these, but if you have them, all the better.
03:04The third thing to look at when considering Drupal is whether there might be a
03:07simpler alternative.
03:09On this particular point, I agree with Albert Einstein who said that everything
03:12should be made as simple as possible, but no simpler.
03:16Too often in the Drupal world, the focus is on, which CMS do I need?
03:20But often plain HTML will give you exactly what you need. Or you might be happy
03:24with a hosted solution.
03:26There are a few different types of hosted solution.
03:28First, there are those things that are sort of like CMSes, although you can't
03:32actually take your data off and then re-host it somewhere else.
03:36Examples of those are Facebook, LiveJournal, and Yahoo Groups.
03:39Although quite honestly, LiveJournal does let you take your stuff off.
03:43It's just a little bit hard then to re-host.
03:46If you like Drupal but you don't want to have to deal with the server, you might
03:49want to consider Drupal Gardens.
03:50It's a real Drupal setup, but it's being hosted by Acquia, and you never have to
03:54do that kind of maintenance.
03:56If you're interested in this, see Drupal Gardens Essential Training, also on
04:00lynda.com. Or you might be happy with a simpler CMS;
04:03the big one in this category is WordPress.
04:06Or perhaps you don't want something simpler, just something different, in which
04:10case you have many, many choices-- among them Joomla! and MediaWiki.
04:15So why did I choose Drupal?
04:16Well, for me it was the right solution when I wanted to build a site to promote
04:19a book I wrote in 2008.
04:21I wanted to put a lot of things onto the site.
04:23I wanted to have news feeds and original blog posts, and other information of
04:27that sort, and I couldn't do all that I wanted using just WordPress.
04:31I certainly couldn't do it with HTML.
04:34So the site demanded it.
04:35That's the first requirement met.
04:37I already knew a little bit about working with servers, and I had the time to spend on it,
04:41so there is the second requirement.
04:43Finally, I looked at all the other CMS's out there, and then I looked at Drupal
04:47and played around with it a little and found that it was really the best option
04:51for what I wanted to do.
04:53So in the end, Drupal was right for me.
04:55Your task is to go out and look at your requirements, what you want your site to
04:59do, and consider the other options, and decide if Drupal is right for you.
Collapse this transcript
Looking at Drupal-built sites
00:00Possibilities define goals.
00:02That is, you need to know what can be done before you plan to do it, but it's
00:06hard to see possibilities in the abstract.
00:08A better way is to look at what's been done already and then build from that.
00:12So in this video, we're going to run through a bunch of sites that are built on Drupal.
00:16You'll get two things from this little exercise.
00:18First, you'll see common patterns of Drupal use.
00:22Second, maybe you'll get a little inspired to replicate some of the fancier tricks.
00:26I'm going to start with the two highest-traffic Drupal sites on the web.
00:30The first one, amusingly enough, is Drupal.org itself.
00:34This is of course built in Drupal.
00:36You see that it uses a columnar design, where you have a column here, a
00:40column here, and one here.
00:41It also has several other interesting features:
00:44a large Search box up here, a menu that's hugging the top of the screen, a
00:49map down here that shows you the latest activity around the world and where
00:53exactly it's coming from.
00:54The bottom of the page, as is increasingly common in modern design, has a list
00:58of links, so you can find out more about the company--
01:01in this case, about the open source community of Drupal.
01:04Another very large Drupal site is examiner.com.
01:08This is an interesting example because it wasn't a Drupal site until very recently.
01:13In fact, they rebuilt the site on Drupal 7 before Drupal 7 was ever released.
01:18Once again, it has separate pieces of content here, lots of teasers to the
01:23internal content so you can click on any one of them.
01:26You immediately get a picture, and then you can go on to the story itself
01:29by clicking further.
01:31Another big Drupal site is run by the U.S. government, commerce.gov.
01:35It has this large graphic here, which is not just a static graphic.
01:39It's what's called a rotator.
01:40So you can see a variety of things the Commerce Department is doing around the world.
01:44Sony Music has done something interesting.
01:47They've standardized on Drupal, so their individual artist sites are all on
01:51Drupal--for example, Elvis Presley.
01:53Going on, we have this Gizmo's Freeware site.
01:56You might be asking, why show this site?
01:58Well, one thing I want to show about it is it actually didn't take very much to set this up.
02:03This is the Acquia Marina theme, and there are very few changes to it.
02:07This is something that anybody who knows Drupal well can do in a couple of days.
02:11Now, I chose all of these sites to give you a sense of the variety that's
02:14available in Drupal. But that's really hard to do nowadays, because Drupal is
02:18truly being used for every purpose online.
02:21Here are two places where you can get to see a lot more Drupal sites.
02:26One of them is on the blog of Drupal's founder, Dries Buytaert.
02:29If you go to buytaert.net/tag/drupal- sites and scroll down, you'll see a whole
02:35big variety, and many of these are international sites, as you can see.
02:39Another place to see Drupal sites is on backendbattles.com.
02:43Go to backendbattles.com/backend/drupal.
02:47From there, you can see not only which sites are built in Drupal, but how
02:50popular they are within the Alexa.com 10,000.
02:53They are listed from most to least traveled.
02:56Now, some of what you've seen in these sites isn't exactly core Drupal, but
03:01includes a little bit of custom programming on top of it.
03:04But most of what you've seen is pure Drupal.
03:07That techsupportalert site especially has very little custom code in it.
03:12If you are a JavaScript or PHP developer, it's encouraging to see how well
03:16custom code can be made part of a Drupal site.
Collapse this transcript
Exploring the Drupal universe
00:00There is a prolific Drupal developer named Dan Kudwien who wrote in a comment on
00:04my blog that Drupal is not a product, Drupal is the community.
00:09Now, I think he is going a little far.
00:11I mean you run code on your computer;
00:12you don't run community.
00:14But he does have a good point.
00:15Drupal is open-source software created and supported by individuals, not a central company.
00:22Well certain people and companies exert strong influence,
00:24there is no single authority.
00:26So let's take a moment to unravel this decentralized yet powerful community.
00:31First things first:
00:32while the Drupal project doesn't have a central authority,
00:35it does have a central meeting place--Drupal.org.
00:39There is a lot of information here, and you'll find yourself coming back to this
00:42site again and again once you start using Drupal.
00:45I'll show you around, but honestly, you'll often find yourself simply using
00:49the Search function.
00:50The first thing I'm going to do is to log in.
00:53Now, if you don't already have an account on Drupal.org, you really must get it,
00:57and I'll show you why.
00:58Let's say I do a search here for views, and I come down and I want to take a
01:03look at a discussion that people are having about view. And I look and I think
01:08oh, that's very interesting.
01:09I'd like to posts something about this.
01:11Well, until I get a membership, I can't post to ask questions or answer questions.
01:16So do go back and get yourself a membership.
01:19I'm just going to log in with the membership I already have.
01:23Incidentally, I'm tgeller on Drupal.org.
01:27Once you've logged in, you have a choice of either going to the homepage, which
01:31is what we saw before, or a dashboard.
01:34This dashboard is very handy.
01:37You can set it up so that you see only those things that are most important to
01:40you whenever you log in.
01:42You can switch between the homepage and your dashboard as the thing you see
01:45first when you log in by using this Use Default Homepage, or Make this your
01:51Dashboard to be your homepage.
01:54The first question you might have is, where do I actually download the software?
01:58Well, you'll find that under Download & Extend.
02:01First off, you'll find here the most recent version of Drupal available in this big button.
02:06Now, when I made this, Drupal 7 hadn't quite come out yet.
02:09But when you watch this video, it'll probably say Download Drupal 7.whatever the latest version is.
02:15You'll also find here themes--
02:16that is, the graphic designs for Drupal--or even translations.
02:21So you can work Drupal in French or Spanish or any of many other languages.
02:25Just as importantly, there are modules here that extend Drupal.
02:29You'll learn more about this later in the course.
02:32So that's how you get the software.
02:33But just as important is getting help with the software after you've downloaded it.
02:38There are several places you can do that.
02:40The first one is in Documentation.
02:42If you need any help, especially just starting up, these first few guides,
02:47Understanding Drupal and the Installation Guide, are extremely useful.
02:51These are what are called handbooks in the Drupal.org world.
02:54These blocks on the right let you click around and drill down further into the
02:58exact steps that you need help with.
03:01There are also community resources.
03:03We'll describe more of these options in the video on getting help with Drupal issues.
03:08As long as we're talking about community, I want to go back and speak about
03:12something on that Documentation page.
03:14After you've gotten involved with Drupal for a while, you'll start wanting to give back;
03:18I know that I did. And you'll find that stuff down here at the bottom in the
03:23Community block here.
03:24I'll talk more about ways that you can help strengthen Drupal in the video about
03:28joining the Drupal community.
03:30Well, that's enough for the drupal.org web site.
03:32I mean you can click around it and find all the resources there yourself.
03:36But there is one more thing I want to point out, which a lot of people miss but
03:39I think is an extremely useful resource.
03:41It's called Planet Drupal.
03:43It's a blog roll that keeps track of all of these Drupal-related blogs, and it
03:48republishes them in a very easy-to-subscribe-to form.
03:52You go there by going to drupal.org/planet.
03:55As you scroll down, you see all of these blog posts, as well as the different
03:59blogs that make up the Drupal Planet.
04:02My own blog is here, by the way.
04:03If you want to look at any individual one, of course you can click on that
04:06person's name or the company name.
04:09Obviously, all of these people are important in the Drupal world.
04:12But I want to mention a few players specifically.
04:15The first one I've mentioned already, Dries Buytaert, was a university
04:19student in Belgium when he created the first version of Drupal in 2000.
04:23You'll see his name throughout the drupal.org site.
04:26To learn about other active drupal.org contributors, just find issues that
04:30interest you, and then look through the names of commenters and people who
04:34contribute the software.
04:35For example, let's go back up to the top of the page, and to Download & Extend.
04:40Here is an interesting module: Views.
04:42Well, we'll talk about this more later on in the course.
04:45I click there, and I see who exactly is maintaining views.
04:49If I view all committers, it tells me not only who the programmers are, but by
04:54clicking on Commits, I can see who did the most committing, and this
04:57merlinofchaos is an important person.
05:00Click on any user profile, and it tells you more about that individual.
05:03But that's enough for the drupal.org web site.
05:06The other big thing you should know about in the Drupal community is DrupalCon.
05:11You can find out more about it by going to drupalcon.org.
05:15This is the twice-a-year event that draws Drupalists from all over the globe.
05:20There is one in the spring in the United States, and then one in the fall.
05:24Up until now, it's been in Europe, although it may move to other areas of the world.
05:28These conferences draw over a thousand people, all of them interested in Drupal,
05:33for as much as a week at a time.
05:35I'll tell you, I've been to a few of them,
05:36they're wonderful places to meet the people who make Drupal and make
05:40connections for yourself, as well as learning more about the software you use.
05:44Finally, I want to mention groups.drupal.org.
05:47At the time I'm making this video, it's not very well integrated with Drupal.org,
05:51so it's a good idea to go there separately.
05:53You can get there, as I say, at groups.drupal.org.
05:58What you see here is the old design, and by the time you visit it, it may well
06:02look more or like the rest of the drupal.org site.
06:06groups.drupal.org is the place to go to find a local Drupal users group, or to
06:10find people interested in specific uses or cultures.
06:13For example, I belong to groups on Drupal.org that focus on real estate sites
06:18and Esperanto speakers and so forth.
06:21Well, that was just the barest introduction to the names and the things you'll
06:25see around the Drupal community.
06:27But it's growing really fast, and new people, companies, and initiatives appear daily.
06:32The only way to really know what's going on is to get involved.
06:35First, that means get an account on drupal.org and start using it.
06:39Second, subscribe to Planet Drupal--
06:42again, that's drupal.org/planet-- either on the web site itself or through
06:46whatever your favorite news feed reader is.
06:49Third, if you can make it to DrupalCon or any of your local Drupal events, do so.
06:54Again, you'll find out more about these events later on in the course and in the
06:58video about joining the Drupal community.
07:00One thing is for sure: with Drupal growing as quickly as it is, you'll never
07:04want for fellow travelers.
Collapse this transcript
Getting help with Drupal issues
00:00I'm sure I don't have to tell you the advantages of open-source software like Drupal.
00:04There is no cost for the software.
00:06There is peer review of the code, and it's a do-ocracy.
00:09That means that all users are empowered to scratch their own itches.
00:13One of the downsides of having no absolute authority is that there is also no
00:17absolute source of help.
00:19Some companies have popped up to provide assistance, but for the most part
00:22you're dependent on the mercy of strangers.
00:25Let's look at how to get the help you need, and how, in turn, to give it back.
00:29There are two parts to this.
00:31The first is knowing where to go, and the second is knowing how to act to get
00:36the answer you need.
00:37I want to cover the second one first, because it's actually more important.
00:41Fortunately, this advice already exists on the web, and there is an excellent
00:45post about it by Chris Heilmann.
00:48I just want to quickly summarize what Chris wrote, and add a few tips of my own.
00:52I'll break this into three phases:
00:54first, what to do before you get help;
00:56second, how to ask your question; and third, what to do after you start
01:00getting some responses.
01:02The first thing you should do is make sure you really have a problem.
01:04Really work at it before you start asking other people.
01:08You might find that you solve your own problem and learn something along the way.
01:11Second, do your research.
01:13Do a search on drupal.org, or just on Google in general.
01:17Again, you might find an answer to your problem more easily than asking someone else.
01:21Third, make sure that you have all the specifics together.
01:24It's a lot easier to answer a question that has error messages and screenshots
01:28than one that's just, "Something is broken. Please help me."
01:32When it comes time to ask, make sure you follow the rules and the norms of
01:35whatever forum you're asking in.
01:37For a support request, for example, don't file it in a place for bug reports;
01:42it just angers people, and you're less likely to get a response.
01:45Again, have all your information together, and then present it in a way that
01:49they can read quickly and understand what you mean.
01:52Third--and I'm afraid this is a big one--ignore any bad attitudes you get.
01:56Unfortunately, the people who are most able to answer your questions are those
02:00who've been using the software for years, and many times they forgotten what it
02:03was like to be a beginner.
02:05Just let any sort of bad attitude roll off your back, and try to get the
02:09information while ignoring any sort of troubles of that sort.
02:12Finally, if somebody gives you off- topic advice, just let it go. Accept it,
02:17see if you can get some use out of it, and then go back to the subject.
02:21These people are doing this for free and in their spare time.
02:25You can't expect them to be totally focused like you would for an employee, for example.
02:29Finally, after you've asked, make sure you give people enough chance to respond.
02:33I know your problem may seem urgent, but it does take time for people to
02:37understand what you need, and to get back to you.
02:40So give it at least a couple of days.
02:42After they start to respond, continue the conversation.
02:44Very often, I'll have a problem and I'll post what I think is complete
02:47information, and they'll come back and say well, have you checked this file and so forth.
02:52After I do, I find the problem.
02:53So make sure that you stay engaged.
02:56After you figured out what's wrong, report back.
02:58The solution you find may help other people in the future.
03:02Finally, when you're ready to, and you see a problem that you can solve, start
03:06answering other people's questions.
03:07Give back to the community.
03:09That's how it continues helpfully.
03:11But enough about etiquette;
03:12let's talk about where to get help.
03:15Our first source as always is drupal.org.
03:17I assume you're already logged in.
03:19If you're not, what now reads Your Dashboard will have a login or register link,
03:24and you can start your own account that way, or log in if you're not logged in.
03:28The first place to go is Documentation if you have a basic question.
03:32Here, there are several handbooks, which will help you with installation and
03:36administration, and even building your site and building your own themes.
03:41These are fairly well organized, so they can be quick ways to find your answer.
03:44Very often, however, you need a solution to a specific problem.
03:48In those cases, the Search box is often your best friend.
03:52Let's say that I am trying to delete a user, for example, and I can't do that.
03:56I'll try "can't delete user".
03:58That brought back a fairly short list of what look like relevant links.
04:03If you ask a more general question, such as, let's say "help with views",
04:08you'll find that it returns a much larger number.
04:11However, you can cut down on that number by looking over here in this right column.
04:15This is what's called a faceted search.
04:18If you wanted ongoing help with views, you might I think, oh, I'll join a
04:21group that specifically about that.
04:24As we scroll down, we see, well, I might be able to find something that helps me here.
04:28If you want to see all the issues again, just click All.
04:31There are two other places where you can ask questions.
04:34The first is in the forums on drupal.org.
04:36You get there by going to Community & Support, and then scrolling down
04:40and clicking Our forums, or just by entering the word forum at the end of drupal.org,
04:45so drupal.org/forum.
04:48Another place you can ask online if you're having problems with the specific
04:51module or theme is in the issues queue for that module or theme.
04:55To go there, I'll go to Download & Extend and then down to our Modules.
05:01Just for argument's sake, let's say that I'm having a problem with the Views module.
05:05I click there and then look down at the Issues.
05:08Here I can do a more focused search.
05:10So let's say I am having a problem with the calendar view.
05:13I could just enter calendar, and then click Search.
05:16Here I get quite a few issues where people have already had their
05:20questions answered.
05:21Many of these are bug reports.
05:22But if you're looking for support, you can also filter based on support
05:25requests. Or if you don't find an answer that you want there, you can create a
05:30new issue. But as I mentioned before, you have to already be logged in.
05:34The next thing I want to show you is how to get immediate help through
05:37Internet relay chat, or IRC.
05:40You can learn about that by going to Community & Support and then
05:43scrolling down to IRC.
05:46Here you'll find a lot of information of all the different channels and how
05:49to connect to them.
05:50The easiest way to get onto IRC is to go to webchat.freenode.net.
05:57Here I'll type in my nickname, and the channels that I want.
06:00On that previous page, there was a list of channels.
06:02I happen to know that Drupal and Drupal-support are the two that I want.
06:08Then type in this CAPTCHA code and click Connect.
06:12Before I do, notice that in the channels I put a little hash mark before the
06:15name, and there is no space after the comma.
06:20Here we're connecting, and there are our two boards:
06:22Drupal-support and Drupal.
06:24Notice all of the people who are here waiting to either ask questions or help
06:29you with yours, or just discuss Drupal.
06:31Again, be sure you read through the information on drupal.org about the
06:35community that exists in IRC and the proper way to ask questions.
06:39There are additional options up here in this little dropdown menu.
06:43The very last thing I want to mention is that you might want to hire somebody
06:47who is a Drupal expert.
06:48There are a few ways of doing that.
06:50Go up to Marketplace on drupal.org, and you'll see a list of people who either
06:55will help you with hosting or services or training.
06:58If you can't find somebody that way, you can post a specific job by going to
07:02groups.drupal.org/jobs.
07:06But if yours is a common question, chances are you'll get your answer simply
07:10through one of the forums or one of the other boards.
07:12If none of that works, of course, you can hire someone.
07:15The good news is that Drupal community is big enough to support all of these
07:19options, and certainly one of them will get you the answer you need.
Collapse this transcript
2. Understanding How Drupal Works
Checking Drupal's requirements
00:01Here's the brief speech that describes Drupal from a technical point of view.
00:05It's a set of computer programs that accesses a database and delivers
00:10information through a web server.
00:12That statement implies the three parts that you need to run Drupal;
00:15you need a way to run those programs, a database and a web server.
00:20The devil is in the details though, so here they are.
00:23First, there are Drupal's stated requirements.
00:26To run the programs, you need the PHP programming language installed.
00:30Specifically, it has to be version 5.2 or higher to run Drupal 7.
00:35Secondly, you need a database program. MySQL is preferred, but others are possible.
00:41And you can read the details at that URL that you see in front of you.
00:44That's drupal.org/node/310069.
00:49Thirdly, you need a web server.
00:51Again, there is a strong preference for Apache, although you could run it with
00:55a different sort of web server as well.
00:58Now those are the stated requirements for Drupal.
01:00There are also some other requirements which are not often mentioned.
01:04First, you need a way to install the Drupal program on your server.
01:08Some web hosts don't give you enough access to do that.
01:10Usually it's installed in one of two ways: either the web hosts installs it for
01:15you, or they give you enough access to do it yourself.
01:17If you have any problems with this, speak with your web host.
01:21Secondly, you need sufficient permission to run the Drupal program;
01:25just getting the files on the server isn't enough.
01:27Again, if you have any problems with that, your web host is who to talk to.
01:31Thirdly, and along the same lines, you need enough disk space, memory use, and
01:36bandwidth allowance.
01:37And you need system administration skills to manage all of this.
01:42There are two ways to check these requirements quickly.
01:45First, if you have the database program phpMyAdmin running, it shows all these
01:50version numbers in the web server section of its front page.
01:53I have already installed Drupal on my desktop computer.
01:56And we are using the Acquia Drupal Stack installer, which includes phpMyAdmin.
02:01You will learn about that in the section of this course about installing Drupal
02:04on Mac OS X or Windows.
02:06To see that information through the Acquia Drupal Stack Installer, click Manage
02:10My Database. That will bring up the phpMyAdmin program.
02:14Over here we see some of that information.
02:16There is MySQL version. That's terrific.
02:19The Apache version, also fine.
02:21To get the PHP information, I am going to do a little trick.
02:25I have created a file in the exercise files, which is a very simple PHP command
02:30here, which will give us all the PHP info we need.
02:33I will move that into the top level of our Drupal installation, and you'll
02:37remember we called that 2trees.
02:40Take that file and just drop it here.
02:43Now the file is called phpinfo.php.
02:46I will then go back to my site, which I have already loaded up here, and at the
02:51end of the URL, I will type phpinfo.php. There.
02:56Now if look through here, we will see all of the configuration information we
03:00could possibly want.
03:01This does open up a security hole, however, so after you have looked at it and made
03:06sure that you have what you need,
03:08go back and remove and throw away that file.
03:11Again, that's phpinfo.php.
03:14Finally, if you have any problems with your site once it's installed and you
03:18think it might be because you aren't meeting any of their requirements of Drupal
03:21or one of the add-on modules you installed, you can check it by looking at
03:25Drupal's Status Report screen.
03:27I will switch back to my site and go there by clicking Reports and Status report.
03:32This will also tell you have any problems you have.
03:35For example, we have a problem with a file directory that can't be written.
03:38We can go back and change that later.
03:41You will learn more about this report in the sections about administering Drupal
03:45and going further with Drupal later in this course.
03:48So you need PHP, MySQL, and a web server.
03:52All of these are satisfied by installing what's called an AMP Stack.
03:56And you will learn how to do that in the part on installing the Acquia
03:59Drupal Stack installer.
04:01So all of that is actually taken care of for you.
04:03Now I have tried to give you a high-level overview of what you need to run Drupal 7.
04:07For details, however, visit the official page at drupal.org/requirements.
04:13When you do, be sure you're looking at the requirements for Drupal 7.
04:16The drupal.org site officially supports both the current and previous
04:20version--that is, Drupal 6.
04:22And some information is even older than that.
04:25If you can't find your answer there and you are trying to install Drupal on a
04:28remote server, chances are you need to talk to your system administrator at the
04:32web service provider itself.
Collapse this transcript
Investigating Drupal's inner workings
00:00The truth is, you don't need to know how Drupal works on the inside to make your site work.
00:05Once it's installed, you will probably never touch the database server or the web
00:09server or the files directly.
00:11You can do all that through Drupal's own web-based interface.
00:14Still, a bit of understanding will help you talk with programmers, system
00:18administrators, and others who you will be dealing with if you start doing
00:21any custom development. So here we go.
00:24First, let's look at how traditional HTML works.
00:28Someone goes to your site by clicking a link or typing in a URL.
00:31That request goes through the Internet to a web server, which is usually
00:35based on software named Apache. On that server is your HTML page, which
00:39contains the text content to be delivered and instruction on how to gather
00:43other files together.
00:45Once all that stuff is organized, the web server delivers the complete page back
00:49over the Internet to the person who requested it.
00:52So that's how a traditional HTML site works.
00:55Now, let's take a look at the way that Drupal does things.
00:59It starts out the same way, with someone sending a request over the Internet
01:02to your web server.
01:04But then instead of an HTML page, the web server connects to a program written
01:08in the PHP language.
01:10This is the first point of contact with Drupal.
01:13That program gathers together graphic files and other resources just like the
01:16HTML page, but with two differences.
01:19First, unlike the HTML page, the program itself doesn't contain any of your
01:24site's data; that's mostly stored in a database.
01:27Second, that first program starts a whole cascade of dozens of PHP programs
01:31calling each other, very quickly and very efficiently.
01:35When they're all done, and it only takes a fraction of a second, the completed
01:39page returns through the web server to the person who requested it.
01:43I should mention that this procedure isn't actually Drupal specific.
01:46It's how just about all content management systems work, including WordPress, Joomla!
01:51and even homebrewed systems.
01:54So understanding this architecture will serve you in good stead, no matter what
01:57CMS you use. But, back to Drupal.
02:01A site essentially lives in three parts: the Drupal files, your site's files, and
02:06the database which holds the site's content.
02:08We will look at each of these.
02:11First, Drupal's files: this is everything in the Drupal folder, except what's in
02:15the sites folder, which is inside it.
02:18Next, your site's files, which are inside that sites folder.
02:21This is a where you will store not only all the graphics on your site, but also
02:25any custom programming and design files.
02:27Finally, we have Drupal's database.
02:30Drupal automatically sets this up when you install it. Generally, you never need
02:33to touch this database.
02:35We will only very briefly look at it a few times during this course.
02:39Don't worry if you have missed any of that;
02:41it's a lot of information to absorb, and is only necessary if you want to start
02:45mucking around in Drupal's guts.
02:47On the other hand, if you want a lot more information about Drupal's inner
02:51workings, the place to find it is on drupal.org.
Collapse this transcript
Learning Drupal's basic workflow
00:00This video picks up where the one about getting a Drupal site up fast left off.
00:04Like that video, this one shows you a few features of how you will work on your
00:08Drupal site after it's installed, but I am not going to get into the details. But don't worry;
00:13at each step I will point you to videos elsewhere in the course that will
00:17provide those details.
00:18We couldn't possibly touch on all the things you could do on your Drupal site
00:22in a five-minute video, but I will try to show you some of the most commonly needed features.
00:26So here we go.
00:27The first thing you will probably want to do is to add content to your site. Well, that's easy.
00:32We have the Add content link here and one up here as well.
00:36Click either one of them and then choose what content type you want.
00:39I will just choose Basic page.
00:41The Title I will say is "Welcome to our site!"
00:45For the Body I'll put, "This will be the front page, woo-hoo!"
00:52I will then scroll down to the bottom and put it on the front page and make
00:57it sticky and save.
00:58Again, don't worry about exactly what I'm doing, because you will learn
01:01these details later.
01:02In particular, you will learn how to create content like this in the videos
01:05about understanding nodes and creating basic content.
01:09Now when we go back to our front page, there it is.
01:12The next thing I am going to do is change the title up here.
01:16To do that, I go to Configuration and Site information.
01:19I'll change it to My new site, and for the Slogan, how about, "Turns meat into mayonnaise!"
01:30Scroll to the bottom and save. We close the overlay, and there it is.
01:35The next thing I want to do is change the whole look of this site, which is very
01:39easy in Drupal, because it separates content from presentation.
01:43The way you do that is by going up to Appearance and then choosing a theme.
01:47I am going to use Garland. Click Enable and set default, scroll down and save
01:53configuration and then close.
01:57Immediately, the whole look of the site changes.
02:00I think I liked it the other way, so I will just switch it back.
02:02Again, Appearance > Set default.
02:05I don't even have to say Save.
02:07I can just close this out, and it's done.
02:09You will learn how to do this in the video about changing site information,
02:13graphics, and interface.
02:15By the way, you'll notice that I got there by clicking in this black area in
02:18the top of the screen.
02:20That's called the toolbar. The gray area underneath it is called the shortcut
02:23bar, and when you click around, you see that this overly pops up.
02:28You will learn all about that in the section Controlling Drupal.
02:31The next thing I'll do is I will create a page with a menu link.
02:34Again, I go up to Add Content.
02:36I'll make this one let's say an article, and then just type in a title and body
02:41again, "About us", "We are great!
02:45What more do you need to know?"
02:49Scroll down. Next to menu Settings, I will provide a menu link and save.
02:55Now when we go home, you will notice once again we have our little tab up here.
03:00All of this happens very quickly in Drupal.
03:02You will learn more about menus in the section about helping users find their way around.
03:07Finally, I will do two more small things.
03:10For one, I'm going to put a little bit more information into the sidebar, and it
03:13will be what's called dynamic content--
03:15that is, content that I don't explicitly create,
03:18but the Drupal keeps an eye on and then puts the information there.
03:22To do that, I will go up to Structure and Blocks and scroll down to my disabled blocks.
03:28I think I will put Recent Content in the left-hand column.
03:30I choose that, click Save blocks, close my overlay, and there it is.
03:36We see those two items we just created.
03:38And if we were to create more, it would continue showing us that.
03:42You can do a lot with these little bits of content, which are called blocks.
03:45You will learn about those and about how to change your site's entire graphical
03:49design in the video about changing a site's interface.
03:52Finally, I'm going to turn on a feature of Drupal that right now isn't enabled.
03:56To do that, I go up to Modules and scroll down.
04:00The one that I'm going to turn on is called Poll.
04:04Scroll to the bottom and save configuration.
04:08I close out our administrative overlay, and now I can add what's called a Poll.
04:13For a question, I will just say "Yes or No?" and as my choices, there will be "Yes"
04:18and "No," and I will just fake a vote here, say that more people want it to be Yes
04:25than No, and save it.
04:30Now when we go to our front page, we see that poll, where we can vote and
04:36then see the results.
04:38I enabled one of Drupal's included modules there, which allowed me to design
04:42questionnaires for my site.
04:43You will learn how to do that in the section about enabling other content types,
04:47and you will learn how to further extend Drupal's functionality in the section,
04:51"Expanding a Site's Capabilities with Modules."
04:54Well, that takes you through maybe 0% of what you will probably do with
04:58Drupal in the first week of using it, and it only touches on far less of what it's capable of.
05:04We haven't described image handling or setting up tags or managing users or
05:08many, many other features that Drupal gives you.
05:11But I think you got an idea of how easy it is to create and run a basic Drupal
05:15site once you know what you're doing.
05:17The rest of the videos in this series will take you even further towards
05:21possession of a lot more of what Drupal can do.
Collapse this transcript
Understanding key terms in Drupal
00:00As with any community, the Drupal world has its own jargon--that is, terms that
00:05either don't exist or have a different meaning outside the community.
00:09Fortunately there aren't many such words, but understanding the few Drupal-
00:13specific terms will help you not only to communicate with others who use it,
00:17but also to understand some of the concepts you need again and again as you
00:20create your Drupal site.
00:21I'll show you around a sample site as a way of defining these terms.
00:26The first term is "core."
00:28You already known what this is;
00:30core is Drupal as you download it from drupal.org.
00:33There are other versions of Drupal, but the one you get from drupal.org is
00:37considered sort of the official version, or what is generally called core.
00:42A module is something that extends Drupal;
00:44in fact, Drupal is made up of modules.
00:47If we switch to our site and click the Modules button up here, we see a list of
00:51modules that come in core Drupal.
00:53You can turn these on and off by checking their boxes and scrolling to the
00:56bottom and then clicking Save Configuration.
00:59You can download additional modules to extend what Drupal does by going to drupal.org.
01:04The next term is "theme."
01:05A theme is what defines the way that your site looks.
01:09In Drupal, you take a look at your themes by clicking Appearance.
01:13Right now, our default theme is called Bartik.
01:15This is the one that visitors see when they first come to the site.
01:19Other themes that are available are Seven--that's the one we see here when
01:22we're administering the site-- and then there are two additional ones that are
01:25disabled by default.
01:27In addition, you can download hundreds and hundreds of other themes from drupal.org.
01:32A content type is a template for bits of content that you have on your site.
01:37By default, there are two, and you see those by clicking Structure and then
01:40click Content Types.
01:42There is the article and the basic page, and you can create additional ones, as
01:46you'll learn later in this course.
01:48They differ in which fields they contain, along with some other important bits of
01:52information, such as whether the content appears on the front page.
01:57Now a moment ago I mentioned fields;
01:59they are places for information inside a content type.
02:02As an example, let's say you have a content type called customer. That might
02:06include such fields as "address" and "phone number."
02:10The pieces of content you actually create are called nodes.
02:13In Drupal, you create a node by clicking Add content and then choosing which
02:17content type you would like to create.
02:19When you finish filling out this form and click Save, you have created a node.
02:24Nodes appear on their own, or they can be collected into what's called a view.
02:29Views are most often used to display multiple nodes in one place, but they
02:33can also be used to collect comments and users, and change how you see all of those things.
02:38We'll talk a little bit about views later on in this course;
02:41I delve much more deeply into them in the course "Drupal 6: Online Presentation of Data."
02:47Content organization also has some special terms in Drupal.
02:50The first is taxonomy, and it relates to how you categorize content using
02:55vocabularies and terms.
02:56I know it's a little hard to understand this conceptually, so I'll give a fuller
03:01explanation later in the course.
03:03The aggregator is Drupal's tool for collecting news feeds from outside of your Drupal site.
03:09Many news sites provide such feeds.
03:11You can subscribe to them in your site so that all that information appears
03:15there by way of the aggregator.
03:17Now we move on to some of the community terms.
03:20The first one is "Drupalcon."
03:22this is the semi-annual conference that happens in the United States in the
03:25spring, and usually in Europe in the autumn.
03:28It draws over a thousand people interested in Drupal each time, and features
03:33nearly a week of conferences, learning sessions and just places for us to meet each other.
03:37It's a wonderful thing to go to if you have the chance and you want to get
03:40more involved in Drupal.
03:42You can find out more about Drupalcon by going to drupalcon.org.
03:48The Druplicon is that little fellow you see at the top of your site when you
03:52first install Drupal;
03:53it's the mascot of the Drupal Community, and has been for several years.
03:57You'll see it here and there throughout the community, sometimes in funny contexts.
04:01For example, some people have made Druplicon cakes, and one person even made
04:06a model out of bacon.
04:08Finally we come to the Drupal Association, which you can learn more about
04:12association.drupal.org.
04:15This is the Belgium-based, not-for- profit organization dedicated to supporting
04:19Drupal promotion and development.
04:20They run Drupalcon, for one thing, and just as importantly, they pay for the
04:24servers and some of the incidental costs that keep Drupal and its
04:28infrastructure running. And there you have it.
04:31While discussions on drupal.org can get pretty technical, you now know enough
04:36jargon to understand most of what you read there.
Collapse this transcript
Touring Drupal's interface
00:00You usually can't tell when you visit a Drupal-built site;
00:03it looks the same as any other site on the web.
00:06When you're logged in as the administrator though, lots of controls pop up that
00:09require a little bit of explanation.
00:11This video takes you quickly through them, so you won't have any surprises when
00:15you start clicking around.
00:16I already have Drupal up and running, and I am seeing it as you will after
00:20watching the section about installing Drupal--except that I'm not logged in as
00:23the administrator, so I'll do that now.
00:26Throughout this course when I am using the exercise files, I use the same
00:29username and password: "admin" and "Drupal".
00:32Now I see the site as you would see it as the main administrator, the super user.
00:37I'm also looking at this site in a different browser not logged in, and I'll
00:41come back to this in just a few minutes to show you some of the differences.
00:44One thing you'll notice that's different is there this additional block over
00:47here, which doesn't show up when you're not logged in. And in fact, there's one
00:51here that tells people to log in, which doesn't show up when you are logged in.
00:55Drupal displays these blocks and various contents conditionally.
00:59It pays attention to what kind of user is looking at the site. In this case,
01:03I am an administrative user, and in the other one I am what's called an anonymous user--
01:07that is, someone who hasn't logged in yet.
01:09Another difference is when I bring my cursor down over these blocks, I get
01:12this little widget here.
01:14This is an administrative tool called the contextual menu, and it varies
01:18depending on what you're pointing at.
01:20When I click here, I see that I have three options.
01:23I can edit the menu that this block contains, I can configure the block itself,
01:27and again, it depends very much on what the block is.
01:30Up here I only have one option to configure the block. None of those shows up
01:34when you're not logged in, because you don't have access to those controls.
01:38At the top of the screen, we see two bars which have administrative controls:
01:42The one in black is called the toolbar, and it says the same no matter what
01:46you do to your site. And one below it the shortcut bar is customizable.
01:50And you'll learn more about those two in videos on using the toolbar and using the shortcut bar.
01:55When you decide you want to do an administrative task in Drupal, you almost
01:58always start by clicking something up here in the toolbar, or possibly by
02:02clicking on one of these little widgets.
02:04In either case, a layer pops up called the administrative overlay.
02:08I'll show that by clicking here, in Appearance.
02:11You see how we see the original window behind this one on top. You perform your
02:16administrative functions, and then when you're done, you either click a button
02:19at the bottom that says something like Save Configuration, or if you decide you
02:23want to leave it, you just click this little X and you go back to where you were.
02:27Now we won't go into all of the different things that are contained appear in the toolbar.
02:31There are quite a few, and we are saving that for the video on touring
02:34administrative controls.
02:36Some of them, such as the Content button and the Appearance button, immediately
02:40take you to some place where you can make a change.
02:43Here, for example, I could change the look of the site by clicking Set Default.
02:47Some take you to a list of options, such as when I click Structure, and then I
02:51would further click one of these, and then I could perform some actions.
02:56Finally we have the dashboard, which is a highly configurable way for you to
03:00interact with your site as an administrator. And we'll talk about that more in a
03:04video about the dashboard.
03:05So that takes care of controls for configuring Drupal, but that's only one part
03:10of running a web site.
03:11Once the site is the way you want it, it's time to add your content.
03:14That's easy enough to do. Just go up to the shortcut bar here and click Add Content.
03:19Once you are there, you choose which content type you want to add and click its link.
03:24Now this screen is one you'll find yourself looking at an awful lot once your
03:27site is up and running.
03:28You'll learn more about adding content in the sections about building a Drupal
03:32site, controlling content, and several others.
03:34It's a big subject, so there's a lot of videos on it.
03:37Finally, we come to users.
03:39Drupal, as I've mentioned before, is a multi-user system.
03:42You can control what people can and can't do on your site through a system of
03:45roles and permissions.
03:47You learn more about that in the section "Managing Users," but briefly you get
03:51there by going to people--which shows you a list of people, and then you can
03:54perform certain actions on them--and then permissions and roles once you're in
03:59that Permissions tab.
04:00From an individual user's point of view though, the important thing is that
04:04everybody who logs in gets a user account and a profile that goes with it.
04:08We can see that by clicking up here where it says "hello admin," or if we were an
04:11ordinary user, would see this My Account up here in the corner.
04:15From there, we can take a look at information about the user, or go in and edit it.
04:19I want to remind you that nearly everything you have seen in this video is from
04:23the administrator's point of view, but by Drupal's default settings, the content
04:28of your site is available to all visitors, even if they don't log in.
04:32Much of this course deals with how you can control exactly what's seen and how and by whom.
04:38Drupal gives you an astonishing level of control over those things, and accessing
04:42these controls are easy once you're used to the Drupal interface.
Collapse this transcript
3. Installing Drupal on Mac OS X or Windows
Installing Acquia Dev Desktop
00:00As I mentioned in the video "Checking Drupal's requirements,"
00:03you need three systems installed on your computer in order to run Drupal.
00:07Let's review.
00:08First, Drupal was written in the PHP language so you'll need a PHP interpreter to run it.
00:14Second, Drupal stores all of its information and settings into a database.
00:17Most commonly, that's the MySQL database program.
00:21Third, because it's a web program you need a way to serve up the HTML pages that it produces to the Web.
00:27Usually that's through the Apache Web server, although you could use another one such as IIS.
00:31When you put these all together, Apache plus MySQL plus PHP,
00:36it creates what they call an AMP stack.
00:39Add Drupal to that
00:40and you get a DAMP sack.
00:41You can cobble all these bits together yourself, but the easiest way to do it is by downloading them all in one package.
00:48When I recorded Drupal 6 Essential Training in 2008
00:52to two best AMP stacks were MAMP for MacOS X and WAMP for Windows.
00:56For MAMP go to mamp.info,
00:59and for WAMP go to wampserver.com.
01:02If you decide to go either these routes,
01:04you may want to watch the lynda.com course Installing Apache, MySQL and PHP.
01:09But both MAMP and WAMP have problems.
01:12Fortunately there's now an AMP stack that specially tuned to run Drupal.
01:16It's the Acquia Dev Desktop for both Windows and Mac, formerly known as DAMP. It's a full AMP stack plus a special version of
01:23Drupal called Acquia Drupal.
01:25You can get it at acquia.com/downloads.
01:29After we installed the Acquia Dev Desktop there'll be two additional steps before we actually have Drupal running.
01:35The first is to replace the Acquia version of Drupal that comes in the Acquia Dev Desktop with the core version of
01:40Drupal from Drupal.org.
01:42You'll see how to do that in the video "Importing core Drupal into DAMP."
01:46Then the last step is from Drupal's own installer which you'll see in the video "Running Drupal's installer on top of DAMP."
01:54This will get Drupal running on your home computer.
01:56The process is slightly different to install it on a remote server and we'll go into that in the section "Installing Drupal on a server."
02:03Anyway, let's get started.
02:05First we'll grab Acquia DAMP
02:07Once again, it is from acquia.com/downloads.
02:11Scroll down and select the version you want. It doesn't matter whether you choose Drupal 7 or Drupal 6 since we're
02:16going to be getting rid of the version of Drupal that comes with it. Once you have your version,
02:20click Download
02:22and then save it wherever you like.
02:25This may take a while.
02:28Once downloaded, double-click the file.
02:31You may have to uncompress it
02:34and confirm that you want to run the program.
02:37This procedure may be slightly different on the Mac, but it'll generally be the same.
02:41Once there, you start stepping through the installer.
02:44Simply click Next.
02:45Select the components that you want. Generally speaking all that you need is the core components here.
02:51Then click Next.
02:52You're going to be told exactly what's going to be installed. Click Next.
02:56And then you have a license agreement to agree to. If after reading it you agree to it,
03:00then leave this as selected as Yes and click Next.
03:04Here you decide where you want to put the program
03:07and also where you want to put the sites that you're going to be serving up. You'll be able to change this later.
03:12This is only for the first site that you install along Dev Desktop, which we're actually not going to be using.
Collapse this transcript
Importing core Drupal into DAMP
00:01At the end of the last video, we had installed the Acquia Drupal Stack
00:04installer, also known as DAMP.
00:06I have started recommending it because it's built especially to run Drupal, but
00:09it does have one peculiarity.
00:12Instead of installing core Drupal, which is what you download from the
00:15drupal.org site, it installs Acquia's own version of Drupal. And you can tell
00:19the difference because up here, it says Acquia Drupal.
00:22So our next step is to install core Drupal into DAMP.
00:26Here's how you do it.
00:27The first place to go is drupal.org, where you can download core Drupal.
00:31The specific page is drupal.org/project/drupal.
00:36You then scroll down and take a look at this Downloads area.
00:39Now, I'm making this video before the official release of 7, so I am going to
00:43download the one that's here under Other releases.
00:45Once it has been released, you'll see 7 up here under Recommended releases.
00:49In any case, you should use the most recent released version.
00:52I would then click the Download link.
00:54I have already actually downloaded the file and uncompressed it.
00:58If you have any problems doing that, see Garrick Chow's videos about computer
01:01literacy, which are also available on lynda.com.
01:04When I go to my Desktop, I see the folder right there.
01:07This is the Drupal software.
01:09It still has its original name, so I am going to change that to the name of my site.
01:14Throughout this course we'll be building a site for a fictional Olive Oil
01:17Company, called Two Trees Olive Oil, so I call it 2trees. Then we go back to the Acquia Stack,
01:23go to Settings, and then click Sites.
01:26Incidentally there's another way you can get to this, and I usually do it this
01:29other way, which is by going to this little dropdown menu and clicking More;
01:33that takes you directly to the sites window.
01:35We then click Import. If you were to click New,
01:38you would create a new Acquia Drupal site, and we want it to be core Drupal.
01:43So I click Import, find the folder that I just uncompressed, select it, and click
01:47OK. Then I create a new database.
01:50I am going to call that 2trees, and for consistency, the server will be 2trees.
01:55You can't leave it as localhost because that's the name that went with the
01:58original site that we installed. Then we click Import.
02:02The process only takes a moment, and it launches a screen in your browser which
02:06starts the installation process on Drupal's side.
02:09Incidentally, the Acquia Stack will support both of those sites, the one that
02:13you installed when you first put in the stack, and this one, and any others that you add.
02:18In order to switch back and forth among them, simply click the one you want and
02:22click Go To, and that'll take you to your site.
02:26Now, Drupal isn't completely installed yet.
02:28We still have to go through its own installation process, but don't worry.
02:31It's quick and easy.
02:32Now I just want to mention about the differences between core and Acquia Drupal.
02:37Personally I like Acquia Drupal a lot, and frankly I usually use it as a base for
02:41all of the sites that I build. But it is less common than core Drupal.
02:46It has a lot of extra pieces and a few complications, and those are outside the
02:50purview of this course.
02:51If you're asked to work on a Drupal site that's someone else has set up, chances
02:55are it will have been created in core Drupal, not Acquia Drupal.
02:58With that in mind, the rest of this course assumes that you're running
03:01core Drupal.
Collapse this transcript
Running Drupal's installer on top of DAMP
00:01In previous videos, we finished installing the Acquia Drupal Stack installer
00:04called DAMP, and we also imported core Drupal into DAMP.
00:08Now we'll continue as Drupal 7's own installation process.
00:12This list in the left-hand column shows a number of steps on the way to completion.
00:16We'll be skipping two of them because we're installing Drupal using DAMP,
00:20rather than MAMP or WAMP.
00:22Mainly, we don't have to verify requirements or set up the database.
00:25We'll see how to do those things in the section, "Installing Drupal on a Server."
00:30So we start at the beginning with the installation profile.
00:33Drupal 7 is the first time that multiple installation profiles are included:
00:37Standard and Minimal.
00:38They actually both install the same software, but with the Minimal profile, only
00:43a few of the pieces are turned on.
00:45It's particularly useful for hard-core developers and folks with a strong
00:48do-it-yourself ethic.
00:50You know, those people who want to build their sites from the ground up without
00:53distraction, such as the administrative overlay or a search box. But personally
00:57I always use the standard profile,
00:59so that's what we'll do here. Leave it selected and click Save and continue.
01:03By default, Drupal installs in English, but it is possible to download
01:07other languages for Drupal so that the entire interface is in your
01:10preferred language.
01:12You can learn all about that by clicking this link. But for us, we'll just leave
01:15it as it is, and click Save and continue.
01:18Then the installation process begins.
01:20We're almost done, but before we go on, I want to talk a little bit about this
01:23Requirement screen, just in case you decide to install Drupal on top of WAMP or MAMP.
01:29The two most important things is that you'll have to manually duplicate a file
01:32named settings.php on your server. DAMP, again, takes care of that for you.
01:37Secondly, DAMP make sure that the PHP interpreter has enough memory to run Drupal.
01:42Drupal demands at least 40 megabytes, but WAMP, get this, only gives it 2
01:46megabytes, and MAMP gives it 8 megabytes.
01:49By comparison, DAMP gives it 128, so there is plenty of memory if you use DAMP.
01:53Finally, we configure our site.
01:55I'm going to name this "Two Trees Olive Oil" after the site we'll be building, put
01:59in an e-mail address, and a username.
02:02Now the username you enter here is the one that's known as the super user that
02:06has control over the entire site.
02:09I'm going to give that a name "admin", and as a password I'll just use "drupal", all in lowercase.
02:15Keep that in mind if you're using the exercise files that come with this course,
02:18because when you use the exercise files, you'll have to log in as admin using
02:22the password drupal.
02:23Of course, you can use whatever username and password you like for your own site.
02:28Scroll dow. Select a country for this site.
02:31This is important for such matters as date and time formatting.
02:35I'm in the United States, and I'm near Los Angeles, so I'll leave it as it is.
02:39Now we're ready to go. But before we click Save and Continue, I just want
02:43to mention these two check boxes, and I recommend that you keep both of them checked.
02:47The first one will make sure that your site is up to date.
02:50Every once in awhile, it'll send a little bit of information from your site to a
02:54central server at drupal.org, and compare your version number with the most
02:58recent Drupal version.
02:59Don't worry, it doesn't send any personal information about the site, or any of your content.
03:03The second one determines whether drupal.org will then send you an e-mail when
03:07there is an update that you have to install.
03:09Very useful, and I recommend you leave it checked.
03:12Then click Save and continue, and we're done.
03:16Click Visit your new site, and there it is.
03:19Now we did this on top of DAMP, and since DAMP is fairly new, I want to mention
03:23a few things that are different between it and other AMP Stacks.
03:27First of all, it's set up for multisite installations.
03:30You might remember that when we clicked here and went to More,
03:33we already have more than one site installed.
03:36If we go back to our Drupal folder, 2trees, we double-click it to open and then
03:41double-click on sites, which is where all the site information is.
03:45Under other AMP Stacks, you will typically just see all and default, but because
03:50we're running DAMP, we also see this 2trees folder, and that's where all of your
03:53files will actually be stored.
03:56One other thing that's different about DAMP is it changes the way the
03:59settings.php file works inside that 2trees folder, inside sites.
04:04I'm going to just open that up with a text editor and scroll down a little bit.
04:10Usually all of the information that connects your Drupal site to the database--
04:14which has all of your contents and settings--is down here around line 181.
04:19With DAMP, all of that information goes at the end instead, and it
04:23overrides what came before.
04:25So here is the information for our site.
04:30That comes into play when you decide to move your site to a server, as you'll see later.
04:35So now we have Drupal running on either Windows or Mac, but chances are that
04:39your Internet service provider runs either Linux or UNIX.
04:42So we're going to talk about how to get Drupal up and running there in the
04:45section on installing Drupal on a server.
04:48It's a fair amount trickier, and there are more places where things can go
04:51wrong. But the overall procedure is the same, so what you've learned here will
04:55stand you in good stead.
Collapse this transcript
4. Installing Drupal on a Server
Uploading Drupal with SFTP
00:01We've already installed Drupal on our local computer--
00:03that is, our desktop or laptop.
00:06Now we're going to install it on a remote computer that is a server from which
00:09other people would be able to see your site.
00:12I have to warn you that this is more difficult than installing it on your local computer;
00:16in fact, there are myriad ways that it can be done.
00:19I'm going to show you two.
00:21In this video, I'll show you how to do it using an FTP program.
00:25In another video, I'll show you how to do it using an SSH program, which is a
00:29command-line interface.
00:30I've already set up where I'm going to put my site.
00:33This is on a host called webenabled.net, although you could use whatever web host to like.
00:38I've also set up a site where it's going to go.
00:40It's at this twotrs.dev3.webenabled.net.
00:45And if we click there, we see there is just a simple page there right now.
00:49The FTP program I'm going to use is called FileZilla.
00:53You can download it yourself at filezilla-project.org, or you can use any other
00:58FTP program you like.
01:00They all have different interfaces though, so what you see here will only
01:04work with FileZilla.
01:05The program you use will probably have similar features, although they will be
01:08located in different places.
01:10Our next step is to grab the Drupal software from drupal.org, and you can get
01:15that at drupal.org/project/drupal.
01:18Some FTP programs let you transfer directly from drupal.org to wherever you're
01:22hosting your site, but not everyone will let you do that.
01:25So I'm going to download it to our local computer, uncompress it there, and then
01:30reupload it to our remote server.
01:33Once we're at drupal.org site, we scroll down until we get to the Downloads area.
01:38Now I'm recording this video before the official release of 7.0, so I'll
01:42actually grab the one that's down here in the yellow area.
01:45If it's been released by the time you're watching this video, you'll find it up
01:49here in the Green area.
01:50In any case, you want to grab the most recent version.
01:53To download it, I click Download, and the file goes to my default download location.
01:59Once you've downloaded it, you'll have to uncompress the file.
02:02On the Mac, it's fairly easy to do;
02:04you simply double-click it on.
02:05On Windows, you'll need a help program, such as WinZip or 7-zip.
02:10You can download WinZip at WinZip.com, and 7-zip is available at 7-zip.org.
02:17But we have it already decompressed here, and we also have FileZilla already running.
02:22I'll now connect to my remote server.
02:25I've already set up all of the details here, so all I have to do is click
02:30Connect, and there we are.
02:32Once you're on your remote server, you might find that it's not completely
02:35obvious where your web site goes.
02:37One common place is in a folder called public_html.
02:41That sometimes also has aliases with names such as www.
02:45In any case, if you have any problems at this point, speak with your web host.
02:49When I open up that folder, I see that there is another folder inside it with
02:53the name of my site, twotrs.
02:56In there is an index.html file.
02:59This index.html page is what we went to earlier, as you can see here.
03:04We're going to get rid of that.
03:05So in FileZilla I highlight that and the logo, right-click, and choose Delete.
03:12Incidentally, FileZilla is available for both Mac and PC, and if you're on Mac,
03:16you would hold down the Control key while you clicked.
03:18Now we'll move all of our Drupal files that are on our local computer over to
03:23our remote computer.
03:24First, we'll navigate to that folder.
03:26I see we're actually already there.
03:28I then select everything that's inside this folder, but I have a warning:
03:31you have to make sure that all of the dot files are showing.
03:35If you don't see a file .htaccess, then you don't have them all showing.
03:39I highlight everything, except for this double dot at the top, which is a special
03:43control file, and I drag them over.
03:46I do want to mention, this isn't the only way to do it. If your FTP program
03:51allows you to uncompress files right on your remote server, the best way to
03:55do it is to transfer it directly from drupal.org, and then uncompress it on the server.
03:59Unfortunately, that's not possible here, so this is a slightly more complex
04:04way that still works.
04:05This process takes a while. The Drupal software isn't large, but it contains
04:09many files, and the FTP process it looks at each individual file.
04:13Down here you can see how many files have been transferred and how many are still waiting.
04:17There, the files are all transferred.
04:19Now if we go back to our site and reload the page, we see Drupal's initial
04:25installation screen.
04:26And I'll show you how to get through the installation in a later video.
04:30So that's one way of installing Drupal on a remote server.
04:33And again, there are many variations even within FTP programs.
04:37Personally, I prefer to use a command- line program, such as SSH, and you'll
04:41learn how to do that in another video.
04:43I find that the process is quicker and more foolproof.
04:46However, not every web host allows you to use an SSH program, so if you can't or
04:51if you prefer to use a graphic interface, FTP is a good second method.
Collapse this transcript
Uploading Drupal with SSH
00:01We've already installed Drupal on our local computer; now we're going to install
00:04it on a remote computer, so that people can actually go to our web site.
00:08I should warn you ahead of time:
00:10this is a fairly complex procedure, and I'm going to show it to you in this
00:13video using an SSH program, which reaches directly into UNIX and its
00:18command-line interface.
00:19I found the command-line interface to be the fastest and most reliable way of doing this;
00:24however, some hosts don't allow you to do that.
00:27If not, see my other video about installing on a remote computer using an FTP program.
00:33The first thing that you have to do is set up a place where you'll be putting Drupal.
00:37I've already done that on the host at webenabled.net, and the URL I'll going to
00:42is twotrs.dev3.webenabled.net.
00:47In order to get there, I'm going to use an SSH program.
00:50On the Mac, the program you'll use is called Terminal, and it's already
00:54included with Mac OS X.
00:56On Windows you have to download another program. The one I'm using is called
00:59PuTTY, which you can find most easily by searching the Internet for puTTy or
01:05going directly to the URL that you see here.
01:07I've already set up PuTTY and logged in to my account.
01:11The way to see what's there is by typing "ls". That shows all of the files that are
01:16in that directory that you just logged in to.
01:18To get a longer form of it, type "ls-al". That's short for, show all files in a long form.
01:25I find that it to be much more useful because it shows all of these dot files
01:29which are normally hidden.
01:30The one we're looking for is something like www, or in this case, public_html.
01:36That's where the web pages are actually stored.
01:39To go there, I type cd, which stands for change directory, public_html.
01:44Now here is a little trick that's true in most UNIX servers.
01:48You only need to type in the first part of the name and then hit Tab, and it
01:51fills out the rest of it.
01:53And I hit Enter, and list it one more time.
01:55I see that actually my site is one more level down in that twotrs.
01:59So I'll go down there.
02:00Now this is something that you'll have to learn from your web host.
02:02Every one of them is a little bit different, both in how you log in and in
02:06where your web files are going to go.
02:08If you have any problems, contact your web host's support desk. But for me, I'll
02:12just go into twotrs right there and list to see what's there.
02:16I have no files at all. And in fact, if I go to that URL, which I'll do by going
02:21back here and clicking on the link,
02:23I see that I'm not allowed into that directory.
02:25We can prove, however, that that's the place that we want to put our files by
02:29editing a small file called index.html.
02:32I'm just going to put a little HTML file there, just to test it, and I do that
02:35using a UNIX program called nano.
02:39I'll just say "Hello World!"
02:42and save it out, and now I'll reload this page. Yes, it worked.
02:47That means we're in the right place.
02:48I can delete that file now with "rm", which stands for remove.
02:53And if we reload the page, we find once again, we're locked up. Good!
02:57The next step is to get Drupal and put it into that directory.
03:01To get the Drupal files, go to drupal.org/project/drupal, then scroll down
03:07to the download area.
03:08Now I'm making this video before the official version of 7 was released,
03:12so we're going to grab it from this yellow area.
03:15Once it is released, it will show up in this green area.
03:18In any case, you want to get the most recent version, go down to the Download
03:21link, and if you're on a PC or a Mac with a two-button mouse, you can right-click
03:25here and copy the link location.
03:28If you only have a one-button mouse, hold down the Ctrl key, and you can do the same thing.
03:32Then we go back to our terminal program.
03:34We're going to get it using the UNIX programs wget, and then paste in the URL.
03:41In PuTTY, you do that simply by right-clicking and hit Enter.
03:45You see a progress bar, and there it is.
03:47We can prove it by listing what's in that directory, ls, once again.
03:51Now I have to uncompress that.
03:53To do that, I use a program called tar, and then you need the switches
03:58-xvzf and then the file name.
04:04You can learn more about those switches by taking a look at
04:06UNIX's documentation.
04:08We hit Enter, and we see all the files come out. There it is.
04:12Now, when we list, there are now two things there.
04:14There is the archive that we downloaded and the uncompressed version.
04:18I'll just get rid of the archive by typing "rm drupal 7.0-rc1.tar", and then I can hit Tab and Enter.
04:28Done! The last thing that we need to do is to move that copy of Drupal up one level,
04:33so it's in the root of our directory.
04:36If we don't do that, I'll show you what happens.
04:37When we go to our URL and reload the page, we still can't get into anything.
04:42Or you might just see a list of all the files that are in that folder depending on
04:45how your host is set up.
04:47So we descend into the directory by typing "cd drupal". Once again, that's
04:51change directory, list what's there, just to be sure, and then move with mv,
04:58everything that's with a star, dot dot.
05:02What that does is it moves everything in that folder up one level.
05:05There is a catch I'll show you in a second, but first I'll do that.
05:08Now if I list it again, it should all be gone.
05:11There is one thing we missed: the star doesn't get this dot file .htaccess.
05:17So we also have to move that as well, mv space .ht, again I hit Tab to fill out
05:23the rest of the name, and dot, dot.
05:26Now, when I list what's in that directory, it's all empty.
05:28If I go up one level, now there, all of our files are at the correct level.
05:33We still have this empty folder, drupal- 7.0, and we can get rid of that easily
05:38enough by saying rmdir, that's remove directory, space drupal and hit Tab. Now we're ready.
05:46When we reload this page, we see that Drupal is prepared for its
05:50installation procedure.
05:52I know that whizzed by if you're unfamiliar with the command-line interface of UNIX and Linux.
05:56So here is a summary of the commands that I used.
05:59As I mentioned, SSH is usually the command that you use to get to the server; ls
06:03lists files; cd changes the directory; wget downloads the files; tar extracts
06:09them; rm removes anything that you need to remove, except if it's a directory,
06:13in which case it's rmdir; pwd, which I didn't show, will tell you where exactly
06:18you are in the hierarchy--
06:19that's very useful if at anytime you get lost--
06:22and mv will move a file from one place to another.
06:25In addition there are several shortcuts.
06:27When you type asterisk that means everything that's in your current location.
06:31So mv space asterisk means move everything.
06:35One dot refers to your current location.
06:38So sometimes you'll say copy everything to where I am now, in which case you'll
06:42just say copy these things space dot.
06:44Two dots gets you to a level above.
06:47Most often you use this with cd, so cd space, dot, dot means go up one level.
06:52And as I mentioned several times, when you start typing in file names,
06:55pressing Tab completes them.
06:57Finally, I want to mention a few learning resources if you want to go
07:00further with UNIX or Linux.
07:02First, you can find information about a specific command by typing either man,
07:07help, or info, and then the command itself.
07:10That varies from system to system, so if one of them doesn't work, try the others.
07:14And if you're not sure what the command should be, type apropos and then the concept--
07:18for example, apropos file or apropos permissions.
07:23Then here are two sites that will help you if you just want to read up some
07:26more on UNIX and Linux.
07:28Our next step is to set up the database that Drupal will use.
07:31You'll learn how to do that in the video about creating Drupal's MySQL database,
07:35and then we'll actually be ready to install Drupal on a remote server, which
07:39we'll do in the video, "Running Drupal's installer."
Collapse this transcript
Creating Drupal's MySQL database
00:01As I mentioned in the videos about uploading Drupal using SFTP and SSH, server
00:05configurations vary a lot, and that's true of database configurations as well.
00:10In this video, I'll show you two ways to create Drupal's database.
00:14The first uses a very common database program called phpMyAdmin, which you see
00:18right here on the screen.
00:20The second method uses the UNIX or Linux command line, which is quite a bit trickier.
00:25Both of these require that your Internet service provider has given you
00:28access to certain tools.
00:29If you have problems making any of this work, I'm afraid you'll have to talk with them;
00:33I won't be able to help you.
00:34It might be that you don't have access, or it's possible that they have set up a
00:37different procedure for you to make these things happen.
00:40So here we are on the phpMyAdmin screen.
00:43This is the interface, once again, to the MySQL database engine.
00:47Over here, we see the databases that are already set up.
00:50We're going to set up another one, which we'll call 2trees. It's very easy.
00:54I'll just go in to Create new database and type it in, 2trees, and click Create.
01:02That's all there is to it.
01:03If I go back Home again, I see it in my list.
01:07I just want to point out that these two have numbers next to them. That refers to
01:12the number of tables that are in the database itself.
01:15After you've installed Drupal, your database--in this case, 2trees--will also have
01:21a number next to it.
01:22That's one way to tell whether Drupal has set up correctly and is connecting to this database.
01:26If there are no tables in it, then Drupal hasn't been set up.
01:29Now I'm going to delete this database and show you how to create it using the
01:33trickier command-line method.
01:35Normally of course, you just use one of these methods.
01:37I'm showing both only for demonstration purposes.
01:40To get rid of it, I click Databases, then select it, and then click this little x.
01:47It asks whether I'm sure I want to do that, and I say yes.
01:50There. And it's gone.
01:52To start the command-line method, we first have to log into our remote server.
01:56You can do this on the Mac by using the Terminal program that's included in Mac
01:59OS X. On Windows, I'm using the PuTTY program.
02:03I've already launched PuTTY, and I have logged in to my site.
02:06Now to create the database. We type in the command, which is mysqladmin -u
02:12then our user, w_twotrs -p, which means it'll challenge us
02:18for the password, space, create2trees.
02:24We're asked for the password, and it's done.
02:27We can prove that it's there by going back to phpMyAdmin and clicking on
02:31Databases, and there it is. Congratulations!
02:34You've gotten through one of the most show-stopping tasks for most
02:37beginning Drupal users.
02:39If you weren't able to complete it, don't feel bad. As I said before, this is a
02:42step that varies a lot from server to server.
02:45Fortunately, there's some good documentation to help you get through it.
02:48For one thing, you'll find that in your Drupal folder itself.
02:51I'll go back to that.
02:52It's called 2trees.
02:54And it's this file here, INSTALL.mysql.txt.
02:59When you open it, you see the command that I just gave you a moment ago, and it
03:03gives you a little bit more information if you have further problems.
03:05There is also good information on the drupal.org web site.
03:08Go to drupal.org, then click Documentation, Installation Guide, Basic
03:15installation and Creating the database.
03:20In the end though, you may have to get your web host provider involved, because
03:23they might require you to set up the database in some other way.
03:26But once you have the files and database in place, you're ready to run
03:30Drupal's installer.
Collapse this transcript
Running Drupal's installer
00:01We already put the Drupal files on our server.
00:03We did two videos on that: one for how to do it using an SFTP program and one
00:08using an SSH program. Then we set up the database where Drupal will store its
00:12content in the video about Creating Drupal's MySQL database.
00:16Now, we will actually run Drupal's own installer.
00:19This step is a lot easier because it takes place in the web browser.
00:22You don't have to know any more UNIX commands. And if you install Drupal on your
00:26desktop or laptop computer by watching the videos about running Drupal's
00:29installer on top of DAMP, then this will all look very familiar.
00:33However, there are some extra steps and a little bit of complication. But don't
00:37worry; I'll walk you through it all.
00:39We are starting here at a page that's provided by my web hosting
00:41provider, webenabled.net.
00:44There are few things we'll have to come back to this page for, notably the MySQL
00:47host/port. But first we will just go to the URL of the page where we have our
00:52Drupal files installed,
00:54and immediately we see our Drupal installation.
00:56You have a choice between Standard and Minimal, which I discussed a little bit
01:00in the earlier video about Installing Over DAMP.
01:02So I'll simply say, Save and continue.
01:04Generally speaking, I always use Standard.
01:07You can choose what language to install in and add languages besides
01:11English, but again, I discussed that in the earlier video, so I'll just say Save and continue.
01:15If you want to learn more about that though, the best place to go is this link
01:19right here. But for now, we go on.
01:22Now this is a step you didn't see in the earlier video.
01:24You have to enter the Database name, username, and password, and then there
01:28are some other options.
01:30I'm actually going to go through this a couple of times and have it wrong.
01:33So we're not going to get all the way through first, so you can see what sort of
01:36errors you'll come up against.
01:38This is one of the hardest places of installing Drupal, and the best way to get
01:42answers for it is from your web host, either by contacting them directly or
01:47through the documentation, such as on this page.
01:49The database name we made is called 2trees, the username was w_twotrs, and I
01:57have my database password.
01:59Now when I do this, it's not going to work, here we go.
02:04It didn't work, and it asks us a couple of questions which, quite honestly, are
02:08not all that enlightening.
02:09So I will walk through it again, and I'll change a couple of things as we go.
02:13The problems were in this Advanced Options.
02:16Let's go back to our documentation.
02:18We see that the host should be 127.0.0.1. What do we have here? Ah!
02:22It's entered as localhost, so I'll say 127.0.0.1.
02:28On many computers, the two are the same, but in this case let's just go with
02:32exactly what it tells us to use.
02:33It also has its special port, 4847.
02:38So I will go back and enter that: 4847.
02:41Now let's try again, and we made it through.
02:45Drupal is actually going through the process of installing now.
02:49When it's done, you will be asked for all of the information for this site:
02:52its name, the main e-mail address, and also a username and password for the super user.
02:58That's the one who has access to everything on your Drupal site.
03:01I will do it the same way that I did in the earlier video about installing on
03:04DAMP. The name is Two Trees Olive Oil, add my address, username is admin, and as
03:12elsewhere in this course, password will be drupal, all lowercase, and we are in
03:17the United States, and Save and continue.
03:22The installation is confirmed, and we visit the site by clicking this link. That's it.
03:27You're now ready to run Drupal on your remote server.
03:30Nearly everything else you see from here out in this course is the same, whether
03:33you're running Drupal on a local computer or a remote server.
03:37I will be going through it on a desktop computer--that is, a local computer, but
03:40if there are any minor differences, I will explain them wherever they occur.
Collapse this transcript
Installing Drupal using Acquia's Debian/Ubuntu package
00:01If you run UNIX or Linux, there is an assumption that you're an
00:03experienced system administrator. But more and more people are running
00:07Linux on their desktop computers,
00:09so I'm really glad that Acquia provides an installer as an Ubuntu package
00:13because it really simplifies Drupal on Linux.
00:14Now I do have to mention that the version 7 of Drupal hasn't come out in Acquia Drupal yet.
00:21But whenever it does, I expect that Acquia will quickly come out with Debian
00:25package for that as well.
00:27As usual to get it, you would go to acquia.com/downloads. Then underneath the
00:32Stack installers for Windows and Mac OS X you would click on the Debian package,
00:37and then click Download Now. Then click OK.
00:43I've chosen to download this directly into the Ubuntu Software Center.
00:46I then click the Install button.
00:50You'll be asked for the root password on this computer.
00:56Sometime during the installation process, you will be asked to provide a
00:59password for the root user.
01:01I am going to keep it simple and just put root.
01:04Of course, you should put whatever you want.
01:06After entering it once, I am asked for it again to confirm and then click
01:10forward, and the installation process continues.
01:14Also during the installation, you will be asked this question about whether to
01:17configure the database using dbconfig-common.
01:20I found it works best when you uncheck it and then go forward.
01:23We will configure the database ourself manually, as you learned how to do in another video.
01:30Great, Acquia Drupal is now installed.
01:32We can just close out this window now.
01:35In order to see it, hit Ctrl+L to go to a location and then type
01:40"/usr/share/acquia-drupal6", and then click Open.
01:53Now this is Acquia Drupal, but during this course we are going to use core
01:57Drupal, so you'll have to download and install it.
02:00However, the Ubuntu package doesn't directly support multiple sites, and doesn't
02:04have the same import feature as the Windows and Mac versions of the Drupal Stack installer.
02:09So you'll have to install the files and create the database manually and then
02:13run Drupal's installer.
02:14You can learn how to do all of those things in other videos in the course, in
02:18the section named, "Installing Drupal on a Server."
02:21There is just one last thing: because the Debian package is presented in the same
02:24way as the amp stack for both Windows and Mac,
02:27you might think that the package is the same, but that's not quite true.
02:31Here are a few of the differences that I noticed.
02:34First of all, you will find that you have to do everything as root, and you can
02:36use the Sudo command to do that.
02:38Secondly, it doesn't install phpMyAdmin.
02:42If you don't have it in any other way, use mysqladmin.
02:45As I mentioned before, it's not multisite, and there's no control panel like
02:50you got on Windows or Mac.
02:51Finally, the Debian installer doesn't necessarily install all of these new
02:55pieces; instead it brings together what's already there in Ubuntu or Debian.
03:01Acquia details several other ways that it's different in the documentation
03:04page that you see here.
03:06That page gives quite a few other technical details, including how to install
03:10the package from the command-line interface.
03:12Clearly the Ubuntu package isn't quite as easy to use as DAMP, but then again
03:16it's not supposed to be.
03:17It's sort of a compromise between the ease that desktop Linux users require and
03:22the power that server administrators need.
Collapse this transcript
5. Controlling Drupal
Using the toolbar
00:00We have installed Drupal and are logged in as the administrator.
00:04We know this because we see this black bar at the top, and we also see our
00:07administrator name up here, admin.
00:09That was the one that we entered when we first installed Drupal.
00:12It's known as the super user.
00:14If you don't see these things, here is what you do.
00:16First, I will log out to show you what it looks like when you're not logged in
00:19as the administrator.
00:21That bar disappears, and you see this user login over here.
00:24I log in. My username is admin, and my password throughout the course is
00:30lowercase drupal, and then just click Log in, and we are back in.
00:36The toolbar is really broken into three parts.
00:40The first one is pretty obvious, the Home button.
00:43Clicking there brings you to the front of your site.
00:45It's a same place you go if you were to click the logo here or the title
00:49or the Home button.
00:51It's good that it's in the toolbar though, because sometimes while you're
00:54developing a site, you will remove all of these links.
00:57The second group of controls in the toolbar is all of these here in the middle,
01:01and I'll be showing you more about these in just a few minutes.
01:04One in particular I want to mention, however, is the Dashboard over here.
01:08When you click this, you come to a customizable view of administrative options,
01:13and you'll learn about this in a separate video about the Dashboard.
01:17Finally, we have these links at the far right.
01:19It's obvious what Log out does.
01:21We already showed you that.
01:23The one to the left leads to your user account page.
01:27Here you can view your profile, or you can edit it by clicking the Edit tab.
01:31You will find out more about this in the "Managing Users" section.
01:35Now when we go back, you will notice a third tab called Shortcuts.
01:39We have a video in this course also which will explain what shortcuts are and
01:42how that fits in with this gray area up here, the shortcut bar.
01:46Let's get back to these links up here at the top.
01:49There are essentially two kinds of links here. Some of them take you directly to
01:53pages where you can perform actions. Those are Content, where you see a list of
01:57content and can perform certain functions on them;
02:01Appearance, which lets you switch among themes--that is, the visual display of the
02:06page; and People, which shows you a list of who's on the site.
02:11It's very similar, you will notice, to the Content page.
02:14But instead of being about nodes, it's about members of your site.
02:18Finally there's the Modules link, which shows you the different pieces that make
02:23up your Drupal software, both the core--that is, what you first download from
02:27drupal.org when you install Drupal-- and any additional ones that you download.
02:33The other kind of link in the toolbar lead to lists of links.
02:36You will see that under Structure, Configuration, Reports, and Help.
02:44Obviously when you go to any of these, you will just click on whichever link you
02:47want and get further information and controls there.
02:50Now you've probably noticed this gray bar up here.
02:54It's called the shortcut bar, and I'll talk about it in a separate video.
02:57The big difference between the toolbar and the shortcut bar is that you can
03:01easily change the links that appear in the shortcut bar.
03:04The toolbar on the other hand is intended to stay the same no matter how you
03:08configure this site.
03:09I will let you in on a little secret though:
03:11you can actually change what's in the toolbar up here.
03:15To do so, you would click Structure, then menus, then Management under list links.
03:23These top-level links underneath Administration match up with the links on the
03:28toolbar. And if you were to change these around or disable them, they would
03:31disappear or reappear up here in the toolbar.
03:34You will learn more about that in the videos about menus.
03:37The toolbar is new in Drupal 7, and it's part of the push to make Drupal easier
03:42for beginners to understand. But it's not the only way to get at Drupal's
03:45administrative controls.
03:47For one thing, whenever you're on an Administrative page, you'll see this list
03:51of links up here, what's called a breadcrumb trail.
03:54One of the early links will be Administration.
03:56When you click that, you see, once again, links that are very similar to the
04:00ones in the toolbar: Dashboard, Content, Structure, Dashboard, Content,
04:04Structure, and on it goes.
04:06The other way to get directly to an Administration page is to type in the URL directly.
04:11You could type in this entire thing, or you could remove part of it so you only
04:15show the Administrative page itself.
04:18The other way to get to Administrative pages is to type in its URL in the
04:22address bar in your browser.
04:24You could type in the entire thing or just the part that's in the
04:28administrative overlay, like so.
04:32You will learn more about that in the video about the administrative overlay.
04:37Now what if for some reason you decide you don't like seeing the toolbar at all--
04:40you want to get rid of this black area up here?
04:42Well, you can turn it off entirely.
04:45To do so, click Modules and then scroll down to toolbar, check the box, go down
04:53to the bottom, and click Save configuration.
04:57Both the toolbar and the shortcut bar will disappear.
05:01I am going to turn it back on though for the rest of the course.
05:07I simply click and Save configuration, and I think I'll go back home.
05:12Now I mentioned you can change the toolbar, but it's a little bit difficult to do.
05:16But if you want to have a customizable experience, there are two ways.
05:20First, there is the Dashboard, as I mentioned earlier, and then there's the gray
05:23shortcut bar as well, which is completely configurable.
05:27You will learn all about that in the video about using the shortcut bar.
Collapse this transcript
Using the shortcut bar
00:00Along with the black toolbar at the top of the screen which leads to all of
00:04Drupal's administrative controls, Drupal 7 introduces this gray shortcut bar.
00:09Links in the toolbar are difficult to change, but you can easily change those in
00:13the shortcut bar to lead anywhere on your site that you like.
00:16The shortcut bar comes with two shortcuts already built in.
00:20The first one lets you quickly add content, and the second one lets you find
00:24content that's already on your site.
00:27To add or remove other items, there are two methods.
00:30One is really convenient once you know where it is.
00:33I will show you that by clicking Modules.
00:35Let's say that we wanted to add this administrative page so it showed up in the
00:38shortcut bar as well as the toolbar.
00:41We just go down to this little Plus sign, and as you hover over it, it says Add
00:45to Default shortcuts.
00:46I do that, and there, it's done.
00:48Now you'll notice when you go to this page, the plus has turned into a minus.
00:53You can hover over it again, confirm that you want to remove it, and it's gone.
00:59The other way to add and remove shortcut bar items takes a little bit more
01:03digging, but it's actually more flexible.
01:06First, you need to know the URL of the page you want to link to.
01:09I will show that by copying this URL for the Modules page.
01:13I just highlight it and copy.
01:15Then go over to Edit shortcuts.
01:18To add a shortcut, click the Add shortcut link, enter a name, and instead of
01:23Modules, I am going to call this Functions let's say, and paste the path.
01:29Now I can tell you right away that this won't work because it already has
01:33the 2trees:8082 in it.
01:36You can only use this method, by the way, to link to things on your site;
01:39you can't have something in the shortcut bar that links off your site.
01:43So I'll get rid of that bit there, including the slash, and I'm left with this.
01:49Now when I try to save this, it'll still give me an error.
01:53That's because the actual URL is the part without this overlay bit in here.
01:57You will learn more about that overlay and about overlay URLs in the video about
02:02the administrative overlay.
02:04So we have removed that and try saving again. And there it is.
02:09We now have a Function button that goes straight to the Modules page, and
02:13although that link is labeled as Functions, we can remove it by clicking the
02:17Minus sign. And it's gone. So far so good.
02:22Now things get a little tricky.
02:24We have been editing a single shortcut bar, but you can actually create as many
02:29shortcut bars as you want.
02:31That's useful if you have administrators on your team performing different tasks.
02:35A news editor might have a shortcut bar that says "Post news article" while a
02:40community manager shortcut bar has one that says "Add member."
02:44To change that, go up to Configuration and then click Shortcuts.
02:48I am going to create a shortcut set called Editor.
02:51Now remember, we are not adding individual shortcut links right now; we are
02:55adding entire sets of shortcuts.
02:57I add shortcut set here and just call it Editor and create new set.
03:03Now I'm going to try to add some links.
03:05I will go up to let's say Add content and Add Basic page.
03:09Let's say that this is the link that I want to add to the shortcut bar.
03:13I'll bring my cursor over it, and you notice it says Add to Default shortcuts.
03:18This will add it to the first shortcut set, not the second one, not the Editor
03:22one that I just created.
03:23So you might ask, how can I add things to the Editor set?
03:27Well those sets are defined on a user-by-user basis.
03:31My username is admin, so let's go up to Hello admin here and take a look at my shortcuts.
03:37Ah, this is where I define which shortcuts I'm going to use.
03:41It not only defines what shows up in that gray bar, but also what will appear
03:45when I click on that little Plus sign. Change it to Editor and Change set.
03:50Incidentally, this is also a place where you can add a new set if you want.
03:55Now if I go back to that Add content and Basic page, when I hover over that Plus
03:59sign, I see Add to Editor shortcuts, and let's go ahead and do that.
04:05You will learn more about changing the settings of individual users in the
04:08section of this course about managing users.
04:11So now we have two shortcut sets.
04:13We are currently on the Editor set, which has this extra link to create a basic
04:17page. And just to prove that this works, I am going to switch my Shortcut set
04:21back to default, and that link should disappear.
04:24Again I go up to my user and Shortcuts, go back to Default and Change set, and
04:29indeed it did disappear.
04:31When you create a new user, they get the default shortcuts to start off with.
04:35As someone with administrator privileges, you can change which set they see by
04:40going to that user's page, just as you did on your own page.
04:43You do that by going up to People and coming down and editing their profile.
04:49You can also grant these users permission to decide which shortcut bars they want to use.
04:53To do that, go to People and then to PERMISSIONS, and then scroll all the
05:00way down to Shortcut.
05:02You would then grant that permission, select any shortcut set to whichever roles you wanted.
05:07You will learn more about that in the "Managing Users" section.
05:10Finally, if you don't like this shortcut bar at all, there are two ways to turn it off.
05:15First of all, you can turn it off temporarily for yourself by clicking
05:18this little arrow here.
05:20That gives you a little bit more screen space to play in.
05:23If you want to turn it off for good though, go to Modules and scroll down to
05:28Shortcut, uncheck the box, and scroll to the bottom, and say Save configuration.
05:35I'm actually going to leave it as it is, though.
05:37Now I have to say that section where I showed you how to set up multiple
05:41shortcut bars is actually a pretty advanced subject.
05:44You'll probably never use it until you start administering a site that has multiple
05:48people fiddling with it.
05:49But if you find yourself doing the same task over and over again in Drupal, just
05:54stick a link in the default bar for one-click access.
05:57Even without multiple shortcut sets, that little link or two can really make a
06:01difference in your efficiency.
Collapse this transcript
Touring the administrative controls
00:00Now that we have Drupal installed, we are going to start digging pretty deeply
00:04into individual points in its interface.
00:06But first, let's get an overview of the region's map before we visit those
00:10individual villages of control.
00:12As I said in the video about the toolbar, you can get to just about every
00:16administrative screen through this black bar at the top.
00:19One thing you probably noticed when you clicked it is that the screen sort of
00:22freezes and puts the controls over what you are looking at.
00:25That's called the administrative overlay, and it's new Drupal 7.
00:30As you can see, our original site is still back here, even as we scroll
00:33through this overlay.
00:35There are a few features of things that you see in the overlay.
00:39First of all, over here you'll see what's called a breadcrumb trail.
00:43As we click further into the administrative interface, it gets longer and longer.
00:47If you ever get lost, you can sort of back out and see one level above.
00:53It's sort of like being in a file folder and looking above to the higher level
00:57and then above again.
00:59Another feature is that some of these screens have tabs over here.
01:03So for Appearance, for example, not only can you see a list of all the themes
01:07you have installed, you can also update them or change the settings that
01:11affect all of them.
01:12While we are there, that's a good time to point out these subtabs which
01:15sometimes show up in the overlay.
01:18Here we have Global settings, Bartik, and Seven.
01:22One more thing I want to point out about the administrative overlay, which is
01:25the URL up here in the browser's address bar.
01:28The first part up to the Pound sign is what you see underneath the overlay--
01:33that is, the page that you are on before you clicked one of those links.
01:38Then you see #overlay=, and then you see the rest of the URL.
01:42If you want to see this page without the thing underneath it, all you do is
01:46delete that #overlay= and then hit Return, and there it is.
01:51If you get in at this point, and you want to go back to seeing the overlay, you
01:56can't really do that by just clicking around on these administrative links;
01:59instead you have to go back Home or to a content page and then start clicking
02:04around again, and the administrative overlay will come back up.
02:08Incidentally, you can turn off this administrative overlay entirely if you like,
02:12by clicking Modules and scrolling down to Overlay, un-checking that box, and
02:19scrolling down, and saying Save configuration.
02:21You will learn more about how to use this screen, by the way, in the section on
02:25extending Drupal's functionality. But let's get back to our links up here at the top.
02:30The first one is the Dashboard.
02:32The Dashboard is a very customizable screen which lets you change how you
02:35administer Drupal. For example, we can move Recent comments down here, and then
02:40when we say Done, when we have comments on the site, they will be listed here
02:44whenever we go to the Dashboard.
02:46I am going to go ahead and drag that back out though, and click Done.
02:51We will talk about that in a video about customizing the Dashboard.
02:55Then we go on to Content.
02:57We don't have any content on the site yet, but when we do, it'll all be listed
03:01here and we'll be able to sort it by title, type, or any of these other criteria.
03:05We will also be able to perform mass functions on them, such as publishing or
03:09unpublishing all of them.
03:11And we can filter the list, as you can see from the Filters up here.
03:15We will talk about this more in the section on content.
03:19Structure and Configuration are both lists of links, and this is where you get
03:24at most of the power of Drupal.
03:26We will go into these individual links throughout the rest of the course.
03:30I already mentioned the Appearance screen.
03:32We will talk about this in greater detail in the section about changing a site's interface.
03:37The People screen, which also includes the important Permissions tab, we talk
03:41about in the section "Managing Users."
03:44I already mentioned Modules, and again, we'll talk more about that in the
03:47section about expanding a site's capabilities.
03:50Finally we have Reports, which allow you to monitor what happens on your
03:54site, and Help, which brings you to text-based information that'll help you
03:59through all of this.
04:00Finally I want to re-iterate that Drupal is a multiuser system.
04:04We have been looking at this site from the point of view of the super user--
04:07that is, the person who was set up when you initially installed Drupal.
04:11That person has control to everything in the site.
04:14You can determine if that's you by clicking on your link up here or here to My
04:19account and then clicking Edit.
04:23If it shows you as user/1, then you are the super user.
04:28But if you're not that person, if, for example, you're working on someone else's site,
04:32you might be an administrator who only has access to some of the features that
04:36you'll learn about in this course.
04:38So don't worry if you find that a control is missing from your interface; just
04:42contact the person in charge of the site to make sure that you have access to
04:45all of the things that you should.
Collapse this transcript
Customizing the Dashboard
00:00A big push in Drupal's redesign for version 7 was to make it easier for
00:04beginners to administer.
00:05One part of that is the Dashboard, a homepage for administrative tools.
00:10Like the shortcut bar-- that's the gray thing right here--
00:13you can change what it contains, but to a much, much greater degree.
00:17To go to it, simply click Dashboard up here.
00:20Right now, our Dashboard doesn't show very much since we haven't added any
00:23content to this site.
00:25If we had, every time something new is added to the site, it would come to the
00:29top of this list here in Recent content.
00:31On the Dashboard, we can, however, search for content on our site or see who's new.
00:36Again, as we added users, they would appear in this block.
00:40The most interesting thing about the Dashboard is how you can change it to your will.
00:44To do so, click Customize Dashboard, and you see you have two additional blocks
00:49that can be dragged into these areas, either the wide left column or the
00:53narrower right one.
00:55So let's see Who's online right next to Who's new and Recent comments
00:59underneath Recent content.
01:01Now since we haven't added users or comments, there won't be anything in
01:05there. But when we click Done, we can see that should we start adding content and users,
01:09they would show up here.
01:10When you customize, you can also change where those things show up within a column;
01:15just drag and drop and click Done.
01:18But before we go on, I want to mention something.
01:21All of these pieces that we are dragging around this Dashboard area are what
01:25are called blocks, and you'll learn more about blocks in a video later in this course.
01:29Blocks are shared between the Dashboard and the main Drupal site in a sort of unusual way.
01:34I'll quickly just click Done here and then go back and customize and show you what I mean.
01:39All of the blocks on the site are listed in Structure and Blocks.
01:45As you can see, there are quite a few, and by the way, the main site has many
01:48more regions than you see on that Dashboard page.
01:51Again, we will come back to this later on in the course.
01:54But back to our Dashboard.
01:57If you wanted to have more options than just the five blocks that you
02:00added here, click Customize Dashboard and then either Add other blocks or
02:04configuration page;
02:06both of those go to the same place.
02:08The Dashboard has those two areas, which is main and sidebar, and then it has
02:12an inactive area: those are the things that are sitting in that pane at the top of the page.
02:17Finally there are other blocks.
02:20These are blocks shared between the Dashboard and the main Drupal site.
02:24If you make something available to the Dashboard, it stops being available on the main site.
02:29Drupal's developers decided to do this just to avoid some redundancy, so that
02:33you wouldn't have a Management block both in the administrative interface with
02:37the overly floating and on the main site; it's part of their push to keep the interface simple.
02:42Let's take the Management block, for example, and move it up into the main
02:46area. So I just click this dropdown menu and go to Dashboard (main), and you
02:50see it pops up there.
02:52Now before it actually goes there, we have to click Save at the bottom, Save blocks.
02:56Now when we go back to the Dashboard page, there it is, the entire Management menu.
03:02By the same token, you could add a block by going up to Structure > Blocks > Add
03:08block, and then make it available to the Dashboard in the same way.
03:12Finally if you don't like the Dashboard at all, you can turn it off the same way
03:16you could with a toolbar or the shortcut bar.
03:19Just go up to Modules, scroll down to Dashboard, uncheck the box, scroll to the
03:25bottom, and click Save configuration.
03:28I like it, so I'll leave it and just go back to my homepage.
03:31This new Dashboard is a big change for Drupal administrators.
03:35It really helps move Drupal from something that hard-core system administrators
03:38like to something that everyone can manage with just a few clicks.
03:42However, it does take a little bit of setting up to make the Dashboard the
03:45way that you want it.
Collapse this transcript
Differentiating administrator and visitor views
00:00By now you've noticed that a Drupal site looks quite different when you're
00:03administering it from when you're just visiting it.
00:06That wasn't quite true in Drupal 6, but it was something that a lot of people ask for.
00:11But not everybody likes it.
00:13This video shows you a simple trick to change the way the administration
00:16interface looks so it matches what everybody else sees.
00:19To do it, go to Appearance.
00:22Right now, our main theme is Bartik, and you will notice from its screenshot,
00:26that looks very much like what we saw on the main site.
00:29When we click an administrative link, we go to this Seven theme.
00:33The Bartik theme is what's called the default theme, as you see right next to its name.
00:37Now if we scroll down to the bottom of the screen, you see we have a separate
00:41choice of what we want the administration theme to be.
00:44We have chosen Seven, but all we'd have to do is change it to either Bartik or default theme.
00:51By changing this pop-up menu to default theme, the administration theme will
00:54stay in sync with the theme that everybody else sees.
00:58Then we go down and click Save configuration.
01:02Now you'll notice a few subtle changes here.
01:05First of all, these tabs look a little bit different.
01:07I am going to go and create some content, and you will notice it even more then.
01:11Click Add content, and as you see, the type is a little bit different. Click Basic page.
01:17As we scroll down, look at these vertical tabs. As you will see from later in
01:21the course, they look quite different in Bartik than in Seven.
01:24I am going to change it back just by going to Appearance, scroll down again, and
01:30change it back to Seven.
01:33Incidentally, we do have this little check box here so that you could change the
01:37administration theme only when you're looking at an administrative page such as
01:40this one, and not when you're creating content.
01:43To do that, you would just uncheck that box.
01:45But I am going to return to its original state, click Configuration, and we
01:50are back as we were.
01:52There is one other thing you could do to make the administration experience even
01:55more like the browsing experience:
01:57you could turn off the Administrative Overlay. And you'll learn to how to do
02:01that in the video about touring administrative controls.
Collapse this transcript
6. Building a Drupal Site
Understanding nodes
00:00Drupal is, as you know, a content management system.
00:04The first word of that phrase is content, and I think that needs a little bit of
00:07explaining--particularly as it relates to Drupal.
00:11First, let's consider content as it's traditionally known, and what's more
00:15traditional than a book.
00:16Most people would agree that it's content, but a book is actually made up of many parts.
00:21It's a mixture of content and form put together in a format that we recognize as a book object.
00:28Books typically have a title, and they have only one title. Then they have a cover.
00:33Open it up, and you see the front matter--which is the table of contents and
00:36publication info--and in the back, the back matter--the index and the colophon.
00:41All of this, however, isn't what we typically think of as the book's content.
00:46Going further into the book adds more elements.
00:49First, there is the text of the book.
00:51This is more like what we think of as content.
00:53There are other parts to the page: footnotes and page numbers, for example.
00:57There may even be comments that are added to the book in handwriting.
01:01You can extrapolate this model to anything you think of as content: movies,
01:06paintings, video games--anything.
01:08You quickly see that content is not such a simple matter to define.
01:12Now let's turn back to Drupal.
01:14I said before that a book comprises many parts.
01:17A node also comprises many parts, known as fields.
01:20I will show you that by creating a basic page.
01:23The two main fields are the Title and the Body.
01:26However, a node can have many other parts, and I'll show you a little bit of
01:29that by creating an article.
01:31It also has a title and body, but in addition, it has tags so that you can
01:35categorize the content.
01:37It also has a place to put a picture.
01:39You decide what fields you want to go into a node by first creating a content
01:43type under Structure and Content types.
01:46Then when you create a node, you specify which content type it should
01:49be patterned after.
01:51Drupal 7 comes with two content types enabled, called Basic page and Article.
01:57You will learn how to create other content types in the section about extending content.
02:01Now that you know how Drupal constructs content, let's start creating some
02:04of our own.
Collapse this transcript
Creating basic content
00:00Our site still looks the same as when we first installed Drupal, and I know you
00:04are chomping at the bit to actually start building it out, right?
00:07We will get things going by creating this site's homepage, which in Drupal
00:10language is usually called the front page.
00:12I will then also create other pages to show off different features.
00:16Incidentally this video in the course uses the exercise files.
00:20We are just going to copy and paste some text and use a graphic, but you're
00:23welcome to use your own if you like.
00:25To create that page, we first go up to Add content, and we're going to create a basic page.
00:30I'll explain the difference between these two in just a minute.
00:32Now I'm going to go back to my exercise files, which I have on the Desktop,
00:37and open up my text.
00:38I copy this section here as the title and paste it into my site, and I'll do
00:44the same with the body.
00:48Then I scroll down to the bottom and click Save.
00:51And there is our front page.
00:53Let's go back to the front. Wait a second.
00:55It's not there.
00:56We didn't actually move it to the front page.
00:59We just created the node.
01:00So we will go back to it.
01:01We could either hit the Back button, or to find content, we just click this
01:06Content link up here, and there it is.
01:08We'll go back and edit it by clicking the Edit link.
01:12To put it on the front page, you actually scroll to the bottom.
01:15There is a whole set of links down here to all kinds of settings, and I'll show
01:19you what each of these mean in just a moment. But for right now, I'll just click
01:23Show Publishing options > Promote it to the front page, and Save.
01:27Now when we go to the front page, there it is.
01:30If you want to see the full node and edit it, just click here on the title.
01:35That's the same way that it works on any Drupal site, by the way, and on
01:38most other CMS sites.
01:40If we go to drupal.org, which of course is built in Drupal, you see that it
01:44works exactly the same.
01:45You click on a title, and it takes you to the full node, but back to our site.
01:50Now that we have our front page up, let's go back and check out some of
01:53those other features.
01:55To do that, I will create another node that demonstrates how some of them work,
01:58while other features will get their own videos in this series.
02:01Once again, I'll go and click Add content.
02:03I am going to add another Basic page.
02:06This is going to be an About Us page.
02:09I'll go back to my exercise file, copy the title, and paste it in, and copy the
02:16body and paste it in.
02:20The first thing that you notice is this Edit summary.
02:23When you click on that, it opens another window where you can add additional text.
02:26We will discuss that in the video about creating content summaries.
02:30For now, we'll just hide it.
02:31Scroll down a little bit further, and we see this Text format pop-up menu.
02:35We will discuss that in the video about using text formats to prevent damaging content.
02:40Then we go down to all of these settings in what's called a vertical tab format.
02:45The first one is menu link, and I will actually add a menu link to this page.
02:49Because it's about Us, I'll make the title About, and under Description, I will say About us.
02:55You'll see the difference between the title and the description in just a moment
03:00when I'm finished editing this.
03:01The next tab, Show Revision information, we'll discuss in the video
03:05about revising content.
03:07For URL path settings, we actually will add what's called a URL alias to this
03:11node, and we will say it's about-us.
03:15This is what will go up into the browser bar here when you go to this page;
03:20otherwise it would simply say the name of our site/node/a certain number,
03:25whichever number we created.
03:27You can see up here, for example, that we were looking at node 1 when we went to
03:31edit this page; that was the first node we created on the site.
03:35The next tab has to do with comment settings, and we're not going to open that
03:38up for anybody to comment on this content.
03:41But you will learn how to do that in a few videos: one is called "Setting the comment
03:45policy," and the other one is "Managing comments."
03:47For authoring information, you can change who apparently wrote this piece of
03:51content and when it was apparently posted, but we'll just leave it as it is for now.
03:56And finally, you already took a quick look at this Show Publishing options and
04:00what Promoted to front page does.
04:02You will see what sticky does in just a moment, but for now we'll click Save,
04:07and there's our node.
04:08As I mentioned before, if you look up here, you can see the URL is about-us.
04:13If we go back to our front page and look at the other node that we created, it's /node/1.
04:19That's what that URL alias does.
04:21You might also remember that we added a menu item to that node, and there it is,
04:26right up here, About.
04:27If we want to go to that node quickly, just click that Tab. And as we hover or
04:31cursor above it, it shows the description that we entered, About us.
04:36So far you've only seen how to create basic pages, but you might remember from
04:40the earlier video about understanding nodes that there are multiple content
04:44types in Drupal, and that Basic page is only one of them.
04:47So let's create an article to see the difference.
04:50We start out the same, by going up to Add content and then instead of Basic
04:53page, we choose Article.
04:55Once again, I'm going to paste in some information from our exercise files.
04:59We will scroll down here and select our text, paste it in, and our body, and paste it in.
05:11I am also going to add some tags.
05:13This will be let's say press release, pr.
05:19and the New England Organic Chefs Association, NEOCA, how about that?
05:24Finally, articles give us a place to add a graphic.
05:27I'll browse back to our exercise files and add one that I have for just this occasion.
05:32There's our graphic.
05:33I'll click it and say Open and Upload.
05:36And for alternate text, I'll just say "Olive branches in Southern California."
05:43As we look at the vertical tabs at the bottom, you'll notice a few other
05:46differences between articles and basic pages.
05:49First of all, comments are open, so when we post this, people who are visiting
05:53our site will be able to comment back and say what they think about the node.
05:57Also, it's automatically promoted to the front page.
06:00Let's save it and see what that looks like.
06:03There's our node with our picture, and there are our tags.
06:06Now if we go to our front page, there it is. But there is something strange here.
06:12We really wanted that first node that we posted to be at the top of the page,
06:15but as we add other things to the front page, it gets pushed down.
06:19We can change that by going back and editing that node.
06:22There is a few ways of doing that. One of them, as you saw, is to click Content,
06:26find the node, and then click Edit.
06:28Another is to click on the title itself and then click Edit. Or, going back to the front page,
06:34in some contexts, we will see this little widget here,
06:37we can click on that and say Edit.
06:39In any case, it takes us back to our page.
06:42I'll scroll down to our Publishing options and make it sticky at top of lists.
06:46That's what this box does:
06:48it makes it so it appears above all the other content.
06:52I click Save, go back to my front page, and there it is.
06:56It'll stay at the top of the page, unless another one is made sticky above it.
07:00Finally, there are a few ways to delete a node.
07:03We could go to the node, click Edit, and scroll to the bottom and then click
07:07Delete, after which we'll be asked to confirm our choice. Or we could go up to
07:12Content and click Delete. Or we could select several nodes at once and then
07:17select Delete from here and then Update.
07:20In each case, you will be asked to confirm your choice before the content is
07:24actually removed from your site.
07:26But I'm not going to do any of that.
07:27I will just right back to my front page.
07:29Now that you know how to create, remove, and change content, you could actually
07:33stop watching right now.
07:35You know everything you need to fill your Drupal site with text.
07:38But your goals are probably a lot more ambitious, so keep watching.
07:41There is a lot more that Drupal can do, including user management, design,
07:46and site maintenance.
Collapse this transcript
Changing site information, graphics, and interface
00:00Now you have a little content on your site, but it still looks generic.
00:05Let's change that. I'll show you how to do three things in this video.
00:09First, we're going to change the site's title and add a little slogan underneath it.
00:13Then we'll change the logo, along with this little thing up here which is
00:16called a favicon.
00:18Finally, I'll show you how to change the theme, which controls the site's
00:21appearance on every page. But we'll start with the title.
00:25To change that, go up to Configuration and Site information.
00:30We'll actually leave the site name the same, but as you can see, you can change
00:33it however you like.
00:34And we'll add a slogan here. How about "The best olive oil in the world"? And scroll down.
00:42There are few other things that you can change, for example, what page people
00:46reach when they go to a page that doesn't exist, and things like that. But we'll
00:49ignore that for now and say Save configuration.
00:53Now when we go back or our front page, we see our slogan.
00:56Now for the logo and favicon. To change that, we go up to Appearance, and then
01:01we click the Settings tab.
01:03Now there is also a Settings link next to the theme itself, and I'll get back to
01:07that in just a minute, but we're going to change the icon on every theme.
01:11So we go up to Settings and Global settings.
01:14We could actually hide the logo entirely by unchecking that box. Scroll down to
01:18the bottom and click Save configuration.
01:20I'll show you that that works by closing out the administrative overlay, and
01:24it's gone, but we actually want to include a different logo, not just hide the one we have.
01:29So I click Appearance, and again, I click Settings.
01:32I'll put the Logo back and then scroll down.
01:36As you see, we have Logo Image settings and Shortcut Icon settings.
01:39The shortcut icon is that favicon that I mentioned earlier.
01:43In both cases, we'll uncheck Use the default logo, and then we'll click Browse
01:48to go our exercise file where we have a logo prepared. And there it is.
01:53Click logo.png and Open.
01:56Same thing with the shortcut icon: uncheck the default icon, click Browse, find
02:01the one you want to use, and click Open.
02:04I do want to mention something about favicons;
02:07they are only 16 or 32 pixels square so you should make them very simple.
02:12I've already designed mine to fit that space well,
02:15so I'll scroll down to the bottom and click Save Configuration.
02:18Now when I close out the administrative overlay, we see our new logo, both here
02:23and up in the Favicon areas.
02:25So far so good. But there is one thing that still bothers me about the logo:
02:29it sort of clashes with the blue in the background, doesn't it?
02:33To fix that, we'll go back to the settings screen we saw, by going up to
02:37Appearance and Settings.
02:40However, you'll notice there are no settings here to change color.
02:44That's actually a feature specifically of Bartik.
02:47So I'll go back to my List here and then click Settings next to Bartik.
02:51I could've also just stayed in the Settings tab and click Bartik here;
02:55they both go to the same place.
02:56Bartik is what's called a re-colorable theme.
02:59Not every theme is like this, and some themes have additional features.
03:03That's why it's a good idea when you download a new theme, as you learn how to
03:06do later in the course, you look at all of its settings before you start playing with it.
03:12Sometimes it will surprise you with things you don't expect.
03:14Now the two changes I'm going to make are to Header top and Header bottom.
03:19Right now, it goes from this darker blue to this lighter blue.
03:22I've already figured out what colors I want to use, so I'll highlight there and type them in.
03:27Header top will be #B9C6AA.
03:32And as I type, you'll notice it actually changes right in the background of the text.
03:36Very nice feature.
03:37I think I'll change the bottom one to be the same color as well.
03:41So I'll just copy that and paste. Then I'll go down and click
03:46Save configuration.
03:48Close out our overlay, and there it is.
03:50Well, I like it, but it kind of makes the logo disappear in the background.
03:54So I'll go back to Appearance and change those colors again.
03:58In this case, I've already chosen a color, so I'll change Header top to it, which
04:02is #32411B, and let's see how that looks.
04:08As we scroll down, we actually see a preview, which is really nice.
04:12I think that looks pretty good, so I'll scroll all the way down and say Save
04:16configuration and close out my overlay. Much better!
04:19The last thing I'm going to show you in this video is how to change from one
04:23theme to another entirely.
04:25It's really quite easy; just go up to Appearance and scroll down and see what
04:29other themes you have available.
04:31We have seven available.
04:32We also have these disabled themes that we could enable and then make the default.
04:36In fact, I'll do that with Garland.
04:38Click Enable and set default. Close out the overlay.
04:42There, you see it made quite a big change to our site.
04:45If I were to switch it to Seven, it makes the site's interface quite different.
04:50Set default, close the overlay. Yeah, very simple.
04:53I think I like it as Bartik though,
04:56so I'll go back here and Set Bartik as the default.
05:00If I wanted to, I could go back and Disable Garland, although I don't really need to.
05:05Now when I close out, I'm back as I was.
05:08This video showed you only a few ways you can change your site's identity and look.
05:12We only scratched the surface about themes though, and it's a huge subject.
05:16There are literally hundreds of alternate themes available to download for free.
05:20In the section about changing a site's interface, we'll show you how to get and
05:23use them, and even a little about creating your own.
Collapse this transcript
Giving visitors a way to contact you
00:00This part of the course is intended to give you just the basics you'd need to
00:04create and launch a site quickly.
00:06You've learned how to change the site's identity and add simple content, but
00:10there is one more thing I think every site needs--even the simplest ones: a way
00:14for visitors to contact you.
00:16To make that happen, go up to Modules and scroll down to Contact.
00:21It's a model that's turned off by default. To turn it on, click the check box and
00:25scroll to the bottom, and then click Save configuration.
00:29That's actually all that we need to do.
00:31Our contact form is now turned on.
00:33If we go up for URL here and type in "contact after" our domain name, we can see
00:40the contact form, but we can go further than that.
00:43In order to add more than one contact form, or to change some of the criteria
00:47that make up this one, go to Structure and Contact form.
00:51Here we see Website feedback.
00:53That's the one contact form we've seen already.
00:56To configure it, I click Edit.
00:58On this screen, we can change the category, which again doesn't come into play
01:02until we add other categories, as we will later in this video.
01:05You can change who receives the e-mails that are sent through that contact form.
01:09If you want more than one person to receive them, put a comma between each
01:12e-mail address. And we could put in an auto-reply, just to tell people that
01:16we're going to answer their e-mail soon.
01:18In fact, I'll do that: "Thanks for your e-mail!
01:21We'll respond soon."
01:26I'll talk about the Weight and Selected pop-up menus in a minute. But for now,
01:30I'll just click Save, and then I'll go back and look at the form.
01:33Now we're looking at this as somebody who is already logged in to this site.
01:37So our name and e-mail address is already filled out.
01:40In addition, there is a Send yourself a copy box down here. If we were to fill
01:44this out and check that box and say Send message, a copy would also go to our
01:48e-mail address since it already knows who we are.
01:51But what if you look at this form as somebody who is just visiting your
01:54site without logging in?
01:55Well, I've already brought up the site in another browser where I haven't logged in.
02:00On this page, I'll go to /contact and try to take a look at that contact form.
02:07We're not allowed to see it.
02:08That's because by default Drupal only allows people who are logged in to send
02:13e-mail through that contact form.
02:15We can change that, though. I'll go back to my administrative interface and go
02:19up to People and then click Permissions.
02:22Then we scroll down to the Contact area here. The thing we're editing is called
02:26the site-wide contact form.
02:28In addition, as you'll learn later, individual users can set up contact forms
02:33so that, for example, one user can write to another by using a similar form.
02:37I'm going to make it possible for everybody to use this contact form.
02:40To do so, I click Authenticated User and Anonymous user in that row, scroll all
02:46the way to the bottom, and click Save permissions.
02:50You'll learn more about permissions in the section on managing users, and in
02:53particular, the video "Controlling access permissions."
02:56I do also want to warn you that by opening up our site so that anyone can send
03:00us e-mail, we will start to get spam from automated services that are going
03:05around the web looking for ways to send us junk mail.
03:07They have already discovered this contact form on Drupal, so you will start to
03:11get some of that junk.
03:13Anyway, let's go back and take a look at our anonymous user and reload the page.
03:18There. Now we can see the contact form.
03:20However, neither the name or the address are filled in, and there is not that
03:24Send yourself an e-mail check box down here, because again, the site doesn't
03:27know who this anonymous user is.
03:30Now let's go back and actually send ourselves a note.
03:33I'll close that out.
03:34I'll change my name to Tom Geller,
03:37change my e-mail address to my actual e-mail address, and the Subject will be, "Hey there!"
03:44Message is "Great Site," and I'll send myself a copy.
03:49Now when I send this, I should get three e-mails.
03:52The first one will be the one that I'm sending to the administrator, who happens to be me.
03:57The second one is the Send yourself a copy message.
04:00The third message that I'll get is the auto-reply.
04:03Again, I'm sending this to myself, so I'll see both sides of the equation, both
04:07the sender and the recipient. And I click Send message.
04:11Drupal tells me that the message has been sent. Now, we wait a little while.
04:15And there is our mail.
04:16Let's see what it is.
04:19As I said, we have three messages. The first one is the auto responder,
04:23Thanks for your e-mail!
04:25Then we have the message that was sent from the sender to the recipient, and an
04:29identical message that was sent from the sender as a bounce-back, that is the
04:34one that they said they wanted to get a copy of.
04:37Now let's go a little bit further.
04:39I'll go back to our site by closing out my mailbox and take another look at
04:43Structure and Contact form.
04:47Let's add another contact form to see how it works when there is more than one.
04:50We click Add category, and this one I'm going to call Suggestions.
04:55Recipients will once again be admin@example.com.
05:01We don't need an auto-reply, and I'll leave Selected as No.
05:05Click Save, and we're back at our list.
05:08Now when we go to our contact form, we see an extra control, this pop-up here.
05:13Now you remember, we said, no, we didn't want for Suggestions to be selected and
05:18so the other one, Website feedback, is selected.
05:21If we go back, by clicking Structure and Contact form once again, we can make
05:26this one the selected one by changing Selected to Yes.
05:30Now when I do that, it makes the other one No.
05:32Obviously only one can be selected at the time.
05:35We can also make the Suggestions show up below Website feedback by editing it
05:40and changing its weight.
05:41The larger number means that it's heavier. The smaller numbers, or the negative
05:45numbers, float to the top.
05:47I'll change that to 6 and say Save, and as you see, it sank to the bottom.
05:53Now when we go to our contact form, it's obvious when you look at how the
05:57Category selector is set up.
05:58So now we have a contact form that will direct e-mails wherever we want, but
06:03there is still one problem: people don't know it's there.
06:06I'm going to make the path to it obvious, by just very quickly adding a link to
06:10it in our main menu.
06:11To do that, I go up to Structure and Menus, and then I add a link to our main menu.
06:17The title will be Contact, the Path will be contact--
06:21and you'll remember that's what we saw in our browser bar--and in the Description
06:24I'll say, Contact us through this e-mail form. Scroll down and save.
06:32You'll learn more about menus in the section on helping users find their way around.
06:36When we close out this administrative overlay, we then see it here.
06:39And when we hover our cursor over it, we see what we typed in as the description.
06:44Contact forms like this are an effective way to get valuable feedback, but they
06:47are not the only way.
06:49If you want to make things even more interactive, consider also letting people
06:53talk directly to each other, and you'll learn how to do that in the video about
06:57adding discussion forums.
06:58Forums are a much more heavyweight solution, because you have to keep an eye on
07:03them to make sure they're not being abused.
07:05By comparison, contact forms are fairly simple, and they're really trouble-free,
07:09and furthermore, they're really easy to set up.
Collapse this transcript
7. Controlling Content
Creating content summaries
00:00We haven't created any really big nodes in this course yet, but you probably
00:04will if you run a site for any length of time.
00:07When Drupal groups nodes together--
00:09for example, here on this front page-- it naturally cuts off those long strings of text.
00:14So you just get the first 600 characters or so, with a link to click to read
00:18more. But sometimes the first 600 characters don't summarize the nodes' contents well.
00:25This video shows you how to get better control over that so-called teaser text,
00:29both in individual nodes and throughout your Drupal site.
00:33I am going to use this little news story as an example.
00:37We added this earlier on in the course from the exercise files.
00:40Right now, there is no trimmed text because the story itself is pretty short.
00:44If we look at it here on the front page, as well as on the node itself, it's
00:49just two paragraphs.
00:50So I am going to edit that and make it longer, so that we can see exactly what's going on.
00:55At the end of the second paragraph, I am just going to add "blah-blah" and copy
01:00that over many, many times.
01:03That should be enough. And then you know what I'm going to do is I am going to
01:06cut it into a third paragraph here and add another paragraph.
01:10Now we know that we don't want all of that on the front page, and Drupal will in
01:13fact cut it down a certain amount.
01:15Let's find out exactly how much it cuts it down by saving it and looking at it
01:19from the front page.
01:22So as we look it on the Node view, we see the whole thing.
01:25If we go back to the front page, we see only the first paragraph.
01:30That's great; we really didn't want to see all of that stuff on the front page.
01:34But we can change that.
01:35Let's say that we really wanted to give us the first two paragraphs in the front,
01:39instead of just one.
01:40I'll go back up, click and then edit it again. And let's make it so that this
01:46entire second paragraph should show up as well.
01:49What I do then is I click Edit summary, go down, copy exactly what it is that I
01:53want to appear in the summary, paste it, go down to the bottom, and save.
02:01Once again, in the node itself we see the full thing, but on the front page we
02:06see only the amount that we wanted as the summary.
02:08I'll go back and of course turn that back to the way it was.
02:13We don't really need this here,
02:15so I'll just delete it and Hide the summary. And I'll return this so that it's
02:21more like it should be.
02:22I do want to point out, however, that the summary doesn't have to contain any of
02:26the same text at all.
02:27If I go back up and say Edit Summary, I can then type in let's say "Yet
02:32another chef's association votes in our products as their preferred brand of choice."
02:44Scroll down to the bottom and save, go back to the front page, and there it is.
02:50That's pretty much all you need to know about how to change the summary of a
02:53single node. But since you're the administrator of the whole site, you can also
02:57change how long the automatically trimmed text is, and whether editors can add
03:02summaries themselves.
03:03To do that, you'll edit the content type. First, let's change the trim length.
03:08To do that, go up to Structure, Content types, and I'm going to change article
03:13since that node in particular was of the article content type.
03:17Go to Manage Display and then note that up here you have a separate control for
03:22the default and the teaser.
03:24What we are going to change is the teaser, so I click that button there, and
03:28here--here we are we see all of the fields that are part of that content type.
03:32The one we're going to change is the Body.
03:34Now we could have that change the entire node if we wanted, by changing this to
03:38Default. We could also change it so it's only plain text--that is, it'll show
03:42up properly with all of the stylings and such in the node, but on the front
03:46page and anywhere else that it's gathered together, like in a view, it'll show
03:50up as plain text. But what we're going to do is change the trim length, and to
03:54do that, you click the widget next to the body field, and there you have some
03:59additional controls.
04:00In this case, we can only change the trim length,
04:02so I could change it, for example, to 50
04:05if I wanted. Very small excerpts on the front page or much longer, we don't have
04:09to do that here. Just click Cancel.
04:12Now when you do that, it changes all existing content. It doesn't change what's
04:17in the node itself, only the way it's displayed, but it'll happen consistently
04:21throughout your site.
04:23Finally, here's how you get rid of the option that lets users add a summary
04:26when they create nodes.
04:28We will go back to managing our fields, and the field we are talking about is
04:31the Body. Click Edit next to it, scroll down, and then uncheck Summary Input.
04:39Now, if I go down and save, you'll see the difference when I add content of the
04:43article content type.
04:45You see that Edit Summary has disappeared from up here?
04:47That's what that check box does.
04:49I am just going to return it to its previous status. Just go up to Structure,
04:53Content types, Article, Manage fields and Edit the body. And once again, I scroll
05:01down, allow Summary Input, and save.
05:05Now we haven't gotten into this area yet of editing content types, and there are
05:09a lot of controls available.
05:10You'll learn about them in the section on extending content.
05:14Now I have found that trim text at its default length tends to be fine for most
05:19webmasters. The ones who take advantage of the summary are usually running
05:22content-driven sites such as those associated with newspapers, because they are
05:26used writing blurbs which are different from the first paragraph of the story.
05:30But I could also imagine some very creative uses for summaries.
05:33For example, let's say you are running a site on riddles. The summary could be
05:37the question and then you click through, the full node is the answer.
05:41If you're doing something unusual on your site, take a minute to think about how
05:45you might use summaries creatively.
05:47Since the results generally appear on the front page, the results will be
05:51highly visible.
Collapse this transcript
Revising content
00:00I've mentioned a few times that Drupal is a multiuser system, and it is, as
00:05you know, a content management system. Put those two together and you get the
00:09possibility of lots of people editing the same content and the danger of
00:13having them create what's called an edit war, where they write over each
00:16others' corrections.
00:18You'll learn how to permit or restrict access to node editing in the section on managing users.
00:23This video shows you how to keep track of node edits so at least you can
00:27untangle the history of a piece of content and then return it to a previous
00:31version if necessary.
00:33To demonstrate, I am going to make some changes to this About page that we added
00:37earlier on in the course.
00:39So we click About--that takes us to the node--and then click Edit.
00:43Now I have some text in our exercise files that I'm going to add to the end of that node.
00:48So I select it and copy it and go back and paste it. And I don't actually need
00:54this continuation text right here, so I'll take that out, and scroll down.
01:01Now there is a vertical tab here, Show Revision information.
01:04That's where you make the control.
01:05So I'll click there and say Create new revision, and then after that I'll say
01:10"Added final paragraph and signature," and then click Save.
01:17Now you'll notice a difference about this node that we can see because we
01:20are the administrator.
01:22We have View and Edit as before, but we also have this Revisions tab.
01:26I click there, and we see the original version along with the new one with our
01:30node, and above that node, it tells us when and by whom that edit was made.
01:35Let's go back and edit it one more time, because I want to show you an additional
01:39feature of revisions. So I go up here and click Edit, and down here I'm going to
01:44just make a contact link, so that instead of it just saying Maria Ann Vitalia, it
01:49actually sends them to the contact page.
01:51You might remember that we added a contact page earlier in the course which
01:54is at /content, so I will just say a href=' /contact, and then at the end, I
02:04will close out that tag.
02:06Go down and once again I'm going to add a Revision, and I'll say "Added contact
02:12link" and Save, and once again go back to Revisions. But let's say that after we
02:17left it up there a while
02:18we don't like all of the e-mail that we're getting from that page,
02:21so we want to revert it back to the second one.
02:23That's easy enough.
02:24We just click revert.
02:25We are asked if we really want to do that, and we do, and we are done.
02:28But there is something interesting.
02:30It doesn't just step backwards;
02:32It goes forward so that you can now go back again to that third step where
02:35the contact link was there, and it puts in an automatic note here saying copy of this revision.
02:41Now if we go and look at that node we see that indeed the contact link is gone.
02:46So that's how you create a revision on a single node.
02:49By default, Drupal forces you to check the box every time in order to do this,
02:53but you can change that setting so that revisioning is turned on by default for
02:58any given content type.
03:01This particular node is of the basic page content type, so that's the one we will change.
03:05To do it, go up to Structure and Content types, the one we're going to change is Basic page.
03:11So I go Basic page and Edit. Then I scroll down to my vertical tabs down here.
03:17Now there is no vertical tab down here for the revision; instead, it's in
03:21Show publishing options.
03:24I click there and then go to Create new revision, and Save content type.
03:30Now when I go up and add content of the basic page content type, scroll down,
03:35and you see that the revision box is already checked by default.
03:39That change incidentally affects all existing nodes of the content type as well,
03:44so it forces revisions even for those nodes you created earlier before making
03:47this change to the content type.
03:49I can prove that by going back to our About page. I'll go home, click About, and
03:54then Edit. And as I scroll down, you'll see the revision information now has
03:59it checked by default.
04:00You will learn more about controlling content type defaults like this one in the
04:04video on creating new content types.
04:07In the beginning of this video, I painted a scenario where multiple people are
04:11fighting for control over one piece of content. But in practice, I find
04:15revisioning useful even if I'm the only one who's making changes.
04:19Hey, we all make mistakes. Keeping revisions is a way to recover from them, and
04:23the only cost is the small amount of disk space that those revisions take up.
Collapse this transcript
Categorizing content with tags
00:00Everywhere in life, we encounter organization by categories.
00:04A trip to the supermarket would be chaos if the same shelf held, let's say
00:08dental floss, cans of beans, and slabs of meat.
00:12Instead, these items are all separated into their aisles, according to
00:15what's called taxonomy.
00:17Drupal lets you distinguish nodes by taxonomy as well.
00:21It's a two-part process.
00:23First, you define a vocabulary.
00:25In the supermarket example, it might be product type.
00:28Second, you assign terms to the individual items that fit in that category.
00:33So dental floss would be tagged with the term "health,"
00:36beans go into "cans goods," and so on.
00:38To demonstrate this, I've created a handful of new article nodes in our site,
00:42but I unchecked the setting that would have put them on the front page.
00:46I got this text from our exercise files.
00:48To see them, we go up to Content. And as we scroll down, there they are.
00:53They are basically just moments in the history of the company. I want to label
00:57each of these nodes with the tag "timeline," but before we do that, I have to
01:02set up a vocabulary. To see what vocabularies we have, we go up to Structure and then Taxonomy.
01:07Now, there is already one set up.
01:10It's a general-purpose vocabulary called Tags, and I am just going to use that
01:13one at first. But you can create your own vocabularies as well, and I'll show
01:17you how to do that in the video about going further with content categories.
01:22So to tag all of these, I go back to Content, and then I'll edit each one.
01:27I will start with this one, Edit, and for Tag, I'll say Timeline, scroll to
01:33the bottom, and save.
01:36Then I'll go to the next one which is 1908, Edit, Tags, Timeline.
01:41Now as I start to type it in, you'll notice that Drupal has remembered that it's
01:44already in the Tags vocabulary.
01:47So I could continue typing or just go down and select it, and then go down and click Save.
01:53Now I'm going to go ahead and tag all of these.
01:55You should do the same thing yourself, but I won't be showing it to now. I'll meet you at the end.
01:59So now I've added that tag to all of those nodes.
02:03Let's go back and take a look at any one of them, and you'll see exactly how that works.
02:07So I'll click on Coming to America,
02:09the first one in the Timeline, and there's the tag.
02:13Now, if I click it, I see a page which has as its title Timeline, which is the tag
02:18itself, and then all of the other nodes that have that tag.
02:23There is one thing about this, however.
02:25You'll see that it's going in backwards chronological order. That has to do with
02:29the order in which I created the nodes.
02:31You can change that order, and you will learn how to do that in a section of
02:34this course on creating views.
02:36Now taxonomies are kind of hard to grasp conceptually, so I would just like to
02:40expand upon this a little bit to drive it home.
02:42I'm going to change these last two, the 1995 and the 1945 ones, so that they also
02:48have the tag "postwar." To do that, of course I go to each individual node and edit
02:53it, up to the Tags comma and postwar. Scroll to the bottom and save. And of
03:00course, I do that with the other one as well, which I believe was 1945.
03:04Yep, there it is. I'll edit it, comma, postwar, scroll down, and save.
03:12Now let's go back and look at one of those two nodes--1945 let's say.
03:17We see that indeed we have both tags.
03:19If we click the Timeline tag, we will see all of the nodes that are tagged
03:22that way. Or of course, if we click Postwar, as you would expect, we'll see only
03:27those two: 1945 and 1995.
03:30You might have noticed that at the top of this Taxonomy page, there's also an Edit tab.
03:36Let's click it and see what happens.
03:38Now we are editing the tag itself, not any particular node.
03:43Let's say that I wanted postwar, for example, to be capital P the same way the
03:47Timeline was. I could do that, and I could add a description, a URL alias--which
03:51is actually quite useful, I will make that postwar-timeline--and some other
03:56changes which we won't go into any detail now, and then click Save.
04:01Now, when we go back to that page by closing our administrative overlay, we
04:05see it's capitalized.
04:07Furthermore, if we go down and click postwar again, we see that the URL has
04:11changed to that URL alias.
04:14Tagging content makes it easy for visitors to just click around and see what
04:17interests them most.
04:19We've only just scratched the surface, though.
04:20You have quite a bit more control over taxonomies, and I'll show you that in the
04:25video on going further with content categories.
Collapse this transcript
Going further with content categories
00:00In the video on categorizing content, you saw how to add tags to articles and how
00:05Drupal gathers similarly tagged content into the pages.
00:09We can see that if we go up to our list of Content, go down to one of
00:12those tagged pages--
00:13you might remember we have a Timeline here--click on one of them, and then notice
00:18the tag right there.
00:19When we click the tag, we see all of those nodes that are tagged as Timeline.
00:25Now we're going to go a lot further with Drupal's taxonomy system.
00:28First, you'll see how to create vocabularies besides tags.
00:32Then you'll see how to add fields to those terms, so people who create nodes on
00:36your site can add them the same as they added tags.
00:39Finally, you'll learn a little trick to make those pages of similarly tagged
00:43nodes easier for users to access.
00:46We saw that Drupal comes with the tags vocabulary, and to look at that, we go up
00:50to Structure and Taxonomy, and there it is, Tags.
00:54Now let's say you want to separate news articles--
00:58that is, recent stuff like press releases and reviews--from the historical stuff
01:02like timeline items and company trivia.
01:05Let's also say that you want to make sure that every article gets one of those tags.
01:10To do that, we add another vocabulary by clicking Add Vocabulary.
01:14I'm going to give the name "Current news?"
01:20and the Description will be "Two terms:
01:24News and Historical," and then I'll click Save, and there is our vocabulary.
01:31Now we start adding terms by clicking the add terms link.
01:35The first term I'll add is, of course, News.
01:38Scroll to the bottom and save. And Drupal asks if we want to add another term.
01:43That's because typically when you start adding terms to vocabularies you add
01:46many at a time, and Drupal just works along those lines.
01:49The second one will of course be Historical, and save.
01:55Now, if we go back to that taxonomy, again Structure > Taxonomy and list terms,
02:01there they are. So far so good.
02:03So we've created the vocabulary, but it's not actually doing anything.
02:07If we go up and add an article, by clicking Add content and Article, we
02:12see Title, Tags, Body. There is no place for us to add that news or historical thing.
02:18To do that, we have to add a field to whatever content type we want to have that tag on.
02:23We're going to add it to the Article content type. So we go up to Structure >
02:28Content types, and then next to Article, we click manage fields.
02:34Under Add new field, I'll ask, Is it current news?
02:38And in the field name, I'll just call it current_news.
02:42Now here's where the magic comes in: for Field type select Term reference.
02:48That's Drupal's way of saying it's going to be a taxonomy term. And in the
02:52Select list, I'll choose whatever I want--in this case it'll be check
02:56boxes/radio buttons.
02:58Now we are delving pretty deeply into an area we haven't covered yet, but we
03:01will cover it in a later section in this course titled "Extending Content," so if
03:06you see anything here you don't understand, don't worry--we will get to it.
03:10Anyway, going on, we click Save.
03:12We make sure that it's referencing the vocabulary that we want, "Current news?"
03:15that's right, not Tags.
03:17Save field settings, and then I'll just scroll down through the rest of this.
03:21The only thing I'm going to change here, however, is that we want every article
03:25to have a tag that's in this vocabulary.
03:27So I click this Required field box, scroll to the bottom, and click Save. Great!
03:34Now we're back at our page where we see all of our fields.
03:36I am going to rearrange these.
03:38I am going to move Tags up above Body, and I'll move Is it current news? also above Body.
03:44Then I go down and save.
03:45I move those around, by the way, by clicking on this little compass-like icon,
03:50and then you can freely drag them as you like. Now we're set.
03:54If we go back to Add content and add an article, we see we have our title, our
03:59tags, as before, but then we are forced to add whether it's historical or news.
04:04So we're pretty golden at this point.
04:06Now before going on, I'm going to go back and tag all of my articles with his new vocabulary.
04:12I go up to Content, and I'll filter so that my type is Article. And to edit
04:18these, of course, I would just click edit.
04:21This one is News, go to the bottom, click Save. Go back to my list of Content
04:28and continue down the row.
04:30There is one thing: if you go back and edit one of these nodes and you don't
04:33add that tag and try to save it again, because you made it required, you're now
04:38going to meet an error.
04:40So you have to go down and say, okay, this one is historical and save it.
04:43So I'm going to go and add tags to all of these articles, and then once I am
04:48finished with that, I'll show you how that affects our site.
04:51Now that they're all tagged, we see when we click on any one of these nodes
04:55that we have our tags, its timeline, and then we have a separate thing here, Is it current news?
05:00It's Historical. And as usual, if we click here, we would get a page which shows
05:05only those historical items.
05:07At the beginning of this video, I said I'd show you three things.
05:10You saw how to create your own vocabularies, and you saw how to create a field
05:14for them in content types.
05:16Now, I'll show you something unrelated to those two, but still quite handy.
05:20We are going to make those term pages more accessible to site visitors.
05:25First thing you'll notice when we go to this Historical link, we have this not
05:29really very user-friendly URL up here.
05:32We can change that in a few ways.
05:34One is by going back to Structure, clicking Taxonomy and then listing terms.
05:40Now when we edit the term, we go down, and we could add a URL alias.
05:44Let's call that historical-items and save.
05:50Another way we could do that, and I can show you this by going to the News page,
05:53clicking News here, then just go up to Edit, and we come back to that same page,
05:57and I'll call this news-items and save.
06:02Now our URLs are much more friendly, as you can see if you go down here and
06:06click on a node and then click on one of these links. Historical, yup,
06:10historical-items, just as we wanted.
06:12I'm going to copy that URL right there and add a menu item for it right next to
06:17all of these other ones up here.
06:19To do that, click Structure and menus, and then I'm going to add a link to the main menu.
06:27The title will be Timeline, and then under the Path, I paste historical-items.
06:33In the Description, I'll say Timeline and other historical info about our company.
06:41Scroll down and Save.
06:43Now when we close out this window and go back to our historical-items page, I
06:48see I have a Timeline tab here, and as we click around, it remains there.
06:53When we click back, it goes to Historical items.
06:56You'll learn more about menus in this section on Helping users find their way around.
07:01I'll be honest,
07:02it took me a while to warm up to Drupal's taxonomy system, but it really
07:06wasn't Drupal's fault.
07:08The fact is, taxonomies are conceptually hard.
07:11I've actually come to really like the way Drupal implements them in this
07:14categorization system, because it takes that hard concept, makes it clearer, and
07:20then lets you apply it in a flexible way.
Collapse this transcript
Publishing content via RSS
00:00Years ago there were CompuServe and America online, services where you dialed up
00:05and got all of your information from a single source.
00:08When the Internet started to become available and popular in the mid-90s, such
00:12services were known as "walled gardens" by comparison, since you could now go from
00:16one garden to another on the Internet simply by clicking links.
00:20The Internet had brought those walls down.
00:23Later, people started asking, why do we actually have to go from site to site?
00:27Couldn't we just get all the information we want in one place?
00:30And that's how RSS was born.
00:32RSS stands for really simple syndication, and it allows you to look at different
00:37sources in one place.
00:39The best way to explain RSS is to show an example.
00:42What I am going to do is I'm going to look at the blog from lynda.com, as well
00:46as my own blog from TomGeller.com, in one place.
00:50The place I'm using is Google Reader, which you can sign up for yourself
00:53at google.com/reader.
00:56But this isn't the only way that you can look at RSS feeds;
00:58there are many, many others.
01:00In fact, I usually read them on my mail program on my Mac.
01:03And you can also use an iPhone or any other kind of mobile device to
01:07subscribe to RSS feeds.
01:09So I'm already signed up for the lynda blog.
01:12Now I'll go to my own site at tomgeller.com/blog and look at my RSS feed, by
01:20clicking this icon in the upper-right corner.
01:22Now my site is, as you might guess, a Drupal site, and I didn't have to do
01:26anything special to create this page.
01:29You'll see how that works in just a moment.
01:30But for now I'm going to select my URL, go back to Google Reader, and add it as a subscription.
01:37It takes a minute to grab all that information from the Internet, and here we are.
01:43If we look at all of the items, and we were to scroll down, you would see that
01:47lynda's items are mixed in with mine, and we can just easily get lots of
01:51information from different sources this way.
01:54But let's talk about how Drupal does this, by going back to our site, the Two
01:57Trees Olive Oil site.
02:00You'll notice that here on the front page we already have an RSS icon.
02:03I click it, and we see the two front-page items here, with clickable links to go back to them.
02:09This one is an article, and it has its tags down here, and this one is a basic page.
02:14We click them, and we go back to the node itself.
02:18So I showed you that on the front page, but actually Drupal does that anywhere
02:21on your site that there is a collection of nodes.
02:23For example, we created this Timeline here by collecting items onto a taxonomy
02:28page, and up here we have the little RSS Feed icon.
02:31Click it, and as before, you see all of the different links for items that have
02:36been tagged as timeline items.
02:38So that tells you about RSS, and that tells you a little about how Drupal
02:42handles it by default.
02:43Now let's look at the settings you can change in Drupal to affect how it
02:47publishes that information.
02:49The first method affects all of your RSS feeds, and I'll show you that by going
02:53back to our site, clicking Configuration, and scrolling down to RSS Publishing.
03:00Here you can add a description, for example, "News from the Two Trees Olive Oil site."
03:07You can change how many items show up in each feed, and just by way of
03:09demonstration, I'll change it from 10 to 5.
03:12And you can change what kind of content shows up.
03:15Right now, we are showing the entire node, but let's say that I just want to
03:19show the titles and force people to come to my site to read more.
03:23Change that to Titles and then click Save configuration.
03:27Now when I close out the administrative overlay, I go back to my timeline and
03:31click the RSS feed to see how our changes affected what we get.
03:35And indeed, we see only five nodes, and we see only the titles.
03:39I am going to go back and change that back actually, because I think I want to
03:43show the full nodes to demonstrate something else.
03:46Once again, I go up to Configuration, scroll to RSS Publishing, and I change it
03:51back to Full text, and save.
03:54So that affects all RSS feeds on your site.
03:57The second method I'm going to show you only affects specific content types,
04:02and I'll demonstrate this by going back to our front page and looking at our feed there.
04:09So here we have an article, and here we have a basic page.
04:13One thing I don't like about this article is that it includes all of these tags.
04:17It seems that there is more information than I really want to feed out over the Internet.
04:21So to change that, I'll go back to my site, click Structure and Content types,
04:28and then next to Article, I'll go to manage display.
04:31You've already learned a little bit about this page in previous videos.
04:35You'll learn a lot more about it in a section on extending content, which comes
04:39later in this course.
04:40But basically you can change how individual fields are displayed in
04:44different contexts.
04:45Right now, we just have a default context, which is what you see in the node
04:48itself, and a teaser context.
04:52But down here under Custom Display Settings, we can also add an RSS context, and click Save.
04:59Now when we click this RSS button up here, we can change exactly what
05:04comes through RSS fields.
05:06And in this case, I want to get rid of the label, make it hidden, and get rid of
05:11the tags, make those hidden.
05:15As you see, that moves it into an area down here, Hidden, just to make clear
05:18that it's not going to come through the feed.
05:20Then I'll click Save.
05:22Now to prove that this worked, let's go back to our front page here and take a
05:25look at the RSS feed, and there it is.
05:29We see the title, the picture, the body, but the Tags field, which we had
05:33here, isn't showing.
05:35If we want, we can also go back and hide that "Is it current news?" field by
05:39doing the same thing.
05:41We go to Structure > Content types > manage display, click the RSS button, and
05:48hide it, and save, and there it is.
05:54We now have no tags underneath that particular node--or any node of the
05:58article content type.
06:00There is something strange about Drupal, which is that there's no way to
06:03turn off RSS entirely.
06:06If you publish something publicly and place it on a page that collects nodes,
06:09such as the front page or a taxonomy terms page, then it's going to be available on RSS.
06:15The best you can do is to make only the title available, as I showed you.
06:20On that note, remember, whatever you publish via RSS, other people will
06:25republish on their sites.
06:26If you don't want that, limit what you publish that way.
06:30But on the other hand, you can increase how much you are publishing, and for a
06:33promotional site like ours, you probably want people to republish your content.
06:39So that's how you control what Drupal feeds to the Internet via RSS.
06:43But Drupal also lets you collect other sites' RSS feeds.
06:47To learn about that, watch the video on subscribing to RSS feeds.
Collapse this transcript
Using text formats to prevent content damage
00:00In the beginning on the Internet was the word, and the word was in plain text.
00:05Then came HTML, designed as a text-formatting language.
00:09Then came extensions to HTML that let people frame and redirect content and
00:14JavaScript and cross-site exploits and code injection, and there was
00:19trouble unto the land.
00:21As web technology has gained capabilities, it's also gained complexity, and a lot
00:25of different types of attacks take advantage of that complexity on the web.
00:30One place where Drupal opens itself up to those attacks is in its system of text
00:34formats, which defines how your content will appear when delivered to visitors.
00:40This video shows you how to cut down on those dangers while still displaying
00:43content the way that you want it.
00:46First, let's take a look at the problem.
00:48To do that, I will add content and add a basic page.
00:52As we scroll down, we see this Text format.
00:55By default, it's in Filtered HTML, which is actually quite safe.
00:58It only allows these HTML tags here.
01:02Most of them only define how text appears on the page.
01:05It doesn't let you do any fancy tricks, except for linking, which can be
01:09dangerous, but generally it's pretty safe.
01:12If you go up to this Text format pop-up and go down to Full HTML, that allows
01:17all HTML tags to be included.
01:20So let's say you want to put up content that needs to use tags that's not in
01:24that text format Filtered HTML.
01:27You might be tempted to simply switch it to Full HTML, but therein lies the
01:31problem, and I'll show you.
01:32In Title I will call this Dangerous Content, and then I am going to type in a
01:38little bit of code in the body, just to demonstrate.
01:41It will be an inline frame, iframe, source will simply be http://google.com.
01:49I will make the width=800 and the height=600, and then I will close it out.
01:58Now don't worry if you don't understand it; it's just by way of demonstration.
02:04Scroll down, make sure Full HTML is turned on, and then click Save.
02:09Now it looks as though our site is delivering content that's actually
02:12coming from another site.
02:14Now in this case, it doesn't matter that much because it's Google, and everybody
02:17knows what Google is and understands it. But it could be anything.
02:20It could be a gambling site, it could be content you really don't want your users to see.
02:25The problem is even worse if you've turned on a filter known as the PHP filter.
02:30I will show you how to do that, and later we will turn it off.
02:33To start, go up to Modules and scroll down to PHP filter.
02:39Turn it on and then Save.
02:43Now, let's go back to our node and edit it.
02:45I am going to replace this with a little bit of PHP code, scroll down, and
02:53change the Text format to PHP code and then save. Oh boy!
02:59What I've just done is I have created a page on my site that demonstrates
03:03everything about the configuration of my server.
03:06Once somebody has this page in front of them, they could then figure out how to
03:10take advantage of it,
03:11so I really don't want that information on my site.
03:14To get rid of it, I will click Edit, and I'm actually going to delete this
03:17entire node by clicking Delete down here. And yes, I want to get rid of it.
03:22Now, there are sometimes good reasons to permit PHP and content--and we'll talk
03:26a bit about that in the "Developing for Drupal" section of this course--
03:30but generally speaking, you shouldn't turn on that filter unless you need it.
03:34I'm only showing it here because sometimes you'll work on a site where it's
03:37already been enabled.
03:39But just to be sure, I'm going to turn it off now.
03:41We go up to Modules, scroll down to PHP, PHP filter right there and turn it off and then Save.
03:50So now you know the problem of giving people too much access to text formats.
03:55At the same time there's a different problem if you don't give them enough access,
03:59and I will show you that by trying to embed a YouTube video.
04:02So I have my video right here, and let's just make sure it's what I want.
04:06(video playing)
04:09Yup. That's it.
04:10So I want to embed that in my site,
04:11so I click the video embed code here, scroll down, and copy it.
04:16Go back to my site and create a node that contains that.
04:19Click Add Content and Basic Page.
04:23Title I will say, Video, and paste it right here.
04:28Scroll down to the bottom and save. And because we are in filtered HTML, as you
04:32might guess, it doesn't actually show up.
04:36Now, if I were to change that to Full HTML, it will show up, but we have the
04:40same problems we described earlier, and there it is.
04:44(video playing)
04:48We can see the problem if I go back and edit this node.
04:51Once again, filtered HTML only includes these kinds of links, whereas the ones
04:57that I need include object and param and embed.
05:02Those are the three tags that I need.
05:04So what I'll have to do is create my own text format which has those tags in
05:08it but nothing else.
05:10That would, for example, avoid the whole iframe problem, because that tag isn't included.
05:16To add a text format, we go up to Configuration and Text Formats.
05:20Now we could edit the Filtered HTML one, but to be honest, I like to keep it the
05:26way it is because it is designed by the people who created Drupal, and I trust
05:30them to watch out for my safety more than I trust myself.
05:34So I'll add one, and I'll call this one Embed YouTube.
05:40When you create a text format, you can decide who is allowed to use it.
05:44I am going to allow authenticated users to do it as well as administrators, but
05:48not anonymous users.
05:49You will learn more about the differences between these, and permissions in
05:53general, in the "Managing Users" section.
05:56The most important part here is the enabled filters.
05:59I am going to just quickly turn them all on for demonstration purposes first.
06:03If you had the PHP filter also turned on, that module I mentioned earlier, there
06:08would be another choice here as well which would allow PHP code.
06:11Some of these filters have additional settings. Specifically, Convert URLs into
06:16Links lets you chop off the URL, so that it doesn't show the entire thing.
06:20And the one that we're going to use, the one that's most important to us, is this
06:23Limit allowed HTML tags.
06:26By default, it gives you the ones that's in the Filtered HTML format.
06:30I am going to just add a couple of more to that.
06:32It's going to be embed, object, and param.
06:37I'm going to just go up here and see if I want to take any of these away.
06:44No, I don't want to do that.
06:46Convert line breaks, that's fine. URLs into links, that all looks good.
06:51I just want to mention a couple of other little things here under Limit allowed HTML tags.
06:55We will see what this Display basic HTML help is in just a moment.
07:00Add rel= "nofollow" is an anti-spam device, which prevents some kinds of robots
07:07from going onto your site and creating nodes that will then profit other sites.
07:11I am going to add that because it's just a good general practice, and say
07:14Save configuration.
07:16Now, if we go back to our content, scroll down and find that video, I am going
07:22to edit that and change the Text format to Embed YouTube, the one we just
07:27created. And here is that help text I mentioned.
07:30It shows all of the codes that we had entered in that field.
07:34Scroll down, cross our fingers, and click Save.
07:39Now when we look at the node, there's our video. It works.
07:44Finally, if you really want to prevent use of these text formats, you can
07:48simply remove them.
07:50Go up to Configuration, down to Text formats, and then disable the one that
07:56you don't want to use.
07:58Now when you disable a text format, it's really the same as deleting it.
08:02You can no longer have it available for nodes, and any nodes that have that text
08:06format become not as available.
08:08I am going to say Yes, Disable, close out our administrative overlay.
08:13So our text format is gone, and as I said, we can no longer watch our video.
08:17If I click Edit, I will see why.
08:19We scroll down to text format,
08:21you notice no text format is selected now.
08:25If we try to delete this, we can't even delete it.
08:28We have to change it to a text format, which you'll notice from that little
08:32asterisk is required, put it on Filtered HTML.
08:35It doesn't really matter what you put it on because we're just going to
08:38delete it, and it's gone.
08:41Now I only very quickly talked about what those individual text filters do, but
08:46they come with pretty good explanatory text, and a little playing around will get
08:49you comfortable with them.
08:50There is one caveat, however, and I'll show you that by going back to
08:54Configuration and Text formats, and then I will just configure the Filtered HTML one.
09:00The order that you have these filters in makes a difference;
09:04some of the filters strip capabilities, while others add them.
09:07So if you find a filter is not working the way you want, think hard about the
09:12order of operations, as well as what the filters themselves do.
Collapse this transcript
Setting the comment policy
00:00The Internet showed us that anything that can be abused will be abused, and
00:04nowhere is that more evident than in comments and public forums.
00:09The good news is that Drupal gives you ways to control such abuse, and there are
00:13several methods to give you control over how comments appear on your site as
00:16well, including whether they're allowed at all.
00:18We will start by very quickly looking at comment permissions--
00:22that is, whether people are allowed to comment at all.
00:24Those controls are in two places.
00:27The first one is in the Permissions screen, which you get to by going to People
00:31and then Permissions.
00:33We scroll down to the Comments area.
00:35The two most important ones here are Post comments and Skip comment approval.
00:40By default, only authenticated users are able to post comments, and they don't
00:45have to get your approval after they have posted them.
00:47What some administrators like to do is to give anonymous users permissions to
00:52post comments but not to skip comment approval.
00:55That means that they will post their thoughts, but then they'll get a message
00:58saying that the administrator has to approve it, and it won't appear on the site
01:01for visitors until you as the administrator do so.
01:04I will just leave it as it is right now, so that anonymous users can't actually post.
01:09The other prominent setting in here is View comments, and you can see that
01:13everybody can see comments on the site.
01:15Again, that's typical to leave it that way.
01:17You will learn more about this screen, and about permissions in general, in the
01:21"Managing Users" section of this course.
01:24Changing a permission affects all content throughout the entire site, but you
01:29can also change settings on a content-type-by-content-type basis.
01:33To do that, go up to Structure, and then Content types, and then click Edit next
01:39to the content type you want to affect.
01:41In this case, I am going to change the Article one, so I click Edit there and
01:45scroll down toward the bottom.
01:47In the vertical tabs, there is a Show Comment settings tab, so click there, and
01:52there are several settings.
01:53I won't get into all of these right now.
01:55The most important one to look at is this first one.
01:58You have three options:
01:59Open means that you will accept comments in response to any nodes of this content type;
02:05Closed means that further comments won't be accepted; and Hidden means that no
02:09controls for comments are seen at all.
02:11We will just leave this on Open since we want to show how comments work.
02:15Now this change only affects new content; that is, it's the default comment
02:20setting for new content.
02:22It doesn't change content that already exists.
02:25All the other settings do affect nodes that already exist.
02:29So let's talk about those other settings.
02:31The next one is Threading, and the best way to explain it is to show a node with
02:35lots of comments, both with and without threading.
02:38I have gone ahead and added a bunch of comments to one article up here.
02:41I can get to it by scrolling down and going to 1995:
02:45Passing on the tradition.
02:47As we scroll down, we see that JoeBob left a comment, and then Polly Ann
02:52Saturated left a comment in response.
02:54The conversation continued like this.
02:56Now, you see how this indenting works.
02:59That's what they're talking about when they say threading.
03:01Well, what happens if we go back to that content type and change it from
03:05Threaded to Not Threaded?
03:07Well, it's an article, so I'll go up to Structure and Content Types and Edit
03:12Article and again go down to Comment Settings, and instead of Threading, I will
03:17uncheck that box and then say, Save content type.
03:20I will close that overlay, let the screen redraw and then scroll down, and as
03:26you can see, it's all at the same level.
03:29It's not really as easy to read.
03:31For that reason, I pretty much always leave Threading on.
03:35Some people find it a little bit less attractive, especially if you have a lot
03:39of people replying to each other--
03:41it gets to be very indented, and the area where they can actually enter comments
03:44get smaller and smaller for a while.
03:46But I haven't had that problem. So I will go back.
03:49Edit, Comment, and Threading.
03:53Now I also have this node opened as an ordinary user.
03:57This happens to be JoeBob, and by the way, I added all of those users that you saw:
04:02JoeBob, Maria Ann Vitalia, OilExplorer there are few others in there.
04:06If you're doing this at home from the exercise files that come with this course,
04:11they all have the same password, which is drupal, all lowercase.
04:16Now I am going to use JoeBob's account just to show what happens when we make
04:20these changes to the Commenting settings.
04:23So I will go to that node, go back to the administrator, save it so that
04:27threading is turned back on,
04:29and then as we reload this page,
04:32we see the Threading back on. And we will go back and edit those comments on the
04:37article content type.
04:39Comments Per Page is pretty obvious what it does.
04:41If you have more than 50 comments, what would happen at the bottom of the page
04:44is you'd see a little link that says More, and you could go backwards and
04:48forwards through the pages.
04:49The Range is from 10 to 300.
04:52Personally, I tend to turn it up quite a bit on a busy site because I would
04:56rather have people see everything all at once.
04:59There are two reasons why you might want to leave it at a lower setting.
05:03First, you might be trying to force more page views if you're serving up an
05:07advertise-supported web site, and you want more pages to show, more
05:10opportunities to click on the ads.
05:13The other reason to lower the number of comments per page is if you're trying to
05:16get your pages to load faster.
05:18In the modern days of the Internet, it's not that much of a difference, but for
05:21some people, especially coming through mobile devices and other slower
05:24connections, it might make a difference.
05:27For Allow Comment Title, I will simply remove that and save it and then show you
05:31what it looks like by switching over to JoeBob's account.
05:34So I will scroll down and show you how it is without that change.
05:39We have a Subject and Comment field.
05:41Now when I reload the page with that new setting, the Subject area has disappeared.
05:46JoeBob can only enter a comment.
05:49And as a matter of fact, when he does, part of that comment becomes the title.
05:53Here, I will show you.
05:55I will type in "Yes, it was a great year!"
05:59and say Save, and there it is.
06:03If he had written a longer comment, it would have just chosen the first few words.
06:07But let's go back and take a look at the rest of those settings.
06:10Click on Edit next to Article.
06:14The next setting, Show reply form on the same page as comments, means that
06:18somebody doesn't have to click a link that says, please leave a comment here.
06:21And in fact that's the setting that we have here.
06:24We're allowing people to simply scroll to the bottom of the page and leave their comment.
06:28Incidentally, if you wanted to reply to something earlier on in the thread,
06:32say that you wanted to reply to OilExplorer here and not have it show up at
06:35the bottom but rather indented here under his, you'd click Reply under the
06:39individual comment.
06:42That brings you to a new page, showing only the comment that you're applying to,
06:46and that's very much what this check box is like.
06:49Finally, we have Preview comment.
06:52At the moment it's optional, which means that if I'm going to post something, I
06:55have a choice between Save and Preview.
06:58If I type something in here, "let me say one more thing" and preview, before it
07:05actually becomes part of the site, it shows me what it's going to look like.
07:09Then if I actually want to save it, I would have to click Save here, but if I
07:13don't now, the comment just gets thrown away.
07:16Required, on the other hand, means that you will only see a Preview button.
07:21By contrast, Disabled means you'll only see a Save button.
07:25I am going to go back and allow Comment title and Save content type, and then
07:30we're back as we were before.
07:32So as you can see, you have a lot of control, both for how your site accepts and
07:36how it displays comments.
07:38In the next video you'll see how to get finer grain control to manage
07:42individual comments.
Collapse this transcript
Managing comments
00:00In the video on setting comment policy, you saw how you can change how people
00:04leave and read comments throughout your entire site, or in relation to nodes of a
00:09specific content type, such as articles.
00:11But if you allow comments at all on your site, you will soon find that you need
00:15to manage them individually for various reasons--most notably, to prevent abuse.
00:21Here are a few ways to do that.
00:23First, let's take a quick look at what kind of commenting Drupal allows by default.
00:27Before we go on, I want to show you that in this other browser I am looking
00:30at the site as an anonymous user, and I'll look at a note on the site where I
00:34have some comments.
00:35To do that, I will go to Timeline, and then to this one that we've already added
00:39to the site and put some comments on, 1995:
00:42Passing on the tradition.
00:43I will just click on that title there, and I can see all of the comments and the node itself.
00:49Now notice that by default if I want to post a comment, all that I see is this
00:53link here, Log in or register to post comments.
00:57I can't actually create a comment directly yet.
00:59Let's go back to the administrative interface though, and make it possible for an
01:04anonymous user to post comment. To do that, go up to People and then to
01:08Permissions and scroll down to the Comment area.
01:12Already, anonymous users can view comments but not post comments, and certainly
01:17not skip comment approval.
01:19I'm going to let them post the comments but not skip comment approval.
01:23I'll scroll to the bottom and click Save permissions.
01:29And you will see what that does when I switch back to my anonymous user
01:32and reload the page.
01:35Now you see the reply link appears below each comment. And in fact, if I go back
01:39to that front page, I will see that I can reply to the node in general. Or if I
01:43scroll to the bottom of this page, I see the commenting form.
01:46But what happens if I actually try to add a comment?
01:49I am going to do that. I am just going to make it a mildly abusive comment. So who cares?
01:55Why don't you talk about something interesting for once?
02:01And I'll go down and save it.
02:03You see this warning that gives me?
02:05It's very polite about it, at least.
02:07Your comment has been queued for review by site administrators and will be
02:10published after approval.
02:12Well, since we are logged in as the administrator in the other browser, let's
02:15see what that looks like.
02:17The way we would find out about that is as an administrator we would get an
02:21e-mail saying that there's a comment waiting for your approval.
02:24We click Content and then Comments, and then we see there are Published comments
02:30and Unapproved comments.
02:33Click that Unapproved comments, and we see all of the ones that are waiting.
02:36Now, there are several things we can do.
02:39We can go directly to the comment and see what it is.
02:42It shows up in a slight pink, so that that's not actually been published yet.
02:48From here, we can edit it, actually change the message itself.
02:51We could delete it directly or approve it.
02:53Now we can do all three of those things also back here on the Content page.
02:59If we want to edit it, we would click here. Or we could select it and then
03:03choose one of our update options.
03:04I am going to just say delete it.
03:06We are asked to confirm that choice, and I say Yes, and it's gone.
03:12So that's how you handle a single comment. But you have additional controls if
03:17you decide that all of the comments on a node have gotten out of hand.
03:20To show that, I'm going to go back to that node. So I will close this out here,
03:24go to my Timeline, and click on 1995.
03:29Right now, anybody who is logged in can go ahead and post the comment and
03:33skip approval, but let's say that this is turned into some kind of horrible flame war.
03:37We can go back up and edit the node,
03:39then go down to the Comment Settings in this vertical tab down here.
03:43If we want to keep what's there already, we would just change it from Open to
03:47Closed and then Save.
03:51Now as we look down the screen, we see, okay there are those comments, but
03:54there's no form at the bottom.
03:56Similarly we can go up in Edit, scroll down again, click Show Comment
04:00settings, and hide it if we really just want to get everything out of the way.
04:04Click Save, and exactly as you would expect, it's all gone.
04:08I am just going to open it back up because actually we're not having a flame war at all.
04:15The last thing I want to mention is that you as the administrator can
04:18actually edit any comment.
04:20I have found this to be useful when somebody gets on to my site and will post the
04:25comment but include some sort of spam-y link in it.
04:28Sometimes they will include useful information, but then they will link to a
04:32site that I don't really want to link to.
04:34Well, you can go in and actually change what they said for better or worse.
04:39In short, Drupal gives you total control over the content of your site.
04:44The problem with that is if you've opened your site to comments, it can be a lot
04:48of work to deal with them.
04:50Even on my obscure little blog at tomgeller.com, I have to moderate about a dozen
04:55spam comments a week, and that's with other anti-spam measures in place.
04:59So managers of busy sites often delegate community management to someone else,
05:04giving them the Administer comments and comment settings permission, and again
05:08that's up under People and Permissions and then scroll down to Comment. There it is.
05:13You will learn more about that in the "Managing Users" section of the course.
Collapse this transcript
8. Enabling Other Content Types
Adding blogs
00:00By now you probably have a pretty good handle on Drupal's two default content
00:04types: articles and basic pages.
00:07Drupal also includes a few other types that work similarly, although with some
00:11interesting display quirks.
00:13The first one is blogs, which we will cover in this video.
00:16The others are forums and polls, which we will cover in the two
00:19videos following this one.
00:20Then these is one more called books, which we will show later in the course.
00:24All of them come as part of core Drupal, but they're disabled by default.
00:29So let's turn on Blogs and see what it has to offer.
00:32To do so, go up to Modules, go down to Blog, and turn that check box on.
00:37Then scroll to the bottom of the page and say Save configuration.
00:42Doing so turns on a new content type called Blog entry, and you notice that if
00:46you go up to Add content.
00:48See? You have Article, Basic page, and Blog entry.
00:51However, Drupal doesn't make it available to anyone at first except for you
00:55as the administrator;
00:56you have to turn on that permission explicitly.
00:59To do so, go up to People and then to Permissions, and then scroll down to the
01:04node group. Here you notice several permissions: Blog entry, Create new content,
01:10Edit own content, and so on.
01:11I am going to give that to authenticated users, so they can create and
01:15edit their own content.
01:17Then I'll go down to the bottom and say Save permissions.
01:20Now I want to explain a little bit about what a blog actually is.
01:25The word itself comes from "weblog" and signifies a sort of online journal.
01:31One place that you can see a blog is, of course, at blog.lynda.com.
01:36There are a few characteristics that are typical of blogs.
01:39Posts almost always appear in reverse chronological order, so the most
01:43recent one is at the top.
01:45They are usually written from a personal point of view, and the posts
01:49usually accept comments.
01:51Now the term itself first showed up around 1999, but people had used the format
01:56like this for years before that, including me, starting back in 1997.
02:02So how is a blog different from say a series of article posts that are
02:05promoted to the front page?
02:07Well, to tell you the truth, there is not that much difference, except in how they display.
02:13To demonstrate, I have created a bunch of blog posts under the names of
02:17different members of our Two Trees Olive Oil site. You'll find that in the
02:20exercise files if you have them.
02:22I am going to import them right now using techniques from the video on using
02:26the exercise files.
02:27If you don't have it, don't worry; you can just create your own blog posts if you like.
02:32There, I've imported all of those blog posts.
02:35If you have any trouble doing this, again, refer to the exercise files video
02:38earlier in this course.
02:40We can be sure that those blog posts are there by going up to Content and then
02:44filtering by the type Blog entry.
02:47And there they are: four different posts by three different people.
02:52Let's go back to the front page and take a look at those.
02:54Blog posts by default promote to the front page.
02:57Of course, you can change that if you want, using the techniques you learned
03:00earlier on in this course about content.
03:03But as we go down, we see one by Poly Ann Saturated about using Olive oil as a cosmetic.
03:09Now one thing that's different between a blog post and an article is this thing
03:13down here, Poly Ann Saturated's blog.
03:15If you click it, you come to a page where you see everything that she has posted.
03:19In this case, she's only posted the one thing, but I happen to know that Joe
03:23Bob posted two, so let's look at his blog.
03:26And there they are, collected in reverse chronological order, as is
03:30traditional for blogs.
03:32So each user can have a blog.
03:33There is one difference between blogs and articles.
03:37Drupal gives you a couple of other ways to control blogs that aren't available
03:40for other content types.
03:42First, there is a page that shows everybody's blog. And you can get to there by
03:46going up to your domain name/blog. And as we scroll down, we see the most recent
03:52one is on top, as expected.
03:54There is one from Maria Ann Vitalia, there is one from JoeBob, and so on.
03:59Second, Drupal creates a recent blog post block.
04:03I will enable it now, but I won't go into much detail.
04:05To learn the details of how to control it, see this course's "Changing a Site's
04:09Interface" section. But very briefly, you go up to Structure and then down to
04:13Blocks and scroll down until you see Recent blog posts.
04:19I'll put that in the left-hand column, which I know is Sidebar first and save it.
04:25I'll close the administrative overlay, and we have a list of recent blog posts.
04:30I am going to go back and hide that now.
04:31Again, the detail of how this happens is later on in the course.
04:39Blogs are a sort of unusual feature in Drupal.
04:41There is very little that sets them apart from basic pages, aside from being
04:45promoted to the front page. And all those small features I showed here could
04:49be replicated pretty easily using views, which we will learn about near the end of this course.
04:54I think the reason that this feature is in Drupal is simply because the market demands it.
04:59All of Drupal's other advantages--such as revisioning, feeds, field customization
05:03and so on--are available to blogs just like on any other content type,
05:07so it's a quick way to get a blog up and running without cutting out any
05:11of Drupal's features.
Collapse this transcript
Adding discussion groups
00:00One of the first applications for networked computers in the early 1970s was the
00:05Bulletin Board System, or BBS, which allowed users to have online discussions.
00:10It's 40 years later, and that's still one of the top reasons people get online.
00:15And Drupal, of course, has a BBS built in called Forums.
00:19It's great, but it does have some quirks that I'll focus on in this video, so
00:23that you can watch out for them.
00:25To turn it on, it's very easy.
00:27You just turn on the Forum module by going up to Modules, scrolling down
00:32to Forum, checking the box, and scrolling to the bottom, and clicking Save configuration.
00:39Doing so adds a link in the Navigation menu, which you can see by closing this
00:42administrative overlay.
00:44See over here, underneath Add Content?
00:46That's also the first link that shows up in that menu for ordinary users, and I
00:51can show that by switching over to my other browser, where I am logged in as the
00:54user Polly Ann Saturated.
00:56Here's what the screen looked like, and now when I reload it, there's the Forums link.
01:01When you click that, it goes to a list of discussion forums, and clicking any
01:06particular forum leads you into any topics that are in that forum.
01:10Now you see this notice up here at the top when I'm logged in as an ordinary user.
01:14I'm not allowed to post new content.
01:17That's because although of the forums are turned on, no permissions are granted
01:21to anybody except the administrator to put anything in them.
01:24So let's change that.
01:25I will switch back to my administrative screen and go up to People and Permissions.
01:30Then I will scroll down to the Node group, where I see Forum topic, Create new
01:37content, Edit own content, and so on.
01:40I will allow authenticated users to create forum topics.
01:43I will then scroll to the bottom and save my permissions.
01:48You'll learn more about this screen and about permissions in general in the
01:51"Managing Users" section of this course.
01:54Now when I switch back to my other browser and reload the page, I see this:
01:59Add New Forum Topic--and I think I'll do that.
02:02I just click that link, and in the Subject, I will say "Health benefits of olive oil."
02:10There is only one forum right now, so I will stay in that general discussion
02:14area, and I'll type in the body.
02:17"I have heard all sorts of claims. what do you think?"
02:23Scroll to the bottom and click Save, and there it is.
02:27Now, if I switch back to my administrator and take a look at the Forums--I
02:30will just close out this Administrative overlay, go to the Forums--and I see
02:34in my General discussion, not only is there one topic, but there's one new
02:38since I last looked.
02:40That's something very clever that Drupal does.
02:41It keeps track of each user and what they have last looked at.
02:45I can look at that topic either by clicking on that 1 new, or I could go in
02:49and see the whole list of topics, and then click on any particular topic, and there it is.
02:55There is what she wrote, and there's her title.
02:58Like any other node, the administrator can go in and administer it, change it,
03:03delete it, and so forth.
03:04There is one unusual feature here, Leave shadow copy.
03:08If you decide to move a topic from one forum to another, Drupal will leave one
03:13copy in the old forum so that the conversation seems to continue.
03:17However, further conversation will continue in the new forum.
03:21It's a very subtle and clever way of handling things.
03:25Anyway, we won't dwell on it.
03:26Instead, I'll go back and take another look at that, and let's say that I as the
03:30administrator want to respond.
03:32I might say, "I think it's great, but remember it's a fat and should be treated as one."
03:45Scroll down, click Save, and there we are.
03:49You see the discussion is up here, comments are down here, a link to all forums
03:54is right here. And since I added that comment, by the way, we see it right here.
03:59So that's basically how you use Forums, and it should look familiar if you've
04:02been online and using any other kind of forum system.
04:05But let's talk about creating entire discussion areas, like this
04:09General discussion here.
04:11To do that, go up to Structure and then down to Forums.
04:15I am going to add a couple of forums now, and I'll talk about what containers
04:18are in just a minute.
04:20The first one will be, "Put it in your mouth!"
04:25"All things about edible olive oil," and I will click Save.
04:31I will explain what the Parent is in just a moment.
04:33I will add another forum, "Don't put it in your mouth!"
04:39"Olive oil for external use."
04:45Scroll down and Save.
04:47Now let's go back and take a look at our forums again.
04:50Close the administrative overlay, click Forums, and you see how it is.
04:55We have the description. We have the title.
04:57If we click on any of these, we go in and can add topics just as before.
05:01That's fine as it goes, but if we go back to our list of forums, you might
05:05decide you want to categorize these a little bit better.
05:07For example, two of these are about olive oil, and this one is just
05:11general discussion.
05:13We can add them into categories by creating what's called a container.
05:17To do that, I'll go back up to Structure and then down to Forums and Add Container.
05:24The Container will be, "Things you can do with olive oil," and we could add a
05:30Description or not just as before. I will click Save.
05:34Now we have a container and these three forums.
05:37If we look at our list of forums, it doesn't really look very different.
05:41We have the container down here but nothing in it.
05:43As you might have guessed from looking at the previous screen, we can change
05:46that by going to Structure and Forums, and then move things around using these
05:50little compass handles.
05:52I'll move that right down there, move that right down there. And if I wanted to,
05:57I could make this multilevel like so, but I think it's great the way it is,
06:00so I will click Save.
06:02Now, when I look at the Forum, it makes a lot more sense.
06:07There is something peculiar about these containers, however.
06:11Let's say that I add a new forum topic from here, and I'm given a choice of what
06:16forums to add it to.
06:17I see the forums that I set up earlier and should be able to add topics to, but
06:22what if you try to add a topic to a container? "Let's talk!"
06:27I will just leave it as that very quickly and try saving it.
06:31You can't actually add discussions to containers,
06:34so I would have to change it to one of the other ones.
06:36There is another peculiarity, and I will show this by going back, all the way to our Forums.
06:44Let's say that you're already reading a Forum, like this one about external use,
06:48and you say Add new Forum topic.
06:50Now remember before when I clicked on this button from one level up, it asked me
06:54what forum I want to put it in.
06:56But if I click here, it automatically assumes that I want to put it in the forum
07:01that I am already reading.
07:02That saves you just a little bit of time.
07:05Just to complicate matters a little bit more, forums themselves can act as
07:09containers, and I'll show you what I mean by that.
07:12I go to Structure and Forums once again. And I will add a forum I will just say
07:17is Recipes, and scroll down and save it.
07:22In Recipes I could put this, Put it in your mouth and Don't put it in your mouth
07:26discussion, then scroll down.
07:29Now if I want to add a topic, I could actually add it at this top level.
07:32Go back to Forums and look at it.
07:37If I click there and Add new forum topic, "Let's talk about all kinds of recipes,"
07:46scroll down and save and then go back to our Forums,
07:50we could either click that link--or I should mention, you can always go to your
07:54Forum simply by typing Forum at the top of the screen--and you see we have a
07:58topic at that top level.
08:01That can be a little confusing.
08:02So before you start out, it's a good idea to plan exactly what your structure is going to be.
08:07To do that, one more time, we go up to Structure, and then Forums, and over here,
08:12we go to the Settings tab.
08:15As with Comments, you can choose how many to display per page.
08:19Again, if you have a lower selection, such as 10 or 25, people will have to
08:24reload their page often. On the other hand, that the pages themselves will draw
08:28more quickly, and you might want them to reload the page frequently if, for
08:31example, you're serving up advertising and you get more money for the more pages you serve.
08:37You can change the order in which the forum topics appear, and you can change
08:40this thing called Hot topic threshold.
08:43What that is is let's say that somebody has posted a topic, and it's drawn a
08:47whole lot of comments.
08:49That will appear on the Forums list with a special icon next to it that
08:53distinguishes it from the other forum topics.
08:56But for us, we will leave it as it is.
08:59When all is said and done, the Forum system is actually just an interesting way
09:03of organizing these nodes visually.
09:06One interesting way to prove this is by going to the Content list here, and if
09:10you search by the type Forum topic, you see those topics we posted earlier.
09:15Also, if you go to Structure and Taxonomy, you see there's a new
09:19vocabulary called forums.
09:23The forms that you added are just taxonomy terms.
09:26If you decide to open your site to forums, I do want to give you one last piece
09:30of advice, which is that you can expect people to misbehave, as with anything
09:34that's open to the public.
09:36So be sure to monitor posts and the comments in them and include enough time in
09:40your budget so that you can plan out for that.
09:43But done right, Forums can be one of the most active parts of a community-based
09:47site and make your site grow more quickly than any other method.
Collapse this transcript
Adding polls
00:00So far in this course, we've talked about four features designed to give
00:04visitors a way to respond to your site:
00:06comments, blogs, forums, and contact forms.
00:10Surveys, or polls, are one more that people respond to well, perhaps because
00:15they don't have to think up a subject or write a narrative.
00:18You just pose a provocative question, and they click a button, and they're done.
00:22You gain both user engagement and sometimes valuable data.
00:26Here is how you set them up.
00:28As with many features in Drupal, you go up to Modules and scroll down to the
00:32module you want to turn on--in this case, Poll.
00:36Check it's check box, go down to the bottom and click Save configuration.
00:41Now just because we've turned on polls, doesn't mean we've given everybody
00:44permission to actually take part in them.
00:46So I am going to very quickly do that by going up to People and then Permissions
00:51and then scroll down to Poll.
00:52I'll allow everybody to vote on polls, but not to change their votes or to view the results.
01:00This view voting results actually is not related to the total count, but instead
01:05the result of each individual person's vote.
01:07I'll scroll down to the bottom and click Save permissions.
01:12So, what should we vote on?
01:13Well, you might remember that the owner of our fictional olive oil company made
01:17a blog post that asked people what flavors they should introduce.
01:20Here I'll show you.
01:21We'll just go back to the front page where we have all our blog posts, scroll
01:25down, and there it is, What flavors should we introduce next?
01:28I've already pre-populated this discussion with a bunch of comments from people,
01:32which you see by clicking Read more.
01:35You'll find those comments in your exercise files, by the way.
01:38And there they are.
01:39Somebody suggests fruit, somebody suggests herbs, somebody suggest something sharp, and so on.
01:45Let's turn this into a poll.
01:47To do that, we go up to Add content, and we see a new choice, Poll. Click it and
01:53you see the form to create a Poll.
01:55This will be "Vote for the next Two Trees Olive Oil flavor!"
02:02And for our Choice, we'll start with Fruity, Spicy, and then we run out of
02:09spaces, but that's okay, just click the More choices button to get another one.
02:14And then I'll add Herbal blend.
02:18We'll talk about what Vote Count is in just a minute.
02:21We want this to be an active poll so we leave it as Active.
02:24We'll talk about Poll duration again in just a few moments.
02:27Since I am logged in right here as the administrator, I think I'll make the
02:30author Maria Ann Vitalia--
02:34she's the one who told me to do this--and save it.
02:38And now we see that node presented as a poll.
02:42Let's see what this looks like when an anonymous visitor looks at it.
02:45What I'll do is I'll go up here, and I'll copy this URL, and I've already
02:49brought it up in this other browser.
02:51Now let's say I'm an anonymous visitor, and I say, I think an Herbal blend is good.
02:55I click that button and vote, and there it is.
02:59I immediately see the results of all of the votes so far, and I'm not allowed
03:03to make another vote.
03:04Now, let me go back as the administrator and say that I want to vote.
03:09I'll say I want Fruity and click Vote, and now we see there is one of each.
03:14Now you'll notice a button down here, Cancel your vote,
03:17that wasn't available for the anonymous user.
03:19That was one of the things that you could control in the Permissions screen.
03:23Also, as the administrator, you have two other options: Edit and Votes.
03:28When we click Votes here, we see how each individual person voted.
03:32Now, I'll show you how that works by going back to my browser here, and I'm
03:36going to log in as JoeBob. And again, the password for all users on our
03:41exercise files is Drupal,
03:42all lowercase. And again, I can vote because I'm no longer that anonymous user.
03:48And I think I'm going to also vote for a Fruity kind and click Vote.
03:52Now if we go back to the administrator and reload this page, we see how JoeBob voted.
03:57Very good!
03:58There are a few other features of polls that I want to point out, and to do that
04:02I'll click the Edit tab.
04:05The first one is that even though you've already started this poll, Drupal
04:09allows you to continue to change it.
04:11That's somewhat unusual in survey systems, but Drupal does give the
04:15administrator more power than they do.
04:18For one thing, you can change the vote count.
04:20At first you might say oh, that's dishonest.
04:22That's stuffing the ballot box.
04:23But there are actually legitimate reasons for doing this.
04:26For example, let's say that you had handed out cards at a convention and people
04:30had turned in the results of the poll there, and then you have to tally them up
04:34and bring them online.
04:35Well, this is how you would add them in.
04:37So let's say that there is 32 Spicy and 50 for Fruity but only 10 for Herbal
04:43blend. Scroll down and save.
04:45And if we take a look at it, it's all tallied up.
04:48Let's go back to Edit to look at some of those other features.
04:52As I mentioned, you can choose to close a poll at any time by simply
04:55switching this radio button to Closed. Or you can make this automatically
04:59close after a certain duration.
05:01To do that, you would simply click that pop down menu and change it to, let's
05:05say a week and save.
05:09Now there is something about that, which is that users don't actually see any
05:13notice as to when the poll is going to close.
05:16If you wanted to do that, you'd have to add some sort of text around the poll.
05:20That leads me to my next point, which is when you look at this poll, you don't
05:24really have very many options. All that you see is a title and then the tally
05:29area, and as you saw before, you had the place where you could make your vote.
05:35But remember, a poll is just a node of a specific content type.
05:40So if you wanted to add another field to it, you just go up to Structure and
05:44then down to Content types and then edit the fields connected with poll.
05:48In this case, I'll manage fields, and I'll actually add a body field.
05:53I'll just type in Poll body, the field will be poll_body, the field type will be
06:00Text, and it'll be a Text field.
06:03We don't have to go through the whole process now.
06:05You'll learn more about this in the section on extending content.
06:09But even without adding fields, you can see that polls are really easy to set
06:13up, and they have the same options as any other kind of node.
06:17You can promote them to the front page, let people leave comments, and so forth.
06:20They are little inflexible unless you start adding fields.
06:24And once again, you'll learn how to do that in the section on extending content.
Collapse this transcript
Subscribing to RSS feeds
00:00Running a web site is a lot of work, and it's made even harder if you personally
00:05create all the content. But what webmasters have discovered over the past 15
00:09years is that visitors get as much value from borrowed and user created content
00:14as the exclusive webmaster-created stuff.
00:16We've talked a fair amount about user-created content. Besides blogs and
00:21comments and forum posts, you could give users permission to simply create
00:25articles and nodes of other content types.
00:27But let's look now at how to display content taken from other web sites by
00:32subscribing to the news feeds that those sites provide.
00:35I have to emphasize that we're not talking about stealing content;
00:38we are only using stuff that others have released specifically so we
00:43could republish it.
00:44I'll show you a few quick examples.
00:48On my own web site, I write a blog, and you see those post right here.
00:53These in the left-hand columns are nodes on this site, but over here in this
00:57right-hand column is a feed that's coming from an outside site.
01:00Specifically, it's coming from planet Drupal, which is at drupal.org/planet.
01:05In exchange, Planet Drupal is just subscribing to hundreds and hundreds of
01:10feeds, including my own.
01:13So if we go back to my site, let's say that I post a new blog post, it will
01:16eventually show up in the feed on their site which I'm then feeding back onto my site.
01:22So how do you get these feeds?
01:24Well, I talk about that a little in an earlier video on publishing RSS feeds,
01:27but let's take another quick look at it.
01:30As an example, I'm going to go to blog.lynda.com.
01:34On any page where there is a feed that you could subscribe to, you'll see this
01:38little icon here in the address bar of most browsers.
01:41You might also see it elsewhere on the page.
01:44Clicking it gives you a URL that's in a format that feed subscribers can understand.
01:51So that brings us to another question:
01:53How can we find RSS feeds that are relevant to our site?
01:56That's easy, just do an online search, then look for the Feeds.
02:00Anything labeled news or blog is a good bet.
02:03So I'm going to say olive oil news and see what comes up.
02:08Well, it turns out that there is a publication called oliveoiltimes.com.
02:12So I click there, and I see I'm in luck.
02:15There is our little RSS feed, right there.
02:18I click it and just copy its URL.
02:21Now I am going to go back to my site and subscribe to that feed.
02:25As with many things on Drupal, we first have to turn on that feature, and we do
02:29that by going to Modules and check the box next to Aggregator.
02:33Aggregator, in this case, is short for feeds aggregator.
02:36We scroll to the bottom of the screen, and click Save configuration. Now we are ready.
02:42The place you go to configure these feeds is under Configuration.
02:47Scroll down to the bottom of the screen, and there's the Feed aggregator.
02:51Click it and then click Add feed.
02:54Categories are another subject
02:55I'll the covering in the next video.
02:57But for right now, we'll just say Add feed is going to be News from Olive Oil
03:03Times, and then paste in the URL.
03:08Update interval is how frequently your site will pull that information from the
03:12external site, in this case, oliveoiltimes.com.
03:16If you click this pop-up menu, you'll notice that the shortest length of time is
03:1915 minutes. And you might say well, why shouldn't I continually get that news?
03:24Well, it's really not very good online etiquette.
03:27If you were to set that to something like 10 seconds, then the other person's
03:30site is going to be constantly hit by your site, and that's going to drive up
03:34their hosting costs, and it'll slow down everybody else who is trying to access their site.
03:39So the shortest you can do is 15 minutes.
03:41And quite honestly, I usually just leave it on an hour.
03:45As for News items in block, I'll tell you what that is in a few minutes.
03:48For right now we click Save, and we can add another one if we want.
03:52I think I will in fact go back to Olive Oil Times and do another search for,
03:58how about olive oil news. And I see the second one is from the New York Times. Who knew?
04:07They categorize their olive oil news, and I'll take their feed.
04:13Again, I copy it, go back to my aggregator, Olive oil news from the New York
04:20Times, and paste in the URL and save. Great!
04:26Now when I click List, I see the feeds that I have.
04:30However, I haven't received any information yet because I'd have to wait for
04:33that entire hour before they would start sending me Feed items.
04:37In order to bring them in manually, I can click this Update items button.
04:41This is considered okay etiquette, because obviously you're not going to be
04:45sitting there all day just to click that button, and I'll update the other one as well.
04:50Good, so we have six items in this feed and two items in this feed.
04:53So you might ask, how can I actually see those feed items?
04:57Well, you do have a link right here.
05:00If I click here, I go to a page which has all of those news items one after the other.
05:05And if I click on these titles, it actually takes me to the other site.
05:09These are not nodes that live on my site.
05:11It's just temporarily taking in the information and then throwing it away again.
05:15But let's go back to our site.
05:18Those feed items also show up in layout elements called blocks.
05:22Now we'll talk a lot more about managing blocks in the section of this course
05:25called "Changing a Site's Interface," but I'll just very quickly enable a few so you can see.
05:31To go to them, go to Structure and Blocks.
05:35As we scroll down to the disabled region, we notice that we have two blocks that
05:39were created by that Feed:
05:41News from Olive Oil Times and Olive oil news from the New York Times.
05:44I am going to enable those in the right- hand column on our page, which I happen
05:50to know that Drupal calls Sidebar second in this theme.
05:55Then I scroll to the bottom of the page and Save blocks.
05:59Now when I close the administrative overlay, there they are.
06:03Not only do I see the feed items-- and again, clicking these takes you to the
06:07external site--I also see a More button, which takes you to a page which
06:12collects all of those items.
06:14This also explains what that number of items per block is.
06:18I had it as five, and here we see five and then followed by More.
06:22If you wanted to have a smaller block over here, of course, you'd make it a
06:24smaller number, or larger if you preferred.
06:27Now just to prove that these aren't nodes on our site,
06:30I'll go up here and click Content which shows all the nodes on our site.
06:36And indeed, they're not there.
06:38It is all the stuff we entered earlier on in the course.
06:41Looks pretty good, huh?
06:42You could stop right here, but let's go a little bit further.
06:46Let's say we wanted to mix all of these news items into one big feed.
06:50That's a lot like what you saw earlier with the Planet Drupal site.
06:53It mixes together post from hundreds of sources into what's called a blogroll.
06:58And actually, Drupal has already created a blogroll for our site.
07:02You'll find that at /aggregator. And there it is, mixing in both the News from
07:10Olive Oil Times and the Olive oil news from the New York Times.
07:15We can tag individual feeds, or individual feed items, so that they are grouped
07:19together according to the categories we give them.
07:22I'll show you how to do that in the next video.
Collapse this transcript
Categorizing RSS feeds
00:00When we last left our site, we had just brought in two news feeds: one from
00:05Olive Oil Times and one from the New York Times. And we see their feed items here.
00:09We've set up our site to grab those feed items every hour.
00:12But we can do even more;
00:15we can split up these items or split up the feeds themselves, so they show
00:19on their own pages, depending on subject.
00:22To do that, we click Configuration and then go down to Feed aggregator.
00:27Now we see our two feeds here, but we also see Add category and a group of
00:32categories down here.
00:33I'm going to add one, and I'll say Production news, and I'll save it. And then
00:40I'll add another one, and let's call that Sales of olive oil and save it.
00:48Finally, I'm going to add one more category, which is going to be all of
00:52oil news and save it.
00:55Now let's go back our list.
00:58We have our two feeds, and we have our categories.
01:02Let's say that I want everything that comes from these two feeds to go into
01:05olive oil news, but I'm not sure whether to be production or sales.
01:09Well, we can categorize an entire feed by going in and clicking Edit.
01:14Now there is an option here, which we didn't see before we added categories.
01:18We can categorize the entire feed as news by just clicking this button here and
01:23saying Save. And I'll do the same for the other one, olive oil news from the New
01:28York Times is olive oil news, and save.
01:33So now I want to categorize individual items as production news or sales of olive oil.
01:40To do that, I can't just go back to my aggregator;
01:43I have to go back to any sort of individual feed or category.
01:47Fortunately, I now have everything going into olive oil news, so I click there,
01:52and I see this page.
01:53You'll notice a new tab at the top, Categorize.
01:57We click there, and then we see every item in the feeds, with little check
02:02boxes next to them.
02:03I'll scroll down and just find a few to categorize. Advertising, I'd say that it's about sales.
02:09Here's something about a supplier.
02:10I'll say that's about sales. Something about growing olives on Crete in Greece,
02:15I'll change that to production. And here is something about California olive oil, production.
02:20Now we can make this a lot more accessible, though.
02:23When we create a category, it creates a block, much like these over here in
02:27the right-hand column.
02:29So we'll go up to Structure and Blocks, and then we can turn them on from there.
02:34In fact, I'm going to get rid of these other two. And I think production is the
02:39most important thing, so I'll scroll down to production items and put that in
02:43the right-hand column.
02:45Scroll down and save blocks, and take a look to make sure it's there, and indeed it is.
02:51Finally, I want to point out just a few advanced settings for RSS feeds,
02:55although, to tell you the truth, I almost never touched them.
02:59To get to them, go up to Configuration, scroll down again to Feed aggregator,
03:04and then click the Settings tab.
03:07I won't go through all of the settings on this page, just the most important
03:11ones that I do sometimes affect.
03:13First, the Allowed HTML tags, let's say that you're subscribing to a feed that
03:17includes some sorts of videos, like a YouTube feed or something like that.
03:21Well, you can't actually have those in your feed, because you aren't allowed to
03:25use those tags--the object and embed tags as well as the param tag--but you can
03:30add them here if you wanted.
03:31This Discard items older than, as you might guess, will throw away any items that
03:35are older than a certain age.
03:38When you're selecting categories, as you see, you can choose check boxes,
03:42which is what we saw earlier, or a multiple selector, which is a sort of
03:46different kind of menu I won't go into much now, but you can play around with it if you like.
03:50Finally, if you decide to display these as a trim description instead of the
03:54full node, you can decide exactly how big you want that full item to be.
03:59And you can see that by going back to our aggregator, and it's only a very short
04:06blurb, but I could make that longer if I wanted by changing that length.
04:10I do want to mention one other thing that I sort of glossed over;
04:15we have Add category, Add feed, and Import OPML.
04:20OPML is a way of storing a whole list of feeds, storing a blog roll for
04:24example, and it gets kind of complicated, so we won't go into it here.
04:29Finally, I'd like to remind you that all groups of nodes on your Drupal
04:33site--for example, the front page-- get published as a feed, and you can see
04:37that by going to the front page and then clicking on the RSS icon that's on your own site.
04:43So other webmasters might end up publishing your content.
04:46To learn more about that and how to control it, see the video on
04:49publishing content via RSS.
Collapse this transcript
9. Extending Content
Creating new content types
00:00When I teach Drupal, I'm always a little afraid to use the term "content type"
00:04because it's not something you hear anywhere else in your life.
00:08But once you see content types in action, the concept just sort of clicks.
00:12If you've been watching the course straight through, you have probably
00:15already had that "aha" moment because we have dealt with about half a dozen
00:19content type so far.
00:20You can see them by going up to Structure and then content types.
00:25And you see all the content types we have dealt with so far, five of them.
00:29By now you have a pretty good sense of how a basic page differs from a poll,
00:33which differs from a blog post.
00:35But these were all created by Drupal.
00:38Now I'll show you how to create your own content types.
00:41Then in the videos that follow including adding fields to content types,
00:45you will learn how to bend these content types until they sing your tune so to speak.
00:50To get started, click Add content type.
00:52The one I am going to add is called Product and the Description, Items sold by Two Trees.
01:02Then down at the bottom you will see that these vertical tabs are very similar
01:05to when you edit an individual node, but they're a little bit different so I am
01:09going to go through them one after another.
01:12First, the Title, you can't remove the title from a content type.
01:16It's the primary key so to speak.
01:18It's what identifies the node.
01:20You can choose whether people have a choice of previewing a node before
01:23submitting it or if they're forced to do so and you can add some explanation or
01:27submission guidelines.
01:28I think I'll add some of those.
01:31I want to make sure that every product has an SKU.
01:36That is an identification number.
01:38Under Publishing options, no, I don't think it has to be promoted to the front page
01:42but I do want it to create a new revision each time.
01:45We have talked a little bit about revisions in the video earlier in this
01:48course, Revising content.
01:51Under Display Settings, we see this Display author and date information.
01:55To understand what that is, I am going to just open up a new tab in our browser
01:59with our site on it.
02:00I did that by Ctrl+ Clicking on our Home up here.
02:02Now as we scroll down here, we see this one that says published by name at
02:08time, whereas this node doesn't.
02:11That's the difference that you're going to make by checking or unchecking this box.
02:15I'm going to uncheck it because we don't really need to know who entered product
02:18information or when.
02:21Comment settings I discussed in another video on setting comment policy.
02:25In this case, I'm going to be posting the primary information about products of
02:29our company and I don't really want people to be talking about it right there on the page.
02:34It's too easy for people to start throwing up all kinds of insulting trash.
02:38So I will change it to Hidden.
02:40Finally, we have Show Menu settings.
02:43Again, I will go to our front page here to explain what that means.
02:46Let's say that we add a new basic page.
02:50And we fill out the form up here and then at the bottom we have Show Menu settings.
02:54If I say, yes I do want to show that.
02:57I have several choices one of them being what parent item should it be in.
03:01Which of the menus that are available to me.
03:04And I actually only have one choice, Main menu, and then the items that
03:07are underneath that.
03:08We will talk more about menus later on in the course but Drupal comes with four menus.
03:14And as I go back to my xontent type I will show you what that means.
03:17By default, when you create a new content type, it only lets you put the
03:21links in that Main menu and you might remember the Main menu is what's up
03:24toward the top of the screen.
03:25There is also Management, which is hidden by default.
03:29Navigation, which is the one that you see in that left-hand column.
03:33And User menu, which is usually seen up here in the right-hand column.
03:37These are pretty well separated by their task or by their function, so I will
03:40just leave it as Main menu.
03:43Finally, I'll save my content type and there it is.
03:48We see all of our old content types and there's Product with the description
03:52that we put right there.
03:53But we still can't really add content of that content type very easily.
03:58At least, we can as the super user, but nobody else on the site can.
04:03In order to change that, we have to go up and give permissions to those other roles.
04:07We do that by clicking People and Permissions.
04:11Then we scroll down to the node group.
04:14Here we start to see some of the different content types, Blog entry, Poll,
04:18Forum topic, and as we go further, ah there we are, Product.
04:22We want to at least allow our administrators to create products so I will give
04:26them all of those permissions.
04:27I select those boxes, scroll to the bottom, and click Save Permissions.
04:34Now, to create a node of that content type it's very easy.
04:37We do just as we did with Basic pages and Articles. We go up, Add content >
04:42Products, and there we are.
04:44Incidentally, here we see our help text right at the top.
04:47Now that we have that Product content type, we can start to distinguish products
04:52from basic pages and articles.
04:53I will show you some other ways of doing that in the next few videos.
Collapse this transcript
Adding fields to content types
00:00In the video about creating content types, we made a content type called product
00:05and we will use that from here on out to make nodes about the products we offer
00:09at our fictional Olive Oil Company.
00:11But right now there's not much we can do with it and we can see that by going up
00:15to Add Content and clicking Product.
00:17It just has a title and a body and that's pretty much it.
00:20So we are going to extend this content type by adding fields for price, an image
00:26for the product, and the SKU identifier.
00:29That's the Stock Keeping Unit in merchant talk.
00:32To do that, we go up to Structure and Content types, and then next to Product we
00:37click Manage Fields.
00:40To add a new field, we enter the information along this line under Add new field.
00:44I am going to add SKU as the Label, the field name, and this is the name that
00:50Drupal looks at internally as opposed to the label that you see when you look at
00:54the field itself, will be sku.
00:56That has to be all lowercase.
00:59And as a field type, I am going to choose Integer and the only option there is Text field.
01:04Now this type of data to store is a very big list and each one has its own set of options.
01:10Rather than explain all of them here, I will tell you about them in a different
01:13video in this course which is about exploring field types and options.
01:18But for now we'll just click Save.
01:21Now when you add a field to a content type, you typically go through two screens.
01:26The first setting screen is for that field everywhere that it appears in your
01:30Drupal site and it usually doesn't have very many settings.
01:34In this case it has no field setting, so I will just say Save.
01:37Then we come to the second page, which only affects the SKU, the field that
01:41we've just created, when it's in the Product content type.
01:45You see when you create a field you can reuse it in different content types.
01:49We won't be getting into that here.
01:51The important thing is to go through both screens.
01:53In our case, I am going to make it a required field and we have a minimum and maximum value.
01:59Now let's just say that our olive oil company keeps track of things by using
02:03a five digit number.
02:04Well, in that case, the minimum should be 10,000 and the maximum should be
02:11999,999 and for Help Text, I am just going to add "If the item has no SKU use 99,999."
02:23The rest we'll leave as is.
02:25But again, I'll come back and talk about some of these things later on.
02:29Click Save Settings.
02:31Now I said, I was going to add two other fields.
02:33One is a price and the other is an image.
02:35I will quickly add the price.
02:37Label will be Price, field name Price.
02:41That will be a Decimal type and again Text field is the only option and Save.
02:47Here we have a few more options in the first setting screen.
02:50We can choose how precise we want the decimal to be and how many digits to show
02:55to the right of the period.
02:57In our case, we don't need to store a very precise number.
03:00However, the smallest precision we can have for decimal is 10, so that's fine.
03:05Number of digits to the right of the decimal, fortunately it's already on
03:082, which is what you get in money, and since we are in the United States,
03:12or at least I am, I will say Decimal point for the marker and Save those field settings.
03:16We will make this field required.
03:19We don't have a minimum or maximum.
03:21For the Help Text, I will just say "Enter as numbers and a period for the decimal point.
03:31No need to include the dollar sign."
03:35Under Prefix, I am going to add a dollar sign and you will see how this comes
03:39out in just a few minutes.
03:41The rest I will leave as it is and then say Save.
03:45Finally, we are going to add an image.
03:47This is going to be a little bit different.
03:49I am going to call it Product photo, product_photo, and the Field type will be Image.
03:57We have only one option there as well, Image, and Save.
04:01In the first screen of settings, I'm going to put in a default image.
04:04I will click Browse and I have one in my exercise files here, there's
04:08no-image-available, and say OK.
04:12The upload destination, we don't really need to talk about right now.
04:15Essentially, you have the option of having either public files, which are
04:18downloadable by anybody, or private files.
04:21That's getting into an area that's a little bit beyond this course.
04:24But for now we'll click Save field.
04:27On the next screen, the options are quite different because we are dealing with
04:30an image as opposed to a number.
04:32I will leave things mostly as they are.
04:35In particular, I'm going to leave the image resolution by pixels as it is
04:39because I'll be showing you how to handle that in a later video about
04:42modifying image styles.
04:44However, I do want to make sure that people don't upload absolutely enormous
04:48files and fill up our server, so I will turn this into 2 MB.
04:52That should be big enough for most graphics.
04:54I will enable the Alt and Title fields and you'll see what those do when we
04:58create a node of this content type and the remainder I will leave as it is and
05:03click Save Settings.
05:04So we have our product content type and we have the fields that we want.
05:10Let's take a look at what happens now when someone wants to create a product type node.
05:14As usual we would go up to Add Content and select Products.
05:19There is our Title, there is our Body and as we scroll down further, there are
05:24the three fields that we added.
05:26But there are few things that I think are not quite right with this.
05:29For one thing, we don't need all this space.
05:31We are going to have very short product descriptions.
05:34Also, I don't think it should be called Body.
05:36We could call it something else like Product Description.
05:39That will be a little bit easier for people who are entering products later, who
05:42perhaps aren't as well trained.
05:44This way they'll know exactly what a product description is as opposed to a body.
05:49Furthermore, I think these things, the SKU, Price, and Photo, should come above
05:54because they are the first things you enter.
05:56So we'll go back to our content type by clicking Structure and Content types.
06:02Then next to Products at the bottom of the screen click once again Manage Fields.
06:06The first thing I'll do is I will change the name of that Body field by going
06:09over and clicking Edit next to it.
06:12Instead of Body, it will be Product description.
06:16Instead of being 20 rows, it will just be 5 rows.
06:19I don't want people to enter a lot of text there.
06:22Go down and Save settings.
06:26Now, to move things around, I just grab these little compass icons and drag them as I like.
06:30SKU goes there, Price goes there, and I think I will leave the photo after it. Go down and save.
06:37Now, we're ready to start adding products.
06:40I'll go up to Add Content and Product again, and I'll just add one as a sample.
06:46Product is Pure Grade A olive oil, 1 liter.
06:54The SKU, let's just say it's 15011.
06:59The price is $18, and notice we have our little bit of information here
07:04telling us how to do that. .00.
07:09I will enter a quick description here, and I'll even put in a little bit of HTML.
07:16We know what HTML is permitted of course by this list here under the
07:19Filtered HTML text format.
07:21You can learn more about text formats in a separate video earlier in this course.
07:26So that's the product description.
07:28Then we have a place for a photo.
07:29Again, I will browse and go back to my exercise files, select it, and upload.
07:36Now, the alternate text is useful for those people who are looking at the site
07:40through a different kind of screen reader, that is, not a browser, or for people
07:44who are having problems with seeing.
07:46So it's very useful to have.
07:47This will be once again, let me see.
07:49It was Pure Grade A olive oil.
07:51Photo of Grade A olive oil bottle.
07:59The title is just what people see when they hover over the image.
08:02So in this case, I am going to say 1 liter for $18.
08:10Scroll down and save, and there it is.
08:13It looks pretty good. We have our photo.
08:18We have our price, our SKU, and our description.
08:21Of course we could have put all of this information into the Body field and
08:25just left it at that.
08:26But by making separate fields, we will later be able to play with the data in
08:30interesting ways, particularly when we start using views later in the series.
08:35But first we're going to take advantage of field settings to make things prettier.
08:39We don't really need to have the word product photo here for example and this
08:43could be in line with price as one line instead of two.
08:46You will find out how to fix all of these things and do a lot more in the video
08:50about adjusting field display.
Collapse this transcript
Exploring field types and options
00:00In an earlier video you saw how to create a content type that we called product
00:04and how to add fields to it.
00:06Once again as a reminder, you go up to Structure, down to Content types, and
00:11then you can add a content type here, or add fields to an existing content type
00:15by clicking Manage fields.
00:18We added three fields.
00:20The SKU, which is a five digit number, the Price, and a Product photo.
00:25But those are only a few field types of the many that are available in Drupal,
00:29and you could see them by clicking this Select a field type pop-up menu here.
00:33Some of the ones we didn't even come close to touching were List, Float, which
00:37is a kind of number, and Long text, along with Long text and summary.
00:42We also didn't talk about this area down here very much, Add existing field.
00:46We'll explore both of these things in this video.
00:50Now, so we don't mess up anything we've already done, I'm going to first create
00:54a temporary content type, which I'll simply call Temp.
00:57As usual, I go up to Structure and Content types. Add content type. It's called Temp.
01:05Scroll down and save.
01:06We'll be deleting this at the end of the video, so we don't have to worry about it too much.
01:11Now let's start playing with fields.
01:13Go down to Temp and Manage fields.
01:15We'll start with the Add existing field section.
01:18When you click on this pop-up menu, you see all of the custom fields that we
01:22have in our entire Drupal site.
01:25Now, when you add an existing field, you're not bringing over any of the
01:28previous data. Just the field selections and some constraints.
01:32That is, its configuration.
01:34I'll sure that using the term reference that we created earlier.
01:38Right now that field only shows up in the Article content type, but I'm just
01:42going to add a label here.
01:43I'll say, "Is it current news yet?"
01:48Then over here, again, we have choices that are related to term references.
01:52Earlier on, we had check boxes.
01:54This time I'm going to say Autocomplete term widget and click Save.
02:00On this page, I'll leave everything as it is and say Save settings.
02:04Now let's compare the two.
02:06We have this field both in the Article content type and Temp content type.
02:10The best way to compare them is by opening up tabs.
02:13I'm doing this by Ctrl+Clicking on Add content.
02:16In this tab, I'll add an Article node.
02:19In this one, I'll add a Temp node.
02:21Now, as we scroll down here, you see there is our radio buttons and here we have
02:28an autocomplete area.
02:30The two terms now available are Historical and News.
02:33So if I were to start typing News, it would pop up and we would be able to just select that.
02:38However, there is something different.
02:39Because I'm using this Autocomplete I can also type in whatever I like and that
02:44then becomes a term in that vocabulary.
02:47So we have News and Historical. I'll say it's Sort of news and I'll just create
02:53a Temp node, which I'll later delete, and say Save.
02:59Now, I can prove that it was added on to that vocabulary by going back to my
03:02article and reloading the page.
03:06Now you see we have that third choice there.
03:08So you have to be careful when you share fields among different content types.
03:12In particular, if they're taxonomy fields of this sort.
03:15I want to go back and get rid of that though, because obviously we don't need
03:19to have that Sort of news there.
03:20The way I'll do that is first I'm going to delete this node.
03:23Then I'll go up to Structure and Taxonomy, I'll edit that Taxonomy by listing
03:32its terms and get rid of that Sort of news.
03:38At this point you know how to do all of this.
03:40I just do it to keep my site clean.
03:42Anyway, let's move on and add some more new fields.
03:45To do that, I go back to my Temp content type and let's take another look at
03:50the different kinds of field types we have available to us.
03:53These are divided into a few different categories.
03:56The first group is Numbers.
03:58Decimal we already talked about when we entered the Price field.
04:01A Float is a different kind of number.
04:04It's a mathematical concept, which I won't get into here.
04:07An Integer is a whole number.
04:09Under Text, we have Long text, ordinary Text, and Long text and summary.
04:15Long text and summary is familiar to you, because that's what Drupal uses for
04:18the Body field in the Article and Basic page content types.
04:23I can show you that by going again to the Article node we started to create.
04:27And you'll remember, under the Body, we can click Edit summary to add
04:31something that shows up on collected pages, such as the front page that's
04:35different from the body.
04:36We discussed this way back in the content section of this course.
04:40The other two are Text and Long text.
04:43The major difference between those is in the way it shows up on the forum.
04:47Simply put, Long text has multiple rows while simple Text is just one row.
04:52Then we have Lists.
04:53These differ from other field types in that you create a list of allowable
04:57values when you create the field.
05:00That list cannot be changed later.
05:02They're sort of like taxonomy terms as we saw earlier, but more strict.
05:07Now, the file type you've already seen when we added an image.
05:11The main difference between Image and File is that items we put in the File
05:15field don't get displayed as an image.
05:17Rather they just show up as a list of attachments to a node, as a list
05:20of generic file icons.
05:23One use of this field type would be to give members of a workgroup a way to
05:27exchange files that they're working on.
05:29That's actually how we managed traffic among a bunch of editors for a book that
05:33I was working on recently.
05:35The Boolean field type is designed to provide users with simple yes or no input.
05:41In truth, you could do this with other content types by controlling their
05:44criteria and using check boxes for entry, but the Boolean type is a simpler way to do it.
05:49Then finally, we come to the Term reference field type.
05:52This amazingly useful field lets you reference taxonomy terms as you've already seen.
05:58Now, when you add a Term reference field, you specify which vocabulary it can draw from.
06:04As you saw, you can let users add items to vocabularies this way, so it become
06:09sort of like a List field but with choices that change depending on user input.
06:14That brings us to the end of the types of fields available in"core Drupal,
06:18but that's not all. Some contributed modules give you access to additional field types.
06:24Now, when we go back to our site and edit our Temp content type by clicking
06:28Structure and Content types and then back to manage the fields there, we can
06:33see that each field type has its own options and they're all too numerous to go into.
06:38But I do want to mention one option that's available for all of them.
06:41The Number of values option.
06:43To show that, I'm just going to call this Temp field. The field will be temp_field.
06:50I'll just make this an ordinary Text field and save it.
06:56Save again to get to our final screen.
06:59Down at the bottom we have Number of values.
07:01I could make that a specific number from 1 to 10, or I could make it Unlimited,
07:05which I'll do just to demonstrate.
07:07Then Save settings.
07:08I'll move that up to the top, scroll down and Save, and create a new node of
07:14that content type. Add content and Temp.
07:19Here is that field. Let's say Red.
07:22Add another item.
07:23See, this is where that unlimited number comes in.
07:26Blue, and so forth.
07:28We could go on forever.
07:30So we've done a lot in this video.
07:31Before going, I just want to clean things up a little bit.
07:34The first thing I'll do is I'll go back to that content type, Structure,
07:38Content types and Temp, manage those fields.
07:43I'm just going to get rid of the new fields that I created.
07:45I click Delete, and yes, I really do want to delete it.
07:48In the Temp field, I'll do the same thing.
07:52Finally, I'll delete the content type itself by clicking Edit, going down and deleting it.
07:59Yes, I really do want to do that.
08:02We covered a lot in this video, but in return we gained a lot.
08:06Drupal offers you so many options when you add fields, it can sometimes seem overwhelming.
08:11My advice to you is to just create a Temp content type like I did here and
08:16start playing around with them.
08:18Quickly you'll realize which ones are most useful for your application.
Collapse this transcript
Adjusting field display
00:00So you've created your content type and added fields to it.
00:03But somehow when you add nodes of that content type, it doesn't quite look right.
00:08I'll show you what that Product node that we created.
00:11We go up to Content and filter by that product type and there it is.
00:15Now let's take a look.
00:16As you could see we have the SKU here and then we have the number below it.
00:22We don't really need a space in the number since it's a straight ahead
00:24five-digit number, the price doesn't have to be on its own line, and we really
00:28don't need a label that says Product Photo.
00:30Also the photo is larger than I would like but we'll come back and fix that
00:33later in another video.
00:35Right now what we want to do is go in and edit this content type.
00:39That will make all of the display changes that we want and it will make them
00:42consistently throughout the site.
00:44To do that, go up to Structure and then Content types.
00:48The one we are going to change is Product.
00:50And instead of clicking Manage fields, we actually click Manage display.
00:56Before we start changing all of these things, I want to point out the two
00:59buttons up here, Default and Teaser.
01:01Essentially, when we change Default, that changes the full node view that we
01:05were just looking at.
01:06You can also change the way that this content type appears in
01:08different contexts.
01:09For example, the teaser or as you see down here, RSS and searches and things like that.
01:15We will talk more about that in the video about customizing field display by context.
01:19Right now, we are just going to go with the default.
01:22We can change the basic settings on all four fields.
01:25And remember that the Product description is what we rename the body field back
01:29in the video on adding fields to content types.
01:32Notice that you have additional options here as you can see from these widgets,
01:35for changing the three fields that we later added, the SKU, the Price, and the
01:39Product photo, but we'll start with the basic settings.
01:43For the Product description, I didn't see anything that I wanted to change so
01:46I leave it as it is.
01:47For the Price and the SKU, I am going to make the label Inline. That will keep it
01:53from appearing on a different line from the actual information.
01:56And in its format, I will leave it as it is but I will show you what the choices are.
02:00You can have it either as the Default, which if there is HTML in it, it will show
02:03up with the HTML styling or you can strip out all of the HTML so it's just plain text.
02:09Or you can actually hide the value that's in that field. But we'll leave them as they are.
02:14Now let's go back and take a look at what that looks like after I click Save.
02:18And then I close the overlay so I can see the node behind it.
02:21And as you see they are now in line.
02:23Now we still do have this Product photo, which I meant to remove.
02:26So let's go back, Content types, Product and Manage display. Easy enough to do.
02:35Just hide that label.
02:36Now let's make some of those additional changes that are specific to the field type.
02:41For the SKU, I will click on the widget here.
02:43And I don't really want a thousands marker at all. I am just going to say None
02:48and that should bring it all together.
02:50The rest looks good, so I say Update.
02:52It gives me immediate feedback.
02:54For the Price, I am going to add a comma for the thousands. Not that any of
02:58our olive oil costs over $1000 but just in case we decide to sell a 55 gallon drum of it.
03:03We want it to say Comma. And Update.
03:07Then we go to the photo, which has some unusual options available to it.
03:11First of all, we can have it linked to whatever we want.
03:14We could permit users to click it and then just see the file, that would be all
03:18that's on the screen, or go directly to that node.
03:22I tend to like to have pictures linked to nodes because people are used to
03:25clicking on pictures and going to further information.
03:28So I will change that to Content. Image style lets us change the size of that
03:33graphic and you remember I right now have it going to the original image, which
03:36is bigger than I really want.
03:38I am going to try Medium and see what that looks like for now.
03:41I think it will be okay but if you want more information about these image
03:44styles and how you can add your own, see the video a little bit later about
03:48modifying image styles.
03:50For now though, I will just click Update and Save.
03:53Let's go back and see what that looks like.
03:55I close the administrative overlay.
03:56The screen redraws and pretty good.
04:00We have the SKU showing, no comma in there, the price showing, the dollar sign before it.
04:05Everything's in line.
04:06The picture is a little bit small but again we will change that a little bit
04:09later on in the course.
04:11This gives you a pretty quick overview of ways you can change field display.
04:15And again, none of these were available in Drupal 6.
04:19Back then you had to hack at the themes template files to make such changes,
04:23which meant having a pretty solid understanding of the CSS and PHP languages.
04:28So the things you see here are just one more thing to thank Drupal 7's
04:31developers for and that will make Drupal a much stronger content management
04:35system in the future.
Collapse this transcript
Customizing field display by context
00:00We've built our content types, we've added fields to them, and we've
00:04adjusted their appearance.
00:05Now, I would like to show you one more thing that's a bit advanced but it's
00:08surprisingly useful.
00:10That is changing how nodes of that content type appear in different contexts.
00:15Now before I get too deep into this, I need to clarify that there's a module
00:19called Context, but I'm not talking about that.
00:21It's actually quite a complex module.
00:24Instead, when I talk about context here I mean content as it appears in
00:28different situations throughout your Drupal site.
00:30We have already seen three kinds of context.
00:34First, we have nodes as they appear on the front page when they have been promoted.
00:38They are a little bit different.
00:40They have the Read more link down here.
00:42In some cases if there's a lot of text they will be cut off so you'll see only
00:45the teaser or summary.
00:47Then when you click the title, you go to the full node.
00:50That's another kind of context.
00:52Going back to front page, we see a third kind of context, which is up here,
00:56clicking on the RSS link.
00:58This is once again the same information but in a different view or context.
01:03What we're going to change now is the way that this Poll content type appears in the RSS feed.
01:10Let's say that we don't really want to show the results in the RSS feed. We want
01:13to get people to our site by saying vote on this but not tell them how the vote
01:17is going until they actually come to our site.
01:20To do that, we just go back to our site.
01:22And then we will go and edit the xontent type by clicking Structure and Content types.
01:27That one is the Poll and the thing we're going to change is the display.
01:31So we click Manage display.
01:33I mentioned in an earlier video that we already have two contacts showing here by default.
01:38The Default one, which is what you see when you look at the full node, and the
01:42Teaser, which again is what you see on the front page and any other place where
01:46nodes are collected. But you can add a few others by clicking this Custom
01:50Display Settings down here.
01:52In our case, I am going to add the RSS context.
01:54So the thing I want to hide is the poll results.
02:01I simply go up to the RSS button up here, change Poll results from Visible
02:06to Hidden, and save.
02:08Now let's go back to our front page. We still see the results on the front page
02:14but if we go up to our RSS feed, now they're hidden.
02:18Being able to change how content appears in varying contexts is a sort of thing I
02:23didn't realize that I needed until I have been using Drupal for a while.
02:26So you might not actually come across this until your site is up and running.
02:30But when I found I needed it, I really needed it and it simply wasn't easy in
02:34Drupal 5, which is what I was using back then.
02:37In Drupal 6 with the CCK module, it was possible but not nearly as flexible.
02:42The best thing about it being built into the core of Drupal 7 is that module
02:46developers can extend it, so you might get similar control over any new display
02:51contexts that they dream up.
Collapse this transcript
Modifying image styles
00:00One of the biggest complaints about Drupal 6 was that it had no built-in
00:04tools for image handling.
00:06Just to get an image into a node took an HTML hack and to really do it right
00:10meant installing and configuring a half-a-dozen modules.
00:14Drupal 7 attacked that problem by incorporating those half-dozen modules into
00:17its core and the results are pretty good.
00:20To get those images in now, you just add an image field to a content type as we saw earlier.
00:26This approach is less flexible than a system that would let you mix graphics and
00:29text freely, but you do get more control over your images that way, because you
00:34can apply image styles that impose consistency throughout the entire site.
00:38I'll show you how to do that by changing a node we created earlier in the course.
00:43It's this Pure Grade A olive oil one.
00:45It's a product node, and as we scroll down we see that we have the graphic here.
00:50The original graphic we had was much larger and we changed it to the medium
00:54style that comes built-in to Drupal.
00:56Now I'll show you how to create your own styles and apply them throughout your site.
01:00First, let's go back to that content type and take a look at what exactly we did.
01:04We go up to Structure, Content types, and that particular node is of the
01:09Product content type.
01:10I go over to manage display and then I look at the field Product photo.
01:14And here is where the information is. To change it, we quick this little widget here.
01:19And instead of having Image style medium, I'm going to change it to the original
01:24image so you can see what that looks like.
01:26Click Update and Save.
01:29When I close out this administrative overlay, the page redraws and as we scroll
01:33down we see, yeah, it's quite a big picture. Really too big for this page.
01:37But as we saw before the picture we were looking at was a little too small.
01:41We want something that's in-between.
01:43To change image styles, we go up to Configuration and then scroll down to Media
01:48and click Image styles.
01:51This is where you get the three that are built-in: thumbnail, medium, and large.
01:56We could have chosen the large style, but we're going to make it a little bit different.
01:59First let's take a look at what large actually is, by clicking the edit link here.
02:04The large image style constrains this image by its size.
02:08It scales it to no larger than 480 pixels in either direction, so we have a target size.
02:14Let's go back to our Image styles by clicking on this link here and what's
02:17called the breadcrumb trail, and add our own style.
02:20For the product name, you can only use lowercase letters, underscores, or hyphens.
02:26So it will look like this, and then click Create new style.
02:31Now we can start adding effects.
02:33If we don't add anything now and say Update Style, it will basically just
02:37show the original image in its original format, but first we're going to scale it down.
02:42So we'll do Scale and Add, and I'll bring it down to, as the large one, was 480x480.
02:48We'll just see what that looks like and click Add effect. Then I go down
02:55and click Update style. Great!
02:57Now I'm going to go back to Structure and see what happens if I change that content type.
03:02Again, Content types, Product, Manage display, change the Product photo to
03:09product_style, and Update.
03:13Then we'll go back to our node and scroll down.
03:16It's about the same size really.
03:19I'm going to make it little smaller and I'll also add some other effects to it.
03:22Again, we go up to Configuration, back down to Image styles, and then we
03:27edit our product style.
03:31I should talk about what some of the other effects are.
03:34First, we have Crop. That actually removes part of your image.
03:37So be careful when you use it.
03:39Desaturate is an interesting one.
03:41It takes away all of the color information.
03:44It could just as well be called the black-and-white effect.
03:47Resize stretches or shrinks your image to be whatever dimensions you want.
03:51That will distort the image however.
03:53Rotate, as you can guess, rotates the image.
03:56Scale we've already seen.
03:58And Scale and crop changes one of the dimensions, but it cuts off the other one.
04:03Most of these has their own set of options. Desaturate doesn't, because all it
04:07does is take away the color information, but we'll see a few of those.
04:11So first thing I'm going to do is I'm going to change the scale. I'm going to
04:14make it 300x300 instead.
04:18The Allow Upscaling, by the way, lets you take a smaller graphic and make it larger.
04:22The problem with that is that those larger graphics after they've been
04:26resized don't look as good.
04:27There is not enough information in the small graphic.
04:30It just takes each pixel and makes it bigger essentially, but we'll leave this
04:35as it is, 300x300, and Update effect.
04:39Then I think I want to try the black-and-white effect.
04:41So I select Desaturate and Add, and as you see there are no options for that.
04:47Finally, I think I'll rotate it a little bit.
04:49Let's click Rotate and Add.
04:52Make it a subtle -15 degrees and for the background color, I'm going to make it a light #000066.
05:02You can learn about hex codes of course in other lynda.com courses.
05:05You'll see exactly what this background color is after you see what the
05:09rotation effect does.
05:11So I then click Add effect.
05:13Okay, well, you can see it's made quite a difference.
05:16We have our original sample here and this is the sample we end up with.
05:20I really don't like that blue color however, so I think I'll make that much
05:24subtler and I'll make the rotation a little bit less.
05:27Again, you can always go back and edit these things.
05:30So I'll make the rotation angle only 7 degrees, I'll make the background color let's
05:37say a grayish color, and Update effect, there.
05:42That's a little bit better.
05:44Finally, I'll just remove the Desaturate.
05:48I like the way that looks.
05:50Since we've already applied the style to our product photo in the Product
05:55content type, all we have to do now is Update the style. Good!
05:59It's taken, and then just to be sure I'm going to go back to my content type. Go back.
06:04Manage that display of that image.
06:08Change it from original image to product_style, click Save, and then we'll go
06:14back to that product and we should see the new style.
06:17Scroll down and there it is.
06:20So that's how the image styles work in Drupal, and I want to mention once again
06:23this will be consistent throughout the entire site.
06:26I can add as many product nodes as I want and they will always come out looking like this.
06:30And if I make any changes, they will apply to all of those product nodes
06:35throughout the entire site.
06:37So we've seen how image styles work in Drupal.
06:39Let's take a very quick look at how they're stored on the server.
06:42To do that, I'll go to my desktop where I have my folder, go to 2trees, and into
06:47my sites folder, and then into the site itself. 2trees.
06:52Inside the 2trees folder is the files folder and in there you see a folder
06:56called styles, and there is all of our different styles.
07:00If we look in product_style and public, there is the graphic itself.
07:04That's important, because we haven't changed the original graphic.
07:08If we make any other changes to the style or we add a style or we decide not
07:12to style the graphic at all, we can go back to the original image.
07:15I just want to close by saying that the five filters you saw here aren't everything.
07:20Many more are available for image cache, which is this system's predecessor on Drupal 6.
07:25I think we can expect to see many of them get ported to Drupal 7's image system,
07:29giving you access to such things as reflections and watermarks and some other
07:33really impressive graphic effects.
Collapse this transcript
10. Managing Users
Defining new user policies
00:00When you open up your site to the public, you invite enormous collaboration but
00:05also enormous trouble.
00:07The same things that let people contribute content also make it easy for them to cause problems.
00:12We talked a little bit about that in the videos on setting comment policy
00:16and managing comments.
00:18Now we'll go into what happens when someone goes from being an anonymous visitor
00:22to a site member and how you can control it.
00:25To start with, I want to explain that Drupal comes with four levels of
00:28permission built-in.
00:30You can see that by clicking People and then the Permissions tab.
00:35Here we see three different levels.
00:38There is the Anonymous User.
00:39That's anybody who visits your site and isn't logged in.
00:42Authenticated User. That's somebody who has already signed in and that means
00:46they first have to get an account.
00:48The third level is the Administrator role, which I'll come back to in just a minute.
00:52There is a fourth level here which isn't showing called the super user.
00:56That's the first user that was created when you set up your Drupal site and who
01:00has access to absolutely everything on the site.
01:02It's not shown here because you can't add or remove permissions from that person.
01:07I'll go more deeply into the system of roles and permissions in the videos about
01:10defining user roles and controlling access permissions.
01:14The important thing to know now is that people who aren't signed in are the
01:18anonymous user and people who are, are authenticated users, and that you can
01:24control what each group does.
01:27So how does one go from being anonymous to authenticated?
01:30You control that in the account settings, which you find under Configuration
01:35and Account settings.
01:37I'll walk through this entire screen.
01:39The first thing is what you're going to call anonymous users and by
01:42default that's Anonymous.
01:43There is one site out there, slashdot.org, which calls them anonymous cowards,
01:48which is one way of getting people to sign up for the site.
01:51You can call them whatever you want.
01:54To explain some of the rest of the settings, I'm going to open up my own user
01:57account here by Ctrl+Clicking on Hello admin.
02:00That shows my user page here.
02:02Then I'll also click Edit.
02:05Now going back to our settings, we have enabled a personal contact form by
02:09default for new users.
02:11When you go to my profile, I'll click again on View,
02:15you see this tab here that says Contact.
02:17Anybody who has the permissions to reach this and clicks Contact can then send
02:21me an e-mail message.
02:23It's very similar to the contact form that you saw earlier, but it's set up
02:26for individual users.
02:28Now if I go back up and edit my account, you see that I have a check box down
02:33here where I can either allow or disallow that Personal contact form.
02:37Going back to our Account settings, we have this administrator role.
02:42That's the one that I was talking about a minute ago when you saw those three
02:45columns of permissions.
02:47The administrator role is automatically assigned new permissions whenever a
02:50module is enabled, as it says here.
02:53Really I've never changed it from the administrator role, but some people like
02:56to have many more roles than that and they might change the name.
02:59So if they do that, they can change it to whatever role they set up. When you
03:03start out though, you only have a choice of having in the administrator role be
03:06the one administrator or turned off entirely.
03:10Incidentally, when you set up a new content type, the administrator does not
03:14automatically get permission to add or change nodes of that content type.
03:18It's only for when you install modules.
03:21As we scroll down, we get to the most important part of the screen: who
03:24can register accounts.
03:27I'll go through all three of these in the video on creating user accounts, but
03:31essentially, you have three options.
03:33The one that's there by default is that Visitors can create accounts, but
03:36they can't actually start doing anything on the site as authenticated users
03:40until you approve them.
03:42That's not a bad setting to keep at least at first,
03:44because it lets you grow your site but still have control.
03:48The second option here, Visitors, lets anybody setup an account and they
03:52immediately become members of the site.
03:54It's a little dangerous, but it does encourage site growth.
03:57And if you go on the Internet, you'll find that most sites are set up so
04:00visitors can set up their own accounts.
04:03Finally, we have the option Administrators only, which as you would guess, takes
04:06away the option from visitors to setup their own account.
04:09The way this shows up to anonymous users by the way is if you leave your site
04:13in its default configuration there is a link over in the left column that
04:16says Create an account, but that only shows up if Visitors or this last option are selected.
04:23If you have Administrators only, then it doesn't show up at all.
04:27Going down a little bit further, you can require e-mail verification when a
04:30visitor creates an account.
04:31And what that does is it checks to make sure that the e-mail address that they
04:34entered really does exist.
04:36It sends a message to that address with a secret key.z they have to click on a
04:40link to go back to your site and if the key isn't right they don't become a member.
04:45And if they don't click that link within a certain period of time, I think it's
04:4824 hours, they don't become a member.
04:50Finally, you can decide what happens when you cancel a user account.
04:54And you can go through those options.
04:56there they have to do with whether or not the account itself gets deleted, or
04:59merely disabled, and what happens to the content that that person created.
05:05Going further down the screen, you can allow people to upload user pictures,
05:09what are sometimes called avatars, and have signatures, which appear at the end of comments.
05:14All of these settings here have to do with the pictures and if I uncheck that,
05:17you see they simply disappear.
05:21At the very bottom of the page we have a set of e-mail messages.
05:25You can customize the messages that people get at various times as members.
05:30There is, of course, the new user created by an administrator when they try to
05:34create an account and their account is activated and so on.
05:38Some of these you can choose whether or not the e-mail goes out, like right here
05:41under account activation, Notify user when account is activated.
05:45In each of these messages you have what are called tokens, so you don't have to
05:49type in an explicit message that says, oh well, what's this person's name?
05:53You can just put in this token that says, username, and it gets filled in with
05:57the proper information.
05:59Details on all these variables are at the top of the screen here.
06:04Finally, we click save configuration and we set our policy.
06:08You might have noticed these two tabs at the top, Manage Fields and Manage Display.
06:12These are very similar to setting up fields in nodes, that is, through content
06:16types, but they have to do with user profiles.
06:19And we'll talk about that more in the video about user profiles.
06:22There is one other thing I recommend you change when you start accepting
06:25members to your site.
06:27And that's to turn on tracking.
06:29You do that by going to Modules and scrolling down until you get to the Tracker module.
06:38Turn that on and click Save configuration.
06:42What that does is it add the tab to user profiles that lets everybody see what
06:46they have been doing on the site to a certain extent.
06:49And if I go back to my own profile here and I'll go to View, we now see that tab,
06:55Track, and as I said it shows where I've been.
07:01The one problem with the tracker is that there aren't separate permissions
07:04to access it. Anyone who can view profiles can see what other users have been doing.
07:09And you can see that by going to People and Permissions and then scrolling all
07:14the way down to the user section at the bottom, View user profiles.
07:20By default, however, only administrators can see it.
07:23That takes you through most of the account settings.
07:26The next step we're going to do is to actually walk through those three sign up
07:30scenarios that I showed you before to learn how they work.
07:33Whether you allow visitors to sign themselves up or require
07:36administrative intervention depends on the sort of site you're running.
07:40If you want to encourage public participation,
07:43that is with creating nodes and comments and so on, then by all means use the
07:46one that doesn't require any administrator participation.
07:49If you do that, however, be sure that you have a plan in place to prevent abuse.
07:54And you could learn some of that through the video about managing comments.
Collapse this transcript
Creating user accounts
00:00In the video on defining new user policies, we walked through some of the
00:04controls you have over how people sign up for your site and become, in
00:07Drupal's words, authenticated users.
00:10There are essentially three possibilities, which you can see by clicking
00:13Configuration and Account settings.
00:16When we scroll down, we see a Registration and Cancellation area.
00:21You can either have only administrators setup accounts, you can allow visitors
00:25to set up their own accounts, or you can have visitors set them up, but require
00:28administrator approval.
00:30We'll now walk through each of those.
00:33During some of these procedures, Drupal sends e-mails to both the person signing up
00:37and to the administrator.
00:40When we first created this site, I used a bogus address for the administrator,
00:43so now I'm going to go back and change it so the administrator e-mail is one
00:47that can actually receive mail.
00:49To do that I go to Configuration and Site information, then I enter my correct address.
00:56Go down to the bottom and click Save configuration.
01:04Now it's time to run through the three types of sign-up procedure.
01:08Let's do the default one first.
01:09Once again, we can see what it is by going to Configuration and Account
01:12settings and scrolling down.
01:13It's one that lets visitor sign up, but requires administrator approval.
01:20To do that I'll switch to another browser where I'm looking at the site as
01:23somebody who hasn't logged in, that is, as an anonymous user.
01:27Down here I would click Create new account.
01:30I'll call this person Oily Sam and enter the email address here.
01:40Then click Create new account.
01:42As the anonymous user I get a little bit of information up here saying that the
01:45site administrator has to approve it and that eventually I'll get e-mail messages
01:49confirming everything.
01:50Now let's go back to the administrator account and take a look at my mailbox.
01:55To be clear, this is the mailbox for the administrator, the one that I just
01:59entered into that configuration screen.
02:01I see that I've received the email, so I click. I see, aha,
02:05somebody's applied for an account and it gives me a handy little link here that
02:08goes directly to that person's account.
02:10I click it and then as I scroll down I see that that person is now blocked.
02:15I can also change other things, but for the most part I'm just going to say
02:18Active and then go down and click Save. And we're done.
02:23Now, if I go back to the anonymous user's e-mail account, I'll switch over my
02:27browser to do that, and take a look.
02:30The first message that that person got said that by the way you're going to
02:33have to wait for administrators to prove your account.
02:37The second message that I got, said yup,
02:40you've been approved and in order to get onto the site you have to click on this link.
02:45So I do so, and I go back to the site and I'm told that I have to create my own password.
02:52I'll click Log in to do so, and I'm taken directly to my user account and I'll
02:57enter a password here.
02:58Incidentally, that password will be drupal, all lowercase, so that those of you
03:03who are using the exercise files will be able to access this account.
03:06Scroll to the bottom and Save.
03:09Incidentally, you'll notice that I do have an option to upload a picture,
03:12because that was in the configuration settings for the account earlier on, as
03:16you saw the last video.
03:18But we'll just click Save and Oily Sam is now a member of the site with the
03:21password that he chose.
03:23You might have noticed that Oily Sam couldn't have set his original password at the beginning.
03:28That's because of a setting that we made in account settings as the
03:31administrator in the last video.
03:33If we go back, I'll show you that.
03:35Go up, click Configuration and Account settings, and scroll down this Require
03:40e-mail verification is what prevents people from naming their own password.
03:45Instead, it sends the password to that e-mail address and that's how it
03:49verifies the account.
03:51So that's the first method. Don't worry.
03:53The other two methods are actually quite a bit simpler.
03:55First, let's go back and delete Oily Sam.
03:58To do that I go up to People as the administrator, check Oily Sam's box, and
04:03then cancel the selected user accounts, and Update.
04:07Here we have a choice about what to do with the account. Do we just want to disable it,
04:11that is, block it, or do we actually want to delete the entire account?
04:15And what do we want to happen to content that that person created?
04:18Well, there is no content.
04:20We're just going to delete the account and I'm just going to say Cancel.
04:23Again, you can have that person give their confirmation that they really want to
04:27cancel if you want, but we'll just say Cancel and it's done.
04:31Now, let's go through with the second way.
04:33To change it, we go up to Configuration and Account settings. Scroll down a bit
04:38and make it so that visitors can sign themselves up.
04:41Scroll down to the bottom and Save configuration.
04:44Now I'll go back to the site.
04:46You'll notice, however, if I try to move around the site as Oily Sam, I can't do it.
04:50If I try to edit that page, I've deleted that account so once again we're an anonymous user.
04:56So now I'll try creating an account in the other way where visitors can do that.
05:00I click Create new account.
05:02Enter my username and email address. Once again, Oily Sam, and my address.
05:07Then I click Create new account.
05:13Once again, I'm told that a welcome message has been sent to my e-mail address.
05:18So I go up to my e-mail account and click Inbox. There it is.
05:22Now you'll notice these are the messages we got before when administrator
05:25approval was required, pending admin approval, and approved.
05:29This one though, just says, yup! You've registered.
05:32All you have to do is click this link.
05:33It says though that first e-mail never arrived.
05:36Okay, so that's the second method.
05:38Once again, we'll go back, we'll find Oily Sam and we will delete him.
05:47The final method only allows administrators to set up accounts.
05:50To do that I go up to Configuration and Account settings one more time and then
05:54Administrators only and Save configuration.
05:59Now when I go back to the site, again I'll go back, reload, and I'm once
06:04again an anonymous user.
06:06However, the link that said create new account no longer exists here.
06:10I can only do it as an administrator.
06:12To do that it's fairly simple. I would go to the People page and then click Add user,
06:17fill out all the information and Create new account.
06:20I wish I could recommend one of these three policies over the others, but I can't.
06:25It all depends on the circumstance.
06:27So this is a good time to ask yourself, what are you setting up this site for
06:31in the first place?
06:32Is it to publish, or is it to invite conversation?
06:36Are you so to speak a loudspeaker or a tape recorder?
06:39As in life and looking at how we interact with others, we confront our own purpose.
Collapse this transcript
Setting up user profiles
00:00As you've been building your site, you might have noticed several places where
00:04username show up as clickable links.
00:06Here I'll show you by going down the front page.
00:10Here we have JoeBob and Maria Ann Vitalia.
00:14Let's click JoeBob and see what we have.
00:16That brings us to the user's profile but it doesn't really tell us much.
00:19It just says how long he has been a member.
00:22If we click Edit, we'll see that similarly there is not very much we can change.
00:26It's just the username, address, password, whether they are blocked, what their
00:30roles are and there is a place for a picture because we allow that setting
00:33earlier in the course in the Account Settings.
00:36I'll just go ahead and give him a little photo and scroll to the bottom and save.
00:42But you can do a lot more by adding fields to these profiles.
00:47Here is how you do it.
00:48Go up to Configuration and then to Account settings and then to MANAGE FIELDS.
00:55This looks familiar, doesn't it?
00:57If you've gone through this course from the beginning it should.
00:59It's the same interface as you saw when adding fields to nodes in the section
01:03on extending content.
01:04I'll tell you a little more about that after I add a few fields, but first I am
01:09going to switch over to my other browser and login as JoeBob.
01:13The name is JoeBob and the password once again in this course is drupal,
01:17all lowercase, and Log in.
01:20Now I can go and look at my own account, there's the picture, and here I can edit it.
01:25This will be good because we'll see the changes as we make them on the
01:28Administrator side, but I'll go back to the Administrator screen and
01:31start adding fields.
01:33This one will be, What is your preferred way to use olive oil for cooking?
01:43The field will just be oil_for_cooking.
01:48The field type will be a text list and we'll make that Check boxes and Save.
01:54For Allowed values I'll say Flavoring, Nutrition, Texture and Flavor transfer.
02:05Scroll to the bottom and Save.
02:07I'll leave all of this alone.
02:09You can go through it yourself, and as usual when you add fields there are lot
02:12of options, too many for us to go through in this course.
02:15One thing I will do is I'll allow people to have unlimited values and Save.
02:21Then just to be complete, I'll add one more field.
02:23How about Favorite use of olive oil?
02:28favorite_use, and that'll just be a freeform text field.
02:34Save, save and save. Great!
02:40Now we're ready to go back to JoeBob's account and see what this actually looks like.
02:44I'll switch over and reload the page.
02:48Now when JoeBob edits his account, he still has all of the things before,
02:52including the picture, but then he has two additional choices down here, which
02:56are the ones that we provided.
02:58I like it for Flavoring and for a Massage and save.
03:03That's pretty much all there is to it, except I want to mention that people who
03:07can view this account will see all of this information.
03:11Now earlier in the video, I pointed out how adding fields to a profile is pretty
03:15much the same as adding them to nodes.
03:18That's because in Drupal 7 nodes and fields are actually handled very similarly.
03:23They are both something called entities and the fields you add to one can be
03:28added to the other as well.
03:29And I'll show you how that works.
03:30I go back to my Administrator account, go to Structure and Content types, and
03:39I am just going to manage fields on the Product content type.
03:41I am not actually going to add something.
03:43I'll just show you.
03:44Now when I go down to this Add existing field and click this popup menu, as I
03:50scroll down I see Text: field_favorite_use.
03:53That's a field that we actually created for profiles but now we can also use it for nodes.
03:58Very flexible!
03:59If you want to see a list of all fields and where they're being used, go to the
04:03Report pages by clicking on Reports and Field list.
04:07There is one last thing we need to do and I can demonstrate it by going back to
04:12this account and logging out.
04:14Now that I have logged out, I'll scroll down the page and you'll notice that I
04:19actually can't click on those links anymore.
04:21I can't see JoeBob's account anymore.
04:23If I want to allow anonymous users to do that, I have to change the permissions.
04:28So I'll go back into my Administrative interface, click People and Permissions,
04:33and then scroll all the way to the bottom to the Users group, and then here is
04:39where you change View user profiles.
04:41There are several other permissions also that you might want to consider.
04:45I'll let authenticated users to look at each other's profiles but I won't give
04:48that permission to anonymous users, then I Save permissions and we are done.
04:53But even if you're the only person who can view profiles, you'd be missing a big
04:57opportunity by not adding fields here.
05:00On our Olive Oil site, for example, the fields we added let us do valuable
05:05market research, all for free!
05:07People like to talk about themselves.
05:10The guidance you provide by crafting relevant profile fields gives them a
05:13context to do it in a way that benefits them, other users, and you.
Collapse this transcript
Defining user roles
00:00Although Drupal is known as a content management system, it's also a
00:04user management system.
00:06One feature of that is roles, which lets you impose complex security
00:10controls with confidence.
00:13A role simply categorizes users into groups, you then grant permissions to these groups.
00:18But first things first. Let's talk about roles.
00:21You get there by clicking People and then the Permissions tab and then this
00:26little button, Roles.
00:28To start off with you don't have very much.
00:29You have the Anonymous User, that is someone who is not logged in, Authenticated
00:33User, someone who is logged in, and there's the Administrator role which we
00:36discussed a little bit about in the video about account settings.
00:40I am going to just add one here and I am going to call it content manager and
00:44then click Add role.
00:46That's really all you have to do.
00:48However, now you can start to rearrange them by dragging them up and down and
00:52then once you've done that, Save order.
00:54If you go back and edit any of these roles you actually don't get very much.
00:58It's just the name of the role, or you could delete it by clicking Delete.
01:02Similarly, by clicking Edit Permissions, it takes you back to that Permissions
01:06screen except it only shows you that one role.
01:10Generally speaking, I find that less useful than going to People and then
01:14Permissions and seeing all of the roles, because then I can compare one to the other.
01:19But anyway, let's get back to our roles.
01:22So now we have this extra role. What does that give us?
01:25Nothing, until it's applied to users.
01:28So let's take a look at all of our users by clicking List here. We're already on the People tab.
01:35Let's say this site is been up for a while and we've really gotten to know this
01:38Polly Ann Saturated well and gotten to trust her.
01:41She's an active member of the site and we want to make her our content manager.
01:45There are two ways that you can do that, one is by editing that person's profile,
01:50like so, and adding the content manager role and then clicking Save, or if I go back,
01:55we can do it to multiple people at once by clicking their boxes, going up
01:59to Update Options, and adding the role and click Update.
02:03So you might ask, how does that affect what you can do on the site?
02:07Actually it doesn't at all, until you start giving that role some permissions,
02:11and you would do that, again, under People and Permissions.
02:16We'll talk about that more in the video, Controlling access permissions.
02:20Now once you do start granting such permissions you'll be able to delegate just
02:24about every task on your site to trusted outside people.
02:28That's important and I remember what an instructor said to me once in a
02:31class about nonprofit management. She said, "Whatever someone else can do, don't you do."
02:37Delegating lets you grow your site beyond what you personally have the
02:41skills and time for.
02:42This system of roles is Drupal's way of making that possible.
Collapse this transcript
Controlling access permissions
00:00Managing user permissions in Drupal is a two-step process.
00:04In the last video, we went through the first step by giving the users roles.
00:09Now we'll perform the second step, which is granting permissions to the role we created.
00:14First let's just review what we have.
00:16We go up to People and we see everybody who is an authenticated user on this site.
00:20In the last video we gave Polly Ann Saturated this role, content manager.
00:25I am going to go over to my other browser and log in as her.
00:29Username is Polly Ann Saturated and the password, as for all users in this
00:34course, is drupal, all lowercase, and log in.
00:38We can see right away that there are different permissions between Polly and the
00:42administrator by just looking at the front page.
00:45So let's go there as the administrator.
00:47First, we have this feed over here, which we added several videos ago.
00:51We don't see that as Polly.
00:52That suggests that actually she doesn't have permission to see it.
00:55There is no toolbar up here as there is for the administrator and if you look in
00:59the navigation area there are far more choices over here, most of them, again,
01:03relating to feeds, but still quite a bit more available to the administrator.
01:08So let's go in and add some permissions to that role.
01:11We go up and click People and then Permissions.
01:15Now I know you've seen this screen dozens of times throughout this course so far,
01:19so I am not going to simply say, oh, to add permissions you click the box
01:22and then save them and you're done, because you already know that.
01:25I'm going to go into some detail as to what exactly these permissions are and
01:29how they separate from each.
01:31On the other hand, there are dozens and dozens and dozens of them, so I won't
01:35have time to go into all of them, just some of the more important ones for, in
01:39this case, a content manager.
01:41I'll also talk about how each role interacts with the authenticated user and
01:46the anonymous user. So let's go down.
01:49The Aggregator is something that brings together news feeds.
01:52I think that's something I would want to give to a content manager.
01:55I'll let that person administer news feeds and view news feeds.
01:59But again, we want to make sure that everybody can view those news feeds, so I
02:03click authenticated user as well.
02:05Now you all will notice when I do that, it grays out these boxes.
02:09That's because by definition everybody who's not an anonymous user is an
02:13authenticated user, including any other roles.
02:16So it wouldn't make sense to say that authenticated users can do something but
02:19the content manager can't because the content manager is an authenticated user.
02:23And incidentally, if you have a complicated series of check marks over here and
02:27you add this, it remembers what they are when you uncheck it again, which I think is very clever.
02:32We'll let everybody see the news feeds.
02:36Going down, I think I'll give the content manager ability to do things with comments.
02:40Administer them, delete them, and so on, and also edit her own comments.
02:45The most important part for somebody handling content, however, is found in
02:49this large Node group.
02:51Every content type has multiple listings for permissions in this Node group.
02:56We'll scroll past the first group here, which I'll come back to in a minute,
02:59and we see Blog Entry.
03:00Create new content, Edit own content, Edit any content, five
03:04different selections.
03:05Same is true for Poll, Forum topic, and so forth.
03:08I'm going to give all of those to the content manager.
03:12That person can create content, edit it, delete it, anything he or she wants.
03:17And so that we don't waste your time I'll just fast forward to the end of this process.
03:21There, I just gave the content manager permission to change nodes of
03:25every content type.
03:26I'll just look through here again and see other things that I want the
03:29authenticated users to be able to do.
03:32Well, View published content.
03:33Obviously, everyone should be able to do.
03:35I do want to point out one up here.
03:37It gives a warning, and you'll see this several times throughout the permissions screen,
03:41Give to trusted roles only. This permission has security implications.
03:46This warning is generally put on those permissions that if granted would allow
03:51somebody to basically take over the site, so be especially careful before giving those away.
03:57Continuing to scroll down, let's see what else we might want to give to
03:59the content manager.
04:01Access the administrative overlay? Sure, since they're an administrator.
04:05Administer URL aliases, sure, since that has to do with content.
04:09I don't think I'll let them change polls, but then this Search area,
04:13this is very interesting.
04:14We haven't even noticed that although we have a search box on our site, nobody
04:18has been able to use it up until now.
04:21So I am going to say yes, we want everybody to be able to use search.
04:25Scrolling down a little bit further, we might want to give the content
04:29manager access to Taxonomy.
04:31Although actually I'll leave that alone as it is.
04:33We do want to give access to the toolbar,
04:35usually to anyone who's doing administration, because it gives them easy access
04:40to the commands that they need. But don't worry.
04:42It won't show any commands that they don't have access to reach, as you'll see in a minute.
04:46Scrolling down further, and I think were done.
04:49Click Save permissions.
04:50So now we have done three things.
04:53We've set up that content manager role, we've granted it to our user Polly Ann
04:58Saturated, and we've given it permissions.
05:01So let's see what things look like now from her point of view.
05:03I'll switch back to her account in my other browser and reload the page. Ah!
05:10You see several changes.
05:11We have the toolbar up here, we have the shortcut bar, which just says Add
05:15Content because she can only do that, she can't see all content, so the Find
05:19Content button is gone, and we can see the Feeds over here.
05:24There are quite a few changes.
05:25And if I were to give her additional permissions they would show up in the toolbar.
05:29Now as it turns out there is not much there so we couldn't take it away but
05:33let's leave it for now.
05:35You know, I think I referred to this video more than any other in the course,
05:39because you'll find yourself constantly adjusting permissions while setting up
05:42a Drupal site and then again as you add and remove functionality throughout its life.
05:48I know that that Permissions page is really a lot to take in.
05:52But take heart. After a while you'll really get to know it well and you'll
05:56quickly feel confident with Drupal systems of Permissions.
Collapse this transcript
Canceling user accounts
00:00There is a joke about used cars.
00:02It's important that they go, but it's even more important that they stop.
00:07On your site, too, there will be times when you want to end user memberships or
00:10let them end their own.
00:12I'll show you how to do that by deleting a user that we created earlier.
00:15We're going to work on JoeBob, who you might remember has a blog, so that means
00:19he has posted nodes and he has also posted comments.
00:23We'll go through three procedures.
00:25First, I'll show you how to delete him from the administrator's point of view.
00:29Second, I'll show you how to let JoeBob delete his own account.
00:32And third, I'll show you how to change some behaviors around account
00:36deletion generally.
00:38To start with, I'll show you how to delete a user from the administrator's point of view.
00:41It's very easy.
00:42You just go up to People, find the user you want to delete, and then you can
00:48either edit the account, or just from here check this box and say Cancel the
00:53selected user account and Update.
00:56That brings you to a few options and I'm going to just very quickly describe them now.
01:01You have a choice of either disabling his account or deleting his account.
01:06By disabling it, there remains a JoeBob user, but that person can't actually
01:11access the site as an authenticated user.
01:14When you delete an account, it completely wipes it out from the system.
01:18That means that somebody else could then sign up as JoeBob.
01:21The other thing these options take care of is what happens to content that
01:25JoeBob created and we'll go through all of these options.
01:28Finally, there is a check box at the bottom, which would require e-mail
01:31confirmation from JoeBob.
01:33In other words, after you clicked Cancel accounts, an e-mail would go out to
01:37JoeBob and he would have to click a link to say yes, I really do want to leave this site.
01:41If you're kicking someone off, obviously you don't want to require their confirmation.
01:45I'm not actually going to delete it here, so I'll just go back one screen.
01:49Now, to show a few other things, I'm going to switch over to my other browser
01:53and I'm going to login as JoeBob.
01:55I scroll down to User login, type in his name, and the password, which
02:00throughout this course is Drupal, all lowercase, and click Log in.
02:05Now I'll go up to My account and Edit.
02:07Now, as we scroll down here, all the way to the bottom, we see that we can save
02:12our account, but there is no Delete account button.
02:16In order to let him do that, we have to first grant that permission and you
02:20learned all about that in the video about controlling access permissions.
02:23I'll just do it very quickly by switching back to the administrator account,
02:27going up to People and Permissions, and then scroll all the way down to the
02:31bottom to the User group.
02:36In User, I'll let him cancel his own account and then click Save permissions.
02:42Now when I go back to JoeBob's account and reload the page, I see there is that
02:46Cancel account button.
02:48It worked similarly to the one that you already saw, but I'll go into the
02:51difference in just a moment.
02:53We reload the page and now we see this Cancel account button.
02:56Let's give it a try.
02:57Click it and we're asked for a confirmation.
03:01Now, we're not asked what should happen with the content and we're not asked
03:04whether an e-mail confirmation is necessary, as we were when we were the
03:07administrator. We just have a choice of canceling or canceling the account.
03:12Now, when you click Cancel, I know it's kind of confusing,
03:14that actually means stop this process.
03:17Should he decide to click Cancel account, the choice of what happens to all
03:20of his content and whether he is deleted or disabled will just be defined by
03:25the default method.
03:26So now I'll tell you how to change that default method.
03:29To do that, I go back to my Administrator and click Configuration and Account settings.
03:35We scroll down a little bit and we have When canceling a user account.
03:39When we change this, that's what defines the default.
03:42Again, if you don't let users choose their own, as you can do through
03:45permissions, then they'll get whatever you give them here.
03:49But enough messing around.
03:51Let's actually cancel this account, so you can see what happens to nodes and
03:54comments that JoeBob created.
03:57As we've seen, there are four options.
03:59I'll just show the default one where we disable the account and keep all of the content.
04:03You could check out all the others easily enough by playing around in the test site.
04:07Just to keep this simple, I'll do it as the Administrator.
04:10I go up to People, select JoeBob, cancel his account, and Update.
04:17We'll leave it at the default. There.
04:20Now you'll notice he still shows up in the list, but he is blocked.
04:24That's because the default is to disable, not to delete.
04:27But what about all that content?
04:29Well, let's go up to Content here and take a look.
04:33I'll click Reset so we can see all nodes.
04:35Then I'll search for the author, being JoeBob.
04:38Oh, there is one of them.
04:39Let's click on it and then click on his user link here and see what we get.
04:46It's still there, but that's because his account is disabled, not deleted.
04:50If we wanted, we could go back in and make it active again.
04:54Since we're already editing JoeBob's account, all I have to do to cancel it is
04:58click Cancel account.
05:00This time I will actually delete it by choosing this button and clicking Cancel account.
05:06So now he is actually deleted.
05:08If we go up to Content, we see that all of the nodes that he created are gone. His blog is gone.
05:15However, there is something interesting.
05:16If we go up to Comments, we see that any comments he posted show up still in the thread.
05:23But as somebody who is not a user, it's just an unverified JoeBob and you can't
05:27click on his name in order to get to his user page, because it doesn't exist.
05:31I bet you didn't think account cancellation would have so many subtleties, did you?
05:35Neither did Drupal's designers apparently, because this problem engaged them
05:39for over eight years before they settled on a way to let users cancel their own accounts.
05:44No kidding, really.
05:45If you go to drupal.org/node/8, that is the eighth node on this site, which now
05:51has almost a million nodes, you can see that the conversation started way back
05:55in 2001 and didn't finish until quite recently.
06:00This discussion, however, I think shows you the length to which Drupal's
06:03developers will go in order to give you functionality that's really useful
06:06for your Drupal site.
Collapse this transcript
11. Changing a Site's Interface
Understanding Drupal page layout
00:00Nothing in web development has changed as much as the design options available,
00:04but Drupal has kept up and now it's fair to say that it can create just about
00:09any page layout that HTML can.
00:11After all Drupal is based in HTML and CSS.
00:15However, Drupal has its own way of doing things that makes some kinds of designs
00:19easy and some really hard.
00:21Knowing which is which will help you to go with the flow or to force it to
00:25create undrupally designs when you need to.
00:28First let's cover a few things about Drupal's design that you've
00:31probably noticed already.
00:33Like most content management systems, it's extremely consistent.
00:37As we go from page-to-page you see the same header, you see the same sidebars,
00:41for the most part, and it doesn't matter if you go to something that's a page or
00:44if you go to a user account. Again, it stays mostly consistent.
00:48Along those lines there are different areas of the page.
00:52We have the header as I mentioned and the sidebars but there's also this footer
00:55area that we haven't taken advantage of yet and all of the main content shows up
00:59in this middle area here.
01:01The way that a Drupal site appears is defined by its theme and you can see the
01:06themes by going up to Appearance.
01:08We talked a bit about themes in the configuration videos earlier on in this course,
01:11but I will just very quickly go over them again.
01:14The default theme that visitors see in Drupal is called Bartik, and you can
01:17change its colors and some of the other settings as we've already done.
01:21So instead of looking once again like that screenshot we see here with the blue top,
01:25it has that green top that we added earlier.
01:28The Garland theme was the main theme in Drupal 6 and they have carried it over to Drupal 7.
01:32Let's change to it, just to see what it looks like.
01:34So we do that by clicking Set default, closing out our overlay, and there it is.
01:39I will change it back by going back up to Appearance.
01:42You've already seen the Seven themes since that's what shows up in all the
01:45administrative overlays and then we have something called Stark, which I will
01:48talk about a little bit more later.
01:50Stark is there just so that you can learn theming.
01:53It's a very basic Drupal theme with no actual styling added to it.
01:57But we're going to switch back to the Bartik theme, so we just go back up
02:01and click Set default.
02:02Close our window and we're back.
02:05So those are the themes that come with core Drupal, but there are dozens of free
02:09ones available for download.
02:11To get them, you go to drupal.org/ project/themes and you see it actually says
02:17that there are hundreds of themes, but these won't all work with Drupal 7.
02:21In order to see which ones will, you have to filter by compatibility and then
02:25click Search. There.
02:28Now I'm making this video before the official launch of 7.0 and already there
02:32are six dozen themes available.
02:34By the time you see this video, there should be many more.
02:38You will learn more about these contributed themes in the video "Selecting and
02:41installing downloaded themes," but besides these, you can also create your own
02:45themes mostly by editing image and CSS files. PHP is also helpful, but it's
02:51often not necessary.
02:52I'll show you where those files are by going back to our Desktop and to our
02:56Drupal installation.
02:57We open it up here, go into the sites folder, and then go to all.
03:02In here is the themes folder and that's where you'll put any contributed themes
03:06or themes that you've created.
03:08If you want to see the themes that come with Drupal, we will go back up a
03:11little bit, to the top level of Drupal's installation ,and you see that there is a folder, themes.
03:16I do want to warn you though, don't change anything in that folder. If you are
03:20going to make any changes, it should all be in your sites folder.
03:23We will talk more about theme design later in this section of the course.
03:28So that's a quick tour of themes, but there's another part to Drupal layout that
03:32lets you do a lot without ever leaving the web-based interface.
03:35It's called Blocks, and to show it, I will go back to our
03:37administrative interface.
03:39To get there, you click Structure and then Blocks.
03:43We've already done a fair amount with Blocks in this course. This page shows a
03:47list of available blocks and the regions you can put them in and you can see a
03:51map of what they look like on the page by clicking Demonstrate block regions.
03:55You will learn more about blocks in the videos "Taking advantage of block regions"
03:59and "Creating new blocks."
04:02So to review, the two main ways to exercise control over Drupal's visual
04:06interface is through themes, which you get to through Appearance and Blocks,
04:10which are under Structure.
04:12You can do a lot with blocks without ever leaving the web-based interface but
04:16if you want to make some really fundamental changes, you have to do that by creating themes.
04:21We won't cover that entirely in this course and if you want to learn more about
04:24Drupal theming, the course to watch is Drupal: Creating and Editing Custom Themes also on lynda.com.
04:30But I will give you the basics of theming just to get you started.
Collapse this transcript
Taking advantage of block regions
00:00A Drupal page has traditionally been sort of like a solar system with a main
00:04content here as the sun and all this other content circling around it.
00:08Drupal 7 changed that in two ways.
00:11First of all the sun turns out to be just another planet and the system is a lot
00:15more lively than before, with far more planets on which the content can live.
00:20These planets, which are actually called blocks in Drupal, are also easier to
00:24handle. This video shows you the way.
00:26There are a few different ways to administer blocks.
00:29For one, you could hover your cursor over them when you're the administrator and
00:33then go to the block configuration page.
00:35That will let you configure any individual block, but if you want to configure
00:39them all, the place to go is Structure and Blocks.
00:43The way this page is set up is it lists regions here in bold, Header, Help
00:48and so forth, and then in each of these regions it says which blocks are in that region.
00:53You can move blocks from one region to another in three different ways.
00:56For one, you can grab this little icon here and drag it and after you do that,
01:00you have to click Save at the bottom of the screen to make it stick, or you can
01:04use this pop-up. So I could just move this up to the header by going to Header
01:08and it does the same thing.
01:09Finally you can click configure, either here or through that menu on the front page,
01:13and then change where it appears through this pop-up menu here, save it, and
01:18go back to your layout.
01:20But this screen doesn't really give you a visual representation of what the page is.
01:24Until you get used to it, you don't really know where the help section is and
01:27the highlighted section and so forth.
01:29To see that you click this Demonstrate block regions link here.
01:33That shows all of the regions as these little yellow areas and when we scroll down,
01:38we see there are quite a few.
01:40In Bartik, which is the default theme we are seeing here, there are 15 regions.
01:45Now compare that with Garland, which was the default theme for Drupal 6.
01:48In that earlier version, it only had five regions and now it's been brought over
01:53to Drupal 7 and it still has fewer than Bartik.
01:55We can see that by clicking on Demonstrate block regions after switching to
01:59the Garland tab up at the top, and once again we click here to get back to where we were.
02:04Incidentally, I'm glad I'm showing you around these tabs, because whenever you
02:07make a change to the block layout, it only affects the theme that you are on.
02:13But let's go back to Bartik.
02:14From this page, you might think that all blocks are the same but they vary in two major ways.
02:20First, blocks sometimes grow or shrink to accommodate the contents of other blocks.
02:25Second, each block region has its own unique CSS definitions, so a block you
02:30place in the Header region might not look the same as one placed in the sidebar.
02:34I'll show you that by moving blocks around. Dirst let's go back and take a look
02:38at what our site looks like right now.
02:40We have this one block over here in the right column. I am going to take it out
02:45and you will see how the main area actually expands to take up that space.
02:49So I take it from Sidebar second up to None, and then go down and Save block,
02:54and you see it's expanded.
02:56Now let's take that same block and we are going to move it around the page so
02:59you can see how its style changes.
03:02Since it's not on the page, there's no little icon here to click.
03:04I will go up to Structure and Blocks and then scroll down to the bottom so I can find it.
03:09I believe it was News from Olive Oil Times.
03:12I move that back into the right-hand column, which is called Sidebar second. Go down and Save.
03:17When I close that window, it's a different block but close enough.
03:22Let's move that to a different area.
03:23I will first move it up to the Header and Save.
03:29And as you see, its whole style changed.
03:31Move it again, this time I'll bring it all the way down to the bottom,
03:36the Footer first column.
03:39Save the block, see what it looks like. Very, very different. You know what?
03:45I am going to remove it from the page entirely by going up to None, scroll down
03:49and Save block, and we are back.
03:53Now I mentioned this thing about these regions growing and shrinking.
03:56It all depends on how the theme was programmed and actually this is the only
04:00place it happens in Bartik, in the two columns in the main area, but in some
04:04other themes such as those you download from drupal.org, that change happens
04:08all over the place.
04:09Blocks grow and shrink all the time.
04:11You notice it mostly in blocks that sit side-by-side by the way.
04:15Now that might make block region seem unpredictable, but it's really not that bad.
04:20The lesson is clear.
04:21Don't just move blocks into a region blindly.
04:24Thoroughly test your site after each move and then again when they're all done
04:27to see how they work together.
04:29Because in reality, they're not that unpredictable at all.
04:32You just have to learn the stylings of each block region.
04:35Once you have that, you will be able to move the blocks around faster and with
04:38confidence that you know exactly how they will look in their new places.
Collapse this transcript
Creating and modifying blocks
00:00I talked about how to move blocks around in the previous video about taking
00:03advantage of block regions, but you don't have to live with just the blocks
00:07that Drupal gives you.
00:09You can create your own and even change the behavior of the ones that are built-in.
00:13The result can be a site whose look changes depending on which page you are on
00:17or whether you're logged in or a few other criteria.
00:20First, I'll talk about how to create blocks, then I'll show you how to
00:23master their settings.
00:25To take a look at blocks, we will go up to Structure and then click Blocks.
00:30Now this page shows mostly only blocks that were created by modules.
00:34As we scroll down, we see for example this Search form is created by the search
00:39module, which is part of core Drupal.
00:41Navigation is part of the menuing system and so forth.
00:44As we scroll all the way to the bottom, then we come to blocks that are
00:47created because of modules.
00:49For example, this one here, News from Olive Oil Times, we brought in a feed
00:53through the Aggregator module and that module in turn created this block.
00:57But let's go ahead and create our own block with content that we
01:01specifically put in it.
01:02To do that, go up to the top of the screen and click Add block.
01:05I am going to make this a contact block so it will be "Talk to a real person"
01:11and then in the Block title, it will say the same thing and then I will just
01:14add a Block body, there.
01:19We will scroll down to the bottom.
01:21I am just going to put that into the Sidebar first region.
01:23We can do that here or on that Block administration page.
01:27I will tell you more about these Visibility settings in just a minute.
01:29For now, we'll just say Save block and take a look at what that looks like. I don't see it.
01:35Let's scroll down to the bottom.
01:36Ah! There it is.
01:37That's one thing about blocks. When you add them they get put into the region
01:41but not necessarily in the order you want.
01:43To change the order, let's go back to Structure and Blocks.
01:47Back down to that first Sidebar.
01:49I'll bring that up to the top right below the Search form and as long as I am there,
01:53I will move up the User login.
01:55Scroll down more and then Save blocks again.
01:58Let's see how that looks. Yup, much better!
02:01Now there is one thing I haven't talked about much in this course, which is
02:04whenever you make a change like this especially with blocks, it's a good idea to
02:08take a look at it from the point of view of somebody who's not logged in.
02:12So I'll switch to another browser and I'll reload the page and see what
02:15the changes look like. Yeah, I like that.
02:18One of the things that we change was to move this User login block up, so now it
02:22goes above the fold, so to speak, on small screens.
02:25Now I would like to go back and show you some of the options you have for block placement.
02:30To do that I go back to my Administrative account and I can edit this block
02:34simply by clicking on its widget here and then clicking Configure block.
02:37If we scroll back down to the bottom of the screen, we come to those vertical tabs.
02:41Now you know these from editing nodes and this is very similar.
02:45The first one lets us decide what pages we want this to show on and we
02:48can either have it show only on specific pages or on all pages except specific pages.
02:54In this case, I think I'll only put it on the front page.
02:57So for that, I add this sign, front, and then the closing sign.
03:01And incidentally the details on how you build the selection criteria are here
03:05underneath the field.
03:07I will say Save block and there it is on the front page. What happens?
03:10Let me just make sure that it's not there on any other page. Yup!
03:14It's gone.
03:15So it's now behaving the way we want.
03:17I just want to quickly show you a few other ways that you could change how it
03:20appears by going back and editing the block.
03:23Once again we are at the bottom of the screen and you can decide what content
03:26types that you should show next to.
03:28Now we're talking about here is the content type that shows in the main content area.
03:33You could for example have this block only show when it's next to a Product page.
03:38That's something that you commonly find on catalog sites.
03:40You will have an order block next to Product pages, but not on things that are
03:44about our company because there is really nothing to order there.
03:48We could have it only show to certain roles or let users themselves decide
03:52whether or not it shows.
03:54I just want to show you how that works very quickly.
03:56I'm going to say this is customizable but that it shows until you tell it not to.
04:01Then I click Save block and as expected, it shows up because we haven't told it not to.
04:05The way you would do that as an ordinary user is by going up to My account and Edit.
04:10And as you scroll down, you now see this PERSONALIZE BLOCKS area.
04:15In this area we will list all of the blocks that have that turned on.
04:20There is just one more thing I want to mention about blocks.
04:22At the beginning of this video, I showed you that first screen, that block
04:26administration screen, and said that all of those blocks were created by modules.
04:30There are some differences between blocks that are created by modules and those
04:33that you create yourself.
04:35Most notably, the ones that you create yourself have an extra field.
04:38I will show that by going to Structure and then down to Blocks.
04:41Now here is the one we created.
04:43We click Configure and we could see this Block body.
04:46That's what actually shows up in the block.
04:48But if I go back and I take a look at one of the ones that's created by a
04:52module, let's say the Search form, there is no block body because what's
04:57actually being delivered as the body is defined by the Search module.
05:01There are some other differences and in fact as you add more modules into your site,
05:05you'll find that these blocks often have additional configuration options
05:10that you weren't expecting.
05:11So it's a good idea to take a look at all of the blocks that get added by
05:14modules when you first add them.
05:16Another great thing about blocks is that after you create them, you can simply
05:19disable them very easily.
05:21Change it from whatever region therein to None.
05:24So blocks give you lots of opportunity to improve how you deliver information on
05:28your site and the way they are setup you can play around with them without
05:31worrying about hurting anything.
05:33So as you can see, blocks are surprisingly flexible and you can configure them
05:37for some really interesting applications.
Collapse this transcript
Selecting and installing downloaded themes
00:00Up until now you've only seen three different themes, all of them part of Drupal
00:047's core download, but there are dozens more available for free on Drupal.org.
00:09This video will show you how to download and install them as well as how to
00:13decide which ones will fit your needs best.
00:15The first place for us to go is drupal.org.
00:19Once there, click Download & Extend and then click Themes.
00:23You can also go there directly by simply typing drupal.org/project/themes in
00:28your browser's address bar.
00:30The first thing we need to do is make sure we're looking for Drupal 7 themes,
00:33Those that are designed for Drupal 6 or any earlier version simply won't work.
00:37So we Filter by compatibility as 7 and Search.
00:41By default, these are sorted by most installed.
00:44That is to say which are the most popular, and we can scroll down through here
00:47and see which ones they are.
00:49The first batch or actually something called Base Themes, which I'll get to in just a moment.
00:53The one that I think that we'll look at is called Danland.
00:56It shows you a little bit of information about it, but to get the download link
00:59you have to either click the title or click Find out more.
01:02Then as you scroll down further you see the Downloads area.
01:07I could download this directly to my Desktop by clicking this link but I am
01:10going to show you a slightly easier way.
01:12You right-click it if you have a two-button mouse or Ctrl+Click with a
01:15one-button mouse and then choose Copy Link Location, then go back to your site.
01:20You might remember from earlier videos that to see Theme Settings, you go to
01:24Appearance up here in the toolbar.
01:26Currently we have the Bartik theme showing.
01:29I am going to install a new theme by clicking here on Install new theme. Then I
01:33paste the URL that I just copied and click Install.
01:36It only takes a few seconds and then you can go back to that Theme page by
01:40clicking Enable newly added themes.
01:43If we scroll down to the bottom we see there's our theme, Danblog.
01:47In order to make it actually work we say Enable and set default.
01:51That makes it replace Bartik as the main theme that people see when they visit the site.
01:55To prove that I'll go back Home and there it is.
01:58That was pretty easy, wasn't it?
01:59Now that we have got this installed we can explore it a little bit and you'll
02:03see a few things that are different from theme to theme.
02:06First let's go up to Appearance and click Settings.
02:09You might remember that Bartik was re- colorable and I can show that by clicking
02:13on the Bartik button up here.
02:15That was actually how we changed that header graphic so that instead of going
02:18from blue from blue it when from green to green.
02:20Well, Danblog doesn't have that, but some themes will have additional features
02:24that you don't have in Bartik.
02:26The other way that themes differ quite a bit is in their block layout. To see
02:30that, go up to Structure and then to Blocks.
02:34Now one thing to watch out for. When you see this Blocks page it only refers to
02:39a specific theme and in this case we're still looking at Bartik's theme.
02:43In order to see how Blocks are arranged on the Danblog page we have to click
02:46Danblog and then we can scroll down, and we see, for example, there's something
02:50here Superfish menu.
02:52It has an additional region, which isn't in Bartik.
02:55If we want to see all of the block regions, as usual we would click up here on
02:58Demonstrate block regions, and there it is.
03:02To exit click Exit block region demonstration.
03:06You can learn more about moving and configuring blocks through other videos in this course.
03:11So, we have our theme, but you might be asking how did I decide which team to try?
03:15There is a lot of jargon around themes so here are a few tips and a bit of a glossary.
03:21As I said before, when you choose a theme it must be a version that matches your
03:26version of Drupal, in this case Drupal 7.
03:28It should also be a released version if that's possible.
03:32If I go back to that Themes page, and again I'll just switch over to this tab
03:35and go back to drupal.org/project/ themes, you see that some of them, as I
03:42click on Zen for example, have versions that are still in development.
03:46Then there are some that are on a yellow background, which means you could use
03:49them although it's not necessarily the preferred version, and then the green
03:52area up here is the most preferred version.
03:55In this case, 7 hasn't yet been released so allegedly it's not stable.
03:59The truth is, though,
04:00some of the unstable versions are pretty good, while some of the supposedly
04:03stable ones aren't perfect.
04:05If you hang around the Drupal community long enough you'll find out which
04:08ones really work, but without that your best bet is to stick with those that
04:12are in the green area.
04:14When you're looking at themes don't judge it based on the main graphic.
04:18Many of these themes will have a large graphic in the header but they won't
04:21really have all the settings that you want.
04:23It's easy to change a graphic.
04:25It's not so easy to add settings.
04:28Finally, look for features that you couldn't create yourself.
04:30Again, a graphic you can add but could you add rounded corners or rollover
04:34effects or things like that?
04:36If not and you need them, choose a theme that has those features.
04:39And while we're on the subject, here's a glossary that'll help you look through
04:43those descriptions and decide which one is right for you.
04:46The first one is Fluid/Fixed and the best way to demonstrate this is by going
04:50back to our site and switching our theme to Garland.
04:54I'll do that by going to Appearance and then clicking Set default next to
04:58Garland and closing our window.
05:01Here we see Garland and you've seen this before.
05:03It has certain settings that let you choose whether it's Fixed or Fluid.
05:07You can see the difference between Fixed and Fluid by taking your browser
05:11window and unlocking it from the edges of the screen like so, and then drag the corner in and out.
05:17This one is what's called a fluid version of Garland and I can tell that because
05:21this main area grows and shrinks as I make the window smaller and larger.
05:25In Garland's settings, which I can get to through Appearance and Settings, this
05:29one in particular switches between Fluid and Fixed.
05:32I'll change it to the Fixed version just so that you could see the difference.
05:36I close the window. Now when I move this in and out you see that this
05:39central area stays frozen.
05:42I'll just make this window large again and switch back to our Bartik theme
05:47and close that out.
05:49There, we are back as we were.
05:51Continuing on with the glossary, some themes are re-colorable, you've seen this
05:55with Bartik, and also some have more block regions than others.
05:58Again, Bartik has 15 regions whereas the old Garland only had five.
06:03But what if you decide you want to design your own theme or you want to
06:06extend the theme somehow?
06:08Well, there are some additional things you can do besides just downloading the
06:11theme and living with it.
06:13First, if you want to design your own it's a good idea to start out with a base theme,
06:17and there are quite a few to choose from.
06:19If we go back to drupal.org/project/ themes you can see that the first few, Zen
06:26and Fusion in particular, are both base themes.
06:29That is they don't have very much styling themselves but they are setup so that
06:32you can easily style them yourselves.
06:35A sub-theme is when you take a base theme and make your own theme from it.
06:39It's a much larger topic and one that I won't be getting into this course, but
06:43you can find out more about it by looking at Chris Charlton's course on
06:46designing Drupal themes on lynda.com.
06:48Then there are other modules such as Skinr and Suckerfish that add certain
06:52features to your theme.
06:54The last thing I am going to do is to get rid of the theme we downloaded.
06:57That will keep both our Appearance page and the sites folder clean.
07:02To do that, I'll go to my Drupal installation folder and then to sites, and then
07:06if you look in all, you'll find a themes folder. This is where themes were
07:10installed by default.
07:11Then I'll just get rid of it by dragging it to the Recycle Bin.
07:14Before you do this, make sure that you've turned it off in your Drupal site of
07:17course, as I did just a minute ago.
07:20Now when I go back up to my site, I click on Appearance and Danland is no longer there.
07:26So you can see, it's really quite easy to install themes on your own site.
07:30So why not try out a whole bunch of them?
07:32It only takes a few minutes and you can always switch back.
Collapse this transcript
Building themes the traditional way
00:00Now we're going to dip our toes into a topic that everyone's eager to learn, but
00:03that's incredibly complicated.
00:05That is Drupal theme design.
00:07At its fullest, it involves PHP and JavaScript programming, CSS code, and
00:13knowledge of Drupal's API or Application Programming Interface.
00:17This video can only barely scratch the surface.
00:20I'll get you started by showing you how to get set up to create a new theme and
00:23then I'll show you some resources to learn the rest.
00:26We'll start with something called a base theme and I'll demonstrate what that is
00:30by going to Appearance.
00:31Drupal 7 includes a base theme called Stark.
00:34You see that down at the bottom in the Disabled Themes.
00:37I'll Enable it and set it as the default, just so that you can see what it is
00:40and you can see the changes that we make.
00:42However, it's going to be very different from the themes that you're used to.
00:46it has no styling information whatsoever.
00:48It's only a very basic theme that you then add your own styling to.
00:52So I click Enable and set default and then close that window and there it is.
00:59So what we're going to do now is we're going to go back to our desktop and
01:02duplicate that Stark theme and make our own based on it.
01:06We go to our Drupal installation, which we've called 2trees, and then we open
01:11up the themes folder.
01:13Now remember, you should never change anything outside of the sites folder in
01:16your Drupal installation.
01:18And we're not going to change anything here.
01:20All I'm going to do is make a copy of the Stark theme and put it here on my
01:24Desktop, then I'll change its name to the new theme's name.
01:28I'm going to call it twotrees.
01:33I'll then open that folder and make a few important changes.
01:36The first one is this .info file.
01:40This file is formatted especially so that Drupal can understand where all of the
01:43files are that make up the theme.
01:45And it has to have the same name as the folder that encloses it.
01:49So I'll call it twotrees, then I'll go and Edit that file in a text editor.
01:54Some of these lines were put in automatically by Drupal.org and I'm going to get
01:58rid of them, so they don't confuse anything.
02:00The first one is this first line here.
02:03I'll delete everything between the dollar signs and then the ones at the very
02:07end, these were added once again by the drupal.org packaging script.
02:11And you only need to keep this sort of thing in or deal with it if you plan to
02:15redistribute the theme, but for us, we're not going to, so I'll delete it.
02:19The other two things to change are the name and the description.
02:22For the name, I'll call it Two Trees and the description I'll just say, "This is
02:28based on stark," and save it and close it out. Great!
02:33We now have our theme it'll be exactly the same as the Stark theme, but we can
02:37start to edit it now without affecting the earlier Stark theme.
02:42To install it in our site, I'll do that manually by going back to my sites
02:46folder and then into all and themes, and then I just drag the folder in there.
02:52Now we go back to our site, go to Appearance, and scroll down.
02:58Way down at the bottom in Disabled Theme you see our Two Trees and it has our description.
03:03I'll say Enable and set default.
03:05And as I say, when I remove the administrative overlay, it will look exactly the
03:09same as the stark theme, because the only thing we've changed is the name, but
03:13now we can start adding styling information.
03:16To do that I go back to the theme itself.
03:18Once again, that's in 2trees > sites > all and themes, and then I can edit the
03:24files that are inside that twotrees folder.
03:27The first one I'll edit is once again the info file.
03:31Right now, it only refers to one CSS file, this layout.css.
03:35If I close out this window and take a look at that one, we see it's really
03:40very, very simple CSS.
03:42It only contains enough information to layout the page.
03:47I'm going to add my styling information to another file that's called local.css.
03:52I have to tell the .info file that it exists first.
03:55So I edit it and right here next to the stylesheet, I'll copy and paste and
04:01add local.css and save.
04:05Then I create a new file and add my CSS info.
04:08I'm going to do some very, very simple styling just so you can see the difference.
04:15So finally, I'll save this file in the same folder as local.css and Save.
04:21Now we close the window and go back to our site.
04:25I'll reload the theme cache by visiting the Appearance page.
04:28And now I'll go back to my front page and see if the changes have taken.
04:32And indeed they have.
04:34There is the text, green as we expected ,in the back in that CCC color as we expected.
04:39As you can see, you'll need to know CSS and that's a huge subject that I
04:44won't talk about here.
04:45Of course, lynda.com has several courses that will guide you through its intricacies.
04:49So check those out if you don't already know CSS well.
04:53So that takes care of the CSS part of a Drupal theme, but there are many other parts.
04:58You can see those by going back into your Drupal folder and taking a look in the
05:03themes folder at let's say the bartik theme.
05:06In there, there are template files, and color files, and many, many more CSS
05:11files than you've seen here.
05:14To edit the template files in particular, you really do need to know the PHP
05:18and Drupal standards.
05:20For the first, there are lynda.com courses and for the second the Drupal standards.
05:25The best place to go is the theming guide on Drupal.org.
05:29You get there by going to Drupal.org, clicking Documentation, and then scrolling
05:35down to the Theming Guide.
05:37Another place where you can find even more about the PHP standards is in the API
05:42as I mentioned before.
05:44That's simply at api.drupal.org, but once you're there, make sure you click on
05:49the correct version, in this case Drupal 7.
05:52Well, there is your overview, but before we leave, I want to make sure that our
05:55site is back the way it was.
05:57So I'll go back to 2trees, go up to my Appearance, and switch back to Bartik.
06:04I'll also disable the Two Trees theme and finally just to be completely safe
06:10I'll go in and throw it away from my sites' folder.
06:16So I think you can see that Drupal theming is much too big a subject to cover in a single video.
06:20That's why I recommend very highly Chris Charlton course, Drupal:
06:24Creating and Editing Custom Themes, which is also on lynda.com.
Collapse this transcript
12. Helping Users Find Their Way Around
Understanding Drupal default menus
00:00There are some things that have been right in front of our faces this whole
00:03course and yet we haven't mentioned them.
00:05I am talking about the menus.
00:07You will notice the main menu right here, which we have been adding tabs to and
00:10then we have this user menu up here.
00:12I am not talking about these two bars at the top, which are the toolbar and
00:15shortcut bar, but rather the things that are part of the main page that
00:19everybody who visits the site sees.
00:21When we added these links here, we never really questioned how this Home link
00:25got here or why these links would appear in this menu.
00:28When we switch to a user who is not logged in, this menu disappears.
00:32Let's talk about this a little bit.
00:34There are three areas in Drupal where you control menus.
00:37The first one is a listing of all menus on the site and I'll show you that
00:40by going back to my administrative interface, going up to Structure, and then clicking Menus.
00:46These four menus, Main, Management, Navigation and User, come with Drupal by default.
00:52The group of tabs that we saw up here, the one with the Home in i,t was the Main
00:56menu, whereas the User menu is the one that's up here in the right-hand corner.
01:00I will come back to the Management and Navigation menus in a minute.
01:03The second place where Drupal lets you control menus is in the blocks.
01:07All menus, whether these four or created by a module that you installed or
01:11created by you personally, comes with a block so that you can display that menu
01:15in any block region on the page.
01:17We can see that by going up to Structure and then Blocks and as we scroll down
01:22to the bottom of the page where the Disabled blocks are, we see Main menu and
01:26Management. The other two are actually already on the page, Navigation and User
01:30login, and you can see those when we go back to the main page.
01:34Just to demonstrate, I'm going to move these two into the right-hand column.
01:38Management to Sidebar second and Main menu to Sidebar second.
01:42Then I will scroll down to the bottom and click Save.
01:46And to demonstrate, I will close out this overlay and there it is, Management and
01:50Main menu right here, and then in the left-hand column we see Navigation.
01:54We don't see the User menu though. However when we switch back to the person
01:58who is not logged in, you don't see any of those menus but you do see this User login block.
02:03So like other blocks, these can be conditional based on whether someone is
02:06logged in or other criteria. Let's go back and just remove those.
02:10I'll go to Structure and Blocks, go into that right-hand column and move them
02:16back to None and Save.
02:22If you need a refresher on how these blocks work, see the video on taking
02:25advantage of block regions.
02:27So what about these Main menu and User menu areas? Why do those show up in these locations?
02:32Well that's a special setting in Drupal and you can see it by going up to
02:36Structure, Menus and Settings.
02:40These right here are known as the main links what we now have as the Main
02:43menu, and the thing up here in the corner where we have the User menu is known
02:47as secondary links.
02:48Drupal's designers set this up because this is such a standard in web sites
02:52today to have some place around the top of the screen where you can go to the
02:56main areas of the site and some place where you can handle your account.
03:00Since everybody is expecting them to be there, they have this special screen
03:03where you can additionally put those menus.
03:06Now I'll show you how to create a menu of your own.
03:08As you can see, our site is built around educating people about all olive oil,
03:12and of course selling it.
03:13I've added a few nodes of the product type, which you can see if we go up here
03:17to Content and filter based on type.
03:21These are for our lemon, basil, and garlic olive oil.
03:23I am going to open each of these nodes in their own tab by holding down Ctrl and
03:28clicking on their links.
03:31Reason for this is that I'm going to create a menu which shows all of our
03:34products in one place, and I want to just have the URLs here handy so I can
03:38copy them over quickly.
03:39They are node/21, 22, 23, and 24. Well, that makes it easy.
03:45Creating effective menus happens in three steps.
03:48First, we make the menu, which is really a container for links, then we add
03:52the links themselves.
03:53Finally we make it all visible by moving the block it creates into place.
03:57So first things first. Go to Structure and menus and add the menu.
04:01We will call this Products and Save.
04:05Now we add the links.
04:06The first one is for our Pure olive oil, and that's node 21, easy enough.
04:16And all we have to do is type node/21. We don't actually need the full URL,
04:20although we could put it in if we wanted. These links can go off-site as well as
04:24staying on your site.
04:26And I will just save.
04:27If you like you can look through the other settings but this is the quickest way to add a menu.
04:31Second one, lemon, which is 22, and then I'll just quickly do the other two. Great!
04:43So we now have a menu and we have the links in it.
04:45All we have to do now is make that visible.
04:48You remember it shows up in a block. So we go to Structure and Blocks and scroll
04:52down to the bottom and there we see our Products block.
04:55I will move that into the left column. You remember that's called Sidebar
04:58first and Save blocks.
05:02Go back to our screen, see how that looks.
05:04Let's pull down a little bit. Ah!
05:06These it is. You know what?
05:07I am going to try adding it to a different area. So I go up and edit the block
05:11again, Configure block, and let's move that into Triptych first just to see how it looks.
05:17Remember, styles will change when you move blocks from one region to another.
05:21Scroll down, see how that looks.
05:24I really like that.
05:25So we are all done.
05:26That covers the basics of menus but they do have some subtleties and I'll get
05:30into those in the next videos in this course.
Collapse this transcript
Creating multilevel menus
00:00We cover the basics of menus in the video about understanding Drupal's default menus.
00:05This video goes into one of the subtleties that isn't immediately obvious
00:08from Drupal's interface, namely multilevel menus or as they're sometimes
00:12called hierarchical menus.
00:15You already know what a hierarchical menu is from the Navigation menu, which you
00:18see in the left-hand column here.
00:20See this little arrow next to Feed aggregator? When we click that link it opens
00:25up and shows another level below it.
00:27That's what a multilevel menu is.
00:29Now I'll demonstrate how to set up such a menu.
00:32When we scroll down to the bottom of the page you see a menu that we
00:35created earlier, Products.
00:37However, it's all at one level. To change it I'll go up and I'll edit that menu
00:41by clicking on its little contextual menu link here.
00:44Go down to List links and we see all that we have.
00:47Now we could make this menu multilevel by simply dragging these things in and out.
00:51That's the basic mechanism of it.
00:53But that wouldn't make sense because garlic olive oil isn't a subcategory
00:57of basil olive oil.
00:58What I will do instead is I'll create a top-level link here, which will
01:02be called edible oils.
01:03The thing is, whenever you create a menu link you have to have a place where it goes.
01:07So first I'm going to create a page, which lists all of our edible oils.
01:11To do that I go up to Add content and Basic page.
01:15I already have the text in my exercise files so I'll go and get that and copy it over.
01:27If you're using the exercise files from lynda.com by the way, you might have to
01:30change some of these links if you've added any other nodes that weren't shown in
01:34this course, because the node numbers will be different. But for us I know that
01:38that's okay, and I want to have this page of its own URL alias.
01:42So I'll go down and do that, under URL path settings.
01:46You learned all about this in the section on creating and editing content. Then I click Save.
01:52Great! Now I have the page that I want.
01:56The next thing to do is to put it into the correct menu.
01:59I know that the page is at edible- oils, so all I have to do is add it to
02:03that menu down here.
02:04So I go down and choose List links, then add a link. I'll call this Edible oils
02:11and its path, and once again I say Save.
02:14But before I do, notice this Show as expanded check box.
02:18We haven't talked about this yet because it only comes into play when you're
02:21doing multilevel menus.
02:22I'll leave it off for now and then I'll turn it on and you can see the
02:25difference, but for now I just click Save.
02:28Now I can rearrange my links as I want.
02:30I'll put these all underneath Edible oils.
02:36And I think I'll move the Pure olive oil to the top and then I click
02:39Save configuration.
02:41Now let's see what that menu looks like. Scroll down to it and there it is.
02:45But the thing is we only see edible oils. The reason is that Show as expanded
02:50check box, which you remember we left unchecked.
02:52I'll go back and edit that menu by listing its links, edit that particular link
02:57for edible oils, and this time Show as expanded and Save. When we close it again,
03:04we go down to the bottom of the page and there it is.
03:07Now in this case it's not really showing as a hierarchical menu in the same way as it is up here.
03:12That's because of the region that it's in and remember when you move blocks
03:15from one region to another it changes their display.
03:18Let's move it into that left-hand column just to make sure it works the way we
03:21expect. We go to Configure block, move it into Sidebar first, and save it.
03:28Now when we scroll down, it looks the way that we expected.
03:32But you can go even further with hierarchical menus.
03:35You can make it so that when you come up here and point to that first link,
03:38Edible oils, it shows you all of the other links.
03:40I'll give you some demonstrations of that and show you how to do it in the next video.
Collapse this transcript
Creating easy-to-navigate books
00:00Way earlier in the enabling other content types section of this course,
00:04we enabled blogs, polls, forums and feeds.
00:07Each of those creates its own content type and each delivers information in
00:11its own unique way.
00:13Now we are going to add one more called books.
00:16Now the reason I didn't include this one in the earlier batch is because
00:18individual nodes of the book type are really very similar to basic pages and articles.
00:23The only difference is that they have features that make it easier for visitors
00:26to find their way around from one node to another.
00:29Books are navigational rather than functional.
00:32The best way to understand them is to take a look at a book and one place
00:35to find them is on drupal.org, where much of the documentation is actually in books.
00:41We click Documentation and then go to Understanding Drupal, which is a book on the site.
00:46The first thing that you notice is that there's a block over here, which lists
00:50all of the chapters in the book.
00:51Down here at the bottom, as you click through, you see what's in that
00:55particular chapter.
00:56Now since we are at the top level of this book, we see everything but if we
00:59were to go into Drupal concepts, we would only see the sections that are in
01:03that Drupal concepts area, and you see that I got here in the block on the right as well.
01:07We also have some navigational tools here, go to the previous chapter and the
01:12next chapter, or we could add a child page, that is, add another chapter that's
01:17below this one, or we could show the entire book in a printer friendly version.
01:22Now I have been using the words page and chapter interchangeably when I
01:26talk about Drupal books.
01:27And the best explanation for that is to take another look at how books are set up.
01:33This is another representation of the book we were just looking at.
01:37Understanding Drupal is the top level but it's a page just like any other one.
01:41Unlike a regular book which you would see in real life which has a cover, which
01:44is very different from a page, everything in a book in Drupal is a page and it in
01:50turn can contain other pages or it could end right there.
01:54Now let's get back to our own site and start setting up our own book.
01:57The first thing we need to do is to turn on the book module by clicking Modules,
02:02scrolling down to Book and enabling it, and then clicking Save configuration.
02:08That module makes two changes on your site.
02:11The first is if you go up to Content, you now notice a new tab called Books.
02:16Right now we haven't created any books so it's empty but we'll come back here
02:19in just a few minutes.
02:21The other change you will notice is if we go up to Add content as with other
02:24content types, we now have a new content type called Book page.
02:28I'll click that to start creating our book.
02:30The titles for pages in our book I already have in an exercise file.
02:34And the first one is going to be "How olive oil is made."
02:37So I just add that there and I will leave the body empty for all of these pages
02:42just for brevity's sake.
02:44As we scroll down, you see a new vertical tab, Show Book outline. I'll click that.
02:49That's how we control into which book we are going to put a page and also where
02:53in the book it's going to go.
02:55Since this is the top level one, we will say create a new book and then Save.
02:58Now if we go back to Content, as you might expect we have "How olive oil is made."
03:04That's our first page of the book or you could call it the cover. Let's keep going.
03:08We will Add content > Book page, go back to our exercise file and the first
03:12level is going to be Harvesting and cleaning.
03:14So I will paste that in.
03:17Scroll to the bottom. Show Book outline.
03:20Now in this case, I want it to be part of the book I already created, so I select that
03:24and once I do that I have a choice of which one of the pages in that book
03:28this should be a child of.
03:30You could think of it as a chapter. There is only one right now so it's going to
03:34be inside that chapter. And click Save.
03:36Since we have done that, we now have a little bit of a hierarchy.
03:40This is the second level down. If we click up, we go back up to the top level
03:44and see what's underneath it.
03:46Now there are other ways of adding pages into a book besides going to Add
03:49content, Book page, and all that.
03:51Once you're inside a book, you could say Add child page and in fact that's
03:55what I will do here.
03:56I go back to my exercise file and I see, oh yes, Releasing the oil is a child of
04:01How olive oil is made, so I go back, put that in, scroll to the bottom.
04:05And if I want to be sure, I just click Show Book outline and it's already set up, and then Save.
04:10I will just very quickly add the other pages in this book.
04:13You have to see the rest of the process.
04:16Now we are down to adding the last page and since we have already added a few
04:20others, I want to show you what the book looks like.
04:22So we have Bottling here.
04:24That's going to be the last page, and we show the book outline, you see that the
04:27Parent item dropdown menu is much more complex.
04:31In this case, we are going to make it at the top level, so I'll leave it there
04:34just below How olive oil is made, and save.
04:37There, now we have our complete book.
04:39Let's take a look at it by going up to Content and Books.
04:42In order to see the content of that book, you click Edit order and titles.
04:47And as I look through it I see that I really want this one be over here, so I
04:52can move it around just as in other screens in Drupal by dragging things on this page.
04:56And I also want Bottling to be at the end, so that it's more in order. Great!
05:00I'll then click Save book pages and we are done.
05:04So we've completed our book, but we don't have any way to see it really.
05:08We could add a link up here in the menu, but there's another way that we could
05:11also see our book, which is that the Book Module creates a block.
05:15To see it, go up to Structure and Blocks and then scroll down to your Disabled
05:20blocks at the bottom.
05:21There it is, Book navigation.
05:23I am going to move that into the right- hand column, which I know is Sidebar second.
05:27Scroll to the bottom, Save blocks, and let's see how that looks. There.
05:31Now in order to move around the Book, all we have to do is click on whatever
05:34link we want, and as usual it's multilevel and we could add child pages.
05:40The last thing I want to make sure is that everybody can actually access this page.
05:43To do that I'm going to switch over to my other user who isn't logged in yet
05:47and reload the page.
05:48Yup, and there it is.
05:50However you'll notice that ordinary users cannot add child pages since we
05:54haven't given them that permission.
05:55If you'd like to give them that permission refer to the managing users
05:58section of this course.
05:59Now I'll be honest, I've never been that hard on books.
06:03I find their structure is a little confusing because they're not completely
06:06analogous to real-life books.
06:07There is a tacit expectation that they have to have content on every page for
06:11example and visitors don't see the whole book structure at once.
06:15But books are good at two things.
06:17First, they help you break down large amounts of content into smaller pieces
06:21that can be moved around it well.
06:23Second, their navigational structure is easier to set up then, for example, menus.
06:28As long as you recognize their limitations and strengths, books are a great way
06:32for setting up certain kinds of content structures.
Collapse this transcript
13. Expanding a Site's Capabilities with Modules
Installing and uninstalling modules
00:00By this point in the course, we've visited the Module page many times to turn on
00:05and off some of Drupal's core features.
00:07Once again, to do that, you go up to Modules.
00:09You might have noticed a couple of links at the top of this page.
00:12First, this Install new module one, and then this link here to contributed
00:16modules to expand Drupal's functionality.
00:18They are little links but they lead to an enormous wealth of resources.
00:22This video shows you how to take advantage of that wealth.
00:25I won't talk much about configuring modules in this video.
00:28Instead, that'll be in the next video, which is titled configuring modules.
00:32But for now let's go and take a look at this contributed modules link.
00:35I'll Ctrl+Click it to open it in a new window, and there we are.
00:39It takes us to drupal.org/project/modules.
00:43You can also get there on the Drupal site by going to Download & Extend and
00:47then clicking Modules.
00:48Now the first thing you should do anytime you come to this page is to Filter by compatibility.
00:53Since we're using Drupal 7, we have to only look at Drupal 7 modules.
00:57None of the others will work.
00:58So we do that and say Search.
01:00Now we scroll down.
01:02In this case, they are sorted by Most installed, so the most popular
01:05modules float to the top.
01:06The one I'm going to look at is Views, and let's just take a quick look at
01:09how it's listed here.
01:10There is no place where you can download views from this listing.
01:14It just shows you the title, who wrote it, and in fact if you click there,
01:17you'll go to that person's user page on Drupal.org, some tags, and a link to
01:21bugs and feature requests.
01:23To learn more about the module and to download it, you can either click Find out more,
01:27or go up to the top and click the title of the module.
01:31On this page, you get additional information.
01:33First of all, you find out everybody who is taking care of this module.
01:37It's not listed in order of the most commits-- and the one with the most commits
01:40is usually the one who is the most involved.
01:42To see all of them, just click View all committers and then on that page you
01:46can sort by number of commits.
01:48We see, once again, merlinofchaos.
01:50The person listed is the author is also the one who has done the most commits,
01:54and who made the first commit 5 years ago.
01:57But let's get back to Views by clicking up here.
02:01As we scroll down, we see a lot more information and this is all free-form.
02:04It's up to the person who created the module.
02:07Sometimes it'll say dependencies.
02:09That is, other modules you have to download in order to make this one work.
02:12Sometimes it'll say how you can get involved, specific bugs to watch out for,
02:16and things like that.
02:17So we'll just scroll all the way down to the bottom of the screen where we can
02:20download the module itself.
02:21Now remember, we need one that worked with Drupal 7 and our only option here
02:25is this dev version.
02:26So I click on Download and that brings it to my local computer.
02:30I'll then switch to my download location, which for me is on the Desktop. Yup!
02:34There it is.
02:35I'll close out that Download window.
02:38Now we go back to our site and then we click Install new module.
02:42There are two ways of doing this.
02:43One is by simply copying the URL that you saw on that page.
02:47But since I downloaded it, I'll click Browse, then go to my download location,
02:52find the file, and open it, and finally, Install. Terrific!
02:56It worked. And then to enable it, we go back to our Modules page by clicking here.
03:01Now, after you've started building a site, you'll see that this page gets very, very busy.
03:05One thing I like to do to make it easier to find what's there is I close up
03:09this CORE modules thing, since I know it's not going to be installed there, and
03:13there it is, Views.
03:14However, now it's telling me it requires another module, Ctools.
03:18So I'll go back to Drupal.org, search for it, and there it is.
03:23I then go through the same procedure here.
03:26Find the version I want, download it, go back to my site, and install it.
03:39Now when I go back to my administration pages to enable the module, scroll down
03:43and see if it's there.
03:45Now I can click the box.
03:47When I do so, it'll automatically turn on whatever is needed in that other
03:50module I downloaded called Chaos tools.
03:53It gives me a warning and I say sure, turn it on.
03:55So, we've installed Views and the other module that it requires and they're
03:59both ready to be configured.
04:01I'd like to back up a bit and talk about something I sort of glossed over.
04:04That is, how to decide which modules to download in the first place.
04:09Well, as I mentioned, they must have a Drupal 7 version.
04:12You can find that out by going back to the Modules page at
04:14drupal.org/project/modules.
04:15Then once you're there, Filter by compatibility.
04:22Then there are several ways of finding modules that actually respond to your needs.
04:27One way is by a simple search.
04:28Let's say that I need some sort of mapping module.
04:30I might do a search for map and indeed at the top is Map module.
04:35There are several problems with this approach however.
04:37One is that the top result might not be the best one for what you want to do.
04:42Another is that by searching, you're going to get a whole lot of results.
04:46In this case, we got over 16,000 results.
04:49The good news is that you can filter it down further by clicking Modules.
04:52Even so, we have over 200.
04:55But then of course, you can filter even further by the compatibility to Drupal 7.
04:59If we go back to our Modules page and once again we can do that in a few
05:02different ways, one of them through Download & Extend and then Modules, we see
05:06that we have this Modules category dropdown.
05:09As you can imagine, that's very useful because we can select not only a
05:12category, but also compatibility.
05:14Let's see for example what sort of games there are available for Drupal 7 already.
05:18Hmm, only seven, still not bad.
05:21Another way to find modules is actually not on the Drupal.org site itself.
05:26It's on a completely different site called drupalmodules.com.
05:29Here you'll find not only links to the modules themselves, but also reviews and
05:34ratings and things like that.
05:36It's a place for people to go to talk outside of official channels about which
05:39modules are the best.
05:41The final way to find out which modules are best for you is to ask around.
05:44For help with that, see the videos on getting help with Drupal issues and
05:48joining the Drupal community.
05:49I also talk about some of the more successful modules in the video on
05:52surveying popular modules.
05:54Now as you know, I like to clean up things when I'm done with the video.
05:57That's the last thing I'm going to show you here, how to uninstall modules.
06:01Usually, all you have to do is turn it off.
06:03Again, you go to Modules, scroll down to the modules you want to turn off, and uncheck them.
06:08But here you'll see a complication. Because this module has some dependencies,
06:13you have to go through the screen more than once.
06:15So Save Configuration and then I do it again, because by un-checking that one box,
06:19I can now uncheck other boxes.
06:22In this case, I have to do it three times, because there are so many layers of
06:25complexity, and once more.
06:28I believe that un-checks everything in both of those new modules.
06:32Then to clean up the database, check out the Uninstall tab.
06:36Not every module uses the Uninstall tab, but in this case I see that Views,
06:41Views UI, and Chaos tools all do.
06:44As before, you might have to go through the screen more than once.
06:47So I click on Uninstall, then uninstall Views.
06:53Finally, I can uninstall Chaos tools.
06:55The modules are now completely removed from your site, but they're still in your folder.
07:00So if you want to get rid of them completely, just go into your folder by going
07:03to sites/all/modules and dragging them to the Trash.
07:08If you're like me, you're going to want to try out everything on that
07:11Modules page on Drupal.org.
07:13That's okay. How else would you know what's useful?
07:15Of course, you should do that experimentation on a practice site, not one that's
07:19live or that has important data.
07:21But don't be afraid.
07:23As long as you're safe, the worst that can happen is that you lose a few minutes
07:26while you delete and reinstall Drupal.
07:28Finally, I should mention that you'll have to update your modules from time to
07:31time to keep them secure and bug free.
07:33To learn how to do that, see the video on updating Drupal.
Collapse this transcript
Configuring modules
00:00After you have selected, installed, and enabled a module, you are still not
00:04completely clear to use it.
00:06Some modules require configuration, although the amount needed varies from none
00:10at all to as much as a half-hour or more.
00:13In this video, I'll show you a few different configuration scenarios using the
00:17following three modules:
00:18Token, Pathauto and Views.
00:21If you would like to follow along, you will have to download and install those
00:23modules yourself from the URLs you see on your screen.
00:26I've already downloaded them and enabled them.
00:29If you need any help doing that, see the video on finding and
00:32installing modules.
00:33We will start with the Token module. To go to it, of course you click Modules,
00:38and then we will close up CORE, so we can see just the ones we added. And there it is.
00:42We see this little Help next to it.
00:44I click it and it tells us a little bit more about the module itself.
00:47Another place to get help is to look at the module itself.
00:51In our case, we will go into our Drupal installation to sites/all/modules
00:56and then into token.
00:58What I'm looking for is a README file, although there might be other such
01:01as installation.txt.
01:03That really doesn't give us very much information.
01:06So we will switch to another place where we might find a little bit more
01:09information about what this module does and how to set it up.
01:11I will open up a new tab and go to drupal.org/project, to its project page,
01:18which I happen to know is at token.
01:21As I scroll down here, oh, good there's a documentation page, and that gives me
01:26actually quite a bit more information.
01:28After hacking our way through this, I found out the Token actually doesn't
01:31require any configuration at all.
01:33It's just ready to use.
01:34So that's the easiest case.
01:37Now let's get a little bit more complex with the Pathauto module.
01:40I have already installed and enabled it, as you can see under Modules and then
01:44scrolling down to the bottom where we see Pathauto.
01:47As before there's a Help page.
01:49Let's see what that gives us.
01:50It gives us a little bit of information but not very much.
01:52So let's take another look at the project page.
01:55That's drupal.org/project/pathauto.
02:00And here again, we have a little bit more documentation.
02:03Let's go back to our site and see if we can't get some more help.
02:05I am going back to the Modules page and scrolling down. Ah!
02:10I noticed that next to Pathauto there is a Configure link.
02:13So I click that and that actually takes me to all of the configuration options
02:17that I have available, and there are quite a few.
02:20But at least we can reach them easily and now we know exactly what we have to change.
02:25Finally, I'm going to attack the Views module. This is Drupal 7's most popular
02:29downloadable module and a whole ecosystem of other modules is grown up around it.
02:34I will talk a lot more about it in the section on displaying information with views.
02:38Despite being such an amazing module, it's fairly complicated to set up and the
02:42help info is among the hardest to access of any module I know.
02:45We will start once again by going to the Modules page.
02:48I will scroll down and see if there is anything down here that'll help me.
02:52Nope, no help links at all.
02:53Okay, let's try the project page.
02:56I will just go back to drupal.org/project /views and as I scroll down, let's see.
03:03Is there a documentation? Yup!
03:04There's a documentation page. Ooo!
03:06It's an awful lot of stuff and it starts out with this ARCHIVE, which suggests
03:10to me that it's not going to be current and in fact if I look down here,
03:13it's not good for Drupal 7.
03:15So that's not very much help.
03:16So once again, we can take a look at the README file.
03:19I go back to my installation, open it up, go to sites/all/modules and views,
03:28and indeed there is a README file but that's it.
03:31It really doesn't tell me very much.
03:33So I will close it out.
03:34There is one last resource I can show you.
03:36It's a page that's kind of hidden in Drupal 7 but it's sometimes a lot of help.
03:40It lists the configuration pages by module.
03:43And to go to it, let's go back to our site then scroll up to the top of the
03:47screen and click Administration here in the breadcrumb trail. Then click Index.
03:52Let's see if we have anything here for views.
03:54I am actually going to search for views. Nope!
03:57We can only configure the permissions.
03:59Well, I told you it was hard.
04:00As it turns out, after you slash your way through all of the documentation
04:04on the drupal.org web site, Views and Settings are in Structure and there they are.
04:09By the way, when I run up against a wall like this, the two places I usually
04:12check are in Structure and Configuration.
04:15That's sort of the catch-all places for configuration for modules that you add to Drupal.
04:19As you can see, there is no standard way to configure modules and few standards
04:23about where to learn how.
04:25I didn't even show you the most complicated ones.
04:27You will see one that's particularly tough in the video on enabling styled text
04:30with the WYSIWYG editor.
04:32But honestly, even the hardest ones, they are not so bad. Except for programming
04:36related modules, which require custom code in which I never touch,
04:40it's rare that I have to spend more than 10 or 15 minutes with a module. By then,
04:44I have a good sense of what it is and how I can get it running.
Collapse this transcript
Surveying popular modules
00:00Now that you know how to install and configure modules downloaded from
00:03Drupal.org, you might be wondering what some of them do.
00:06Obviously, it's impossible to run through the thousands available on Drupal.org,
00:11including the hundreds available for Drupal 7.
00:13But here are the very top ones.
00:16Once again, the Modules page is at drupal.org/projects/modules.
00:20And when you go there, you'll notice that by default they are sorted by popularity.
00:25CCK, Views, Token, and so on.
00:28These are the most popular modules.
00:30Here in fact is a list of the top ten. The order might be slightly different by
00:34the time you're seeing this and in fact I noticed a change since I first wrote
00:37this slide, but basically it stays the same.
00:40Now this is the popularity for all versions of Drupal, and of course, most
00:43people are still using Drupal 6 at the time that I am making this movie.
00:47I expect that to change however because many of these modules were actually
00:51incorporated into Drupal 7.
00:53The Content Construction Kit became the Field System, and then all of
00:56those other things,
00:57File Field, ImageAPI and so forth, became part of the image system.
01:01So that leaves the other five.
01:03I won't talk much about views in this video because I go into it at much
01:06greater depth in a few videos later in this course in the displaying
01:09information with View section.
01:11That brings us to the Token module, which actually works well together with
01:14the Pathauto module.
01:15So I will demonstrate both of those together.
01:17To do that, we will go back to our site and click Add content and then just add a Basic page.
01:23Now I want to mention that I've already uploaded and enabled these modules but
01:27incidentally you won't find them in your exercise files.
01:30That's because by the time you see this video, they're going to have new
01:33versions anyway, so there's not much point in giving you obsolete software.
01:37So if you want to follow along, just go ahead and download them from drupal.org
01:40at the URLs you saw earlier in this video.
01:43Anyway, back here. We will create a Title. We will say, This is a test.
01:47It doesn't really matter what we put in the body but as we go down here we see
01:50Show URL path settings.
01:52I click that and there is what Pathauto does.
01:56We don't have to type in a URL alias to get something other than node, slash whatever.
02:00If I click Save here, you notice that the node is already /content/test and
02:06that's based on the title.
02:07If I change the title to "This is a test page which I love," scroll down and
02:13save, indeed the URL changes.
02:16So that's Pathauto.
02:17But where does Token show up in this?
02:19It shows up when you want to configure Pathauto.
02:22I will get there the easy way by clicking Edit on this node, scroll down again
02:27to that tab, take a look there, and then Ctrl+Click to open a window with
02:31these URL alias patterns.
02:34This is the configuration screen for Pathauto.
02:37And you see this node:title.
02:40That's what token does.
02:42If you come down here to REPLACEMENT PATTERNS you see all of the things
02:45that token provides.
02:47It lets you type in a simple little bit of text and then replaces that with
02:50what it actually means.
02:52And there are quite a few other modules that use Token besides Pathauto.
02:55You can learn more about them on Token's project page on drupal.org.
02:59Let's move on to the next one,
03:00the Administration menu.
03:02To understand it, let's look at Drupal's toolbar first.
03:05I will scroll up and close this out just to keep our screen clean and to
03:08delete this node. Great.
03:12The toolbar, as you know, gives you links, which will take you to different
03:15administration areas in your Drupal site.
03:18But it's only at one level.
03:19So you have to click Configuration and then go down to Account settings and
03:22possibly go two or three levels deeper.
03:24What Administration menu does is it replaces the toolbar with something that's
03:28hierarchical and I'll show you how that works.
03:30First, we go up to Modules and we turn it on.
03:33The reason I didn't turn it on is because it conflicts with the toolbar.
03:37So first I'll turn the toolbar off, just scrolling down and uncheck Toolbar,
03:41then I scroll down further and turn on Administration menu.
03:45Scroll all the way down and Save configuration.
03:50Now I'll close out my overlay here.
03:53And now we see the Administration menu.
03:56It's a lot smaller so it doesn't take up as much space on your screen and as I
04:00said before, it's hierarchical like this.
04:03I will just go back and change it back to the way it was.
04:07Once again, I simply turned on Toolbar and turn off the Administration menu,
04:13Save configuration, and possibly redraw the screen once or twice to make sure
04:17that it takes and there we go.
04:21Finally, we come to the Date module.
04:24It makes your Drupal site understand dates, which is actually a really
04:27complicated thing because it has to take into account leap years and daylight
04:30savings time and multi-day events and regional differences and format. Lots and lots of stuff.
04:35It's most immediate and obvious interface to you as an administrator is when you
04:39add fields to a content type.
04:41So to do that, I go up to Structure and Content types and then I will add a temporary one.
04:47I will just call it temporary and Save.
04:52Go down and Manage fields.
04:54I will add a new field and we'll call it Birthday.
04:59Then when I click on the type, we notice we also have Date, Datestamp and Datetime.
05:05I will just leave it on Date and we have many different choices of how to show that date.
05:10I will say with a custom pop-up calendar. Move that up to the top and Save.
05:16It gives us several options of how to configure that as usual.
05:20Save field settings. I will just leave it on its defaults, good.
05:24Now we have our new temporary content type with that new field.
05:27If I add content, go down to temporary and there we see our date with a pop-up
05:33calendar, very handy.
05:35And as usual I'll go back and I will delete that field and that content type by
05:39going to Structure, Content types, Manage fields and then delete Birthday.
05:48Finally, I will delete the content type itself.
05:53I know that was a whirlwind tour and I wish I have the time to keep going
05:56through some of these top modules because a lot of them are really amazing.
06:01Fortunately, the rest of the Drupal community provides commentary on them, both
06:04on drupal.org and on their own individual web sites.
06:09Here are a few places to check out if you want to learn more about modules and
06:13how to compare them.
Collapse this transcript
Enabling styled text with a WYSIWYG editor
00:00Now that we know how to work with modules, I'm going to show you how to install a
00:03WYSIWYG editor that lets you style text visually.
00:07Now that word WYSIWYG is an acronym.
00:09It describes what it does.
00:11It stands for What You See Is What You Get.
00:14This course is almost entirely about Drupal as you get it from drupal.org
00:17without adding any modules.
00:19But I wanted to include a video about this one for two reasons.
00:23First, the lack of a WYSIWYG editor is a huge shortcoming in Drupal that a lot of
00:27site designers want to fix.
00:29Second installing a WYSIWYG tool is pretty complicated, so doing it gives me an
00:33opportunity to help you get used to installing complex tools.
00:37I've already installed the WYSIWYG module, which you can get at
00:40drupal.org/project/wysiwyg.
00:43If you need any help installing it see the video on finding and installing
00:47modules, but to turn it on we just go up to Modules, close the CORE group and
00:53there it is, a simple check box, and Save configuration.
00:57Once we've done that we see the Configure link, which we'll click to go
01:00its configuration page.
01:02Now the WYSIWYG module doesn't actually give your site WYSIWYG abilities,
01:06Instead it connects Drupal to any of several projects that do and you can see a
01:11list of these as you go down. There are quite a few.
01:14There are lots of discussions on drupal.org and elsewhere about which is the
01:18best, but for simplicity's sake I'm just going to go with the first one in the list, CKEditor.
01:23I found it to be just fine for my purposes.
01:26So to get it I'll open up links in two tabs, first this one and this one, and I do
01:31that by holding down the Ctrl key while I click.
01:36One screen gives me more information about the project generally and the other
01:40one gives me a download link. I'll go ahead and download it to my Desktop.
01:47Once it's downloaded, go to your download location. You'll have to
01:51uncompress this file.
01:52If you're on Windows and you don't have 7-Zip or some other decompression
01:55utility you'll need to get one.
01:57See the video about using the exercise files for a little more information about that.
02:02Now that it's downloaded, I'll double-click it and extract it.
02:10So I have the CKEditor itself and I have the WYSIWYG module loaded into my
02:14Drupal site, but how do I put the two together?
02:17For that I go back to my site and look at the instructions on that page, so we
02:21click there and it tells us exactly where to put it.
02:25It should be put in sites /all/libraries/ckeditor.
02:29So once again back to my installation, go into sites/all. Oh, there is no folder
02:36librarie.s I actually have to create that.
02:41Libraries, and then I'll drop this into libraries.
02:47Go back and make sure that's what it told me.
02:49So the actual library is found at libraries/ckeditor/ckeditor.js.
02:53Make sure one more time. sites/all/ libraries/ckeditor and there it is, terrific!
03:03Now when I go back to my site and reload the page, I actually have controls so I
03:09can make that WYSIWYG editor show up where I want.
03:12However I could go on and install other visual editors.
03:15You'll notice that those earlier instructions are under this link here, showing
03:21that CKEditor is in fact installed, but that the others aren't.
03:24Back up to our controls. We're ready to rock and roll.
03:27I'm going to make it appear on filtered HTML and then click Save.
03:31So now when we've installed the module and we've installed the CKEditor and
03:36we've made it so the CKEditor is applied to all filtered HTML.
03:39The last thing we have to do is tell it what commands to make available to all
03:44people who have access to that text format.
03:46So I go to Edit and down to Buttons and Plugins.
03:49There is a huge number of buttons available.
03:52I'm only going to say that I want people to be able to bold and italicize text.
03:57So I'll check those, go down to the bottom and Save. Incidentally these other
04:01settings are enormously complex, I'm afraid I won't be able to go in to them in this video.
04:06But you could of course explore them on your own. Click Save.
04:10So what does that actually give us? Basically wherever someone has an
04:13opportunity to enter content using the filtered HTML format they now get a
04:17toolbar, much like you see in a word processing document.
04:20I'll show you that by creating some content.
04:22I go up to Add content and Article.
04:27And since this is Filtered HTML, we see our Bold and Italic tab. "This is great."
04:34And if I select some text then say Bold, there it is, just as we expect.
04:37I'm going to remove this module before continuing with the course but certainly
04:41you could continue by making the rich text appear in other text formats.
04:45That brings me to a recommendation that you limit use of the editor to specific roles.
04:50Unfortunately the WYSIWYG module doesn't have its own permissions. If you click
04:54People and PERMISSIONS, you won't find it anywhere on this page.
04:59So the way to limit who uses this rich text editor is to create a new text
05:03format as you learned how to do in the video on using text formats to prevent
05:06damaging content. Then you limit access to that text format to the roles that
05:11you want to be able to use it.
Collapse this transcript
14. Displaying Information with Views
Understanding views
00:00When I created lynda.com's Drupal 6 Essential Training course, the number one
00:04thing people in the Drupal community ask me was, did you cover Views?
00:08You see Views is the number one module out there.
00:11Many Drupal sites simply couldn't function without it.
00:14And in fact, it's installed on about two-thirds of all Drupal sites, according
00:17to this statistics.
00:18But Views is a huge subject.
00:20So I split it off into a separate course, Drupal 6: Online Presentation of Data,
00:25and that's still current in available on lynda.com.
00:27Although, its title is Drupal 6, you can still use it with Drupal 7.
00:31With all this going on with Views, I think it needs at least an introduction
00:35here because chances are good that you too will be using it.
00:38This video gives you the conceptual foundation to understand Views and then the
00:42next to, we will show you the basics of implementing them.
00:45I have already installed Views, which you can get at drupal.org/project/views.
00:48I have also installed a module it depends on which is called Chaos tools at
00:54drupal.org/project/ctools.
00:56Finally, I have installed an optional supporting module called Advanced Help,
01:00which is at drupal.org/project/advanced_help.
01:05If you're having trouble installing any of these modules, see the video on
01:08finding and installing modules.
01:10First we have to enable them.
01:12To do so, go up to Modules and then scroll to the bottom or more quickly just
01:16close the Core group and go down to views.
01:19You will need Views and Views UI.
01:22You will also want to have Advanced Help.
01:24Now, when I click Save Configuration that's automatically going to turn on the
01:27part of Chaos tools that I need.
01:28So I save configuration, yup, I will turn that on and Continue.
01:32We are now ready to use Views.
01:35To configure it go up to Structure and then Views.
01:39This page shows a number of views already installed but they're all actually disabled.
01:43These were created to show you some of the examples of how Views can be used and
01:47also to replace some of Drupal's core functionality.
01:50If you wanted to use any of these, for example to change the front page, you
01:54would click Enable over here and then start editing it.
01:57The advantage of using a view for the front page or a taxonomy term or any other
02:01thing like that is that you could then modify it, which you couldn't do with the
02:04default ones that come with Drupal Core.
02:06Now, let me take a step back to explain exactly what a view is.
02:11In essence, it's a way of drawing information from your Drupal site and then
02:15displaying it in a way that you specify.
02:17Consider a sample node.
02:19This one looks a little bit like our Product content type that we created
02:22earlier in the course.
02:24It contains certain fields but you will notice that that last one, Author,
02:28actually connects to a different kind of entity, the user, so that author
02:32implies a whole bunch of other information, and in fact if you click through on
02:36an Author link, you will get that information.
02:39When you set up a view, you're able to pull together a whole lot of different
02:43information from all kinds of entities.
02:45In this example here, I am pulling the Author photo from that user entity and
02:49then I pulled the Title from the node entity itself.
02:52I could then also count up the number of comments and that's pulling from a
02:55whole different part of Drupal.
02:56So you can see that you can collect information with views in interesting ways.
03:00We've already seen some, let's call them pseudo-views that are built into Drupal.
03:06The most obvious example is on the front page.
03:09Here we have a node and that's up at the top that is sticky and then we have nodes of
03:13different content types, this one is a poll, this one is blog post and as we go
03:17down there are articles and so forth.
03:20When we click one of the blog links, this is also kind of a pseudo-view.
03:24As you added more blog posts,
03:25This page would automatically show them.
03:28The main features of views are that first as I said, it dynamically collects
03:32information from entities and that word dynamically is important.
03:36As that user Maria Ann added a blog post, it would simply put that blog post on the page.
03:41She wouldn't have to explicitly say oh, by the way I put another blog post up.
03:45The second feature of views is that it sorts the information.
03:48So on the front page for example, it shows the most recent post first.
03:52Again, the front page isn't actually a view but it works very much like one.
03:56The third feature of views is that it displays whatever specific fields you want to show.
04:02It doesn't have to show the entire node.
04:03It could show just the title for example.
04:06Fourth, Views can display that information in a number of different formats.
04:10So it could be collected on a page as we have seen or could it be put in a
04:13block or an RSS Feed.
04:16By comparison, consider a page we created a few videos back, where we collected
04:20all of the edible oils into one page.
04:23This is just an ordinary node and if we click Edit, we see that we manually had
04:28to type in what nodes these were in.
04:30That's a real pain because we would have to update this page every time our
04:33fictional olive oil company added a new product.
04:36What we'll do in the next two videos is we are going to set up a view that
04:39automatically updates this page along with an associated block whenever we add
04:44or remove a product.
Collapse this transcript
Creating views
00:00You might remember that in an earlier video we set up a page of links to all the
00:04products that our fictional olive oil company sells.
00:07If you've been following along, it's at /edible-oils or you could get there by
00:12going down to this link here and clicking Edible Oils.
00:15The problem with this page is that it's just a node and we have to update it
00:19manually every time we add a product.
00:22By the end of this video we'll have set up a view that automatically displays
00:25and updates this page.
00:27But first we have to understand our data.
00:29I'll go up to Content and then filter so that we only see our products, and I
00:35see that we have four of them already.
00:36I'll click on one of them and then Edit, just so we could see the structure.
00:41Okay, so there's a Title, there is an SKU and a Price.
00:44Those are two custom fields we added.
00:46Product description where the body would usually go and a photo.
00:49Okay, good, so we have an idea what we're talking about.
00:52Now let's create our view.
00:54To do so, go up to Structure and then down to Views and then Add new view.
01:01We'll call this Products and the View description doesn't really matter.
01:04It's only in the administrative user interface.
01:07I'll say "Products that we sell."
01:10The View tag field is so that you can categorize your views.
01:13After you've been doing this for a while and have dozens of use, that helps you
01:16keep them clear and straight and organized.
01:19We are going to be collecting information from nodes so we'll leave it on Node.
01:22That's usually what you'll have, and click Next.
01:26Now we are at the place where we can edit our view.
01:28We are going to take this in three steps.
01:30First, we'll filter things so we only see the nodes we want. Then we'll decide
01:35which Fields we want to display and we'll display that as a list.
01:39In this case, it will just be the title from each node.
01:41Then finally we'll change the Displays up here to show both a page and a block
01:46with that information. Are you ready?
01:48Let's go.
01:49First we filter, so we click Plus next to Filters and go down here.
01:55Now this is a huge list of things that you have a choice of. So I am going to
01:58make it a little bit smaller by going only to the Node group.
02:01Again, we won't be able to go into very many details of views here, just the very basics.
02:06The thing that we're looking for is all nodes that are of a certain type,
02:09that is, the Product type, and that have been Published. Then we click Add.
02:14Once we do that, we can change some options with each of those.
02:17We want it to be all those that, yes have been published so Update, and it
02:21should be of the Product type and Update.
02:24So now we are selecting the right nodes but we immediately get an error because
02:28this display is asking us what fields do we want to show.
02:31Well, that's our second step.
02:32Go up to Fields and Plus.
02:35And again, I am going to show only the Node group and I want us to show the
02:40Title and click Add.
02:45Once again, there are many options here. The only thing that we are going to be
02:49doing is making sure that it Links to its node and click Update.
02:53We are actually there already.
02:54We have a list of all the products on our site, as you can see down here in the preview.
02:59The last part of this is to create Displays.
03:02We want it to show in a page of its own, and why not? We'll also have it
03:05replaced the block that we created earlier.
03:07To do that, we go back up here and we start adding displays.
03:11I am going to add a page, and then change some of the settings that are specific to pages.
03:16For one thing we need to know what path it's going to go to.
03:18So I'll say it should go to all- products. Scroll down and Update.
03:25Then I'll also add a block.
03:27Add that display, and once again I am going to give it the administrative name
03:32"All products" and Update and Save.
03:37And we are actually done now.
03:39Let's take a look at those two, the page that we created and also the view that
03:43we created, and compare what they look like.
03:45I am going to create a new window here and go back to our site 2trees.
03:51From there, I'll open up a tab with the page.
03:54Now remember, this is a node. We would have to update this ourselves.
03:58Then I'll also go back and I'll display the page that we created.
04:02Once again, if we scroll down we see, it's all-products.
04:05Easy enough, 2trees/all-products.
04:11So here's the page and here's the view.
04:14Similar, but not quite there. I am going to just touch it up a little bit.
04:18First, I want to remove the word title from here. Second I want up with the
04:22phrase Our edible oils at the top.
04:24Okay, so here we go.
04:26We can edit that view either by going back to the screen or we could close it
04:30out and use the little contextual menu we see here.
04:33Click it and go to Edit view.
04:36We'll change that title so the word Title doesn't show up next to it and Update.
04:42I am going to say Update default display, which means that it will update not
04:46only the page but also the block and anything else that relies on the defaults
04:50that we set up at first, and then click Save.
04:54Almost there. The last thing is the title, which is Our edible oils. Go back and edit it.
05:01And I'll put on a header.
05:02That's going to be a Text area, and click Add and it will be Our edible oils.
05:11Then I'll click Update default display and Save.
05:18It's not quite there, but it's a lot better and the most important thing is as
05:23we add new products they will simply show up in this list.
05:27I can prove that by adding a product.
05:29I'll go up to Add content and Product and then I'll go to my exercise files
05:34where I already have this text selected. Here is my title.
06:01And save it.
06:02Now as we go back and take a look at all of our products, our view shows five
06:10items whereas our page, since of course it's just a Node, only shows the four. Pretty cool, huh?
06:17It should be immediately obvious, what a boon this is for any data driven site.
06:21And we didn't really do much to create that view.
06:23I'll show you some ways to enhance it in the next video, "Modifying views."
Collapse this transcript
Modifying views
00:00In the video on creating views, we set up a view that displays a simple list of
00:04all published nodes of the product type.
00:07Basically, it's a catalog of everything that our Olive Oil Company sells.
00:10We've then established a page to display the results and we put it at all-products.
00:16This page mimics one that we created manually earlier, which you see by clicking
00:20Edible oils here. I'll Ctrl+Click it so we can compare the two.
00:24So here's our view and here's the thing we're trying to get it to look like.
00:27All right, let's go back and make a few small modifications and then we will
00:31actually bring it beyond that, so it's even more functional.
00:35In order to edit that view, I will Ctrl+Click on Structure.
00:39That way we can edit the view, come back and look at it, and then compare it to our original.
00:44Once you are on Structure, click Views.
00:47And then next to the Products view, click Edit. So, here we go.
00:52The first thing that I noticed between this, our original, and this, our view, is
00:56the size of this header here.
00:58So we go into the view, and the way that I did that was with this header.
01:03Actually in views it's done with this Title link.
01:06And the reason that I did this is to show you that you really have to play with
01:09views to understand the subtle differences.
01:11There is no way that you could understand that a header was different from a
01:14title until you actually went in and played with them.
01:17Okay, no problem. I will go in and I'll get rid of this global header by
01:21removing it, then I will go up to title, as long as I'm here, I will actually
01:26change it to All our products and Update and save it and then I'll reload over
01:33here to see how that looks. Great!
01:36The next thing I notice is that this has done as a list, whereas this is just
01:40simple text without any kind of bullet points.
01:43That's easy enough to change.
01:45You will find that in the Style Settings.
01:47Right now, it's unformatted but I will change it to HTML List and Update.
01:52Leave all of these options as they are.
01:55Update again and save.
01:58Once again, I'll reload it. Great!
02:01Now it looks pretty much the same except of course our list here, shown as a
02:05view, will continually update as we add products.
02:07Well, let's talk about that menu that we created down here.
02:11You might remember that we manually added each one of these things into a menu.
02:16I'm going to go down now and delete that entire menu by going to Edit menu and Delete.
02:23Now when you do this, it warns you that it's going to delete the links but
02:26that's okay. We are going to replace all of this with our view.
02:29So I say Delete and indeed when we close our administrative overlay we see
02:34it's completely gone.
02:35Now, those nodes are still there, all of these as well as the main one, this
02:39edible oils one we created to be our menu.
02:41We can get rid of that later but for now we can just close this whole thing out
02:45and deal only with our view.
02:48Now in a previous video, we created a block that goes down in there.
02:51The way we did that was simply saying, change this to Block and Add display.
02:56So to make it display, we will go up to Structure, to Blocks, and then scroll
03:02down and see where it is.
03:03Blocks as usual start out in the Disabled area and there it is, All products.
03:08Change that to Sidebar first, which is the same place the other one was and Save Blocks.
03:14Let's see how that looks.
03:15As we scroll down, there it is and it looks pretty good.
03:19You know, I don't even think we have to make any changes there.
03:22But I will make one change that shows up on our page.
03:25I am going to make it so the block stays as it is, but the page displays
03:29slightly differently and gives us more information.
03:32To do that, I go back to our view and this time I'm going to override these defaults.
03:37I do that by going to our page, clicking on Fields and then say yes, I
03:42actually want to Override.
03:44This is going to make the page diverge from any other displays we've set up.
03:48We then say Update.
03:49You will notice that it's overridden because instead of being in italics, which
03:53means it's the same as the default.
03:55It's now just in ordinary type.
03:57Now we can add another field and I'm going to just add the price. Scroll down a
04:01bit and you will find that in Field price and Add.
04:05And I will say Price as its label. Update and save.
04:13Now if we go back to our page, let's take a look.
04:15Looks good. We have our block down here and our page, which has
04:18additional information.
04:19The last thing I'm going to do is I am going to change the format of this page.
04:24Go to Edit view Products. Go once again to our page and override the style setting.
04:30Instead of showing it as an HTML List, I will override that, Update, and go back
04:37up and turn it into a Table and Update.
04:43We have several options, which I will leave as they are, and Update.
04:46Finally, we will save this entire thing.
04:50Go back to our page and see how that looks. Oh!
04:53I really like this.
04:54We now have all of our products down here in a block and that shows on every page.
04:58If we go to the Contact Page, there it is, and then if we go back Home, there it is,
05:05but we also have that page, All products.
05:08The last thing I'll do is I will go up and edit the view and add a link to that page.
05:13To do that, I go to the Page settings, add a menu, it will be a Normal menu
05:18entry, Our products, and I'll put that in the Main menu and Update. Save and we are done.
05:28You can see how much you can do with views just from this little bit.
05:32I know I just ran through a lot of that very quickly, but I wanted you to get a
05:36sense of what's possible with views and I think you can see just how much is.
05:40Besides the default styles some contributed modules make it possible to create
05:44charts and calendars and even maps using views.
05:48And the best part is they stay in sync with your content automatically.
05:52You never have to maintain redundant information like we did before.
05:56If you want a lot more information about views, check out my lynda.com course Drupal 6:
06:01Online Presentation of Data.
06:03Although it was created with an older version of Drupal, nearly all of it is
06:06still valid with only very minor interface changes.
Collapse this transcript
15. Administering Drupal
Launching a Drupal site
00:00Now we get to one of the hardest things in Drupal: actually launching the site.
00:05Up until now, we've done all of our development on local computers.
00:08But now we have to move all this to a Web server that's connected to the Internet.
00:12Unfortunately, there are literally dozens, if not hundreds of differences among Web hosts.
00:17I'll just show you how to get online using the most common basic system, an FTP program.
00:22This might not work for you on a step-by -step basis, but I'm hoping you'll get
00:26some tips from it that you can use.
00:28By necessity, I'll have to go through some parts quickly and without much detail.
00:32When you run into problems, contact your web hosting provider.
00:35They'll be able to explain the quark specific to their system.
00:38I've already set up a hosting environment on webenabled.net, one of many hosting providers.
00:44My address, as you can see here, is 2trees.dev3.webenabled.net.
00:50I'll connect to it using an SFTP program.
00:53The one that I'll use here is available for both Mac and Windows and
00:56it's called FileZilla.
00:57You can get it from filezilla-project.org.
01:00I've already connected to the site using FileZilla.
01:05Now as you know, Drupal is a combination of files and a database and then you
01:10have to connect the two.
01:11I'll move the files first.
01:13But before we do that, we have to keep in mind that the Acquia Drupal
01:16Stack Installer we were using on our local computer is set up for a
01:19multi-site installation.
01:21So we're going to have to change some things because the host we're using is
01:24going to expect only one site.
01:26So the first thing I do is I go back to my Drupal installations, which
01:29I've called 2trees.
01:31I open that up and then my sites folder.
01:34In here, I see all, which is where I store my modules and themes.
01:38Those are things that go for all sites.
01:40There is also a default folder, which we haven't really used throughout this course.
01:45Then there is 2trees, which is what the Acquia Drupal Stack Installer knows to
01:49look for, because our site is called 2trees.
01:52However, this folder's name has to be specific to where it's hosted.
01:56So I'm going to change that.
01:58In this case, it becomes 2trees.dev3.webenabled.net.
02:04As you know, that's the domain that we're using.
02:07We'll have to make further changes, but for now, let's go back to our server.
02:11When I logged in, it took us to this area, which is the top level of our user account.
02:16What we're looking for is the place where web files are stored.
02:19In this case, that's the folder called public_html.
02:23Again, this is going to vary from host to host, but this is a common one, public_html.
02:29I go inside it and I see this 2trees folder.
02:32When I open it up, we see what we actually get right now if we go to that site.
02:37In fact, if I click that link, all that we have is a simple page with the graphic on it.
02:42I can prove that that's where we're going by deleting this page.
02:49Then let's revisit it and make sure that we're actually in the right place.
02:52Reload and indeed that change what we see. So far so good.
02:58Now we're ready to move over all of our files.
03:01I'll go back to the Desktop and this is the folder I'm going to move.
03:04It's going to be my folder called 2trees replacing this folder called 2trees.
03:09There are several ways of doing this.
03:11In this case, what I'll do is I'll delete this one and then I'll drag it in.
03:16While that's uploading, and it's going to take a long while,
03:20let's move the database over.
03:22Again, this is a step that varies tremendously from host to host.
03:25Fortunately, this host, WebEnabled, offers the same graphical interface, PHP
03:30Admin, as we've been using.
03:31It works a little differently though as you'll see.
03:33In this case, we'll go back and we'll login to phpMyAdmin right here.
03:39That redirects us to another screen where I enter my username and password and Go.
03:45The biggest difference between this phpMyAdmin screen and the one you're used to
03:49is there is no Import tab.
03:51We're going to have to create the database first and then move over the one
03:54that we have on our local computer.
03:57So I'll do that and again I'll call it 2trees and Create. Good!
04:02So we've created it.
04:03Now we just have to move over all of the parts of our old database.
04:07To make this clear, we couldn't import a whole database.
04:10Instead, we have to create the database, and then into that database we can
04:14import what we want.
04:15So now there is an Import tab here.
04:17I click it, then click Browse, and find the file that I want, and there it is.
04:24Click Open and then Go.
04:27This process may take a few minutes.
04:30If it works correctly, you'll see a notice at the top saying that it's
04:33successful and we were.
04:35Now all our pieces are on the remote host, but we're not quite done yet.
04:39You see different environments vary in how they connect the files to the database.
04:43Those settings are in a file called settings.php, which is inside our site folder.
04:48We can change it on the server if we want or on our own source folder on our local machine.
04:52I'm going to do it locally, and then upload it using SFTP.
04:55I just find it easier to use the local programs like Notepad++.
05:00To edit it, I'll go back to my Drupal installation on the local computer, go
05:04into sites, and here is that folder we renamed, and in there is our settings.php file.
05:09For safety, I'm going to copy it and paste it, just so that I have a backup,
05:14and then I'll just move that to the Desktop.
05:16Drupal lock some of these files for safety, so you might have to unlock this to
05:19edit it and then lock it again.
05:21The way you do that depends on your operating system.
05:24I'll just make sure on Windows by going in here to Properties. Nope!
05:28I'd already turned off Read-only, which is sometimes turned on. So I am OK.
05:33Now I'll go in and edit it with Notepad.
05:36The settings that we want are typically down here under Database settings if
05:40you're using an AMP stack such as MAMP or WAMP.
05:44In fact, this is where it would usually be, around line 181.
05:48However, Acquia DAMP does some things a little differently.
05:51One of them being it puts all of it stuff at the end.
05:54So we go down there to edit it and here you see all of the specifications for
05:58connecting to the database.
05:59This is what we'll have to change.
06:01The first thing I'll do is I'll comment out the base_url. That has to do with
06:06multi-site installations, which we don't have.
06:09Then I'll change the username in the database to what it is on the host.
06:13In this case, it's w_2trees.
06:14I also have to change the password.
06:18In this case, I just made it Drupal.
06:21If you remember from our WebEnabled screen, WebEnabled actually uses a different
06:25port number, and you can see that down here, 4926.
06:27So I'll have to change that as well.
06:32Again, this is specific to my host.
06:34Your own web host may be different.
06:36So I'll save that, go back to my Desktop, and make sure to lock it again for safety.
06:45Now we're ready to move that over and our site should run just fine.
06:48I'll go back into FileZilla, find the same file on the server, and replace
06:53the one that's there.
06:56First, I'll delete the old one and then load in the new one. All right!
07:02Now we cross our fingers and hope.
07:04Let's test and see if it actually works.
07:07I'll go to my site and click the URL, 2trees.dev3.webwnabled.net. It works, amazing!
07:15So to recap, moving your site to the server is essentially a three-step process.
07:20First, you move the files.
07:22Second, you move the database and third, you edit settings.php so it connects the two.
07:28But the devil is in the details, and again there is no way we can cover the
07:32many variations here.
07:34If you're not able to work it out, your best bet is to contact your web host provider.
07:38Good luck to you!
Collapse this transcript
Troubleshooting a Drupal installation
00:00For this video we're going to go way back to before we installed Drupal to
00:04check out some of the problems you might run into along the way.
00:07Of course, this isn't the complete list. The world contains an infinite quantity
00:11of wrong, but it touches on the most common problems.
00:15The first batch of problems are related to the Acquia Drupal Stack Installer.
00:19I've already downloaded it from acquia.com/downloads.
00:21and I've grabbed a fresh copy of core Drupal from drupal.org called new site.
00:27I also have an import site for a problem I'll show you in just a minute.
00:31But let's say I want to import that new site and create a new database for it.
00:36We go up to local host, say More and Import, find the path, there it is, newsite,
00:44and create a new database, which we'll call new site.
00:48But let's say that we leave the server at local host, which is very common.
00:52Click Import. Oops, we can't do it.
00:55The reason for that is that Acquia Drupal reserves that name for itself.
00:59It goes with the first site that was installed when it installs the control panel.
01:04You can't change it and you can't delete it, but that's okay.
01:06Just choose a different name.
01:09Now let's move on to a problem that comes up a lot when you try to import a site
01:12within existing database, as you would normally do if you were moving a site
01:15from one place to another.
01:17I'm going to use a database that's in the exercise files.
01:21It's called import.sql and the site I'll use is importsite.
01:26Once again, we go back here and we click Import.
01:31We browse and find importsite.
01:33There are the files.
01:34We're going to use a database, and there it is, import.sql.
01:43Open that up. The new database name will be import and the server will be import.
01:47Now that should work fine. Let's see.
01:49Click Import. So far so good.
01:52Well, it looks like it worked.
01:53Let's go to the site and see by clicking Go to.
01:57Oh no, we don't see our site.
01:59Instead it's asking us to install it again.
02:02The problem here is in the database file, and you can see that by going back and
02:06opening it up in a text editor.
02:08I'll highlight it and open it up.
02:11You see the database name that it's expecting is 2trees.
02:15The names have to match between what's in the database itself and the name that
02:19you give to the stack installer.
02:21So to change this, I was simply change all of these to import and then it should work.
02:26I save that file and close it. So I've made the changes and now I have to
02:34make the import again.
02:35So, I'll remove this one by clicking Delete. Yes, I really do want to delete it.
02:40And then go back and try again.
02:42Once again, go to importsite.
02:44I'm using an existing database.
02:49I go ahead and find it.
02:54That's called import.
02:56The site is called import and do it again.
03:00Now let's see. And it works.
03:03In this case I was using just the database without the files, which is why the
03:07site looks a little strange, but you can see that all of the information is
03:10there, so the database did work as expected.
03:13Finally, let's talk about another database problem that crops up when your
03:17site starts to get big.
03:18For this one I'm going to use a file called really big databases and it's about 11 MB.
03:23In this case I actually won't try to import it through the Acquia DAMP.
03:26Instead I'm going to go straight to phpMyAdmin, but it's actually the same
03:30error that you get in both cases.
03:33To go there, I go to my DAMP and click Manage my database, and then I'll try to
03:37import it, browse to it, and click Open, and as usual, Go. Oops!
03:47We got an error. We tried to upload too large a file.
03:50If we go back to that tab, we see the problem.
03:53We have a maximum of 8 MB.
03:56So you ask what can you do.
03:57Well, you have three options.
03:59One is to compress the file.
04:01That would work here, since it's only 11 MB and we would shrink down to maybe
04:04about two or three, but that doesn't always work.
04:07What if you have one that's 100 megabytes?
04:09You could also use something called big dump, which you can search for online.
04:13It's a PHP program.
04:14It's a little difficult to use, but it works well, or you can increase the PHP limit.
04:20To do that go back to your Acquia Drupal control panel, go to Settings and
04:26Config, then go to PHP, and click Edit.
04:30The thing that you're looking for is post_max_size, and I'll just do a search
04:34for it, and as you see, there it is says 8 MB.
04:37What you would have to do is, change that to something bigger, let's say 64 MB
04:42to be sure, then restart the AMP Stack and you'd be golden.
04:45Now I'm really glad that I have a chance to make this video because this answers
04:49a lot of questions I had while I was learning Drupal. But the real answer for
04:53any of these problems is to make sure you regularly backup your site and then
04:57make a special backup, before you make any substantial changes to it.
05:01Furthermore, you should test your backups by restoring from them once in a while.
05:05A backup you can't use is no better than no backup at all.
05:08Next, I'll show you how to backup and restore your site, so you can do just that.
Collapse this transcript
Backing up and restoring a Drupal site
00:00The tasks you'll learn in this video are the most important you'll learn in the
00:03entire course: backing up and then restoring from backup.
00:08The truth is though you already know how to do this through a few different ways.
00:12If you watch the "Launching a Drupal site" video or the "Using the exercise files"
00:17video, you can already piece together exactly how to backup and migrate your
00:21site as well as restore from backup.
00:24But I want to show you another system that I have only recently started using
00:27myself and I think it's really good and well worth knowing because it
00:30simplifies the whole process.
00:32It's a module called backup and migrate.
00:35You can find it at drupal. org/project/backup_migrate.
00:39I'll download and install it.
00:44I copy the URL in a usual way.
00:46Go to Modules and Install.
00:49If you need any help doing this of course go back in the course to the area
00:52about extending Drupal, then I just click Install, and I enable it.
00:58Roll down to the bottom or it's a simple check box and Save configuration, and
01:04I'll just go back to my front page for cleanliness.
01:06Now the controls that it introduces are under structure and there it is,
01:11Backup and Migrate.
01:13Before I can use it however I have to specify where the backups are going to go
01:17if I'm going to back up to the server.
01:18I won't go into too much detail here but essentially Backup and Migrate works in
01:23two ways. You can backup files to your local computer or right on the server and
01:28then you can restore from files that are on the server.
01:30The reason you need that in a private file system path is to keep those files safe.
01:35That is, they'll be in a place where the general population can't get to
01:39it through your site.
01:40This module has many different options for backing up, restoring, and where you
01:45want everything to go and you could set a profile so you can have one kind of
01:48backup that happens once a week, once that happens every day, and so forth.
01:52You can also specify a backup style just as a one-off, something that you do just
01:56one time, by clicking Advanced Backup.
01:59But for us I'm just going to stick to our defaults and say Backup now.
02:02It offers to save a file, I say Yes, and then I go to my download location and there it is.
02:08Now it's very important to notice that Backup and Migrate only backs up your database.
02:14It doesn't back up your files as well. So what I would recommend you do is
02:17take your entire Drupal installation and compress it and save it together with that database.
02:22On Windows I would right-click and say Send to > Compressed. There is a
02:26similar command on the Mac.
02:28Now when you do your backups make sure that you keep them in good order.
02:32I'm going to just create a backup folder here, I'll call it backups, and the way I
02:36like to do it, this is a style matter mind you, not a Drupal matter,
02:39I create a new folder with the date, go to New and Folder, and I give it today's
02:44date, 2010 December 08, and I put both of those files in there.
02:50The reason that I do that is so that it'll sort properly when I have it sorted by name.
02:54It will always be the earliest one at the top and the latest one at the bottom.
02:59When I want to restore, all I have to do is go back to my site and click Restore,
03:03then browse for that file and import it.
03:08Incidentally you'll notice that it's tagged already with the date as well as the time,
03:12very handy if you want to do several backups a day.
03:15Open and Restore now, and we're done.
03:19I wish I had time to show all the things that Backup and Migrate will do, but
03:23your best bet is to just try it a few times including the restore and don't
03:27forget to back up the files as well.
03:29I have to say I'm really pleased with the Backup and Migrate module.
03:32When I made my first Drupal course for lynda.com, Drupal 6 Essential Training,
03:37there really weren't any solutions that were quite as elegant.
03:39But this one I've actually taken on myself because it's so good.
Collapse this transcript
Updating Drupal
00:00Your Drupal site is like a living beast.
00:03The software that runs it occasionally needs to be tended, so that you can fix bugs,
00:07protect against newly discovered security holes, and to add features.
00:11You already know how to keep content fresh.
00:13this video shows you how to keep Drupal fresh.
00:16There are two kinds of update.
00:17One is the themes and modules and the other is the Drupal itself.
00:21I will start with the hard one, which is updating Drupal itself, and I will do it
00:24only on my local machine, but of course, you should adapt these procedures to
00:28update Drupal on a server.
00:30The first question is how do you find out that your site needs to be updated?
00:33Well, if you've been clicking around for a while, eventually you'll come across
00:37a warning like this one. It's a security update and it will give you some
00:40links where you can go to see what those updates are.
00:42So I'll click that link, Available updates, and it tells me that I have a module
00:46here that needs to be updated and the core.
00:49As I say, I will start with the core.
00:51INSTALLED VERSION is right here. beta3. A-ha!
00:54And the release candidate 1 is out.
00:55I would better go and get that.
00:57To manually update Drupal, you have to download a new copy.
01:01So I will go to drupal.org/project/druple.
01:05Then I find the version that I want, the most recent one will be up near the top,
01:08and I download it.
01:11Then I go to my Desktop, which happens to be my download location.
01:15You uncompress that file in the usual way, in my case I'm using 7-Zip File
01:19Manager, and then you can throw away the file that you downloaded.
01:29So this is the new Drupal, and this is the old one, but we can't simply replace
01:34one with the other, because remember we have certain files in the old one that
01:37will need to carry over.
01:39That's easy enough. All of those files are found in the sites folder.
01:43So what you do is you throw away the sites folder that's in the new Drupal and
01:47you move over the sites folder from the old one.
01:50I will do it by copying and then pasting here.
01:55The last thing we have to do is we have to rename this folder so it has the
01:59same one as the old site.
02:00So I will just call this one olddrupal-BAD, and then rename the new one to olddrupal.
02:07Okay, now we are ready to go back to our site and reload this page. Good.
02:14The warning that we have to update Drupal has disappeared.
02:16We are not done though.
02:18Every time you do an update of any kind to Drupal, you have to run a program
02:23called update.php, and you do that by going to your domain, deleting everything
02:28at the end of it, and typing update.php.
02:31There are other ways to do it, but that's the direct way, and I'll show you the
02:34other way in just a minute.
02:36It gives you some instructions about backing up your database and your code and so forth.
02:40We are going to skip those for now, but absolutely read these and follow the instructions.
02:45When you're done, click Continue.
02:46You will be told how many updates there are and you can take a look at exactly
02:50what's being updated if you like, but we'll just go ahead and apply them.
02:54The procedure usually only takes a few seconds and if everything worked out fine,
02:58this is the screen you will get.
02:59Let's go to our Front page and then go to Reports and Status report.
03:04That will confirm that we have the latest version of Drupal, and in fact, there it is.
03:09We can check again by running a program manually clicking here, where it
03:13says Check manually. Good, it checked.
03:16Now as I go down the screen, I notice that that module is still out of date.
03:20Let's click again on available updates, and there it is, Token.
03:24Now we are going to get into updating a module. It's much easier.
03:28All that you have to do is check and say Download these updates and then Continue.
03:32Now while Drupal is going through this procedure, it's going to take your site
03:36off-line, but only for a moment.
03:38Again, you are warned to backup your site, but we'll just say go ahead. And we are done.
03:44Now remember how we ran update.php earlier.
03:47This time we get a handy link to do it.
03:49So we click, go through the same procedure, and we are done.
03:54Once again, I go to my front page and them to the Reports and the Status report.
03:59Make sure that everything is good.
04:01Check it one more time. Everything is green and we're golden.
04:07Now the truth is, in our examples, everything worked swimmingly and that's
04:12usually the case, but that's not always the way it happens.
04:15So be absolutely sure you backup before doing these updates and if you have
04:19any troubles, you will find tips that'll help you in the "Troubleshooting of
04:22Drupal installation" video.
Collapse this transcript
Deleting Drupal
00:00When I'm developing a site I find that I'll try several ideas before settling on
00:04one that I want to complete and I tend to delete all the ideas as I go, just to
00:08give myself a clean slate.
00:10There are other reasons to learn how to delete sites of course.
00:12For example to be sure that you've left no sensitive data online.
00:16I've backed up our site and will restore it once this video is done.
00:19If you've done any work you want to save, you should do the same using techniques
00:22you learned in the video about backing up a Drupal site.
00:25Now as you know, Drupal is a collection of files paired together with a database.
00:30You're going to have to delete both, the files and the database. I will show you
00:33how to do that very quickly in DAMP.
00:36You simply go down to your sites here to More, click the site you want to
00:39delete, and click Delete.
00:41I am not going to do it here because I want to show you another way as well.
00:44There is one thing to know about this. If you do it through the DAMP you are
00:48only deleting your database unless you have your site files located together in
00:53the default location, which for me is never the case.
00:56So in addition to deleting it here, I would have to go back to my location where
01:00I have the site, in this case the Desktop, and throw that away.
01:03But I'd rather show you a manual way of deleting the database because it works
01:06in other AMP stacks as well, such as MAMP and WAMP and also on remote servers.
01:11The only thing that you have to have is phpMyAdmin running.
01:15To launch it we'll go to Manage my database in DAMP.
01:18Then we click the Databases tab. We find the one we want to delete, in this case
01:222trees, and check this little x box down here.
01:25Now you're going to get a scary warning and it should be scary, because this is
01:30all of the information in your site. Not only the content, but also all the
01:35settings and users everything. The only thing you'd have left is the files.
01:39But in this case we really do want to destroy it, so we say Yes.
01:43It takes a moment and then it's done.
01:46Now it's just a matter of deleting the files.
01:49I go back to my Desktop where I have the files, simply drag them into the Trash,
01:53and empty if it I like.
01:55On a remote server, the process is essentially the same, although your web host
01:59might not give you the access you need to directly delete files or the database.
02:03If you have any problems along those lines contact the System Administrator.
02:07Now I don't think I need to point out that this is an absolutely
02:11irreversible procedure.
02:12Once it's gone, it's gone, so be sure you make backups if you think you'll ever need them.
02:17On the other hand, remember that deleting the site doesn't delete your backups.
02:22So if you're deleting your site to hide any sensitive information it contains,
02:25such as the database's password in the settings PHP file you'll also have to
02:30secure your backups.
Collapse this transcript
16. Going Further with Drupal
Monitoring performance
00:00How many web sites from 1995 are still alive?
00:03Probably not many. Just those that have been watched and tended over the years.
00:08That's where monitoring comes in.
00:10I'll show you three ways to monitor your Drupal site.
00:13First, Drupal itself provide some tools.
00:16Second, the AMP stack that runs Drupal keeps logs in a raw but complete form.
00:21Third there are ways to browse the site to quickly catch common problems.
00:26First, let's look at some of the monitoring tools that Drupal provides.
00:29You will find these under the Reports button up here.
00:31I will just very quickly go through these.
00:33The status report you've already seen in the video about updating Drupal.
00:38If anything is wrong here, you will see it show up with a yellow or red background,
00:41instead of this green background.
00:45Available updates is where you go if you find that there is a problem in your
00:48status report, and it will show whatever modules, themes, or if Drupal itself
00:52needs to be updated.
00:55Recent log messages shows everything that's happened on your site that's notable.
00:59It doesn't show every time somebody accesses a page. Just things like searches
01:04and if there are any errors or warnings.
01:07You can filter this page further by clicking this link here, FILTER LOG MESSAGES.
01:11For example, let's just see all of the errors that came up. A-ha!
01:14So that tells us we are having a database problem and then you would go to your
01:18system administrator and figure out what it is.
01:21Going back up to Reports, the next one is Field list.
01:25This tells you all of the fields that are being used in your entire site.
01:28Now I found this to be important because sometimes I'll go back and I'll delete
01:32a content type that contains a field.
01:34But in doing so, I haven't deleted the field. So if I later go back and try to
01:38use the same field name, I'm told nope, sorry, it already exists.
01:41So before I delete a content type, I'll often come in here, see if the field is
01:45being used there, and delete it there.
01:48The next two are very similar, Top 'access denied' and Top 'page not found' errors,
01:53and they're exactly what you think that be.
01:54Access denied tells you if anybody's tried to get to a page that they didn't
01:58have permission to, and in this case, there is only one page I believe, as an
02:01anonymous user I tried to go to the Contact page when I hadn't given that person permission.
02:07Finally we have Top search phrases, which again is exactly what you think it would be.
02:11A-ha! And I see here more people have searched for California than anything else on my site.
02:16I find this page unusually valuable for marketing reasons, because it gives
02:20me an insight into what people actually want to get out of my sight.
02:23So that's what Drupal itself will tell you.
02:25Next up, let's take a look at the logs that are kept by your AMP stack.
02:29To do that, we will switch back to Acquia DAMP.
02:32The location of where these logs are is going to vary depending on which AMP
02:36stack you use and how the system administrators have set up the server.
02:39Fortunately for us, the Acquia DAMP Stake Installer that we've been using, puts
02:43the logs in a very easy to find place.
02:46We just go down to Settings and up to Logs.
02:50Then you click any of these view links to see that log.
02:53So let's take a look at the Apache log, for example, and there it is.
02:57Again, you don't have to understand this, because that leads me to my next point.
03:00There are actually some tools that will interpret this for you.
03:04A popular one for Apache is called Analog and you could find that it analog.cx.
03:10Finally, there are several ways to spot trouble when touring your site through a browser.
03:14I talked about some of these in an article I wrote for my blog, called 5 TESTS
03:20TO STOP YOUR DRUPAL SITE'S SILENT DEATH.
03:22Here's a summary of tips from that article.
03:25First, view your site as an anonymous user.
03:28Otherwise you won't know if some content or important features are missing
03:32from their experience. Second,
03:34sign up for your own site using a disposable e-mail address.
03:38You want people to be able to get on to your site easily and you're never sure
03:42about that until you try it yourself.
03:44Third and fourth, check links and check images.
03:48This should be obvious. Just tour the site once in a while and click on all the links.
03:51Fifth, be sure that you back up and restore frequently.
03:55As I have said before, a backup that doesn't work is no better than no backup at all.
04:00Here are some more tips, which didn't make it into the article.
04:04First, actually read any e-mail notifications that your site sends you.
04:08Along the same lines, check the site configuration to make sure that the e-mail
04:12address that it has, both there in the configuration and in user 1, the super user,
04:17is correct and current.
04:19Secondly, go to your own contact page and send yourself some mail.
04:23The e-mail sending capabilities of one of my sites actually went down once and I
04:26had no way of knowing it.
04:28That's what spurred me to write the article by the way.
04:30Finally, look through the user list, look through the content list, and look
04:33through the comment list once in a while.
04:36Sometimes you'll see a user whose name is obviously fake.
04:39You know such and such Viagra or a string of what's obviously random letters.
04:43Those users are often produced by automated programs and then they'll go back
04:46and they'll create nodes and comments and your site will be full of spam.
04:50Another possibility, and one that I use on my own sites, is Google Analytics.
04:55Google Analytics keeps track and produces very readable reports on what's
04:59happening on your site.
05:00Now that means sending some of your site data to Google so be sure to read its
05:04privacy policys if you are concerned about such things.
05:07It works quite well with the Google Analytics Module for Drupal as well, which
05:10is at drupal.org/project/google_analytics.
05:16But really, whatever tools you use are secondary to your vigilance and most
05:20Drupal sites don't really require much.
05:22Just be sure to tour your site once in a while and you'll be well ahead of the game.
Collapse this transcript
Improving administration skills
00:01This video is really a catch-all of tricks that I picked up from administering
00:04Drupal since version 5.
00:06It's by no means exhaustive and it reflects my own personal way of doing things.
00:11First, let's talk about how the public sees your site, the so-called user experience.
00:16Now I have said before that you should browse the site as users of all different roles,
00:20especially as an anonymous user, and here I am looking at the site as an
00:23anonymous user by switching to a different browser.
00:26But along the same lines, sit some friends down in front of your site and ask
00:30them to look around and then watch what they do. Things that seemed obvious to
00:34you might be completely invisible to them.
00:36For example, if I were to sit somebody else down in front of my own site here,
00:39they might say, well what is this site about?
00:42Why are there no graphics here?
00:44What exactly does this mean down here, Feed aggregator?
00:47It's just as important to remove information that doesn't contribute to your
00:50site as to add it and sitting somebody down in front of it who has never seen
00:54it before will help you do that.
00:56So that's the user experience.
00:58Let's talk a little bit about the administrator experience.
01:01Now here is something that I used to do a lot more with Drupal 6 before we had
01:04the toolbar up here.
01:05I didn't like the way the links were set up, so instead of clicking to
01:09administer things, I would tend to just go up to the address bar and
01:13type in URLs to administer.
01:15One thing that's sort of strange about Drupal 7 is now when you click a button,
01:18you get the overlay and so the URL is much longer, but you could still
01:22go to that page which is admin/people by typing in admin/people, and if you're
01:28the sort of person who prefers to type instead of click buttons, you might find this faster.
01:32Another advantage of this is that the more you do it, the more your browser will
01:36keep track of what pages you've been on.
01:39So for example, now if I just go back to admin, I see all of these pages and
01:43the ones that I use most show up at the top.
01:46So I would just hit Ctrl+L or Command+L on the Mac, go to admin, and then scroll
01:51down until I find the one that I want.
01:53You might find it faster. Maybe not but give it a try.
01:56The one thing about this method is of course it gets rid of the overlay, which
02:00if you want you will just have to click the buttons.
02:03Another way to get around quickly is to use the shortcut bar.
02:06Now we talked about this in the video earlier on about using the shortcut bar,
02:10but I didn't really show its application.
02:11Let me give you an example. Let's say that I want to set up a shortcut bar for a
02:15community administrator and I know that that person is mostly going to be
02:18working with people, they're going to be managing the user accounts, they are
02:22going to be changing roles and permissions, and that sort of thing.
02:25Well, it's easy I just go People, add one, go to PERMISSIONS, add another link,
02:33go to Roles, add another link, and there we are. We now have some very easy to
02:39access links here for my community manager.
02:42Once again the video you want to watch to learn how to do that is "Using the shortcut bar."
02:46Along the same lines, some people find the dashboard to be a handy center for
02:50administrative tools.
02:52If you want to learn more about that, see the video on customizing the Dashboard.
02:56Now those are just a few very small tricks.
03:00As always, the best place to get a broader perspective is in the Drupal community
03:04where thousands of people use Drupal every day.
03:08Believe me, if there's a faster or easier way to do something in Drupal,
03:11they'll discover it.
03:12Find out your resources for interacting with them in the video about joining
03:16the Drupal community.
Collapse this transcript
Reviewing security and permissions
00:00Drupal has a good reputation for security and it deserves it.
00:04Now, every piece of complex software has security issues, but the thing about
00:08Drupal is that it has an especially large and well-organized team to respond
00:12quickly when new problems appear.
00:14And it has well-established systems to help people like you and me fix them.
00:18This video reviews what those systems are and gives you additional tips to
00:22ensure that your site is safe.
00:24Now I mentioned that security team. Their home on the web is at
00:28drupal.org/security-team.
00:31The advisories that they release are at drupal.org/security.
00:36Notice that this is for Drupal Core.
00:38If you want to keep track of any security advisories for Ccntributed projects,
00:41that is modules or themes, just click there and then Public service
00:45announcements is for less critical matters.
00:48You could come back to the web site to read these or if you would prefer to
00:51receive them in an RSS feed, each one of these pages has that available.
00:56And of course, you would subscribe to that in your mail program or any other way
00:59that you watch RSS feeds.
01:02But let's say that you're not subscribed to that feed or you forget to read it.
01:05You will still find out about security issues in a couple of ways.
01:09One way that you'll be notified is by e-mail and you'll notice that when you
01:12first install your site.
01:14Now here I am on the last screen before finishing, where I put in the site name
01:18and username and so forth. At the bottom of that page we have this e-mail
01:22notifications check box.
01:25If you leave this box checked, and it is checked by default, you'll receive an
01:29e-mail message whenever there's an important security announcement about Drupal.
01:33That message by the way will be sent to the super user's address.
01:36So make sure that you enter that correctly when you set up your site.
01:40The other way that you'll automatically find out about security issues is
01:43in your site itself.
01:44So let's go back to our site.
01:46Now, I've installed an older version of a certain module.
01:49And so Drupal has to tell me, hey, wait a second, the newer version is out.
01:52I will notice that when I start going to administrative pages, like when I click
01:56Modules and here it is. I see the warning saying, hey, there's a newer version.
02:01And then I click Available updates as it suggests and I can update that module if I like.
02:06To learn how to do that and how to update Drupal itself, see the video "Updating Drupal."
02:12Okay. So your site is running the latest versions of Drupal and the
02:16contributed modules and themes.
02:18Let's talk about a few things you can do to avoid other kinds of security holes.
02:22The first one is to restrict registration. The control for that is under
02:26Configuration and Account Settings.
02:29As we scroll down, we see that you have a setting that allows only you to give
02:33people accounts or that requires your approval when someone applies for one.
02:37We discussed these settings in the video on creating user accounts.
02:41Next, check users' roles and permissions from time to time to see if anybody is
02:46tried to get in who shouldn't.
02:48So let's go up to People and just look down our list.
02:51Ah, you see that name?
02:53That doesn't look right to me, so I might want to take a look and see what the
02:56e-mail address is or any other notices.
02:58Yeah, that looks obviously fake to me.
03:01So what I might do is I might send a note to that person saying, Hey, I see you
03:04joined my site, could you tell me a bit about yourself" and see if I get anything back.
03:08And if not, I might decide to delete it or not. It's up to you.
03:12Along with individual users of course, you should take another look and make
03:16sure that everybody has the role that you really want them to have and that each
03:19of those roles has the permissions you want them to have.
03:23Now, the thing about restricting registration is that it can turn people
03:27off from your site.
03:28So I would like to suggest a module that can be set up automatically to increase
03:32access when people prove themselves trustworthy.
03:35It's called User Points and you'll find it at drupal.org/project/userpoints.
03:41It's a little complicated to set up and decide how to promote people from role
03:45to role, but once you have it set up, it's really valuable.
03:48But let's get back to one more way to make your site more secure.
03:52The last one is to avoid the full HTML and PHP text formats.
03:57I demonstrated their dangers in an earlier video on using text formats to
04:01prevent damaging content.
04:02In short, anyone who can create content that has those text formats can inject
04:08unwanted content that's beyond your control and might even be able to take over
04:12your site completely.
04:13We can see that by going to Add content and let's just say Article.
04:18This is the point of danger. If they can enter PHP code or full HTML, then
04:23you might be in trouble and the way to fix that is under Configuration > Text formats.
04:28Each one of these can be restricted by role, as you see here.
04:33That's a fairly brief overview of ways to stay on top of