IntroductionWelcome| 00:04 | Hi, I am Tom Geller, and this is
Drupal 7 Essential Training.
| | 00:08 | Version 7 makes Drupal even easier,
with better content handling, expanded user
| | 00:13 | management, an improved administrative
interface, and a new installer that gets
| | 00:18 | you up and running faster than ever.
| | 00:21 | This course starts you off at the very
beginning, and guides you through to a
| | 00:25 | completed and launched site.
| | 00:27 | I'll start off by helping you
decide whether Drupal is right for you.
| | 00:30 | Then we will move quickly
but thoroughly, through installation, configuration,
| | 00:36 | layout, content, and user management.
| | 00:42 | Finally, I'll show you how to update
your site, so it will run reliably and
| | 00:45 | securely for years to come.
| | 00:48 | Drupal took me way beyond what I
could create with other web tools.
| | 00:52 | Let's get started making great web
sites with Drupal 7 Essential Training.
| | Collapse this transcript |
| Getting a Drupal site up fast| 00:00 | You'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:05 | This video gives you only the most
bare instructions to get a Drupal site
| | 00:08 | running, and then tells you
which videos to watch for more help.
| | 00:11 | There are basically three steps.
| | 00:13 | First, we will download and install
the Acquia Drupal Stack installer,
| | 00:17 | also known as DAMP.
| | 00:18 | Second, we will download
and import core Drupal--
| | 00:22 | that's the Drupal you get
from Drupal.org--into that DAMP.
| | 00:25 | Third, we'll run Drupal's
browser-based installer. And that's it.
| | 00:29 | Then we'll be ready to add
content and administer our site.
| | 00:32 | Now, along the way I'm going to do
this very, very quickly--and in fact, I've
| | 00:36 | already downloaded some of
these files and uncompressed them.
| | 00:39 | If you have any problems with these
steps, see the Computer Literacy courses by
| | 00:42 | Garrick Chow, also on lynda.com.
| | 00:45 | But let's get started.
| | 00:46 | Our first stop is at acquia.com/downloads.
| | 00:50 | Here we grab the DAMP by looking
over here for the platform we're on.
| | 00:54 | In our case, we're on Windows, so I
just click Download Now, and save it.
| | 00:58 | That will take a few moments.
| | 01:01 | We then go to our download location,
which in my case is the Desktop,
| | 01:06 | and double-click the file
that's been downloaded there.
| | 01:09 | Your computer may throw up a
window that warns you about installing a
| | 01:12 | program from the Internet.
| | 01:13 | In this case, I know we want
to do it, so I'll click Yes.
| | 01:17 | That launches the Drupal Stack installer.
| | 01:19 | I'm just going to click through this.
| | 01:21 | You really don't have to
change any of the defaults.
| | 01:23 | I'll explain what they are in a later video
about installing the Drupal Stack installer.
| | 01:33 | Finally, we come to what
we want to name our site.
| | 01:36 | We're actually going to be replacing
the version of Drupal that's installed by
| | 01:40 | the Stack installer, so it
doesn't really matter what we put here.
| | 01:43 | Still, for consistency, I'll say
username is "admin" and password, as it is
| | 01:48 | throughout this course, is "Drupal".
| | 01:49 | You of course will use
whatever password you prefer.
| | 01:53 | And an e-mail address, and then click Next.
| | 01:57 | We get a confirmation screen.
Click Next again, and then one more time to
| | 02:01 | install the Stack installer.
| | 02:03 | This process will take a
few minutes. And we're done.
| | 02:07 | When we click Finish, that launches
the control panel for Acquia Drupal.
| | 02:12 | So that's our first step completed.
| | 02:13 | Now we want to grab core
Drupal and import it into this stack.
| | 02:17 | To do that, we go back to our web
browser and go to drupal.org/project/drupal.
| | 02:24 | Scroll down on this page until you
get down to the Downloads area.
| | 02:28 | Now, I'm making this video before the
official release of 7.0, so I'm going
| | 02:32 | to download this one.
| | 02:33 | However, by the time you see it,
you'll probably see a 7.0 version or 7.something
| | 02:38 | version up here in the green area,
and that's the one that you should download.
| | 02:42 | I click here to download.
| | 02:43 | I've already done it, and my
download is on the Desktop.
| | 02:46 | So I'll go back there,
and I'll start the import process.
| | 02:50 | So there is our drupal folder
after it has been uncompressed.
| | 02:53 | If you have any problems with that step,
watch Garrick Chow's videos on Computer
| | 02:57 | Literacy, also on lynda.com.
| | 02:59 | I'm going to rename that folder to 2trees.
| | 03:03 | That goes along with the site that
we're going be building throughout the
| | 03:06 | course, which is about a fictional olive
oil company called Two Trees Olive oil.
| | 03:10 | Once we've renamed the folder, I go
back into my control panel, go to Settings
| | 03:15 | and Sites and Import.
| | 03:18 | I find that folder
and click OK. Create a new database.
| | 03:24 | I'll call that 2trees as well,
and call the server 2trees, and click Import.
| | 03:31 | Doing so launches our browser and starts
the third step of our process, where we
| | 03:35 | go through Druple's own installer.
Click Save and continue, and continue on.
| | 03:40 | Again, I'll go through all of these
steps individually in a later video.
| | 03:45 | Finally, we add a little bit of
information about the site, including the
| | 03:48 | primary, what's called the super-user.
| | 03:51 | I'll call this Two Trees Olive Oil.
| | 03:54 | Put in a little bit of other information.
| | 04:06 | Finally, click Save and continue,
and that takes us to our completely
| | 04:09 | installed Drupal site.
| | 04:11 | Click on Visit your new site, and we are done.
| | 04:14 | Now you can start adding content to
your site, changing the design, managing
| | 04:17 | users--basically doing everything
it takes to make this site your own.
| | 04:21 | If you're just seeking a quick and
dirty way to get started, see the video
| | 04:24 | "Learning Drupal's Basic Workflow."
| | 04:27 | Then once your site is ready on your
laptop or desktop computer, you can move
| | 04:30 | that installation to a server, which
you'll learn about from several videos in
| | 04:34 | the section on Installing Drupal on a Server.
| | Collapse this transcript |
| Using the exercise files| 00:00 | You have access to this course's
exercise files if you are a premium member of
| | 00:04 | lynda.com, or if you
receive this course on a disc.
| | 00:07 | These files bring your Drupal site to
the state it would be in if you had done
| | 00:10 | all of the previous exercises.
| | 00:13 | This video assumes that you already
have the Acquia Drupal Stack installer
| | 00:16 | running on either Mac or Windows,
and that your site is called 2trees.
| | 00:20 | If you need help with that, watch the
section of this course about installing
| | 00:24 | Drupal on Mac OS X or Windows.
| | 00:27 | Finally, the technique I'll show you
assumes that you're running a recent
| | 00:30 | version of Drupal 7.
| | 00:31 | There is a longer method that involves
deleting your entire Drupal installation,
| | 00:35 | but this method should work fine.
| | 00:37 | When you bring in your exercise files,
you'll have to replace two things:
| | 00:41 | the site-specific folder full
of files and the site's database.
| | 00:45 | We'll start with the files, which
includes such things as the graphics.
| | 00:49 | On the Desktop, I have the folder
which contains our site, 2trees.
| | 00:54 | Inside here is another folder called sites.
| | 00:57 | This is the information that goes with
our site, and that's what gets replaced
| | 01:00 | with the exercise files.
| | 01:02 | I also have a test
exercise file folder right here.
| | 01:06 | It contains the database, which ends
with .sql.gz, and the sites folder here.
| | 01:12 | We start with the sites folder.
| | 01:14 | On the Mac, to uncompress it,
you simply double-click it.
| | 01:17 | On Windows, you might need to
download a utility such as WinZip or 7-Zip.
| | 01:21 | For more help, see Garrick
Chow's courses on computer literacy.
| | 01:30 | There is our sites folder.
| | 01:31 | We now drag that into our live site
folder to replace the other sites folder
| | 01:35 | that was there--and yes, we
really do want to replace it.
| | 01:39 | If you're concerned about this process
and would like to be able to go back to
| | 01:43 | your earlier version, make sure you
save that sites folder in another location
| | 01:47 | before you replace it with the new one.
| | 01:51 | Next, launch the Acquia Drupal Stack
installer and click the Manage my database button.
| | 01:58 | On the phpMyAdmin screen that
you see here, click the Import tab.
| | 02:03 | Then browse to find the file ending in .sql.gz.
| | 02:08 | That's the database file.
| | 02:12 | Then click Open and Go.
| | 02:16 | This will take a little while,
| | 02:17 | but if it works, you'll get a
message at the top that the import has been
| | 02:20 | successfully finished.
| | 02:22 | Now I have to tell you that this is
the part that's most likely to break, and
| | 02:26 | I'm afraid I just can't offer any good advice.
| | 02:28 | There are too many things that can go wrong.
| | 02:30 | But with these exercise files,
it should work just fine.
| | 02:33 | Our new site is now up and running.
| | 02:35 | If we go back to the site and reload
the page, we'll see some of the changes.
| | 02:40 | There is just one thing:
| | 02:41 | Some of the later videos assume that
you've installed additional modules.
| | 02:45 | I decided not to include those in the
sites folder, since they'd be obsolete by
| | 02:49 | the time you got them.
| | 02:51 | So instead, you'll have to
download and install those separately.
| | 02:55 | Don't worry about it, though.
| | 02:56 | It's not difficult, and it doesn't take long.
| | 02:58 | To determine which modules are needed,
after you've uncompressed your exercise
| | 03:02 | file, go into the folder sites/all/modules.
| | 03:07 | If you find a file there labeled
lyndareadme.txt, and that will tell you
| | 03:12 | which modules you need.
| | 03:13 | If there is no such file, you don't
need to install any extra modules.
| | 03:17 | Instructions on how to install those
modules are in the video on finding
| | 03:21 | and installing modules.
| | 03:22 | There is one last step that you have to do.
| | 03:25 | To show it, I'll go back to our site.
| | 03:27 | You'll notice that bringing in new
exercise files logged us out of the site if
| | 03:31 | we were logged into it before.
| | 03:33 | So first, I have to log in
again as the administrator.
| | 03:35 | Once again, in our exercise files, the
username is "admin", and the password is "drupal".
| | 03:41 | If you don't see the login boxes in
the left column, go to the login page on
| | 03:44 | your site by typing /user
after your site's domain name.
| | 03:48 | In our case, that would
be http://2trees:8082/user.
| | 03:56 | If the screen doesn't look right,
try refreshing your browser.
| | 03:59 | Once we're logged in, go up to the
URL and change the end to "update.php".
| | 04:06 | The reason for this is that the
exercise files were created with a version of
| | 04:10 | Drupal that I have is on making these videos.
| | 04:12 | But when you're watching it months
from now, you may have a later version of
| | 04:15 | Drupal, and there may have been some
structural changes in the database.
| | 04:19 | This program will take
care of them. Click Continue.
| | 04:22 | If there are any, it will
give you further instructions.
| | 04:25 | In this case, there were no other instructions.
| | 04:27 | So we're all set, and that's it.
| | 04:29 | I know it seems like a lot to remember,
but that's because we went through it step by step.
| | 04:33 | Once you've done it a few times though, I
guarantee you will fly through it with ease.
| | 04:38 | Now having said that, I need to make a
disclaimer: these instructions should work,
| | 04:42 | but it's possible that future
versions of Drupal 7 will break the process.
| | 04:46 | I'm afraid there is
nothing I can do about that here.
| | 04:48 | So if you get an error message and
you're sure you followed the procedure
| | 04:51 | correctly, contact
customer support at lynda.com.
| | Collapse this transcript |
|
|
1. Defining DrupalManaging content with Drupal| 00:00 | Drupal is one of a class of
software called web content management
| | 00:04 | systems, or CMSes for short.
| | 00:06 | The best way to understand what Drupal
does, and how it's different from other
| | 00:10 | CMSes out there, is to
look at the field as a whole.
| | 00:13 | We'll also look at how Drupal
specifically handles content while we build this
| | 00:17 | site, Two Trees Olive Oil.
| | 00:18 | But first let's talk about CMSes generally.
| | 00:22 | A CMS has several characteristics.
| | 00:24 | First of all, it's multiuser:
| | 00:26 | That is, you could sign in as the
administrator, and you could give permissions
| | 00:29 | to other people to create content and
do other administrative tasks. Or you
| | 00:34 | could have it just yourself as
the administrator if you prefer.
| | 00:37 | It has multiple permission levels to allow that.
| | 00:39 | For example, on a newspaper site, you
might have editors, writers, and publishers;
| | 00:43 | while on a sales site, there is
a manager, data-entry person, and
| | 00:47 | order-fulfillment-person.
| | 00:49 | Meanwhile for a design firm, there are
designers, coders, and project managers.
| | 00:54 | A CMS treats content as individual pieces.
| | 00:57 | You'll see this in Drupal
in what are called nodes.
| | 01:00 | These nodes can then be moved
around and combined in interesting ways.
| | 01:04 | Let's talk a little bit more
about those content pieces.
| | 01:08 | They can appear by themselves,
or they can be collected together.
| | 01:11 | In Drupal, they are called views,
when you collect them together.
| | 01:14 | I'll show you how to do
that later on in this course.
| | 01:17 | They can be distributed in a variety of ways.
| | 01:19 | Most commonly, that's through a
computer screen, but it could also be in
| | 01:22 | print or through some sort of feed in RSS
or viewed on portable devices, such as phones.
| | 01:28 | CMSes will not only feed out the
information, but will take it in and interpret it.
| | 01:33 | We talk a little bit about something
called Resource Description Framework,
| | 01:36 | or RDF, in this course.
| | 01:38 | One major characteristic of CMSes is
that it treats all of this content equally.
| | 01:43 | It takes it in, and it presents
it back in a consistent manner.
| | 01:47 | You can override that consistency if
you like, but this way you don't have to
| | 01:50 | worry about styling headlines
differently from one to the other.
| | 01:54 | It'll all just come out looking the same--or
at least looking the way that you want it to.
| | 01:58 | Finally, these nodes are
separate from the design.
| | 02:02 | If you have a hundred articles on your
site and you change the design, every
| | 02:05 | headline and every body
text will change its look.
| | 02:09 | It'll do so, once again, in a consistent manner.
| | 02:12 | Finally, I just want to mention a few
technical aspects of CMSes, and again this
| | 02:16 | is true of Drupal as well as other
CMSes, such as Joomla! and WordPress.
| | 02:20 | They are server-based, which means that
you take your files and you put them on
| | 02:24 | a remote computer that then hands
those files off when people request them.
| | 02:29 | The software itself
doesn't live on your computer;
| | 02:31 | it lives on the server.
| | 02:33 | It doesn't require people receiving
the information to have anything more
| | 02:36 | special than a web browser.
| | 02:38 | CMSes do this magic by combining the
files that make up the program with
| | 02:42 | a backend database.
| | 02:44 | In Drupal, that's usually MySQL.
| | 02:47 | CMSes are generally extensible.
| | 02:49 | So although you can download the core
Drupal software from Drupal.org, you can
| | 02:53 | also add on to it for many new functions.
| | 02:56 | CMSes usually separate the way that you
administer the program from the way that
| | 03:01 | people casually view it.
| | 03:03 | That's especially true in Drupal 7,
where the look of the screen is different,
| | 03:07 | as well as of course the things that
you can access as the administrator.
| | 03:11 | Let's take a look at some other
examples of CMSes, and then we'll understand
| | 03:15 | better how Drupal compares.
| | 03:17 | The first one on our list, and on
many people's lists judging from its
| | 03:20 | popularity, is WordPress.
| | 03:22 | Our first WordPress site is CSS-Tricks,
which is by lynda.com author Chris Coyer.
| | 03:28 | You can see that some of the things I
described are true for this site as well.
| | 03:32 | Here is a specific piece of content.
| | 03:34 | In Drupal, this would be a node,
and here is another one over here.
| | 03:38 | The whole site looks consistent as
we go from page to page--or at least as
| | 03:42 | consistent as the author
and creator wants it to be.
| | 03:45 | Another big CMS is Joomla!
| | 03:47 | The Latvian government publishes its
main public relations site using Joomla!
| | 03:52 | Once again, we see a specific piece of
information here, what again would be a node in Drupal.
| | 03:57 | We see menus.
| | 03:58 | If we go from one page to another, we
see that it actually keeps its consistent
| | 04:02 | look, and all of those other
things that I described earlier.
| | 04:06 | To find out more about WordPress,
go to wordpress.org. For Joomla!,
| | 04:10 | go to joomla.org.
| | 04:13 | The last CMS I want to mention is
MediaWiki, which runs Wikipedia.
| | 04:18 | You can get to Wikipedia at
en.wikipedia.org for the English language version.
| | 04:23 | Once again, it looks
consistent from page to page.
| | 04:26 | It has separate pieces of content, menus,
and all these other things we discussed.
| | 04:31 | So those are the three most popular CMSes.
| | 04:33 | By the way, all three are
free and open-source software.
| | 04:37 | Let's take a look again at our Drupal site.
| | 04:40 | What I have here is our site
sort of midway between the course.
| | 04:44 | Once again, it has a consistent
look as you go from page to page.
| | 04:48 | It has individual pieces of content.
| | 04:51 | You can click on any of these
links and see that content itself.
| | 04:55 | It has multiple users, and we can see those
users' profiles by clicking on their names.
| | 05:01 | Finally, it does have a separate
administrative interface from the viewing
| | 05:04 | interface, as you can see by
clicking on an administrative link.
| | 05:08 | I hope that gives you a sense
of what CMSes have in common.
| | 05:11 | I only talked about three besides Drupal,
| | 05:13 | but there are literally
hundreds and hundreds more.
| | 05:16 | If you're interested in learning some
more about those, here are some resources
| | 05:20 | that'll let you plunge deeper.
| | 05:23 | Wikipedia has a list of content
management systems that includes dozens
| | 05:27 | and dozens of them.
| | 05:28 | It's really amazing how many
there are out there besides Drupal.
| | 05:31 | CMS Report is a commercial site that
keeps up on the doings of all of them.
| | 05:35 | CMS Matrix compares them one to the other.
| | 05:38 | I didn't even mention the many web
sites that offer hosted CMS-like services,
| | 05:42 | such as Facebook and LiveJournal.
| | 05:44 | But I think that they're
in a different class, really.
| | 05:47 | In comparison, with Joomla!
| | 05:48 | and MediaWiki and WordPress are much more apt.
| | 05:52 | Those like Drupal live on your own
computer, which you control, and you have
| | 05:56 | much more power with them than those
hosting systems could ever give you.
| | Collapse this transcript |
| Comparing Drupal with other content management systems| 00:00 | Whenever someone mentions Drupal, two
other names are sure to be in the air:
| | 00:04 | WordPress and Joomla!
| | 00:06 | These certainly aren't the only three
content management systems out there, but
| | 00:10 | they are the biggest--at least when you
look at statistics, such as the one on
| | 00:14 | the site backendbattles.com.
| | 00:17 | On the front page, you see a
comparison of all of the backend tools:
| | 00:20 | that is, things that are installed on
the server to help support web sites.
| | 00:24 | And by far the most
popular one is Google Analytics.
| | 00:28 | In fact, Google Analytics is
often used on Drupal sites.
| | 00:31 | If you look down these first
seven, you don't see Drupal at all.
| | 00:34 | But if you look at only the CMS category,
you see that it shows up as number one.
| | 00:40 | Now, quite honestly, the only reason
that that's so is because this particular
| | 00:44 | site classifies WordPress as blogging software.
| | 00:48 | There you see that there is over 140
WordPress sites in the top 10,000 as
| | 00:53 | compared to just a mere 39 for Drupal.
| | 00:57 | In practice though, the
three are really quite similar.
| | 01:00 | This video talks about
some of their differences.
| | 01:03 | To make this easy to remember, I've
broken up the differences into four
| | 01:07 | categories, which are easy to remember with
the letters A-S-U-M, a sum of four qualities:
| | 01:12 | the CMS' abilities;
support for the CMSes;
| | 01:16 | their usage in the world;
| | 01:17 | and their Maturity, how long they've
been around and how stable they are.
| | 01:22 | We'll look at these one at
a time. First, abilities.
| | 01:25 | Drupal has proven itself as being able to
support even the most busy web sites out there.
| | 01:30 | There was one case where 20,000
requests per second were hitting Drupal, and
| | 01:35 | it worked just fine.
| | 01:36 | Drupal gets a lot of high praise from
developers, and it's generally considered
| | 01:39 | to be a complete CMS. Joomla! is very similar.
| | 01:43 | It hasn't proven itself with as
high-traffic sites, but I haven't heard
| | 01:47 | complaints that would suggest that
it wouldn't be able to do the same
| | 01:49 | capabilities as Drupal.
| | 01:51 | Whereas Drupal is favored by developers, Joomla!
| | 01:54 | usually gets a lot of attention from
designers, who find it easier to make
| | 01:58 | visual impact with their
sites. And like Drupal, Joomla!
| | 02:01 | is considered a complete CMS.
| | 02:04 | WordPress is best known for being
easy to set up and easy enough for
| | 02:07 | beginners even to use it.
| | 02:09 | The only thing is it doesn't have nearly
as many capabilities as Drupal or Joomla!
| | 02:13 | However, because it's so popular,
there are so many people developing for it.
| | 02:17 | It's growing fast, and I wouldn't be
surprised to see it start to meet, or even
| | 02:21 | overtake Drupal and Joomla!
| | 02:23 | I should really mention that
these are all arguable measures.
| | 02:26 | There are designers who prefer
Drupal, there are beginners who prefer
| | 02:29 | Joomla!, and so on. Next, support.
| | 02:33 | Both Drupal and WordPress have a
single authority who is considered to be the
| | 02:37 | one who runs the community:
| | 02:39 | Matt Mullenweg for WordPress
and Dries Buytaert for Drupal.
| | 02:42 | These were the people who wrote the original
software and still have a strong hand in it.
| | 02:47 | Joomla!, on the other hand, doesn't
have a central authority, and that's
| | 02:50 | actually caused it some problems. Joomla!
| | 02:52 | itself is a split from an earlier
project called Mambo, and this lack of
| | 02:56 | leadership has caused some
infighting within that community.
| | 03:00 | If you come across problems that you
can't handle and you want to hire somebody,
| | 03:03 | you'll see that Drupal, Joomla!
| | 03:05 | and WordPress all have a large
number of consultants available.
| | 03:09 | It's worth noting that Drupal has quite a
few companies with more than ten employees.
| | 03:13 | That's good if you have a large site
and you want to be sure that they can
| | 03:16 | dedicate enough firepower to your problems.
| | 03:18 | On the other hand, both Joomla!
| | 03:20 | and WordPress seem to have
more individual consultants.
| | 03:24 | Next, we come to Usage.
| | 03:26 | In this regard, there is no comparison.
| | 03:28 | Going back to that site I showed you,
backendbattles, WordPress is by far the
| | 03:33 | most used of the three CMSes.
| | 03:35 | There are allegedly over 25 million
sites using WordPress, although of
| | 03:39 | course how often those sites are updated or
how active they are generally is under debate.
| | 03:45 | But you can't argue with the number
of top sites that are using WordPress:
| | 03:48 | 140 or so, as compared to 40 or
so for Drupal and 20 for Joomla!
| | 03:53 | That's of the top 10,000,
as is rated by Alexa.com.
| | 03:58 | Finally, we can compare the CMSes by maturity.
| | 04:01 | Drupal is the one that's been
out longest as a single project.
| | 04:04 | I mentioned earlier that Joomla!
| | 04:06 | broke off from Mambo in 2005, so you
could arguably say it goes back as far as
| | 04:11 | Drupal, or not, depending
on how much you think Joomla!
| | 04:14 | is similar to the earlier Mambo.
| | 04:16 | Another way to consider the
maturity is by looking at the number of
| | 04:19 | themes available for them.
| | 04:20 | Drupal has about 500.
| | 04:21 | Now, that's for Drupal 6.
| | 04:23 | Many of those will be modified, so that
they'll run with Drupal 7, but of course
| | 04:27 | it's too early to tell yet. Both Joomla!
| | 04:30 | and WordPress have over 1,000 themes.
| | 04:32 | Now, that's only one measure of course.
| | 04:34 | You should also consider how many
people are contributing code, how many people
| | 04:38 | download Drupal or Joomla!
| | 04:39 | or WordPress per month, and so on.
| | 04:42 | On the code contributor side,
Drupal is extremely strong.
| | 04:46 | Hundreds of people are contributing
code to Drupal every week and making it
| | 04:50 | a stronger project.
| | 04:52 | Finally, I just want to mention some
resources, if you'd like to take a look at
| | 04:55 | the whole world of CMSes, to
decide if Drupal is right for you.
| | 04:59 | First, a simple search
online for Drupal versus Joomla!
| | 05:02 | or Drupal versus Joomla!
| | 05:03 | and WordPress will tell you a lot.
| | 05:05 | One article that I like in particular
is this one here on theopensourcery.com.
| | 05:11 | Finally, it's a good idea to look at
sites that are running the three CMSes.
| | 05:15 | A big Drupal site is examiner.com,
which just switched over to Drupal recently.
| | 05:20 | It's one of the top sites on the web, at #505.
| | 05:23 | ubuntu.com is another one running Drupal,
and there are many more that you can
| | 05:27 | see at the URL here on buytaert.net. Joomla!
| | 05:31 | doesn't have quite as many big sites.
| | 05:33 | The biggest one that I could find is
this dnsstuff.com, at Alexa 4,000 or so.
| | 05:38 | There is a site
thatguywiththeglasses.com, which looks very good.
| | 05:42 | WordPress, as I mentioned
earlier, has many sites.
| | 05:45 | The top one, amusingly enough, is
perezhilton, which is Alexa 560, or so.
| | 05:51 | failblog.org is another one,
and you can find many more by going to
| | 05:54 | backendbattles.com/backend/
WordPress, or Drupal, or Joomla!
| | 06:00 | If you go through many of those examples,
you'll quickly realize that all three
| | 06:04 | are ready to tackle pretty much
any web-site-building challenge.
| | 06:07 | They are all free, so there
is no cost to try them all.
| | 06:10 | So that brings us to our next
question. Why choose Drupal?
| | 06:14 | We'll cover that in the video
about deciding whether to use Drupal.
| | 06:18 | If you want to get more of a sense of
what's been done with Drupal, see the
| | 06:21 | video about looking at Drupal-built sites.
| | Collapse this transcript |
| Deciding whether to use Drupal| 00:00 | The decision of whether to use
Drupal is based on three things:
| | 00:04 | first, the kind of site you want to build;
| | 00:07 | second, what resources
you have available to you;
| | 00:11 | and third, what alternatives are out there,
and whether one of them might be a better fit.
| | 00:15 | Let's look through each one of these.
| | 00:18 | First, consider what kind
of site you're building.
| | 00:21 | Drupal is especially good for sites
that go a little bit beyond the basics, or
| | 00:25 | that have to be updated frequently.
| | 00:27 | So if you have frequent updates, you
won't have to upload files and rewrite
| | 00:32 | text on the server;
| | 00:33 | you'll just bring it into
the CMS, and it will be done.
| | 00:35 | Drupal is also good if you have
multiple contributors, because it automatically
| | 00:39 | handles user accounts.
| | 00:41 | Drupal is good if it's a
membership site for the same reason.
| | 00:44 | You can set different levels so that
some people contribute to the site and some
| | 00:48 | people simply have more access to read the site.
| | 00:51 | Drupal is good if it's going to be interactive.
| | 00:54 | You can post a story, for example,
and then allow people to add their own
| | 00:58 | comments to it, and add
comments to the comments.
| | 01:01 | There are some things that
Drupal is not as good for.
| | 01:04 | First of all, if you have any special
design requirements, it's a lot easier to
| | 01:08 | do in other systems, specifically in plain HTML.
| | 01:12 | It's possible to make any kind of
design you want in Drupal, but it's a
| | 01:15 | little bit complicated.
| | 01:17 | If you want to learn how to do that,
watch Chris Charlton's course on lynda.com
| | 01:21 | about creating Drupal themes.
| | 01:23 | Drupal is also a really overkill if
your site doesn't require any maintenance.
| | 01:27 | If you just want to put up something
that announces your business or announces
| | 01:31 | your family, and you don't expect to
have people coming there and leaving
| | 01:34 | comments, and you don't expect it to
change very much, Drupal is probably going
| | 01:38 | to be more than you really need.
| | 01:40 | Secondly, consider what
resources you have available to you.
| | 01:44 | Technically, you need to have an
Internet service provider that will give you
| | 01:47 | the sort of access you need in order to
run Drupal on their web hosting service.
| | 01:53 | That means that they either set up
Drupal for you or they allow you to set it
| | 01:57 | up yourself by giving you enough
access to put the files there, change
| | 02:00 | permissions, and do things of that sort.
| | 02:03 | Drupal does also have some
specific server requirements.
| | 02:06 | I don't go into those very much in this
course because they're low enough that
| | 02:09 | most web hosts already have those taken care of.
| | 02:13 | If you do have any problems with
your web host, however, check the
| | 02:16 | documentation on Drupal.org.
| | 02:18 | In addition to these technical
resources, there are some things that you
| | 02:21 | personally also have to be able to do.
| | 02:24 | First of all, you have to be able to move
files between your computer and the server.
| | 02:28 | You have to have enough knowledge to
get around the server itself, as well.
| | 02:32 | You also need to have the time and
willingness to perform maintenance from time to time.
| | 02:36 | There are two kinds of maintenance.
| | 02:38 | One is the human maintenance, where
you look over the comments people are
| | 02:41 | leaving to make sure that they're
not things you don't want on your site.
| | 02:45 | You also have to update
Drupal every once in a while.
| | 02:48 | The third resource that's good to
have is some knowledge of the languages
| | 02:51 | that make up Drupal:
| | 02:53 | that is, PHP, CSS, and JavaScript.
| | 02:56 | Now, I can tell you personally, I'm
not very good with any of those, and
| | 02:59 | I manage okay, so you don't really need
these, but if you have them, all the better.
| | 03:04 | The third thing to look at when
considering Drupal is whether there might be a
| | 03:07 | simpler alternative.
| | 03:09 | On this particular point, I agree with
Albert Einstein who said that everything
| | 03:12 | should be made as simple
as possible, but no simpler.
| | 03:16 | Too often in the Drupal world,
the focus is on, which CMS do I need?
| | 03:20 | But often plain HTML will give you
exactly what you need. Or you might be happy
| | 03:24 | with a hosted solution.
| | 03:26 | There are a few different
types of hosted solution.
| | 03:28 | First, there are those things that are
sort of like CMSes, although you can't
| | 03:32 | actually take your data off and
then re-host it somewhere else.
| | 03:36 | Examples of those are Facebook,
LiveJournal, and Yahoo Groups.
| | 03:39 | Although quite honestly,
LiveJournal does let you take your stuff off.
| | 03:43 | It's just a little bit hard then to re-host.
| | 03:46 | If you like Drupal but you don't want to
have to deal with the server, you might
| | 03:49 | want to consider Drupal Gardens.
| | 03:50 | It's a real Drupal setup, but it's being
hosted by Acquia, and you never have to
| | 03:54 | do that kind of maintenance.
| | 03:56 | If you're interested in this, see
Drupal Gardens Essential Training, also on
| | 04:00 | lynda.com. Or you might be
happy with a simpler CMS;
| | 04:03 | the big one in this category is WordPress.
| | 04:06 | Or perhaps you don't want something
simpler, just something different, in which
| | 04:10 | case you have many, many choices--
among them Joomla! and MediaWiki.
| | 04:15 | So why did I choose Drupal?
| | 04:16 | Well, for me it was the right solution
when I wanted to build a site to promote
| | 04:19 | a book I wrote in 2008.
| | 04:21 | I wanted to put a lot of things onto the site.
| | 04:23 | I wanted to have news feeds and
original blog posts, and other information of
| | 04:27 | that sort, and I couldn't do all
that I wanted using just WordPress.
| | 04:31 | I certainly couldn't do it with HTML.
| | 04:34 | So the site demanded it.
| | 04:35 | That's the first requirement met.
| | 04:37 | I already knew a little bit about working
with servers, and I had the time to spend on it,
| | 04:41 | so there is the second requirement.
| | 04:43 | Finally, I looked at all the other
CMS's out there, and then I looked at Drupal
| | 04:47 | and played around with it a little and
found that it was really the best option
| | 04:51 | for what I wanted to do.
| | 04:53 | So in the end, Drupal was right for me.
| | 04:55 | Your task is to go out and look at your
requirements, what you want your site to
| | 04:59 | do, and consider the other options,
and decide if Drupal is right for you.
| | Collapse this transcript |
| Looking at Drupal-built sites| 00:00 | Possibilities define goals.
| | 00:02 | That is, you need to know what can be
done before you plan to do it, but it's
| | 00:06 | hard to see possibilities in the abstract.
| | 00:08 | A better way is to look at what's been
done already and then build from that.
| | 00:12 | So in this video, we're going to run
through a bunch of sites that are built on Drupal.
| | 00:16 | You'll get two things from this little exercise.
| | 00:18 | First, you'll see common patterns of Drupal use.
| | 00:22 | Second, maybe you'll get a little
inspired to replicate some of the fancier tricks.
| | 00:26 | I'm going to start with the two
highest-traffic Drupal sites on the web.
| | 00:30 | The first one, amusingly
enough, is Drupal.org itself.
| | 00:34 | This is of course built in Drupal.
| | 00:36 | You see that it uses a columnar
design, where you have a column here, a
| | 00:40 | column here, and one here.
| | 00:41 | It also has several other interesting features:
| | 00:44 | a large Search box up here, a menu
that's hugging the top of the screen, a
| | 00:49 | map down here that shows you the
latest activity around the world and where
| | 00:53 | exactly it's coming from.
| | 00:54 | The bottom of the page, as is
increasingly common in modern design, has a list
| | 00:58 | of links, so you can find
out more about the company--
| | 01:01 | in this case, about the
open source community of Drupal.
| | 01:04 | Another very large Drupal site is examiner.com.
| | 01:08 | This is an interesting example because it
wasn't a Drupal site until very recently.
| | 01:13 | In fact, they rebuilt the site on
Drupal 7 before Drupal 7 was ever released.
| | 01:18 | Once again, it has separate pieces of
content here, lots of teasers to the
| | 01:23 | internal content so you
can click on any one of them.
| | 01:26 | You immediately get a picture,
and then you can go on to the story itself
| | 01:29 | by clicking further.
| | 01:31 | Another big Drupal site is run by
the U.S. government, commerce.gov.
| | 01:35 | It has this large graphic here,
which is not just a static graphic.
| | 01:39 | It's what's called a rotator.
| | 01:40 | So you can see a variety of things the
Commerce Department is doing around the world.
| | 01:44 | Sony Music has done something interesting.
| | 01:47 | They've standardized on Drupal, so
their individual artist sites are all on
| | 01:51 | Drupal--for example, Elvis Presley.
| | 01:53 | Going on, we have this Gizmo's Freeware site.
| | 01:56 | You might be asking, why show this site?
| | 01:58 | Well, one thing I want to show about it is it
actually didn't take very much to set this up.
| | 02:03 | This is the Acquia Marina theme,
and there are very few changes to it.
| | 02:07 | This is something that anybody who knows
Drupal well can do in a couple of days.
| | 02:11 | Now, I chose all of these sites to
give you a sense of the variety that's
| | 02:14 | available in Drupal. But that's really
hard to do nowadays, because Drupal is
| | 02:18 | truly being used for every purpose online.
| | 02:21 | Here are two places where you can
get to see a lot more Drupal sites.
| | 02:26 | One of them is on the blog of
Drupal's founder, Dries Buytaert.
| | 02:29 | If you go to buytaert.net/tag/drupal-
sites and scroll down, you'll see a whole
| | 02:35 | big variety, and many of these are
international sites, as you can see.
| | 02:39 | Another place to see Drupal
sites is on backendbattles.com.
| | 02:43 | Go to backendbattles.com/backend/drupal.
| | 02:47 | From there, you can see not only
which sites are built in Drupal, but how
| | 02:50 | popular they are within the Alexa.com 10,000.
| | 02:53 | They are listed from most to least traveled.
| | 02:56 | Now, some of what you've seen in these
sites isn't exactly core Drupal, but
| | 03:01 | includes a little bit of
custom programming on top of it.
| | 03:04 | But most of what you've seen is pure Drupal.
| | 03:07 | That techsupportalert site
especially has very little custom code in it.
| | 03:12 | If you are a JavaScript or PHP
developer, it's encouraging to see how well
| | 03:16 | custom code can be made part of a Drupal site.
| | Collapse this transcript |
| Exploring the Drupal universe| 00:00 | There is a prolific Drupal developer
named Dan Kudwien who wrote in a comment on
| | 00:04 | my blog that Drupal is not a
product, Drupal is the community.
| | 00:09 | Now, I think he is going a little far.
| | 00:11 | I mean you run code on your computer;
| | 00:12 | you don't run community.
| | 00:14 | But he does have a good point.
| | 00:15 | Drupal is open-source software created and
supported by individuals, not a central company.
| | 00:22 | Well certain people and
companies exert strong influence,
| | 00:24 | there is no single authority.
| | 00:26 | So let's take a moment to unravel this
decentralized yet powerful community.
| | 00:31 | First things first:
| | 00:32 | while the Drupal project
doesn't have a central authority,
| | 00:35 | it does have a central
meeting place--Drupal.org.
| | 00:39 | There is a lot of information here,
and you'll find yourself coming back to this
| | 00:42 | site again and again
once you start using Drupal.
| | 00:45 | I'll show you around, but honestly,
you'll often find yourself simply using
| | 00:49 | the Search function.
| | 00:50 | The first thing I'm going to do is to log in.
| | 00:53 | Now, if you don't already have an
account on Drupal.org, you really must get it,
| | 00:57 | and I'll show you why.
| | 00:58 | Let's say I do a search here for views,
and I come down and I want to take a
| | 01:03 | look at a discussion that people are
having about view. And I look and I think
| | 01:08 | oh, that's very interesting.
| | 01:09 | I'd like to posts something about this.
| | 01:11 | Well, until I get a membership, I can't
post to ask questions or answer questions.
| | 01:16 | So do go back and get yourself a membership.
| | 01:19 | I'm just going to log in with
the membership I already have.
| | 01:23 | Incidentally, I'm tgeller on Drupal.org.
| | 01:27 | Once you've logged in, you have a
choice of either going to the homepage, which
| | 01:31 | is what we saw before, or a dashboard.
| | 01:34 | This dashboard is very handy.
| | 01:37 | You can set it up so that you see only
those things that are most important to
| | 01:40 | you whenever you log in.
| | 01:42 | You can switch between the homepage
and your dashboard as the thing you see
| | 01:45 | first when you log in by using this
Use Default Homepage, or Make this your
| | 01:51 | Dashboard to be your homepage.
| | 01:54 | The first question you might have is,
where do I actually download the software?
| | 01:58 | Well, you'll find that under Download & Extend.
| | 02:01 | First off, you'll find here the most recent
version of Drupal available in this big button.
| | 02:06 | Now, when I made this, Drupal
7 hadn't quite come out yet.
| | 02:09 | But when you watch this video, it'll
probably say Download Drupal 7.whatever the latest version is.
| | 02:15 | You'll also find here themes--
| | 02:16 | that is, the graphic designs
for Drupal--or even translations.
| | 02:21 | So you can work Drupal in French or
Spanish or any of many other languages.
| | 02:25 | Just as importantly, there are
modules here that extend Drupal.
| | 02:29 | You'll learn more about
this later in the course.
| | 02:32 | So that's how you get the software.
| | 02:33 | But just as important is getting help with
the software after you've downloaded it.
| | 02:38 | There are several places you can do that.
| | 02:40 | The first one is in Documentation.
| | 02:42 | If you need any help, especially
just starting up, these first few guides,
| | 02:47 | Understanding Drupal and the
Installation Guide, are extremely useful.
| | 02:51 | These are what are called
handbooks in the Drupal.org world.
| | 02:54 | These blocks on the right let you click
around and drill down further into the
| | 02:58 | exact steps that you need help with.
| | 03:01 | There are also community resources.
| | 03:03 | We'll describe more of these options in
the video on getting help with Drupal issues.
| | 03:08 | As long as we're talking about
community, I want to go back and speak about
| | 03:12 | something on that Documentation page.
| | 03:14 | After you've gotten involved with Drupal for
a while, you'll start wanting to give back;
| | 03:18 | I know that I did. And you'll find
that stuff down here at the bottom in the
| | 03:23 | Community block here.
| | 03:24 | I'll talk more about ways that you can
help strengthen Drupal in the video about
| | 03:28 | joining the Drupal community.
| | 03:30 | Well, that's enough for the drupal.org web site.
| | 03:32 | I mean you can click around it
and find all the resources there yourself.
| | 03:36 | But there is one more thing I want to
point out, which a lot of people miss but
| | 03:39 | I think is an extremely useful resource.
| | 03:41 | It's called Planet Drupal.
| | 03:43 | It's a blog roll that keeps track of
all of these Drupal-related blogs, and it
| | 03:48 | republishes them in a very
easy-to-subscribe-to form.
| | 03:52 | You go there by going to drupal.org/planet.
| | 03:55 | As you scroll down, you see all of
these blog posts, as well as the different
| | 03:59 | blogs that make up the Drupal Planet.
| | 04:02 | My own blog is here, by the way.
| | 04:03 | If you want to look at any individual
one, of course you can click on that
| | 04:06 | person's name or the company name.
| | 04:09 | Obviously, all of these people
are important in the Drupal world.
| | 04:12 | But I want to mention a
few players specifically.
| | 04:15 | The first one I've mentioned already,
Dries Buytaert, was a university
| | 04:19 | student in Belgium when he created
the first version of Drupal in 2000.
| | 04:23 | You'll see his name
throughout the drupal.org site.
| | 04:26 | To learn about other active
drupal.org contributors, just find issues that
| | 04:30 | interest you, and then look through
the names of commenters and people who
| | 04:34 | contribute the software.
| | 04:35 | For example, let's go back up to the
top of the page, and to Download & Extend.
| | 04:40 | Here is an interesting module: Views.
| | 04:42 | Well, we'll talk about this
more later on in the course.
| | 04:45 | I click there, and I see who
exactly is maintaining views.
| | 04:49 | If I view all committers, it tells me
not only who the programmers are, but by
| | 04:54 | clicking on Commits, I can see who
did the most committing, and this
| | 04:57 | merlinofchaos is an important person.
| | 05:00 | Click on any user profile, and it
tells you more about that individual.
| | 05:03 | But that's enough for the drupal.org web site.
| | 05:06 | The other big thing you should know
about in the Drupal community is DrupalCon.
| | 05:11 | You can find out more about
it by going to drupalcon.org.
| | 05:15 | This is the twice-a-year event that
draws Drupalists from all over the globe.
| | 05:20 | There is one in the spring in the
United States, and then one in the fall.
| | 05:24 | Up until now, it's been in Europe, although
it may move to other areas of the world.
| | 05:28 | These conferences draw over a thousand
people, all of them interested in Drupal,
| | 05:33 | for as much as a week at a time.
| | 05:35 | I'll tell you, I've been to a few of them,
| | 05:36 | they're wonderful places to meet
the people who make Drupal and make
| | 05:40 | connections for yourself, as well as
learning more about the software you use.
| | 05:44 | Finally, I want to mention groups.drupal.org.
| | 05:47 | At the time I'm making this video, it's
not very well integrated with Drupal.org,
| | 05:51 | so it's a good idea to go there separately.
| | 05:53 | You can get there, as I say, at groups.drupal.org.
| | 05:58 | What you see here is the old design,
and by the time you visit it, it may well
| | 06:02 | look more or like the
rest of the drupal.org site.
| | 06:06 | groups.drupal.org is the place to go to
find a local Drupal users group, or to
| | 06:10 | find people interested in
specific uses or cultures.
| | 06:13 | For example, I belong to groups on
Drupal.org that focus on real estate sites
| | 06:18 | and Esperanto speakers and so forth.
| | 06:21 | Well, that was just the barest
introduction to the names and the things you'll
| | 06:25 | see around the Drupal community.
| | 06:27 | But it's growing really fast, and new
people, companies, and initiatives appear daily.
| | 06:32 | The only way to really know
what's going on is to get involved.
| | 06:35 | First, that means get an account
on drupal.org and start using it.
| | 06:39 | Second, subscribe to Planet Drupal--
| | 06:42 | again, that's drupal.org/planet--
either on the web site itself or through
| | 06:46 | whatever your favorite news feed reader is.
| | 06:49 | Third, if you can make it to DrupalCon or
any of your local Drupal events, do so.
| | 06:54 | Again, you'll find out more about these
events later on in the course and in the
| | 06:58 | video about joining the Drupal community.
| | 07:00 | One thing is for sure: with Drupal
growing as quickly as it is, you'll never
| | 07:04 | want for fellow travelers.
| | Collapse this transcript |
| Getting help with Drupal issues| 00:00 | I'm sure I don't have to tell you the
advantages of open-source software like Drupal.
| | 00:04 | There is no cost for the software.
| | 00:06 | There is peer review of the
code, and it's a do-ocracy.
| | 00:09 | That means that all users are
empowered to scratch their own itches.
| | 00:13 | One of the downsides of having no
absolute authority is that there is also no
| | 00:17 | absolute source of help.
| | 00:19 | Some companies have popped up to
provide assistance, but for the most part
| | 00:22 | you're dependent on the mercy of strangers.
| | 00:25 | Let's look at how to get the help you
need, and how, in turn, to give it back.
| | 00:29 | There are two parts to this.
| | 00:31 | The first is knowing where to go,
and the second is knowing how to act to get
| | 00:36 | the answer you need.
| | 00:37 | I want to cover the second one first,
because it's actually more important.
| | 00:41 | Fortunately, this advice already
exists on the web, and there is an excellent
| | 00:45 | post about it by Chris Heilmann.
| | 00:48 | I just want to quickly summarize what
Chris wrote, and add a few tips of my own.
| | 00:52 | I'll break this into three phases:
| | 00:54 | first, what to do before you get help;
| | 00:56 | second, how to ask your question;
and third, what to do after you start
| | 01:00 | getting some responses.
| | 01:02 | The first thing you should do is
make sure you really have a problem.
| | 01:04 | Really work at it before
you start asking other people.
| | 01:08 | You might find that you solve your own
problem and learn something along the way.
| | 01:11 | Second, do your research.
| | 01:13 | Do a search on drupal.org,
or just on Google in general.
| | 01:17 | Again, you might find an answer to your
problem more easily than asking someone else.
| | 01:21 | Third, make sure that you
have all the specifics together.
| | 01:24 | It's a lot easier to answer a question
that has error messages and screenshots
| | 01:28 | than one that's just,
"Something is broken. Please help me."
| | 01:32 | When it comes time to ask, make sure
you follow the rules and the norms of
| | 01:35 | whatever forum you're asking in.
| | 01:37 | For a support request, for example,
don't file it in a place for bug reports;
| | 01:42 | it just angers people,
and you're less likely to get a response.
| | 01:45 | Again, have all your information
together, and then present it in a way that
| | 01:49 | they can read quickly and
understand what you mean.
| | 01:52 | Third--and I'm afraid this is a big
one--ignore any bad attitudes you get.
| | 01:56 | Unfortunately, the people who are most
able to answer your questions are those
| | 02:00 | who've been using the software for years,
and many times they forgotten what it
| | 02:03 | was like to be a beginner.
| | 02:05 | Just let any sort of bad attitude
roll off your back, and try to get the
| | 02:09 | information while ignoring any
sort of troubles of that sort.
| | 02:12 | Finally, if somebody gives you off-
topic advice, just let it go. Accept it,
| | 02:17 | see if you can get some use out of
it, and then go back to the subject.
| | 02:21 | These people are doing this
for free and in their spare time.
| | 02:25 | You can't expect them to be totally focused
like you would for an employee, for example.
| | 02:29 | Finally, after you've asked, make sure
you give people enough chance to respond.
| | 02:33 | I know your problem may seem urgent,
but it does take time for people to
| | 02:37 | understand what you need,
and to get back to you.
| | 02:40 | So give it at least a couple of days.
| | 02:42 | After they start to respond,
continue the conversation.
| | 02:44 | Very often, I'll have a problem and
I'll post what I think is complete
| | 02:47 | information, and they'll come back and say
well, have you checked this file and so forth.
| | 02:52 | After I do, I find the problem.
| | 02:53 | So make sure that you stay engaged.
| | 02:56 | After you figured out what's wrong, report back.
| | 02:58 | The solution you find may
help other people in the future.
| | 03:02 | Finally, when you're ready to, and you
see a problem that you can solve, start
| | 03:06 | answering other people's questions.
| | 03:07 | Give back to the community.
| | 03:09 | That's how it continues helpfully.
| | 03:11 | But enough about etiquette;
| | 03:12 | let's talk about where to get help.
| | 03:15 | Our first source as always is drupal.org.
| | 03:17 | I assume you're already logged in.
| | 03:19 | If you're not, what now reads Your
Dashboard will have a login or register link,
| | 03:24 | and you can start your own account that
way, or log in if you're not logged in.
| | 03:28 | The first place to go is
Documentation if you have a basic question.
| | 03:32 | Here, there are several handbooks,
which will help you with installation and
| | 03:36 | administration, and even building
your site and building your own themes.
| | 03:41 | These are fairly well organized, so
they can be quick ways to find your answer.
| | 03:44 | Very often, however, you need a
solution to a specific problem.
| | 03:48 | In those cases, the Search
box is often your best friend.
| | 03:52 | Let's say that I am trying to delete a
user, for example, and I can't do that.
| | 03:56 | I'll try "can't delete user".
| | 03:58 | That brought back a fairly short
list of what look like relevant links.
| | 04:03 | If you ask a more general question,
such as, let's say "help with views",
| | 04:08 | you'll find that it
returns a much larger number.
| | 04:11 | However, you can cut down on that number
by looking over here in this right column.
| | 04:15 | This is what's called a faceted search.
| | 04:18 | If you wanted ongoing help with
views, you might I think, oh, I'll join a
| | 04:21 | group that specifically about that.
| | 04:24 | As we scroll down, we see, well, I might be
able to find something that helps me here.
| | 04:28 | If you want to see all the
issues again, just click All.
| | 04:31 | There are two other places
where you can ask questions.
| | 04:34 | The first is in the forums on drupal.org.
| | 04:36 | You get there by going to Community
& Support, and then scrolling down
| | 04:40 | and clicking Our forums, or just by
entering the word forum at the end of drupal.org,
| | 04:45 | so drupal.org/forum.
| | 04:48 | Another place you can ask online if
you're having problems with the specific
| | 04:51 | module or theme is in the
issues queue for that module or theme.
| | 04:55 | To go there, I'll go to Download &
Extend and then down to our Modules.
| | 05:01 | Just for argument's sake, let's say that
I'm having a problem with the Views module.
| | 05:05 | I click there and then look down at the Issues.
| | 05:08 | Here I can do a more focused search.
| | 05:10 | So let's say I am having a
problem with the calendar view.
| | 05:13 | I could just enter
calendar, and then click Search.
| | 05:16 | Here I get quite a few issues
where people have already had their
| | 05:20 | questions answered.
| | 05:21 | Many of these are bug reports.
| | 05:22 | But if you're looking for support,
you can also filter based on support
| | 05:25 | requests. Or if you don't find an
answer that you want there, you can create a
| | 05:30 | new issue. But as I mentioned before,
you have to already be logged in.
| | 05:34 | The next thing I want to show you
is how to get immediate help through
| | 05:37 | Internet relay chat, or IRC.
| | 05:40 | You can learn about that by going
to Community & Support and then
| | 05:43 | scrolling down to IRC.
| | 05:46 | Here you'll find a lot of information
of all the different channels and how
| | 05:49 | to connect to them.
| | 05:50 | The easiest way to get onto IRC
is to go to webchat.freenode.net.
| | 05:57 | Here I'll type in my nickname,
and the channels that I want.
| | 06:00 | On that previous page,
there was a list of channels.
| | 06:02 | I happen to know that Drupal and
Drupal-support are the two that I want.
| | 06:08 | Then type in this CAPTCHA
code and click Connect.
| | 06:12 | Before I do, notice that in the
channels I put a little hash mark before the
| | 06:15 | name, and there is no space after the comma.
| | 06:20 | Here we're connecting,
and there are our two boards:
| | 06:22 | Drupal-support and Drupal.
| | 06:24 | Notice all of the people who are here
waiting to either ask questions or help
| | 06:29 | you with yours, or just discuss Drupal.
| | 06:31 | Again, be sure you read through the
information on drupal.org about the
| | 06:35 | community that exists in IRC
and the proper way to ask questions.
| | 06:39 | There are additional options up
here in this little dropdown menu.
| | 06:43 | The very last thing I want to mention
is that you might want to hire somebody
| | 06:47 | who is a Drupal expert.
| | 06:48 | There are a few ways of doing that.
| | 06:50 | Go up to Marketplace on drupal.org,
and you'll see a list of people who either
| | 06:55 | will help you with hosting
or services or training.
| | 06:58 | If you can't find somebody that way,
you can post a specific job by going to
| | 07:02 | groups.drupal.org/jobs.
| | 07:06 | But if yours is a common question,
chances are you'll get your answer simply
| | 07:10 | through one of the forums
or one of the other boards.
| | 07:12 | If none of that works, of
course, you can hire someone.
| | 07:15 | The good news is that Drupal community
is big enough to support all of these
| | 07:19 | options, and certainly one of them
will get you the answer you need.
| | Collapse this transcript |
|
|
2. Understanding How Drupal WorksChecking Drupal's requirements| 00:01 | Here's the brief speech that describes
Drupal from a technical point of view.
| | 00:05 | It's a set of computer programs
that accesses a database and delivers
| | 00:10 | information through a web server.
| | 00:12 | That statement implies the three
parts that you need to run Drupal;
| | 00:15 | you need a way to run those
programs, a database and a web server.
| | 00:20 | The devil is in the
details though, so here they are.
| | 00:23 | First, there are Drupal's stated requirements.
| | 00:26 | To run the programs, you need the
PHP programming language installed.
| | 00:30 | Specifically, it has to be
version 5.2 or higher to run Drupal 7.
| | 00:35 | Secondly, you need a database program.
MySQL is preferred, but others are possible.
| | 00:41 | And you can read the details at
that URL that you see in front of you.
| | 00:44 | That's drupal.org/node/310069.
| | 00:49 | Thirdly, you need a web server.
| | 00:51 | Again, there is a strong preference for
Apache, although you could run it with
| | 00:55 | a different sort of web server as well.
| | 00:58 | Now those are the stated
requirements for Drupal.
| | 01:00 | There are also some other
requirements which are not often mentioned.
| | 01:04 | First, you need a way to install
the Drupal program on your server.
| | 01:08 | Some web hosts don't give
you enough access to do that.
| | 01:10 | Usually it's installed in one of two
ways: either the web hosts installs it for
| | 01:15 | you, or they give you
enough access to do it yourself.
| | 01:17 | If you have any problems with
this, speak with your web host.
| | 01:21 | Secondly, you need sufficient
permission to run the Drupal program;
| | 01:25 | just getting the files on
the server isn't enough.
| | 01:27 | Again, if you have any problems with
that, your web host is who to talk to.
| | 01:31 | Thirdly, and along the same lines, you
need enough disk space, memory use, and
| | 01:36 | bandwidth allowance.
| | 01:37 | And you need system
administration skills to manage all of this.
| | 01:42 | There are two ways to check
these requirements quickly.
| | 01:45 | First, if you have the database program
phpMyAdmin running, it shows all these
| | 01:50 | version numbers in the web
server section of its front page.
| | 01:53 | I have already installed
Drupal on my desktop computer.
| | 01:56 | And we are using the Acquia Drupal
Stack installer, which includes phpMyAdmin.
| | 02:01 | You will learn about that in the
section of this course about installing Drupal
| | 02:04 | on Mac OS X or Windows.
| | 02:06 | To see that information through the
Acquia Drupal Stack Installer, click Manage
| | 02:10 | My Database. That will bring
up the phpMyAdmin program.
| | 02:14 | Over here we see some of that information.
| | 02:16 | There is MySQL version. That's terrific.
| | 02:19 | The Apache version, also fine.
| | 02:21 | To get the PHP information, I
am going to do a little trick.
| | 02:25 | I have created a file in the exercise
files, which is a very simple PHP command
| | 02:30 | here, which will give us
all the PHP info we need.
| | 02:33 | I will move that into the top level
of our Drupal installation, and you'll
| | 02:37 | remember we called that 2trees.
| | 02:40 | Take that file and just drop it here.
| | 02:43 | Now the file is called phpinfo.php.
| | 02:46 | I will then go back to my site, which I
have already loaded up here, and at the
| | 02:51 | end of the URL, I will type phpinfo.php. There.
| | 02:56 | Now if look through here, we will see
all of the configuration information we
| | 03:00 | could possibly want.
| | 03:01 | This does open up a security hole,
however, so after you have looked at it and made
| | 03:06 | sure that you have what you need,
| | 03:08 | go back and remove and throw away that file.
| | 03:11 | Again, that's phpinfo.php.
| | 03:14 | Finally, if you have any problems with
your site once it's installed and you
| | 03:18 | think it might be because you aren't
meeting any of their requirements of Drupal
| | 03:21 | or one of the add-on modules you
installed, you can check it by looking at
| | 03:25 | Drupal's Status Report screen.
| | 03:27 | I will switch back to my site and go
there by clicking Reports and Status report.
| | 03:32 | This will also tell you
have any problems you have.
| | 03:35 | For example, we have a problem with a
file directory that can't be written.
| | 03:38 | We can go back and change that later.
| | 03:41 | You will learn more about this report in
the sections about administering Drupal
| | 03:45 | and going further with
Drupal later in this course.
| | 03:48 | So you need PHP, MySQL, and a web server.
| | 03:52 | All of these are satisfied by
installing what's called an AMP Stack.
| | 03:56 | And you will learn how to do that
in the part on installing the Acquia
| | 03:59 | Drupal Stack installer.
| | 04:01 | So all of that is
actually taken care of for you.
| | 04:03 | Now I have tried to give you a high-level
overview of what you need to run Drupal 7.
| | 04:07 | For details, however, visit the
official page at drupal.org/requirements.
| | 04:13 | When you do, be sure you're
looking at the requirements for Drupal 7.
| | 04:16 | The drupal.org site officially
supports both the current and previous
| | 04:20 | version--that is, Drupal 6.
| | 04:22 | And some information is even older than that.
| | 04:25 | If you can't find your answer there
and you are trying to install Drupal on a
| | 04:28 | remote server, chances are you need to
talk to your system administrator at the
| | 04:32 | web service provider itself.
| | Collapse this transcript |
| Investigating Drupal's inner workings| 00:00 | The truth is, you don't need to know how
Drupal works on the inside to make your site work.
| | 00:05 | Once it's installed, you will probably
never touch the database server or the web
| | 00:09 | server or the files directly.
| | 00:11 | You can do all that through
Drupal's own web-based interface.
| | 00:14 | Still, a bit of understanding will
help you talk with programmers, system
| | 00:18 | administrators, and others who you
will be dealing with if you start doing
| | 00:21 | any custom development. So here we go.
| | 00:24 | First, let's look at how traditional HTML works.
| | 00:28 | Someone goes to your site by
clicking a link or typing in a URL.
| | 00:31 | That request goes through the
Internet to a web server, which is usually
| | 00:35 | based on software named Apache.
On that server is your HTML page, which
| | 00:39 | contains the text content to be
delivered and instruction on how to gather
| | 00:43 | other files together.
| | 00:45 | Once all that stuff is organized, the web
server delivers the complete page back
| | 00:49 | over the Internet to the
person who requested it.
| | 00:52 | So that's how a traditional HTML site works.
| | 00:55 | Now, let's take a look at the
way that Drupal does things.
| | 00:59 | It starts out the same way, with
someone sending a request over the Internet
| | 01:02 | to your web server.
| | 01:04 | But then instead of an HTML page, the
web server connects to a program written
| | 01:08 | in the PHP language.
| | 01:10 | This is the first point of contact with Drupal.
| | 01:13 | That program gathers together graphic
files and other resources just like the
| | 01:16 | HTML page, but with two differences.
| | 01:19 | First, unlike the HTML page, the
program itself doesn't contain any of your
| | 01:24 | site's data; that's mostly stored in a database.
| | 01:27 | Second, that first program starts a
whole cascade of dozens of PHP programs
| | 01:31 | calling each other, very
quickly and very efficiently.
| | 01:35 | When they're all done, and it only
takes a fraction of a second, the completed
| | 01:39 | page returns through the web
server to the person who requested it.
| | 01:43 | I should mention that this
procedure isn't actually Drupal specific.
| | 01:46 | It's how just about all content management
systems work, including WordPress, Joomla!
| | 01:51 | and even homebrewed systems.
| | 01:54 | So understanding this architecture will
serve you in good stead, no matter what
| | 01:57 | CMS you use. But, back to Drupal.
| | 02:01 | A site essentially lives in three parts:
the Drupal files, your site's files, and
| | 02:06 | the database which holds the site's content.
| | 02:08 | We will look at each of these.
| | 02:11 | First, Drupal's files: this is
everything in the Drupal folder, except what's in
| | 02:15 | the sites folder, which is inside it.
| | 02:18 | Next, your site's files, which
are inside that sites folder.
| | 02:21 | This is a where you will store not only
all the graphics on your site, but also
| | 02:25 | any custom programming and design files.
| | 02:27 | Finally, we have Drupal's database.
| | 02:30 | Drupal automatically sets this up when
you install it. Generally, you never need
| | 02:33 | to touch this database.
| | 02:35 | We will only very briefly look at
it a few times during this course.
| | 02:39 | Don't worry if you have missed any of that;
| | 02:41 | it's a lot of information to absorb, and
is only necessary if you want to start
| | 02:45 | mucking around in Drupal's guts.
| | 02:47 | On the other hand, if you want a lot
more information about Drupal's inner
| | 02:51 | workings, the place to find it is on drupal.org.
| | Collapse this transcript |
| Learning Drupal's basic workflow| 00:00 | This video picks up where the one about
getting a Drupal site up fast left off.
| | 00:04 | Like that video, this one shows you a
few features of how you will work on your
| | 00:08 | Drupal site after it's installed, but I am not
going to get into the details. But don't worry;
| | 00:13 | at each step I will point you to
videos elsewhere in the course that will
| | 00:17 | provide those details.
| | 00:18 | We couldn't possibly touch on all the
things you could do on your Drupal site
| | 00:22 | in a five-minute video, but I will try to show
you some of the most commonly needed features.
| | 00:26 | So here we go.
| | 00:27 | The first thing you will probably want to do is
to add content to your site. Well, that's easy.
| | 00:32 | We have the Add content link
here and one up here as well.
| | 00:36 | Click either one of them and then
choose what content type you want.
| | 00:39 | I will just choose Basic page.
| | 00:41 | The Title I will say is "Welcome to our site!"
| | 00:45 | For the Body I'll put, "This
will be the front page, woo-hoo!"
| | 00:52 | I will then scroll down to the bottom
and put it on the front page and make
| | 00:57 | it sticky and save.
| | 00:58 | Again, don't worry about exactly
what I'm doing, because you will learn
| | 01:01 | these details later.
| | 01:02 | In particular, you will learn how to
create content like this in the videos
| | 01:05 | about understanding nodes
and creating basic content.
| | 01:09 | Now when we go back to
our front page, there it is.
| | 01:12 | The next thing I am going to
do is change the title up here.
| | 01:16 | To do that, I go to
Configuration and Site information.
| | 01:19 | I'll change it to My new site, and for the
Slogan, how about, "Turns meat into mayonnaise!"
| | 01:30 | Scroll to the bottom and save.
We close the overlay, and there it is.
| | 01:35 | The next thing I want to do is change
the whole look of this site, which is very
| | 01:39 | easy in Drupal, because it
separates content from presentation.
| | 01:43 | The way you do that is by going up to
Appearance and then choosing a theme.
| | 01:47 | I am going to use Garland.
Click Enable and set default, scroll down and save
| | 01:53 | configuration and then close.
| | 01:57 | Immediately, the whole look of the site changes.
| | 02:00 | I think I liked it the other way,
so I will just switch it back.
| | 02:02 | Again, Appearance > Set default.
| | 02:05 | I don't even have to say Save.
| | 02:07 | I can just close this out, and it's done.
| | 02:09 | You will learn how to do this in the
video about changing site information,
| | 02:13 | graphics, and interface.
| | 02:15 | By the way, you'll notice that I got
there by clicking in this black area in
| | 02:18 | the top of the screen.
| | 02:20 | That's called the toolbar.
The gray area underneath it is called the shortcut
| | 02:23 | bar, and when you click around,
you see that this overly pops up.
| | 02:28 | You will learn all about that in
the section Controlling Drupal.
| | 02:31 | The next thing I'll do is I will
create a page with a menu link.
| | 02:34 | Again, I go up to Add Content.
| | 02:36 | I'll make this one let's say an article,
and then just type in a title and body
| | 02:41 | again, "About us", "We are great!
| | 02:45 | What more do you need to know?"
| | 02:49 | Scroll down. Next to menu Settings,
I will provide a menu link and save.
| | 02:55 | Now when we go home, you will notice
once again we have our little tab up here.
| | 03:00 | All of this happens very quickly in Drupal.
| | 03:02 | You will learn more about menus in the
section about helping users find their way around.
| | 03:07 | Finally, I will do two more small things.
| | 03:10 | For one, I'm going to put a little bit
more information into the sidebar, and it
| | 03:13 | will be what's called dynamic content--
| | 03:15 | that is, content that I don't explicitly create,
| | 03:18 | but the Drupal keeps an eye on
and then puts the information there.
| | 03:22 | To do that, I will go up to Structure and
Blocks and scroll down to my disabled blocks.
| | 03:28 | I think I will put Recent
Content in the left-hand column.
| | 03:30 | I choose that, click Save blocks,
close my overlay, and there it is.
| | 03:36 | We see those two items we just created.
| | 03:38 | And if we were to create more,
it would continue showing us that.
| | 03:42 | You can do a lot with these little
bits of content, which are called blocks.
| | 03:45 | You will learn about those and about
how to change your site's entire graphical
| | 03:49 | design in the video about
changing a site's interface.
| | 03:52 | Finally, I'm going to turn on a feature
of Drupal that right now isn't enabled.
| | 03:56 | To do that, I go up to Modules and scroll down.
| | 04:00 | The one that I'm going
to turn on is called Poll.
| | 04:04 | Scroll to the bottom and save configuration.
| | 04:08 | I close out our administrative overlay,
and now I can add what's called a Poll.
| | 04:13 | For a question, I will just say "Yes or No?"
and as my choices, there will be "Yes"
| | 04:18 | and "No," and I will just fake a vote here,
say that more people want it to be Yes
| | 04:25 | than No, and save it.
| | 04:30 | Now when we go to our front page, we
see that poll, where we can vote and
| | 04:36 | then see the results.
| | 04:38 | I enabled one of Drupal's included
modules there, which allowed me to design
| | 04:42 | questionnaires for my site.
| | 04:43 | You will learn how to do that in the
section about enabling other content types,
| | 04:47 | and you will learn how to further
extend Drupal's functionality in the section,
| | 04:51 | "Expanding a Site's Capabilities with Modules."
| | 04:54 | Well, that takes you through maybe
0% of what you will probably do with
| | 04:58 | Drupal in the first week of using it, and it
only touches on far less of what it's capable of.
| | 05:04 | We haven't described image handling
or setting up tags or managing users or
| | 05:08 | many, many other features that Drupal gives you.
| | 05:11 | But I think you got an idea of how easy
it is to create and run a basic Drupal
| | 05:15 | site once you know what you're doing.
| | 05:17 | The rest of the videos in this
series will take you even further towards
| | 05:21 | possession of a lot more of what Drupal can do.
| | Collapse this transcript |
| Understanding key terms in Drupal| 00:00 | As with any community, the Drupal
world has its own jargon--that is, terms that
| | 00:05 | either don't exist or have a
different meaning outside the community.
| | 00:09 | Fortunately there aren't many such
words, but understanding the few Drupal-
| | 00:13 | specific terms will help you not only
to communicate with others who use it,
| | 00:17 | but also to understand some of the
concepts you need again and again as you
| | 00:20 | create your Drupal site.
| | 00:21 | I'll show you around a sample site
as a way of defining these terms.
| | 00:26 | The first term is "core."
| | 00:28 | You already known what this is;
| | 00:30 | core is Drupal as you
download it from drupal.org.
| | 00:33 | There are other versions of Drupal,
but the one you get from drupal.org is
| | 00:37 | considered sort of the official
version, or what is generally called core.
| | 00:42 | A module is something that extends Drupal;
| | 00:44 | in fact, Drupal is made up of modules.
| | 00:47 | If we switch to our site and click the
Modules button up here, we see a list of
| | 00:51 | modules that come in core Drupal.
| | 00:53 | You can turn these on and off by
checking their boxes and scrolling to the
| | 00:56 | bottom and then clicking Save Configuration.
| | 00:59 | You can download additional modules to
extend what Drupal does by going to drupal.org.
| | 01:04 | The next term is "theme."
| | 01:05 | A theme is what defines
the way that your site looks.
| | 01:09 | In Drupal, you take a look at
your themes by clicking Appearance.
| | 01:13 | Right now, our default theme is called Bartik.
| | 01:15 | This is the one that visitors see
when they first come to the site.
| | 01:19 | Other themes that are available are
Seven--that's the one we see here when
| | 01:22 | we're administering the site-- and then
there are two additional ones that are
| | 01:25 | disabled by default.
| | 01:27 | In addition, you can download hundreds and
hundreds of other themes from drupal.org.
| | 01:32 | A content type is a template for bits
of content that you have on your site.
| | 01:37 | By default, there are two, and you see
those by clicking Structure and then
| | 01:40 | click Content Types.
| | 01:42 | There is the article and the basic page,
and you can create additional ones, as
| | 01:46 | you'll learn later in this course.
| | 01:48 | They differ in which fields they contain,
along with some other important bits of
| | 01:52 | information, such as whether the
content appears on the front page.
| | 01:57 | Now a moment ago I mentioned fields;
| | 01:59 | they are places for
information inside a content type.
| | 02:02 | As an example, let's say you have a
content type called customer. That might
| | 02:06 | include such fields as "address" and "phone number."
| | 02:10 | The pieces of content you
actually create are called nodes.
| | 02:13 | In Drupal, you create a node by
clicking Add content and then choosing which
| | 02:17 | content type you would like to create.
| | 02:19 | When you finish filling out this form
and click Save, you have created a node.
| | 02:24 | Nodes appear on their own, or they can
be collected into what's called a view.
| | 02:29 | Views are most often used to display
multiple nodes in one place, but they
| | 02:33 | can also be used to collect comments and
users, and change how you see all of those things.
| | 02:38 | We'll talk a little bit about
views later on in this course;
| | 02:41 | I delve much more deeply into them in the
course "Drupal 6: Online Presentation of Data."
| | 02:47 | Content organization also has
some special terms in Drupal.
| | 02:50 | The first is taxonomy, and it
relates to how you categorize content using
| | 02:55 | vocabularies and terms.
| | 02:56 | I know it's a little hard to understand
this conceptually, so I'll give a fuller
| | 03:01 | explanation later in the course.
| | 03:03 | The aggregator is Drupal's tool for
collecting news feeds from outside of your Drupal site.
| | 03:09 | Many news sites provide such feeds.
| | 03:11 | You can subscribe to them in your
site so that all that information appears
| | 03:15 | there by way of the aggregator.
| | 03:17 | Now we move on to some of the community terms.
| | 03:20 | The first one is "Drupalcon."
| | 03:22 | this is the semi-annual conference
that happens in the United States in the
| | 03:25 | spring, and usually in Europe in the autumn.
| | 03:28 | It draws over a thousand people
interested in Drupal each time, and features
| | 03:33 | nearly a week of conferences, learning
sessions and just places for us to meet each other.
| | 03:37 | It's a wonderful thing to go to if
you have the chance and you want to get
| | 03:40 | more involved in Drupal.
| | 03:42 | You can find out more about
Drupalcon by going to drupalcon.org.
| | 03:48 | The Druplicon is that little fellow
you see at the top of your site when you
| | 03:52 | first install Drupal;
| | 03:53 | it's the mascot of the Drupal
Community, and has been for several years.
| | 03:57 | You'll see it here and there throughout
the community, sometimes in funny contexts.
| | 04:01 | For example, some people have made
Druplicon cakes, and one person even made
| | 04:06 | a model out of bacon.
| | 04:08 | Finally we come to the Drupal
Association, which you can learn more about
| | 04:12 | association.drupal.org.
| | 04:15 | This is the Belgium-based, not-for-
profit organization dedicated to supporting
| | 04:19 | Drupal promotion and development.
| | 04:20 | They run Drupalcon, for one thing,
and just as importantly, they pay for the
| | 04:24 | servers and some of the
incidental costs that keep Drupal and its
| | 04:28 | infrastructure running. And there you have it.
| | 04:31 | While discussions on drupal.org can
get pretty technical, you now know enough
| | 04:36 | jargon to understand
most of what you read there.
| | Collapse this transcript |
| Touring Drupal's interface| 00:00 | You usually can't tell when
you visit a Drupal-built site;
| | 00:03 | it looks the same as any other site on the web.
| | 00:06 | When you're logged in as the
administrator though, lots of controls pop up that
| | 00:09 | require a little bit of explanation.
| | 00:11 | This video takes you quickly through
them, so you won't have any surprises when
| | 00:15 | you start clicking around.
| | 00:16 | I already have Drupal up and running,
and I am seeing it as you will after
| | 00:20 | watching the section about installing
Drupal--except that I'm not logged in as
| | 00:23 | the administrator, so I'll do that now.
| | 00:26 | Throughout this course when I am
using the exercise files, I use the same
| | 00:29 | username and password: "admin" and "Drupal".
| | 00:32 | Now I see the site as you would see it as
the main administrator, the super user.
| | 00:37 | I'm also looking at this site in a
different browser not logged in, and I'll
| | 00:41 | come back to this in just a few
minutes to show you some of the differences.
| | 00:44 | One thing you'll notice that's
different is there this additional block over
| | 00:47 | here, which doesn't show up when you're
not logged in. And in fact, there's one
| | 00:51 | here that tells people to log in, which
doesn't show up when you are logged in.
| | 00:55 | Drupal displays these blocks and
various contents conditionally.
| | 00:59 | It pays attention to what kind of user
is looking at the site. In this case,
| | 01:03 | I am an administrative user, and in the
other one I am what's called an anonymous user--
| | 01:07 | that is, someone who hasn't logged in yet.
| | 01:09 | Another difference is when I bring my
cursor down over these blocks, I get
| | 01:12 | this little widget here.
| | 01:14 | This is an administrative tool
called the contextual menu, and it varies
| | 01:18 | depending on what you're pointing at.
| | 01:20 | When I click here, I see
that I have three options.
| | 01:23 | I can edit the menu that this block
contains, I can configure the block itself,
| | 01:27 | and again, it depends very
much on what the block is.
| | 01:30 | Up here I only have one option to
configure the block. None of those shows up
| | 01:34 | when you're not logged in, because
you don't have access to those controls.
| | 01:38 | At the top of the screen, we see two
bars which have administrative controls:
| | 01:42 | The one in black is called the toolbar,
and it says the same no matter what
| | 01:46 | you do to your site. And one below it
the shortcut bar is customizable.
| | 01:50 | And you'll learn more about those two in videos on
using the toolbar and using the shortcut bar.
| | 01:55 | When you decide you want to do an
administrative task in Drupal, you almost
| | 01:58 | always start by clicking something
up here in the toolbar, or possibly by
| | 02:02 | clicking on one of these little widgets.
| | 02:04 | In either case, a layer pops up
called the administrative overlay.
| | 02:08 | I'll show that by clicking here, in Appearance.
| | 02:11 | You see how we see the original window
behind this one on top. You perform your
| | 02:16 | administrative functions, and then when
you're done, you either click a button
| | 02:19 | at the bottom that says something like
Save Configuration, or if you decide you
| | 02:23 | want to leave it, you just click this
little X and you go back to where you were.
| | 02:27 | Now we won't go into all of the different
things that are contained appear in the toolbar.
| | 02:31 | There are quite a few, and we are
saving that for the video on touring
| | 02:34 | administrative controls.
| | 02:36 | Some of them, such as the Content
button and the Appearance button, immediately
| | 02:40 | take you to some place
where you can make a change.
| | 02:43 | Here, for example, I could change the
look of the site by clicking Set Default.
| | 02:47 | Some take you to a list of options,
such as when I click Structure, and then I
| | 02:51 | would further click one of these,
and then I could perform some actions.
| | 02:56 | Finally we have the dashboard, which
is a highly configurable way for you to
| | 03:00 | interact with your site as an
administrator. And we'll talk about that more in a
| | 03:04 | video about the dashboard.
| | 03:05 | So that takes care of controls for
configuring Drupal, but that's only one part
| | 03:10 | of running a web site.
| | 03:11 | Once the site is the way you want
it, it's time to add your content.
| | 03:14 | That's easy enough to do. Just go up to
the shortcut bar here and click Add Content.
| | 03:19 | Once you are there, you choose which
content type you want to add and click its link.
| | 03:24 | Now this screen is one you'll find
yourself looking at an awful lot once your
| | 03:27 | site is up and running.
| | 03:28 | You'll learn more about adding content
in the sections about building a Drupal
| | 03:32 | site, controlling content, and several others.
| | 03:34 | It's a big subject, so
there's a lot of videos on it.
| | 03:37 | Finally, we come to users.
| | 03:39 | Drupal, as I've mentioned
before, is a multi-user system.
| | 03:42 | You can control what people can and
can't do on your site through a system of
| | 03:45 | roles and permissions.
| | 03:47 | You learn more about that in the
section "Managing Users," but briefly you get
| | 03:51 | there by going to people--which shows
you a list of people, and then you can
| | 03:54 | perform certain actions on them--and
then permissions and roles once you're in
| | 03:59 | that Permissions tab.
| | 04:00 | From an individual user's point of
view though, the important thing is that
| | 04:04 | everybody who logs in gets a user
account and a profile that goes with it.
| | 04:08 | We can see that by clicking up here
where it says "hello admin," or if we were an
| | 04:11 | ordinary user, would see this
My Account up here in the corner.
| | 04:15 | From there, we can take a look at
information about the user, or go in and edit it.
| | 04:19 | I want to remind you that nearly
everything you have seen in this video is from
| | 04:23 | the administrator's point of view,
but by Drupal's default settings, the content
| | 04:28 | of your site is available to all
visitors, even if they don't log in.
| | 04:32 | Much of this course deals with how you can
control exactly what's seen and how and by whom.
| | 04:38 | Drupal gives you an astonishing level of
control over those things, and accessing
| | 04:42 | these controls are easy once
you're used to the Drupal interface.
| | Collapse this transcript |
|
|
3. Installing Drupal on Mac OS X or WindowsInstalling Acquia Dev Desktop| 00:00 | As I mentioned in the video
"Checking Drupal's requirements,"
| | 00:03 | you need three systems installed on
your computer in order to run Drupal.
| | 00:07 | Let's review.
| | 00:08 | First, Drupal was written in the PHP
language so you'll need a PHP interpreter to run it.
| | 00:14 | Second, Drupal stores all of its
information and settings into a database.
| | 00:17 | Most commonly, that's
the MySQL database program.
| | 00:21 | Third, because it's a web program you need a way to
serve up the HTML pages that it produces to the Web.
| | 00:27 | Usually that's through the Apache Web server,
although you could use another one such as IIS.
| | 00:31 | When you put these all together,
Apache plus MySQL plus PHP,
| | 00:36 | it creates what they call an AMP stack.
| | 00:39 | Add Drupal to that
| | 00:40 | and you get a DAMP sack.
| | 00:41 | You can cobble all these bits together yourself, but the
easiest way to do it is by downloading them all in one package.
| | 00:48 | When I recorded Drupal 6
Essential Training in 2008
| | 00:52 | to two best AMP stacks were MAMP
for MacOS X and WAMP for Windows.
| | 00:56 | For MAMP go to mamp.info,
| | 00:59 | and for WAMP go to wampserver.com.
| | 01:02 | If you decide to go either these routes,
| | 01:04 | you may want to watch the lynda.com
course Installing Apache, MySQL and PHP.
| | 01:09 | But both MAMP and WAMP have problems.
| | 01:12 | Fortunately there's now an AMP stack
that specially tuned to run Drupal.
| | 01:16 | It'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:23 | Drupal called Acquia Drupal.
| | 01:25 | You can get it at acquia.com/downloads.
| | 01:29 | After we installed the Acquia Dev Desktop there'll be two
additional steps before we actually have Drupal running.
| | 01:35 | The first is to replace the Acquia version of Drupal that
comes in the Acquia Dev Desktop with the core version of
| | 01:40 | Drupal from Drupal.org.
| | 01:42 | You'll see how to do that in the
video "Importing core Drupal into DAMP."
| | 01:46 | Then 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:54 | This will get Drupal
running on your home computer.
| | 01:56 | The 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:03 | Anyway, let's get started.
| | 02:05 | First we'll grab Acquia DAMP
| | 02:07 | Once again, it is from acquia.com/downloads.
| | 02:11 | Scroll down and select the version you want. It doesn't
matter whether you choose Drupal 7 or Drupal 6 since we're
| | 02:16 | going to be getting rid of the version of Drupal
that comes with it. Once you have your version,
| | 02:20 | click Download
| | 02:22 | and then save it wherever you like.
| | 02:25 | This may take a while.
| | 02:28 | Once downloaded, double-click the file.
| | 02:31 | You may have to uncompress it
| | 02:34 | and confirm that you want to run the program.
| | 02:37 | This procedure may be slightly different
on the Mac, but it'll generally be the same.
| | 02:41 | Once there, you start
stepping through the installer.
| | 02:44 | Simply click Next.
| | 02:45 | Select the components that you want. Generally
speaking all that you need is the core components here.
| | 02:51 | Then click Next.
| | 02:52 | You're going to be told exactly
what's going to be installed. Click Next.
| | 02:56 | And then you have a license agreement to
agree to. If after reading it you agree to it,
| | 03:00 | then leave this as
selected as Yes and click Next.
| | 03:04 | Here you decide where
you want to put the program
| | 03:07 | and 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:12 | This 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:01 | At the end of the last video, we
had installed the Acquia Drupal Stack
| | 00:04 | installer, also known as DAMP.
| | 00:06 | I have started recommending it because
it's built especially to run Drupal, but
| | 00:09 | it does have one peculiarity.
| | 00:12 | Instead of installing core Drupal,
which is what you download from the
| | 00:15 | drupal.org site, it installs Acquia's
own version of Drupal. And you can tell
| | 00:19 | the difference because up
here, it says Acquia Drupal.
| | 00:22 | So our next step is to
install core Drupal into DAMP.
| | 00:26 | Here's how you do it.
| | 00:27 | The first place to go is drupal.org,
where you can download core Drupal.
| | 00:31 | The specific page is drupal.org/project/drupal.
| | 00:36 | You then scroll down and take
a look at this Downloads area.
| | 00:39 | Now, I'm making this video before the
official release of 7, so I am going to
| | 00:43 | download the one that's
here under Other releases.
| | 00:45 | Once it has been released, you'll see
7 up here under Recommended releases.
| | 00:49 | In any case, you should use the
most recent released version.
| | 00:52 | I would then click the Download link.
| | 00:54 | I have already actually
downloaded the file and uncompressed it.
| | 00:58 | If you have any problems doing that,
see Garrick Chow's videos about computer
| | 01:01 | literacy, which are also available on lynda.com.
| | 01:04 | When I go to my Desktop, I
see the folder right there.
| | 01:07 | This is the Drupal software.
| | 01:09 | It still has its original name, so I am
going to change that to the name of my site.
| | 01:14 | Throughout this course we'll be
building a site for a fictional Olive Oil
| | 01:17 | Company, called Two Trees Olive Oil, so I call
it 2trees. Then we go back to the Acquia Stack,
| | 01:23 | go to Settings, and then click Sites.
| | 01:26 | Incidentally there's another way you
can get to this, and I usually do it this
| | 01:29 | other way, which is by going to this
little dropdown menu and clicking More;
| | 01:33 | that takes you directly to the sites window.
| | 01:35 | We then click Import. If you were to click New,
| | 01:38 | you would create a new Acquia Drupal
site, and we want it to be core Drupal.
| | 01:43 | So I click Import, find the folder that
I just uncompressed, select it, and click
| | 01:47 | OK. Then I create a new database.
| | 01:50 | I am going to call that 2trees, and for
consistency, the server will be 2trees.
| | 01:55 | You can't leave it as localhost
because that's the name that went with the
| | 01:58 | original site that we
installed. Then we click Import.
| | 02:02 | The process only takes a moment, and it
launches a screen in your browser which
| | 02:06 | starts the installation
process on Drupal's side.
| | 02:09 | Incidentally, the Acquia Stack will
support both of those sites, the one that
| | 02:13 | you installed when you first put in the stack,
and this one, and any others that you add.
| | 02:18 | In order to switch back and forth among
them, simply click the one you want and
| | 02:22 | click Go To, and that'll take you to your site.
| | 02:26 | Now, Drupal isn't completely installed yet.
| | 02:28 | We still have to go through its own
installation process, but don't worry.
| | 02:31 | It's quick and easy.
| | 02:32 | Now I just want to mention about the
differences between core and Acquia Drupal.
| | 02:37 | Personally I like Acquia Drupal a lot,
and frankly I usually use it as a base for
| | 02:41 | all of the sites that I build.
But it is less common than core Drupal.
| | 02:46 | It has a lot of extra pieces and a few
complications, and those are outside the
| | 02:50 | purview of this course.
| | 02:51 | If you're asked to work on a Drupal site
that's someone else has set up, chances
| | 02:55 | are it will have been created
in core Drupal, not Acquia Drupal.
| | 02:58 | With that in mind, the rest of this
course assumes that you're running
| | 03:01 | core Drupal.
| | Collapse this transcript |
| Running Drupal's installer on top of DAMP| 00:01 | In previous videos, we finished
installing the Acquia Drupal Stack installer
| | 00:04 | called DAMP, and we also
imported core Drupal into DAMP.
| | 00:08 | Now we'll continue as Drupal
7's own installation process.
| | 00:12 | This list in the left-hand column shows a
number of steps on the way to completion.
| | 00:16 | We'll be skipping two of them
because we're installing Drupal using DAMP,
| | 00:20 | rather than MAMP or WAMP.
| | 00:22 | Mainly, we don't have to verify
requirements or set up the database.
| | 00:25 | We'll see how to do those things in the
section, "Installing Drupal on a Server."
| | 00:30 | So we start at the beginning
with the installation profile.
| | 00:33 | Drupal 7 is the first time that
multiple installation profiles are included:
| | 00:37 | Standard and Minimal.
| | 00:38 | They actually both install the same
software, but with the Minimal profile, only
| | 00:43 | a few of the pieces are turned on.
| | 00:45 | It's particularly useful for
hard-core developers and folks with a strong
| | 00:48 | do-it-yourself ethic.
| | 00:50 | You know, those people who want to
build their sites from the ground up without
| | 00:53 | distraction, such as the administrative
overlay or a search box. But personally
| | 00:57 | I always use the standard profile,
| | 00:59 | so that's what we'll do here. Leave it
selected and click Save and continue.
| | 01:03 | By default, Drupal installs in
English, but it is possible to download
| | 01:07 | other languages for Drupal so
that the entire interface is in your
| | 01:10 | preferred language.
| | 01:12 | You can learn all about that by clicking
this link. But for us, we'll just leave
| | 01:15 | it as it is, and click Save and continue.
| | 01:18 | Then the installation process begins.
| | 01:20 | We're almost done, but before we go on,
I want to talk a little bit about this
| | 01:23 | Requirement screen, just in case you
decide to install Drupal on top of WAMP or MAMP.
| | 01:29 | The two most important things is that
you'll have to manually duplicate a file
| | 01:32 | named settings.php on your server.
DAMP, again, takes care of that for you.
| | 01:37 | Secondly, DAMP make sure that the PHP
interpreter has enough memory to run Drupal.
| | 01:42 | Drupal demands at least 40 megabytes,
but WAMP, get this, only gives it 2
| | 01:46 | megabytes, and MAMP gives it 8 megabytes.
| | 01:49 | By comparison, DAMP gives it 128, so
there is plenty of memory if you use DAMP.
| | 01:53 | Finally, we configure our site.
| | 01:55 | I'm going to name this "Two Trees Olive
Oil" after the site we'll be building, put
| | 01:59 | in an e-mail address, and a username.
| | 02:02 | Now the username you enter here is the
one that's known as the super user that
| | 02:06 | has control over the entire site.
| | 02:09 | I'm going to give that a name "admin", and as a
password I'll just use "drupal", all in lowercase.
| | 02:15 | Keep that in mind if you're using the
exercise files that come with this course,
| | 02:18 | because when you use the exercise files,
you'll have to log in as admin using
| | 02:22 | the password drupal.
| | 02:23 | Of course, you can use whatever username
and password you like for your own site.
| | 02:28 | Scroll dow. Select a country for this site.
| | 02:31 | This is important for such
matters as date and time formatting.
| | 02:35 | I'm in the United States, and I'm near
Los Angeles, so I'll leave it as it is.
| | 02:39 | Now we're ready to go. But before we
click Save and Continue, I just want
| | 02:43 | to mention these two check boxes, and I
recommend that you keep both of them checked.
| | 02:47 | The first one will make sure
that your site is up to date.
| | 02:50 | Every once in awhile, it'll send a
little bit of information from your site to a
| | 02:54 | central server at drupal.org,
and compare your version number with the most
| | 02:58 | recent Drupal version.
| | 02:59 | Don't worry, it doesn't send any personal
information about the site, or any of your content.
| | 03:03 | The second one determines whether
drupal.org will then send you an e-mail when
| | 03:07 | there is an update that you have to install.
| | 03:09 | Very useful, and I
recommend you leave it checked.
| | 03:12 | Then click Save and continue, and we're done.
| | 03:16 | Click Visit your new site, and there it is.
| | 03:19 | Now we did this on top of DAMP,
and since DAMP is fairly new, I want to mention
| | 03:23 | a few things that are different
between it and other AMP Stacks.
| | 03:27 | First of all, it's set up
for multisite installations.
| | 03:30 | You might remember that when we
clicked here and went to More,
| | 03:33 | we already have more than one site installed.
| | 03:36 | If we go back to our Drupal folder,
2trees, we double-click it to open and then
| | 03:41 | double-click on sites, which is
where all the site information is.
| | 03:45 | Under other AMP Stacks, you will
typically just see all and default, but because
| | 03:50 | we're running DAMP, we also see this
2trees folder, and that's where all of your
| | 03:53 | files will actually be stored.
| | 03:56 | One other thing that's different
about DAMP is it changes the way the
| | 03:59 | settings.php file works inside
that 2trees folder, inside sites.
| | 04:04 | I'm going to just open that up with a
text editor and scroll down a little bit.
| | 04:10 | Usually all of the information that
connects your Drupal site to the database--
| | 04:14 | which has all of your contents and
settings--is down here around line 181.
| | 04:19 | With DAMP, all of that
information goes at the end instead, and it
| | 04:23 | overrides what came before.
| | 04:25 | So here is the information for our site.
| | 04:30 | That comes into play when you decide to move
your site to a server, as you'll see later.
| | 04:35 | So now we have Drupal running on
either Windows or Mac, but chances are that
| | 04:39 | your Internet service
provider runs either Linux or UNIX.
| | 04:42 | So we're going to talk about how to
get Drupal up and running there in the
| | 04:45 | section on installing Drupal on a server.
| | 04:48 | It's a fair amount trickier,
and there are more places where things can go
| | 04:51 | wrong. But the overall procedure is the
same, so what you've learned here will
| | 04:55 | stand you in good stead.
| | Collapse this transcript |
|
|
4. Installing Drupal on a ServerUploading Drupal with SFTP| 00:01 | We've already installed
Drupal on our local computer--
| | 00:03 | that is, our desktop or laptop.
| | 00:06 | Now we're going to install it on a
remote computer that is a server from which
| | 00:09 | other people would be able to see your site.
| | 00:12 | I have to warn you that this is more
difficult than installing it on your local computer;
| | 00:16 | in fact, there are myriad
ways that it can be done.
| | 00:19 | I'm going to show you two.
| | 00:21 | In this video, I'll show you how
to do it using an FTP program.
| | 00:25 | In another video, I'll show you how to
do it using an SSH program, which is a
| | 00:29 | command-line interface.
| | 00:30 | I've already set up where
I'm going to put my site.
| | 00:33 | This is on a host called webenabled.net,
although you could use whatever web host to like.
| | 00:38 | I've also set up a site where it's going to go.
| | 00:40 | It's at this twotrs.dev3.webenabled.net.
| | 00:45 | And if we click there, we see there
is just a simple page there right now.
| | 00:49 | The FTP program I'm going
to use is called FileZilla.
| | 00:53 | You can download it yourself at
filezilla-project.org, or you can use any other
| | 00:58 | FTP program you like.
| | 01:00 | They all have different interfaces
though, so what you see here will only
| | 01:04 | work with FileZilla.
| | 01:05 | The program you use will probably have
similar features, although they will be
| | 01:08 | located in different places.
| | 01:10 | Our next step is to grab the Drupal
software from drupal.org, and you can get
| | 01:15 | that at drupal.org/project/drupal.
| | 01:18 | Some FTP programs let you transfer
directly from drupal.org to wherever you're
| | 01:22 | hosting your site, but not
everyone will let you do that.
| | 01:25 | So I'm going to download it to our local
computer, uncompress it there, and then
| | 01:30 | reupload it to our remote server.
| | 01:33 | Once we're at drupal.org site, we scroll
down until we get to the Downloads area.
| | 01:38 | Now I'm recording this video before
the official release of 7.0, so I'll
| | 01:42 | actually grab the one that's
down here in the yellow area.
| | 01:45 | If it's been released by the time
you're watching this video, you'll find it up
| | 01:49 | here in the Green area.
| | 01:50 | In any case, you want to
grab the most recent version.
| | 01:53 | To download it, I click Download, and the
file goes to my default download location.
| | 01:59 | Once you've downloaded it,
you'll have to uncompress the file.
| | 02:02 | On the Mac, it's fairly easy to do;
| | 02:04 | you simply double-click it on.
| | 02:05 | On Windows, you'll need a help
program, such as WinZip or 7-zip.
| | 02:10 | You can download WinZip at WinZip.com,
and 7-zip is available at 7-zip.org.
| | 02:17 | But we have it already decompressed here,
and we also have FileZilla already running.
| | 02:22 | I'll now connect to my remote server.
| | 02:25 | I've already set up all of the
details here, so all I have to do is click
| | 02:30 | Connect, and there we are.
| | 02:32 | Once you're on your remote server,
you might find that it's not completely
| | 02:35 | obvious where your web site goes.
| | 02:37 | One common place is in a
folder called public_html.
| | 02:41 | That sometimes also has
aliases with names such as www.
| | 02:45 | In any case, if you have any problems
at this point, speak with your web host.
| | 02:49 | When I open up that folder, I see that
there is another folder inside it with
| | 02:53 | the name of my site, twotrs.
| | 02:56 | In there is an index.html file.
| | 02:59 | This index.html page is what we
went to earlier, as you can see here.
| | 03:04 | We're going to get rid of that.
| | 03:05 | So in FileZilla I highlight that and
the logo, right-click, and choose Delete.
| | 03:12 | Incidentally, FileZilla is available
for both Mac and PC, and if you're on Mac,
| | 03:16 | you would hold down the
Control key while you clicked.
| | 03:18 | Now we'll move all of our Drupal files
that are on our local computer over to
| | 03:23 | our remote computer.
| | 03:24 | First, we'll navigate to that folder.
| | 03:26 | I see we're actually already there.
| | 03:28 | I then select everything that's inside
this folder, but I have a warning:
| | 03:31 | you have to make sure that all
of the dot files are showing.
| | 03:35 | If you don't see a file .htaccess,
then you don't have them all showing.
| | 03:39 | I highlight everything, except for this
double dot at the top, which is a special
| | 03:43 | control file, and I drag them over.
| | 03:46 | I do want to mention, this isn't the
only way to do it. If your FTP program
| | 03:51 | allows you to uncompress files right
on your remote server, the best way to
| | 03:55 | do it is to transfer it directly from
drupal.org, and then uncompress it on the server.
| | 03:59 | Unfortunately, that's not possible
here, so this is a slightly more complex
| | 04:04 | way that still works.
| | 04:05 | This process takes a while. The Drupal
software isn't large, but it contains
| | 04:09 | many files, and the FTP process
it looks at each individual file.
| | 04:13 | Down here you can see how many files have
been transferred and how many are still waiting.
| | 04:17 | There, the files are all transferred.
| | 04:19 | Now if we go back to our site and
reload the page, we see Drupal's initial
| | 04:25 | installation screen.
| | 04:26 | And I'll show you how to get through
the installation in a later video.
| | 04:30 | So that's one way of
installing Drupal on a remote server.
| | 04:33 | And again, there are many
variations even within FTP programs.
| | 04:37 | Personally, I prefer to use a command-
line program, such as SSH, and you'll
| | 04:41 | learn how to do that in another video.
| | 04:43 | I find that the process is
quicker and more foolproof.
| | 04:46 | However, not every web host allows you
to use an SSH program, so if you can't or
| | 04:51 | if you prefer to use a graphic
interface, FTP is a good second method.
| | Collapse this transcript |
| Uploading Drupal with SSH| 00:01 | We've already installed Drupal on our
local computer; now we're going to install
| | 00:04 | it on a remote computer, so that
people can actually go to our web site.
| | 00:08 | I should warn you ahead of time:
| | 00:10 | this is a fairly complex procedure,
and I'm going to show it to you in this
| | 00:13 | video using an SSH program, which
reaches directly into UNIX and its
| | 00:18 | command-line interface.
| | 00:19 | I found the command-line interface to be the
fastest and most reliable way of doing this;
| | 00:24 | however, some hosts don't allow you to do that.
| | 00:27 | If not, see my other video about installing
on a remote computer using an FTP program.
| | 00:33 | The first thing that you have to do is set
up a place where you'll be putting Drupal.
| | 00:37 | I've already done that on the host at
webenabled.net, and the URL I'll going to
| | 00:42 | is twotrs.dev3.webenabled.net.
| | 00:47 | In order to get there, I'm
going to use an SSH program.
| | 00:50 | On the Mac, the program you'll use
is called Terminal, and it's already
| | 00:54 | included with Mac OS X.
| | 00:56 | On Windows you have to download
another program. The one I'm using is called
| | 00:59 | PuTTY, which you can find most easily by
searching the Internet for puTTy or
| | 01:05 | going directly to the URL that you see here.
| | 01:07 | I've already set up PuTTY
and logged in to my account.
| | 01:11 | The way to see what's there is by typing
"ls". That shows all of the files that are
| | 01:16 | in that directory that you just logged in to.
| | 01:18 | To get a longer form of it, type "ls-al".
That's short for, show all files in a long form.
| | 01:25 | I find that it to be much more useful
because it shows all of these dot files
| | 01:29 | which are normally hidden.
| | 01:30 | The one we're looking for is something
like www, or in this case, public_html.
| | 01:36 | That's where the web pages are actually stored.
| | 01:39 | To go there, I type cd, which
stands for change directory, public_html.
| | 01:44 | Now here is a little trick
that's true in most UNIX servers.
| | 01:48 | You only need to type in the first
part of the name and then hit Tab, and it
| | 01:51 | fills out the rest of it.
| | 01:53 | And I hit Enter, and list it one more time.
| | 01:55 | I see that actually my site is
one more level down in that twotrs.
| | 01:59 | So I'll go down there.
| | 02:00 | Now this is something that you'll
have to learn from your web host.
| | 02:02 | Every one of them is a little bit
different, both in how you log in and in
| | 02:06 | where your web files are going to go.
| | 02:08 | If you have any problems, contact your
web host's support desk. But for me, I'll
| | 02:12 | just go into twotrs right
there and list to see what's there.
| | 02:16 | I have no files at all. And in fact, if
I go to that URL, which I'll do by going
| | 02:21 | back here and clicking on the link,
| | 02:23 | I see that I'm not allowed into that directory.
| | 02:25 | We can prove, however, that that's the
place that we want to put our files by
| | 02:29 | editing a small file called index.html.
| | 02:32 | I'm just going to put a little HTML
file there, just to test it, and I do that
| | 02:35 | using a UNIX program called nano.
| | 02:39 | I'll just say "Hello World!"
| | 02:42 | and save it out, and now I'll
reload this page. Yes, it worked.
| | 02:47 | That means we're in the right place.
| | 02:48 | I can delete that file now
with "rm", which stands for remove.
| | 02:53 | And if we reload the page, we find
once again, we're locked up. Good!
| | 02:57 | The next step is to get Drupal
and put it into that directory.
| | 03:01 | To get the Drupal files, go to
drupal.org/project/drupal, then scroll down
| | 03:07 | to the download area.
| | 03:08 | Now I'm making this video before the
official version of 7 was released,
| | 03:12 | so we're going to grab it from this yellow area.
| | 03:15 | Once it is released, it will
show up in this green area.
| | 03:18 | In any case, you want to get the most
recent version, go down to the Download
| | 03:21 | link, and if you're on a PC or a Mac
with a two-button mouse, you can right-click
| | 03:25 | here and copy the link location.
| | 03:28 | If you only have a one-button mouse, hold down
the Ctrl key, and you can do the same thing.
| | 03:32 | Then we go back to our terminal program.
| | 03:34 | We're going to get it using the UNIX
programs wget, and then paste in the URL.
| | 03:41 | In PuTTY, you do that simply
by right-clicking and hit Enter.
| | 03:45 | You see a progress bar, and there it is.
| | 03:47 | We can prove it by listing what's
in that directory, ls, once again.
| | 03:51 | Now I have to uncompress that.
| | 03:53 | To do that, I use a program called tar,
and then you need the switches
| | 03:58 | -xvzf and then the file name.
| | 04:04 | You can learn more about
those switches by taking a look at
| | 04:06 | UNIX's documentation.
| | 04:08 | We hit Enter, and we see all
the files come out. There it is.
| | 04:12 | Now, when we list, there
are now two things there.
| | 04:14 | There is the archive that we
downloaded and the uncompressed version.
| | 04:18 | I'll just get rid of the archive by typing "rm drupal
7.0-rc1.tar", and then I can hit Tab and Enter.
| | 04:28 | Done! The last thing that we need to do is to
move that copy of Drupal up one level,
| | 04:33 | so it's in the root of our directory.
| | 04:36 | If we don't do that, I'll show you what happens.
| | 04:37 | When we go to our URL and reload the
page, we still can't get into anything.
| | 04:42 | Or you might just see a list of all the
files that are in that folder depending on
| | 04:45 | how your host is set up.
| | 04:47 | So we descend into the directory by
typing "cd drupal". Once again, that's
| | 04:51 | change directory, list what's there,
just to be sure, and then move with mv,
| | 04:58 | everything that's with a star, dot dot.
| | 05:02 | What that does is it moves
everything in that folder up one level.
| | 05:05 | There is a catch I'll show you in
a second, but first I'll do that.
| | 05:08 | Now if I list it again, it should all be gone.
| | 05:11 | There is one thing we missed:
the star doesn't get this dot file .htaccess.
| | 05:17 | So we also have to move that as well,
mv space .ht, again I hit Tab to fill out
| | 05:23 | the rest of the name, and dot, dot.
| | 05:26 | Now, when I list what's in
that directory, it's all empty.
| | 05:28 | If I go up one level, now there, all
of our files are at the correct level.
| | 05:33 | We still have this empty folder, drupal-
7.0, and we can get rid of that easily
| | 05:38 | enough by saying rmdir, that's remove
directory, space drupal and hit Tab. Now we're ready.
| | 05:46 | When we reload this page, we see
that Drupal is prepared for its
| | 05:50 | installation procedure.
| | 05:52 | I know that whizzed by if you're unfamiliar
with the command-line interface of UNIX and Linux.
| | 05:56 | So here is a summary of
the commands that I used.
| | 05:59 | As I mentioned, SSH is usually the
command that you use to get to the server; ls
| | 06:03 | lists files; cd changes the directory;
wget downloads the files; tar extracts
| | 06:09 | them; rm removes anything that you need
to remove, except if it's a directory,
| | 06:13 | in which case it's rmdir; pwd, which I
didn't show, will tell you where exactly
| | 06:18 | you are in the hierarchy--
| | 06:19 | that's very useful if at anytime you get lost--
| | 06:22 | and mv will move a file
from one place to another.
| | 06:25 | In addition there are several shortcuts.
| | 06:27 | When you type asterisk that means
everything that's in your current location.
| | 06:31 | So mv space asterisk means move everything.
| | 06:35 | One dot refers to your current location.
| | 06:38 | So sometimes you'll say copy everything
to where I am now, in which case you'll
| | 06:42 | just say copy these things space dot.
| | 06:44 | Two dots gets you to a level above.
| | 06:47 | Most often you use this with cd, so cd
space, dot, dot means go up one level.
| | 06:52 | And as I mentioned several times,
when you start typing in file names,
| | 06:55 | pressing Tab completes them.
| | 06:57 | Finally, I want to mention a few
learning resources if you want to go
| | 07:00 | further with UNIX or Linux.
| | 07:02 | First, you can find information about a
specific command by typing either man,
| | 07:07 | help, or info, and then the command itself.
| | 07:10 | That varies from system to system, so if
one of them doesn't work, try the others.
| | 07:14 | And if you're not sure what the command
should be, type apropos and then the concept--
| | 07:18 | for example, apropos file or apropos permissions.
| | 07:23 | Then here are two sites that will
help you if you just want to read up some
| | 07:26 | more on UNIX and Linux.
| | 07:28 | Our next step is to set up the
database that Drupal will use.
| | 07:31 | You'll learn how to do that in the video
about creating Drupal's MySQL database,
| | 07:35 | and then we'll actually be ready to
install Drupal on a remote server, which
| | 07:39 | we'll do in the video,
"Running Drupal's installer."
| | Collapse this transcript |
| Creating Drupal's MySQL database| 00:01 | As I mentioned in the videos about
uploading Drupal using SFTP and SSH, server
| | 00:05 | configurations vary a lot, and that's
true of database configurations as well.
| | 00:10 | In this video, I'll show you two
ways to create Drupal's database.
| | 00:14 | The first uses a very common database
program called phpMyAdmin, which you see
| | 00:18 | right here on the screen.
| | 00:20 | The second method uses the UNIX or Linux
command line, which is quite a bit trickier.
| | 00:25 | Both of these require that your
Internet service provider has given you
| | 00:28 | access to certain tools.
| | 00:29 | If you have problems making any of this work,
I'm afraid you'll have to talk with them;
| | 00:33 | I won't be able to help you.
| | 00:34 | It might be that you don't have access,
or it's possible that they have set up a
| | 00:37 | different procedure for you
to make these things happen.
| | 00:40 | So here we are on the phpMyAdmin screen.
| | 00:43 | This is the interface, once again,
to the MySQL database engine.
| | 00:47 | Over here, we see the
databases that are already set up.
| | 00:50 | We're going to set up another one,
which we'll call 2trees. It's very easy.
| | 00:54 | I'll just go in to Create new database
and type it in, 2trees, and click Create.
| | 01:02 | That's all there is to it.
| | 01:03 | If I go back Home again, I see it in my list.
| | 01:07 | I just want to point out that these two
have numbers next to them. That refers to
| | 01:12 | the number of tables that
are in the database itself.
| | 01:15 | After you've installed Drupal, your
database--in this case, 2trees--will also have
| | 01:21 | a number next to it.
| | 01:22 | That's one way to tell whether Drupal has set
up correctly and is connecting to this database.
| | 01:26 | If there are no tables in it,
then Drupal hasn't been set up.
| | 01:29 | Now I'm going to delete this database
and show you how to create it using the
| | 01:33 | trickier command-line method.
| | 01:35 | Normally of course, you
just use one of these methods.
| | 01:37 | I'm showing both only
for demonstration purposes.
| | 01:40 | To get rid of it, I click Databases, then
select it, and then click this little x.
| | 01:47 | It asks whether I'm sure I
want to do that, and I say yes.
| | 01:50 | There. And it's gone.
| | 01:52 | To start the command-line method, we
first have to log into our remote server.
| | 01:56 | You can do this on the Mac by using the
Terminal program that's included in Mac
| | 01:59 | OS X. On Windows, I'm using the PuTTY program.
| | 02:03 | I've already launched PuTTY,
and I have logged in to my site.
| | 02:06 | Now to create the database. We type
in the command, which is mysqladmin -u
| | 02:12 | then our user, w_twotrs -p,
which means it'll challenge us
| | 02:18 | for the password, space, create2trees.
| | 02:24 | We're asked for the password, and it's done.
| | 02:27 | We can prove that it's there by
going back to phpMyAdmin and clicking on
| | 02:31 | Databases, and there it is. Congratulations!
| | 02:34 | You've gotten through one of the
most show-stopping tasks for most
| | 02:37 | beginning Drupal users.
| | 02:39 | If you weren't able to complete it,
don't feel bad. As I said before, this is a
| | 02:42 | step that varies a lot from server to server.
| | 02:45 | Fortunately, there's some good
documentation to help you get through it.
| | 02:48 | For one thing, you'll find
that in your Drupal folder itself.
| | 02:51 | I'll go back to that.
| | 02:52 | It's called 2trees.
| | 02:54 | And it's this file here, INSTALL.mysql.txt.
| | 02:59 | When you open it, you see the command
that I just gave you a moment ago, and it
| | 03:03 | gives you a little bit more
information if you have further problems.
| | 03:05 | There is also good
information on the drupal.org web site.
| | 03:08 | Go to drupal.org, then click
Documentation, Installation Guide, Basic
| | 03:15 | installation and Creating the database.
| | 03:20 | In the end though, you may have to get
your web host provider involved, because
| | 03:23 | they might require you to set up
the database in some other way.
| | 03:26 | But once you have the files and
database in place, you're ready to run
| | 03:30 | Drupal's installer.
| | Collapse this transcript |
| Running Drupal's installer| 00:01 | We already put the Drupal files on our server.
| | 00:03 | We did two videos on that: one for how
to do it using an SFTP program and one
| | 00:08 | using an SSH program. Then we set up
the database where Drupal will store its
| | 00:12 | content in the video about
Creating Drupal's MySQL database.
| | 00:16 | Now, we will actually run Drupal's own installer.
| | 00:19 | This step is a lot easier because
it takes place in the web browser.
| | 00:22 | You don't have to know any more UNIX
commands. And if you install Drupal on your
| | 00:26 | desktop or laptop computer by
watching the videos about running Drupal's
| | 00:29 | installer on top of DAMP, then
this will all look very familiar.
| | 00:33 | However, there are some extra steps and
a little bit of complication. But don't
| | 00:37 | worry; I'll walk you through it all.
| | 00:39 | We are starting here at a page
that's provided by my web hosting
| | 00:41 | provider, webenabled.net.
| | 00:44 | There are few things we'll have to come
back to this page for, notably the MySQL
| | 00:47 | host/port. But first we will just go
to the URL of the page where we have our
| | 00:52 | Drupal files installed,
| | 00:54 | and immediately we see our Drupal installation.
| | 00:56 | You have a choice between Standard and
Minimal, which I discussed a little bit
| | 01:00 | in the earlier video about Installing Over DAMP.
| | 01:02 | So I'll simply say, Save and continue.
| | 01:04 | Generally speaking, I always use Standard.
| | 01:07 | You can choose what language to
install in and add languages besides
| | 01:11 | English, but again, I discussed that in the
earlier video, so I'll just say Save and continue.
| | 01:15 | If you want to learn more about that
though, the best place to go is this link
| | 01:19 | right here. But for now, we go on.
| | 01:22 | Now this is a step you
didn't see in the earlier video.
| | 01:24 | You have to enter the Database name,
username, and password, and then there
| | 01:28 | are some other options.
| | 01:30 | I'm actually going to go through this
a couple of times and have it wrong.
| | 01:33 | So we're not going to get all the way
through first, so you can see what sort of
| | 01:36 | errors you'll come up against.
| | 01:38 | This is one of the hardest places of
installing Drupal, and the best way to get
| | 01:42 | answers for it is from your web host,
either by contacting them directly or
| | 01:47 | through the documentation, such as on this page.
| | 01:49 | The database name we made is called
2trees, the username was w_twotrs, and I
| | 01:57 | have my database password.
| | 01:59 | Now when I do this, it's not
going to work, here we go.
| | 02:04 | It didn't work, and it asks us a
couple of questions which, quite honestly, are
| | 02:08 | not all that enlightening.
| | 02:09 | So I will walk through it again,
and I'll change a couple of things as we go.
| | 02:13 | The problems were in this Advanced Options.
| | 02:16 | Let's go back to our documentation.
| | 02:18 | We see that the host should be
127.0.0.1. What do we have here? Ah!
| | 02:22 | It's entered as localhost,
so I'll say 127.0.0.1.
| | 02:28 | On many computers, the two are the same,
but in this case let's just go with
| | 02:32 | exactly what it tells us to use.
| | 02:33 | It also has its special port, 4847.
| | 02:38 | So I will go back and enter that: 4847.
| | 02:41 | Now let's try again, and we made it through.
| | 02:45 | Drupal is actually going
through the process of installing now.
| | 02:49 | When it's done, you will be asked for
all of the information for this site:
| | 02:52 | its name, the main e-mail address, and also
a username and password for the super user.
| | 02:58 | That's the one who has access to
everything on your Drupal site.
| | 03:01 | I will do it the same way that I did
in the earlier video about installing on
| | 03:04 | DAMP. The name is Two Trees Olive Oil,
add my address, username is admin, and as
| | 03:12 | elsewhere in this course, password will
be drupal, all lowercase, and we are in
| | 03:17 | the United States, and Save and continue.
| | 03:22 | The installation is confirmed, and we visit
the site by clicking this link. That's it.
| | 03:27 | You're now ready to run
Drupal on your remote server.
| | 03:30 | Nearly everything else you see from
here out in this course is the same, whether
| | 03:33 | you're running Drupal on a
local computer or a remote server.
| | 03:37 | I will be going through it on a desktop
computer--that is, a local computer, but
| | 03:40 | if there are any minor differences, I
will explain them wherever they occur.
| | Collapse this transcript |
| Installing Drupal using Acquia's Debian/Ubuntu package| 00:01 | If you run UNIX or Linux, there
is an assumption that you're an
| | 00:03 | experienced system administrator.
But more and more people are running
| | 00:07 | Linux on their desktop computers,
| | 00:09 | so I'm really glad that Acquia
provides an installer as an Ubuntu package
| | 00:13 | because it really simplifies Drupal on Linux.
| | 00:14 | Now I do have to mention that the version 7
of Drupal hasn't come out in Acquia Drupal yet.
| | 00:21 | But whenever it does, I expect that
Acquia will quickly come out with Debian
| | 00:25 | package for that as well.
| | 00:27 | As usual to get it, you would go to
acquia.com/downloads. Then underneath the
| | 00:32 | Stack installers for Windows and Mac OS
X you would click on the Debian package,
| | 00:37 | and then click Download Now. Then click OK.
| | 00:43 | I've chosen to download this
directly into the Ubuntu Software Center.
| | 00:46 | I then click the Install button.
| | 00:50 | You'll be asked for the
root password on this computer.
| | 00:56 | Sometime during the installation
process, you will be asked to provide a
| | 00:59 | password for the root user.
| | 01:01 | I am going to keep it simple and just put root.
| | 01:04 | Of course, you should put whatever you want.
| | 01:06 | After entering it once, I am asked
for it again to confirm and then click
| | 01:10 | forward, and the installation process continues.
| | 01:14 | Also during the installation, you will
be asked this question about whether to
| | 01:17 | configure the database using dbconfig-common.
| | 01:20 | I found it works best when you
uncheck it and then go forward.
| | 01:23 | We will configure the database ourself
manually, as you learned how to do in another video.
| | 01:30 | Great, Acquia Drupal is now installed.
| | 01:32 | We can just close out this window now.
| | 01:35 | In 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:53 | Now this is Acquia Drupal, but during
this course we are going to use core
| | 01:57 | Drupal, so you'll have to
download and install it.
| | 02:00 | However, the Ubuntu package doesn't
directly support multiple sites, and doesn't
| | 02:04 | have the same import feature as the Windows
and Mac versions of the Drupal Stack installer.
| | 02:09 | So you'll have to install the files
and create the database manually and then
| | 02:13 | run Drupal's installer.
| | 02:14 | You can learn how to do all of those
things in other videos in the course, in
| | 02:18 | the section named,
"Installing Drupal on a Server."
| | 02:21 | There is just one last thing: because the
Debian package is presented in the same
| | 02:24 | way as the amp stack for both Windows and Mac,
| | 02:27 | you might think that the package is
the same, but that's not quite true.
| | 02:31 | Here are a few of the
differences that I noticed.
| | 02:34 | First of all, you will find that you
have to do everything as root, and you can
| | 02:36 | use the Sudo command to do that.
| | 02:38 | Secondly, it doesn't install phpMyAdmin.
| | 02:42 | If you don't have it in any
other way, use mysqladmin.
| | 02:45 | As I mentioned before, it's not
multisite, and there's no control panel like
| | 02:50 | you got on Windows or Mac.
| | 02:51 | Finally, the Debian installer doesn't
necessarily install all of these new
| | 02:55 | pieces; instead it brings together
what's already there in Ubuntu or Debian.
| | 03:01 | Acquia details several other ways
that it's different in the documentation
| | 03:04 | page that you see here.
| | 03:06 | That page gives quite a few other
technical details, including how to install
| | 03:10 | the package from the command-line interface.
| | 03:12 | Clearly the Ubuntu package isn't quite
as easy to use as DAMP, but then again
| | 03:16 | it's not supposed to be.
| | 03:17 | It's sort of a compromise between the
ease that desktop Linux users require and
| | 03:22 | the power that server administrators need.
| | Collapse this transcript |
|
|
5. Controlling DrupalUsing the toolbar| 00:00 | We have installed Drupal and are
logged in as the administrator.
| | 00:04 | We know this because we see this
black bar at the top, and we also see our
| | 00:07 | administrator name up here, admin.
| | 00:09 | That was the one that we entered
when we first installed Drupal.
| | 00:12 | It's known as the super user.
| | 00:14 | If you don't see these
things, here is what you do.
| | 00:16 | First, I will log out to show you what
it looks like when you're not logged in
| | 00:19 | as the administrator.
| | 00:21 | That bar disappears, and you
see this user login over here.
| | 00:24 | I log in. My username is admin,
and my password throughout the course is
| | 00:30 | lowercase drupal, and then just
click Log in, and we are back in.
| | 00:36 | The toolbar is really broken into three parts.
| | 00:40 | The first one is pretty
obvious, the Home button.
| | 00:43 | Clicking there brings you
to the front of your site.
| | 00:45 | It's a same place you go if you were
to click the logo here or the title
| | 00:49 | or the Home button.
| | 00:51 | It's good that it's in the toolbar
though, because sometimes while you're
| | 00:54 | developing a site, you will
remove all of these links.
| | 00:57 | The second group of controls in the
toolbar is all of these here in the middle,
| | 01:01 | and I'll be showing you more
about these in just a few minutes.
| | 01:04 | One in particular I want to mention,
however, is the Dashboard over here.
| | 01:08 | When you click this, you come to a
customizable view of administrative options,
| | 01:13 | and you'll learn about this in a
separate video about the Dashboard.
| | 01:17 | Finally, we have these links at the far right.
| | 01:19 | It's obvious what Log out does.
| | 01:21 | We already showed you that.
| | 01:23 | The one to the left leads
to your user account page.
| | 01:27 | Here you can view your profile, or you
can edit it by clicking the Edit tab.
| | 01:31 | You will find out more about
this in the "Managing Users" section.
| | 01:35 | Now when we go back, you will
notice a third tab called Shortcuts.
| | 01:39 | We have a video in this course also
which will explain what shortcuts are and
| | 01:42 | how that fits in with this gray
area up here, the shortcut bar.
| | 01:46 | Let's get back to these
links up here at the top.
| | 01:49 | There are essentially two kinds of links
here. Some of them take you directly to
| | 01:53 | pages where you can perform actions.
Those are Content, where you see a list of
| | 01:57 | content and can perform
certain functions on them;
| | 02:01 | Appearance, which lets you switch among
themes--that is, the visual display of the
| | 02:06 | page; and People, which shows
you a list of who's on the site.
| | 02:11 | It's very similar, you will
notice, to the Content page.
| | 02:14 | But instead of being about nodes,
it's about members of your site.
| | 02:18 | Finally there's the Modules link, which
shows you the different pieces that make
| | 02:23 | up your Drupal software, both the
core--that is, what you first download from
| | 02:27 | drupal.org when you install Drupal--
and any additional ones that you download.
| | 02:33 | The other kind of link in the
toolbar lead to lists of links.
| | 02:36 | You will see that under Structure,
Configuration, Reports, and Help.
| | 02:44 | Obviously when you go to any of these,
you will just click on whichever link you
| | 02:47 | want and get further
information and controls there.
| | 02:50 | Now you've probably
noticed this gray bar up here.
| | 02:54 | It's called the shortcut bar,
and I'll talk about it in a separate video.
| | 02:57 | The big difference between the toolbar
and the shortcut bar is that you can
| | 03:01 | easily change the links that
appear in the shortcut bar.
| | 03:04 | The toolbar on the other hand is
intended to stay the same no matter how you
| | 03:08 | configure this site.
| | 03:09 | I will let you in on a little secret though:
| | 03:11 | you can actually change
what's in the toolbar up here.
| | 03:15 | To do so, you would click Structure, then
menus, then Management under list links.
| | 03:23 | These top-level links underneath
Administration match up with the links on the
| | 03:28 | toolbar. And if you were to change
these around or disable them, they would
| | 03:31 | disappear or reappear up here in the toolbar.
| | 03:34 | You will learn more about
that in the videos about menus.
| | 03:37 | The toolbar is new in Drupal 7,
and it's part of the push to make Drupal easier
| | 03:42 | for beginners to understand.
But it's not the only way to get at Drupal's
| | 03:45 | administrative controls.
| | 03:47 | For one thing, whenever you're on an
Administrative page, you'll see this list
| | 03:51 | of links up here, what's
called a breadcrumb trail.
| | 03:54 | One of the early links will be Administration.
| | 03:56 | When you click that, you see, once
again, links that are very similar to the
| | 04:00 | ones in the toolbar: Dashboard,
Content, Structure, Dashboard, Content,
| | 04:04 | Structure, and on it goes.
| | 04:06 | The other way to get directly to an
Administration page is to type in the URL directly.
| | 04:11 | You could type in this entire thing, or
you could remove part of it so you only
| | 04:15 | show the Administrative page itself.
| | 04:18 | The other way to get to
Administrative pages is to type in its URL in the
| | 04:22 | address bar in your browser.
| | 04:24 | You could type in the entire
thing or just the part that's in the
| | 04:28 | administrative overlay, like so.
| | 04:32 | You will learn more about that in the
video about the administrative overlay.
| | 04:37 | Now what if for some reason you decide
you don't like seeing the toolbar at all--
| | 04:40 | you want to get rid of this black area up here?
| | 04:42 | Well, you can turn it off entirely.
| | 04:45 | To do so, click Modules and then scroll
down to toolbar, check the box, go down
| | 04:53 | to the bottom, and click Save configuration.
| | 04:57 | Both the toolbar and the
shortcut bar will disappear.
| | 05:01 | I am going to turn it back on
though for the rest of the course.
| | 05:07 | I simply click and Save
configuration, and I think I'll go back home.
| | 05:12 | Now I mentioned you can change the
toolbar, but it's a little bit difficult to do.
| | 05:16 | But if you want to have a
customizable experience, there are two ways.
| | 05:20 | First, there is the Dashboard, as I
mentioned earlier, and then there's the gray
| | 05:23 | shortcut bar as well, which
is completely configurable.
| | 05:27 | You will learn all about that in the
video about using the shortcut bar.
| | Collapse this transcript |
| Using the shortcut bar| 00:00 | Along with the black toolbar at the
top of the screen which leads to all of
| | 00:04 | Drupal's administrative controls,
Drupal 7 introduces this gray shortcut bar.
| | 00:09 | Links in the toolbar are difficult to
change, but you can easily change those in
| | 00:13 | the shortcut bar to lead
anywhere on your site that you like.
| | 00:16 | The shortcut bar comes with
two shortcuts already built in.
| | 00:20 | The first one lets you quickly add
content, and the second one lets you find
| | 00:24 | content that's already on your site.
| | 00:27 | To add or remove other
items, there are two methods.
| | 00:30 | One is really convenient
once you know where it is.
| | 00:33 | I will show you that by clicking Modules.
| | 00:35 | Let's say that we wanted to add this
administrative page so it showed up in the
| | 00:38 | shortcut bar as well as the toolbar.
| | 00:41 | We just go down to this little Plus sign,
and as you hover over it, it says Add
| | 00:45 | to Default shortcuts.
| | 00:46 | I do that, and there, it's done.
| | 00:48 | Now you'll notice when you go to this
page, the plus has turned into a minus.
| | 00:53 | You can hover over it again, confirm
that you want to remove it, and it's gone.
| | 00:59 | The other way to add and remove
shortcut bar items takes a little bit more
| | 01:03 | digging, but it's actually more flexible.
| | 01:06 | First, you need to know the URL
of the page you want to link to.
| | 01:09 | I will show that by copying
this URL for the Modules page.
| | 01:13 | I just highlight it and copy.
| | 01:15 | Then go over to Edit shortcuts.
| | 01:18 | To add a shortcut, click the Add
shortcut link, enter a name, and instead of
| | 01:23 | Modules, I am going to call this
Functions let's say, and paste the path.
| | 01:29 | Now I can tell you right away that
this won't work because it already has
| | 01:33 | the 2trees:8082 in it.
| | 01:36 | You can only use this method, by the
way, to link to things on your site;
| | 01:39 | you can't have something in the
shortcut bar that links off your site.
| | 01:43 | So I'll get rid of that bit there,
including the slash, and I'm left with this.
| | 01:49 | Now when I try to save this,
it'll still give me an error.
| | 01:53 | That's because the actual URL is the
part without this overlay bit in here.
| | 01:57 | You will learn more about that overlay
and about overlay URLs in the video about
| | 02:02 | the administrative overlay.
| | 02:04 | So we have removed that and try
saving again. And there it is.
| | 02:09 | We now have a Function button that
goes straight to the Modules page, and
| | 02:13 | although that link is labeled as
Functions, we can remove it by clicking the
| | 02:17 | Minus sign. And it's gone. So far so good.
| | 02:22 | Now things get a little tricky.
| | 02:24 | We have been editing a single shortcut
bar, but you can actually create as many
| | 02:29 | shortcut bars as you want.
| | 02:31 | That's useful if you have administrators
on your team performing different tasks.
| | 02:35 | A news editor might have a shortcut
bar that says "Post news article" while a
| | 02:40 | community manager shortcut bar
has one that says "Add member."
| | 02:44 | To change that, go up to
Configuration and then click Shortcuts.
| | 02:48 | I am going to create a
shortcut set called Editor.
| | 02:51 | Now remember, we are not adding
individual shortcut links right now; we are
| | 02:55 | adding entire sets of shortcuts.
| | 02:57 | I add shortcut set here and just
call it Editor and create new set.
| | 03:03 | Now I'm going to try to add some links.
| | 03:05 | I will go up to let's say
Add content and Add Basic page.
| | 03:09 | Let's say that this is the link that I
want to add to the shortcut bar.
| | 03:13 | I'll bring my cursor over it, and you
notice it says Add to Default shortcuts.
| | 03:18 | This will add it to the first shortcut
set, not the second one, not the Editor
| | 03:22 | one that I just created.
| | 03:23 | So you might ask, how can I
add things to the Editor set?
| | 03:27 | Well those sets are
defined on a user-by-user basis.
| | 03:31 | My username is admin, so let's go up to Hello
admin here and take a look at my shortcuts.
| | 03:37 | Ah, this is where I define
which shortcuts I'm going to use.
| | 03:41 | It not only defines what shows up in
that gray bar, but also what will appear
| | 03:45 | when I click on that little Plus sign.
Change it to Editor and Change set.
| | 03:50 | Incidentally, this is also a place
where you can add a new set if you want.
| | 03:55 | Now if I go back to that Add content and
Basic page, when I hover over that Plus
| | 03:59 | sign, I see Add to Editor shortcuts,
and let's go ahead and do that.
| | 04:05 | You will learn more about changing
the settings of individual users in the
| | 04:08 | section of this course about managing users.
| | 04:11 | So now we have two shortcut sets.
| | 04:13 | We are currently on the Editor set,
which has this extra link to create a basic
| | 04:17 | page. And just to prove that this works,
I am going to switch my Shortcut set
| | 04:21 | back to default, and that link should disappear.
| | 04:24 | Again I go up to my user and Shortcuts,
go back to Default and Change set, and
| | 04:29 | indeed it did disappear.
| | 04:31 | When you create a new user, they get
the default shortcuts to start off with.
| | 04:35 | As someone with administrator privileges,
you can change which set they see by
| | 04:40 | going to that user's page,
just as you did on your own page.
| | 04:43 | You do that by going up to People and
coming down and editing their profile.
| | 04:49 | You can also grant these users permission to
decide which shortcut bars they want to use.
| | 04:53 | To do that, go to People and then to
PERMISSIONS, and then scroll all the
| | 05:00 | way down to Shortcut.
| | 05:02 | You would then grant that permission, select
any shortcut set to whichever roles you wanted.
| | 05:07 | You will learn more about that
in the "Managing Users" section.
| | 05:10 | Finally, if you don't like this shortcut
bar at all, there are two ways to turn it off.
| | 05:15 | First of all, you can turn it off
temporarily for yourself by clicking
| | 05:18 | this little arrow here.
| | 05:20 | That gives you a little bit
more screen space to play in.
| | 05:23 | If you want to turn it off for good
though, go to Modules and scroll down to
| | 05:28 | Shortcut, uncheck the box, and scroll to
the bottom, and say Save configuration.
| | 05:35 | I'm actually going to leave it as it is, though.
| | 05:37 | Now I have to say that section where
I showed you how to set up multiple
| | 05:41 | shortcut bars is actually
a pretty advanced subject.
| | 05:44 | You'll probably never use it until you
start administering a site that has multiple
| | 05:48 | people fiddling with it.
| | 05:49 | But if you find yourself doing the same
task over and over again in Drupal, just
| | 05:54 | stick a link in the
default bar for one-click access.
| | 05:57 | Even without multiple shortcut sets,
that little link or two can really make a
| | 06:01 | difference in your efficiency.
| | Collapse this transcript |
| Touring the administrative controls| 00:00 | Now that we have Drupal installed, we
are going to start digging pretty deeply
| | 00:04 | into individual points in its interface.
| | 00:06 | But first, let's get an overview of
the region's map before we visit those
| | 00:10 | individual villages of control.
| | 00:12 | As I said in the video about the
toolbar, you can get to just about every
| | 00:16 | administrative screen
through this black bar at the top.
| | 00:19 | One thing you probably noticed when
you clicked it is that the screen sort of
| | 00:22 | freezes and puts the controls
over what you are looking at.
| | 00:25 | That's called the administrative
overlay, and it's new Drupal 7.
| | 00:30 | As you can see, our original site
is still back here, even as we scroll
| | 00:33 | through this overlay.
| | 00:35 | There are a few features of
things that you see in the overlay.
| | 00:39 | First of all, over here you'll see
what's called a breadcrumb trail.
| | 00:43 | As we click further into the
administrative interface, it gets longer and longer.
| | 00:47 | If you ever get lost, you can sort of
back out and see one level above.
| | 00:53 | It's sort of like being in a file folder
and looking above to the higher level
| | 00:57 | and then above again.
| | 00:59 | Another feature is that some of
these screens have tabs over here.
| | 01:03 | So for Appearance, for example, not
only can you see a list of all the themes
| | 01:07 | you have installed, you can also
update them or change the settings that
| | 01:11 | affect all of them.
| | 01:12 | While we are there, that's a good
time to point out these subtabs which
| | 01:15 | sometimes show up in the overlay.
| | 01:18 | Here we have Global settings, Bartik, and Seven.
| | 01:22 | One more thing I want to point out
about the administrative overlay, which is
| | 01:25 | the URL up here in the browser's address bar.
| | 01:28 | The first part up to the Pound sign
is what you see underneath the overlay--
| | 01:33 | that is, the page that you are on
before you clicked one of those links.
| | 01:38 | Then you see #overlay=,
and then you see the rest of the URL.
| | 01:42 | If you want to see this page without
the thing underneath it, all you do is
| | 01:46 | delete that #overlay= and
then hit Return, and there it is.
| | 01:51 | If you get in at this point, and you
want to go back to seeing the overlay, you
| | 01:56 | can't really do that by just clicking
around on these administrative links;
| | 01:59 | instead you have to go back Home or to
a content page and then start clicking
| | 02:04 | around again, and the
administrative overlay will come back up.
| | 02:08 | Incidentally, you can turn off this
administrative overlay entirely if you like,
| | 02:12 | by clicking Modules and scrolling
down to Overlay, un-checking that box, and
| | 02:19 | scrolling down, and saying Save configuration.
| | 02:21 | You will learn more about how to use
this screen, by the way, in the section on
| | 02:25 | extending Drupal's functionality.
But let's get back to our links up here at the top.
| | 02:30 | The first one is the Dashboard.
| | 02:32 | The Dashboard is a very customizable
screen which lets you change how you
| | 02:35 | administer Drupal. For example, we can
move Recent comments down here, and then
| | 02:40 | when we say Done, when we have
comments on the site, they will be listed here
| | 02:44 | whenever we go to the Dashboard.
| | 02:46 | I am going to go ahead and drag
that back out though, and click Done.
| | 02:51 | We will talk about that in a
video about customizing the Dashboard.
| | 02:55 | Then we go on to Content.
| | 02:57 | We don't have any content on the site
yet, but when we do, it'll all be listed
| | 03:01 | here and we'll be able to sort it by
title, type, or any of these other criteria.
| | 03:05 | We will also be able to perform mass
functions on them, such as publishing or
| | 03:09 | unpublishing all of them.
| | 03:11 | And we can filter the list, as you
can see from the Filters up here.
| | 03:15 | We will talk about this
more in the section on content.
| | 03:19 | Structure and Configuration are both
lists of links, and this is where you get
| | 03:24 | at most of the power of Drupal.
| | 03:26 | We will go into these individual
links throughout the rest of the course.
| | 03:30 | I already mentioned the Appearance screen.
| | 03:32 | We will talk about this in greater detail in
the section about changing a site's interface.
| | 03:37 | The People screen, which also includes
the important Permissions tab, we talk
| | 03:41 | about in the section "Managing Users."
| | 03:44 | I already mentioned Modules,
and again, we'll talk more about that in the
| | 03:47 | section about expanding a site's capabilities.
| | 03:50 | Finally we have Reports, which allow
you to monitor what happens on your
| | 03:54 | site, and Help, which brings you to
text-based information that'll help you
| | 03:59 | through all of this.
| | 04:00 | Finally I want to re-iterate
that Drupal is a multiuser system.
| | 04:04 | We have been looking at this site
from the point of view of the super user--
| | 04:07 | that is, the person who was set up
when you initially installed Drupal.
| | 04:11 | That person has control
to everything in the site.
| | 04:14 | You can determine if that's you by
clicking on your link up here or here to My
| | 04:19 | account and then clicking Edit.
| | 04:23 | If it shows you as user/1,
then you are the super user.
| | 04:28 | But if you're not that person, if, for
example, you're working on someone else's site,
| | 04:32 | you might be an administrator who only
has access to some of the features that
| | 04:36 | you'll learn about in this course.
| | 04:38 | So don't worry if you find that a
control is missing from your interface; just
| | 04:42 | contact the person in charge of the
site to make sure that you have access to
| | 04:45 | all of the things that you should.
| | Collapse this transcript |
| Customizing the Dashboard| 00:00 | A big push in Drupal's redesign for
version 7 was to make it easier for
| | 00:04 | beginners to administer.
| | 00:05 | One part of that is the Dashboard,
a homepage for administrative tools.
| | 00:10 | Like the shortcut bar--
that's the gray thing right here--
| | 00:13 | you can change what it contains,
but to a much, much greater degree.
| | 00:17 | To go to it, simply click Dashboard up here.
| | 00:20 | Right now, our Dashboard doesn't show
very much since we haven't added any
| | 00:23 | content to this site.
| | 00:25 | If we had, every time something new is
added to the site, it would come to the
| | 00:29 | top of this list here in Recent content.
| | 00:31 | On the Dashboard, we can, however, search
for content on our site or see who's new.
| | 00:36 | Again, as we added users, they
would appear in this block.
| | 00:40 | The most interesting thing about the
Dashboard is how you can change it to your will.
| | 00:44 | To do so, click Customize Dashboard,
and you see you have two additional blocks
| | 00:49 | that can be dragged into these
areas, either the wide left column or the
| | 00:53 | narrower right one.
| | 00:55 | So let's see Who's online right
next to Who's new and Recent comments
| | 00:59 | underneath Recent content.
| | 01:01 | Now since we haven't added users or
comments, there won't be anything in
| | 01:05 | there. But when we click Done, we can see
that should we start adding content and users,
| | 01:09 | they would show up here.
| | 01:10 | When you customize, you can also change
where those things show up within a column;
| | 01:15 | just drag and drop and click Done.
| | 01:18 | But before we go on, I
want to mention something.
| | 01:21 | All of these pieces that we are
dragging around this Dashboard area are what
| | 01:25 | are called blocks, and you'll learn more
about blocks in a video later in this course.
| | 01:29 | Blocks are shared between the Dashboard and
the main Drupal site in a sort of unusual way.
| | 01:34 | I'll quickly just click Done here and then go
back and customize and show you what I mean.
| | 01:39 | All of the blocks on the site
are listed in Structure and Blocks.
| | 01:45 | As you can see, there are quite a few,
and by the way, the main site has many
| | 01:48 | more regions than you
see on that Dashboard page.
| | 01:51 | Again, we will come back to
this later on in the course.
| | 01:54 | But back to our Dashboard.
| | 01:57 | If you wanted to have more options
than just the five blocks that you
| | 02:00 | added here, click Customize
Dashboard and then either Add other blocks or
| | 02:04 | configuration page;
| | 02:06 | both of those go to the same place.
| | 02:08 | The Dashboard has those two areas,
which is main and sidebar, and then it has
| | 02:12 | an inactive area: those are the things that
are sitting in that pane at the top of the page.
| | 02:17 | Finally there are other blocks.
| | 02:20 | These are blocks shared between the
Dashboard and the main Drupal site.
| | 02:24 | If you make something available to the
Dashboard, it stops being available on the main site.
| | 02:29 | Drupal's developers decided to do this
just to avoid some redundancy, so that
| | 02:33 | you wouldn't have a Management block
both in the administrative interface with
| | 02:37 | the overly floating and on the main site; it's
part of their push to keep the interface simple.
| | 02:42 | Let's take the Management block, for
example, and move it up into the main
| | 02:46 | area. So I just click this dropdown
menu and go to Dashboard (main), and you
| | 02:50 | see it pops up there.
| | 02:52 | Now before it actually goes there, we have
to click Save at the bottom, Save blocks.
| | 02:56 | Now when we go back to the Dashboard page,
there it is, the entire Management menu.
| | 03:02 | By the same token, you could add a block
by going up to Structure > Blocks > Add
| | 03:08 | block, and then make it available
to the Dashboard in the same way.
| | 03:12 | Finally if you don't like the Dashboard
at all, you can turn it off the same way
| | 03:16 | you could with a toolbar or the shortcut bar.
| | 03:19 | Just go up to Modules, scroll down to
Dashboard, uncheck the box, scroll to the
| | 03:25 | bottom, and click Save configuration.
| | 03:28 | I like it, so I'll leave it
and just go back to my homepage.
| | 03:31 | This new Dashboard is a big
change for Drupal administrators.
| | 03:35 | It really helps move Drupal from
something that hard-core system administrators
| | 03:38 | like to something that everyone
can manage with just a few clicks.
| | 03:42 | However, it does take a little bit of
setting up to make the Dashboard the
| | 03:45 | way that you want it.
| | Collapse this transcript |
| Differentiating administrator and visitor views| 00:00 | By now you've noticed that a Drupal
site looks quite different when you're
| | 00:03 | administering it from
when you're just visiting it.
| | 00:06 | That wasn't quite true in Drupal 6, but it
was something that a lot of people ask for.
| | 00:11 | But not everybody likes it.
| | 00:13 | This video shows you a simple trick
to change the way the administration
| | 00:16 | interface looks so it
matches what everybody else sees.
| | 00:19 | To do it, go to Appearance.
| | 00:22 | Right now, our main theme is Bartik,
and you will notice from its screenshot,
| | 00:26 | that looks very much like
what we saw on the main site.
| | 00:29 | When we click an administrative
link, we go to this Seven theme.
| | 00:33 | The Bartik theme is what's called the
default theme, as you see right next to its name.
| | 00:37 | Now if we scroll down to the bottom of
the screen, you see we have a separate
| | 00:41 | choice of what we want the
administration theme to be.
| | 00:44 | We have chosen Seven, but all we'd have to do
is change it to either Bartik or default theme.
| | 00:51 | By changing this pop-up menu to
default theme, the administration theme will
| | 00:54 | stay in sync with the
theme that everybody else sees.
| | 00:58 | Then we go down and click Save configuration.
| | 01:02 | Now you'll notice a few subtle changes here.
| | 01:05 | First of all, these tabs
look a little bit different.
| | 01:07 | I am going to go and create some content,
and you will notice it even more then.
| | 01:11 | Click Add content, and as you see, the type
is a little bit different. Click Basic page.
| | 01:17 | As we scroll down, look at these
vertical tabs. As you will see from later in
| | 01:21 | the course, they look quite
different in Bartik than in Seven.
| | 01:24 | I am going to change it back just by
going to Appearance, scroll down again, and
| | 01:30 | change it back to Seven.
| | 01:33 | Incidentally, we do have this little
check box here so that you could change the
| | 01:37 | administration theme only when you're
looking at an administrative page such as
| | 01:40 | this one, and not when you're creating content.
| | 01:43 | To do that, you would just uncheck that box.
| | 01:45 | But I am going to return to its
original state, click Configuration, and we
| | 01:50 | are back as we were.
| | 01:52 | There is one other thing you could do to
make the administration experience even
| | 01:55 | more like the browsing experience:
| | 01:57 | you could turn off the Administrative
Overlay. And you'll learn to how to do
| | 02:01 | that in the video about
touring administrative controls.
| | Collapse this transcript |
|
|
6. Building a Drupal SiteUnderstanding nodes| 00:00 | Drupal is, as you know, a
content management system.
| | 00:04 | The first word of that phrase is content,
and I think that needs a little bit of
| | 00:07 | explaining--particularly
as it relates to Drupal.
| | 00:11 | First, let's consider content as it's
traditionally known, and what's more
| | 00:15 | traditional than a book.
| | 00:16 | Most people would agree that it's content,
but a book is actually made up of many parts.
| | 00:21 | It's a mixture of content and form put together
in a format that we recognize as a book object.
| | 00:28 | Books typically have a title, and they
have only one title. Then they have a cover.
| | 00:33 | Open it up, and you see the front
matter--which is the table of contents and
| | 00:36 | publication info--and in the back, the
back matter--the index and the colophon.
| | 00:41 | All of this, however, isn't what we
typically think of as the book's content.
| | 00:46 | Going further into the book adds more elements.
| | 00:49 | First, there is the text of the book.
| | 00:51 | This is more like what we think of as content.
| | 00:53 | There are other parts to the page:
footnotes and page numbers, for example.
| | 00:57 | There may even be comments that
are added to the book in handwriting.
| | 01:01 | You can extrapolate this model to
anything you think of as content: movies,
| | 01:06 | paintings, video games--anything.
| | 01:08 | You quickly see that content is
not such a simple matter to define.
| | 01:12 | Now let's turn back to Drupal.
| | 01:14 | I said before that a book comprises many parts.
| | 01:17 | A node also comprises
many parts, known as fields.
| | 01:20 | I will show you that by creating a basic page.
| | 01:23 | The two main fields are the Title and the Body.
| | 01:26 | However, a node can have many other
parts, and I'll show you a little bit of
| | 01:29 | that by creating an article.
| | 01:31 | It also has a title and body, but in
addition, it has tags so that you can
| | 01:35 | categorize the content.
| | 01:37 | It also has a place to put a picture.
| | 01:39 | You decide what fields you want to go
into a node by first creating a content
| | 01:43 | type under Structure and Content types.
| | 01:46 | Then when you create a node, you
specify which content type it should
| | 01:49 | be patterned after.
| | 01:51 | Drupal 7 comes with two content types
enabled, called Basic page and Article.
| | 01:57 | You will learn how to create other content
types in the section about extending content.
| | 02:01 | Now that you know how Drupal
constructs content, let's start creating some
| | 02:04 | of our own.
| | Collapse this transcript |
| Creating basic content| 00:00 | Our site still looks the same as when
we first installed Drupal, and I know you
| | 00:04 | are chomping at the bit to
actually start building it out, right?
| | 00:07 | We will get things going by creating
this site's homepage, which in Drupal
| | 00:10 | language is usually called the front page.
| | 00:12 | I will then also create other
pages to show off different features.
| | 00:16 | Incidentally this video in the
course uses the exercise files.
| | 00:20 | We are just going to copy and paste
some text and use a graphic, but you're
| | 00:23 | welcome to use your own if you like.
| | 00:25 | To create that page, we first go up to Add
content, and we're going to create a basic page.
| | 00:30 | I'll explain the difference
between these two in just a minute.
| | 00:32 | Now I'm going to go back to my
exercise files, which I have on the Desktop,
| | 00:37 | and open up my text.
| | 00:38 | I copy this section here as the title
and paste it into my site, and I'll do
| | 00:44 | the same with the body.
| | 00:48 | Then I scroll down to the bottom and click Save.
| | 00:51 | And there is our front page.
| | 00:53 | Let's go back to the front. Wait a second.
| | 00:55 | It's not there.
| | 00:56 | We didn't actually move it to the front page.
| | 00:59 | We just created the node.
| | 01:00 | So we will go back to it.
| | 01:01 | We could either hit the Back button,
or to find content, we just click this
| | 01:06 | Content link up here, and there it is.
| | 01:08 | We'll go back and edit it
by clicking the Edit link.
| | 01:12 | To put it on the front page,
you actually scroll to the bottom.
| | 01:15 | There is a whole set of links down here
to all kinds of settings, and I'll show
| | 01:19 | you what each of these mean in just a
moment. But for right now, I'll just click
| | 01:23 | Show Publishing options >
Promote it to the front page, and Save.
| | 01:27 | Now when we go to the front page, there it is.
| | 01:30 | If you want to see the full node and
edit it, just click here on the title.
| | 01:35 | That's the same way that it works
on any Drupal site, by the way, and on
| | 01:38 | most other CMS sites.
| | 01:40 | If we go to drupal.org, which of
course is built in Drupal, you see that it
| | 01:44 | works exactly the same.
| | 01:45 | You click on a title, and it takes you
to the full node, but back to our site.
| | 01:50 | Now that we have our front page up,
let's go back and check out some of
| | 01:53 | those other features.
| | 01:55 | To do that, I will create another node
that demonstrates how some of them work,
| | 01:58 | while other features will get
their own videos in this series.
| | 02:01 | Once again, I'll go and click Add content.
| | 02:03 | I am going to add another Basic page.
| | 02:06 | This is going to be an About Us page.
| | 02:09 | I'll go back to my exercise file, copy
the title, and paste it in, and copy the
| | 02:16 | body and paste it in.
| | 02:20 | The first thing that you
notice is this Edit summary.
| | 02:23 | When you click on that, it opens another
window where you can add additional text.
| | 02:26 | We will discuss that in the video
about creating content summaries.
| | 02:30 | For now, we'll just hide it.
| | 02:31 | Scroll down a little bit further,
and we see this Text format pop-up menu.
| | 02:35 | We will discuss that in the video about
using text formats to prevent damaging content.
| | 02:40 | Then we go down to all of these settings
in what's called a vertical tab format.
| | 02:45 | The first one is menu link, and I will
actually add a menu link to this page.
| | 02:49 | Because it's about Us, I'll make the title
About, and under Description, I will say About us.
| | 02:55 | You'll see the difference between the
title and the description in just a moment
| | 03:00 | when I'm finished editing this.
| | 03:01 | The next tab, Show Revision
information, we'll discuss in the video
| | 03:05 | about revising content.
| | 03:07 | For URL path settings, we actually
will add what's called a URL alias to this
| | 03:11 | node, and we will say it's about-us.
| | 03:15 | This is what will go up into the
browser bar here when you go to this page;
| | 03:20 | otherwise it would simply say the
name of our site/node/a certain number,
| | 03:25 | whichever number we created.
| | 03:27 | You can see up here, for example, that
we were looking at node 1 when we went to
| | 03:31 | edit this page; that was the
first node we created on the site.
| | 03:35 | The next tab has to do with comment
settings, and we're not going to open that
| | 03:38 | up for anybody to comment on this content.
| | 03:41 | But you will learn how to do that in a
few videos: one is called "Setting the comment
| | 03:45 | policy," and the other one is "Managing comments."
| | 03:47 | For authoring information, you can
change who apparently wrote this piece of
| | 03:51 | content and when it was apparently posted,
but we'll just leave it as it is for now.
| | 03:56 | And finally, you already took a quick
look at this Show Publishing options and
| | 04:00 | what Promoted to front page does.
| | 04:02 | You will see what sticky does in just
a moment, but for now we'll click Save,
| | 04:07 | and there's our node.
| | 04:08 | As I mentioned before, if you look up
here, you can see the URL is about-us.
| | 04:13 | If we go back to our front page and look at
the other node that we created, it's /node/1.
| | 04:19 | That's what that URL alias does.
| | 04:21 | You might also remember that we added a
menu item to that node, and there it is,
| | 04:26 | right up here, About.
| | 04:27 | If we want to go to that node quickly,
just click that Tab. And as we hover or
| | 04:31 | cursor above it, it shows the
description that we entered, About us.
| | 04:36 | So far you've only seen how to create
basic pages, but you might remember from
| | 04:40 | the earlier video about understanding
nodes that there are multiple content
| | 04:44 | types in Drupal, and that
Basic page is only one of them.
| | 04:47 | So let's create an
article to see the difference.
| | 04:50 | We start out the same, by going up to
Add content and then instead of Basic
| | 04:53 | page, we choose Article.
| | 04:55 | Once again, I'm going to paste in
some information from our exercise files.
| | 04:59 | We will scroll down here and select our text,
paste it in, and our body, and paste it in.
| | 05:11 | I am also going to add some tags.
| | 05:13 | This will be let's say press release, pr.
| | 05:19 | and the New England Organic Chefs
Association, NEOCA, how about that?
| | 05:24 | Finally, articles give us
a place to add a graphic.
| | 05:27 | I'll browse back to our exercise files and
add one that I have for just this occasion.
| | 05:32 | There's our graphic.
| | 05:33 | I'll click it and say Open and Upload.
| | 05:36 | And for alternate text, I'll just say
"Olive branches in Southern California."
| | 05:43 | As we look at the vertical tabs at
the bottom, you'll notice a few other
| | 05:46 | differences between articles and basic pages.
| | 05:49 | First of all, comments are open, so
when we post this, people who are visiting
| | 05:53 | our site will be able to comment back
and say what they think about the node.
| | 05:57 | Also, it's automatically
promoted to the front page.
| | 06:00 | Let's save it and see what that looks like.
| | 06:03 | There's our node with our
picture, and there are our tags.
| | 06:06 | Now if we go to our front page, there it
is. But there is something strange here.
| | 06:12 | We really wanted that first node that
we posted to be at the top of the page,
| | 06:15 | but as we add other things to the
front page, it gets pushed down.
| | 06:19 | We can change that by going
back and editing that node.
| | 06:22 | There is a few ways of doing that.
One of them, as you saw, is to click Content,
| | 06:26 | find the node, and then click Edit.
| | 06:28 | Another is to click on the title itself and
then click Edit. Or, going back to the front page,
| | 06:34 | in some contexts, we will
see this little widget here,
| | 06:37 | we can click on that and say Edit.
| | 06:39 | In any case, it takes us back to our page.
| | 06:42 | I'll scroll down to our Publishing
options and make it sticky at top of lists.
| | 06:46 | That's what this box does:
| | 06:48 | it makes it so it appears
above all the other content.
| | 06:52 | I click Save, go back to my
front page, and there it is.
| | 06:56 | It'll stay at the top of the page,
unless another one is made sticky above it.
| | 07:00 | Finally, there are a few ways to delete a node.
| | 07:03 | We could go to the node, click Edit,
and scroll to the bottom and then click
| | 07:07 | Delete, after which we'll be asked to
confirm our choice. Or we could go up to
| | 07:12 | Content and click Delete. Or we could
select several nodes at once and then
| | 07:17 | select Delete from here and then Update.
| | 07:20 | In each case, you will be asked to
confirm your choice before the content is
| | 07:24 | actually removed from your site.
| | 07:26 | But I'm not going to do any of that.
| | 07:27 | I will just right back to my front page.
| | 07:29 | Now that you know how to create, remove,
and change content, you could actually
| | 07:33 | stop watching right now.
| | 07:35 | You know everything you need to
fill your Drupal site with text.
| | 07:38 | But your goals are probably a lot
more ambitious, so keep watching.
| | 07:41 | There is a lot more that Drupal can do,
including user management, design,
| | 07:46 | and site maintenance.
| | Collapse this transcript |
| Changing site information, graphics, and interface| 00:00 | Now you have a little content on
your site, but it still looks generic.
| | 00:05 | Let's change that. I'll show you
how to do three things in this video.
| | 00:09 | First, we're going to change the site's
title and add a little slogan underneath it.
| | 00:13 | Then we'll change the logo, along
with this little thing up here which is
| | 00:16 | called a favicon.
| | 00:18 | Finally, I'll show you how to change
the theme, which controls the site's
| | 00:21 | appearance on every page.
But we'll start with the title.
| | 00:25 | To change that, go up to
Configuration and Site information.
| | 00:30 | We'll actually leave the site name the
same, but as you can see, you can change
| | 00:33 | it however you like.
| | 00:34 | And we'll add a slogan here. How about "The
best olive oil in the world"? And scroll down.
| | 00:42 | There are few other things that you
can change, for example, what page people
| | 00:46 | reach when they go to a page that
doesn't exist, and things like that. But we'll
| | 00:49 | ignore that for now and say Save configuration.
| | 00:53 | Now when we go back or our
front page, we see our slogan.
| | 00:56 | Now for the logo and favicon. To change
that, we go up to Appearance, and then
| | 01:01 | we click the Settings tab.
| | 01:03 | Now there is also a Settings link next
to the theme itself, and I'll get back to
| | 01:07 | that in just a minute, but we're
going to change the icon on every theme.
| | 01:11 | So we go up to Settings and Global settings.
| | 01:14 | We could actually hide the logo
entirely by unchecking that box. Scroll down to
| | 01:18 | the bottom and click Save configuration.
| | 01:20 | I'll show you that that works by
closing out the administrative overlay, and
| | 01:24 | it's gone, but we actually want to include a
different logo, not just hide the one we have.
| | 01:29 | So I click Appearance,
and again, I click Settings.
| | 01:32 | I'll put the Logo back and then scroll down.
| | 01:36 | As you see, we have Logo Image
settings and Shortcut Icon settings.
| | 01:39 | The shortcut icon is that
favicon that I mentioned earlier.
| | 01:43 | In both cases, we'll uncheck Use the
default logo, and then we'll click Browse
| | 01:48 | to go our exercise file where we
have a logo prepared. And there it is.
| | 01:53 | Click logo.png and Open.
| | 01:56 | Same thing with the shortcut icon:
uncheck the default icon, click Browse, find
| | 02:01 | the one you want to use, and click Open.
| | 02:04 | I do want to mention something about favicons;
| | 02:07 | they are only 16 or 32 pixels square
so you should make them very simple.
| | 02:12 | I've already designed
mine to fit that space well,
| | 02:15 | so I'll scroll down to the
bottom and click Save Configuration.
| | 02:18 | Now when I close out the administrative
overlay, we see our new logo, both here
| | 02:23 | and up in the Favicon areas.
| | 02:25 | So far so good. But there is one thing
that still bothers me about the logo:
| | 02:29 | it sort of clashes with the
blue in the background, doesn't it?
| | 02:33 | To fix that, we'll go back to the
settings screen we saw, by going up to
| | 02:37 | Appearance and Settings.
| | 02:40 | However, you'll notice there are
no settings here to change color.
| | 02:44 | That's actually a
feature specifically of Bartik.
| | 02:47 | So I'll go back to my List here and
then click Settings next to Bartik.
| | 02:51 | I could've also just stayed in the
Settings tab and click Bartik here;
| | 02:55 | they both go to the same place.
| | 02:56 | Bartik is what's called a re-colorable theme.
| | 02:59 | Not every theme is like this, and
some themes have additional features.
| | 03:03 | That's why it's a good idea when you
download a new theme, as you learn how to
| | 03:06 | do later in the course, you look at all of
its settings before you start playing with it.
| | 03:12 | Sometimes it will surprise you
with things you don't expect.
| | 03:14 | Now the two changes I'm going to make
are to Header top and Header bottom.
| | 03:19 | Right now, it goes from this
darker blue to this lighter blue.
| | 03:22 | I've already figured out what colors I want to
use, so I'll highlight there and type them in.
| | 03:27 | Header top will be #B9C6AA.
| | 03:32 | And as I type, you'll notice it actually
changes right in the background of the text.
| | 03:36 | Very nice feature.
| | 03:37 | I think I'll change the bottom
one to be the same color as well.
| | 03:41 | So I'll just copy that and
paste. Then I'll go down and click
| | 03:46 | Save configuration.
| | 03:48 | Close out our overlay, and there it is.
| | 03:50 | Well, I like it, but it kind of makes
the logo disappear in the background.
| | 03:54 | So I'll go back to Appearance
and change those colors again.
| | 03:58 | In this case, I've already chosen a color,
so I'll change Header top to it, which
| | 04:02 | is #32411B, and let's see how that looks.
| | 04:08 | As we scroll down, we actually
see a preview, which is really nice.
| | 04:12 | I think that looks pretty good, so
I'll scroll all the way down and say Save
| | 04:16 | configuration and close
out my overlay. Much better!
| | 04:19 | The last thing I'm going to show you
in this video is how to change from one
| | 04:23 | theme to another entirely.
| | 04:25 | It's really quite easy; just go up to
Appearance and scroll down and see what
| | 04:29 | other themes you have available.
| | 04:31 | We have seven available.
| | 04:32 | We also have these disabled themes that
we could enable and then make the default.
| | 04:36 | In fact, I'll do that with Garland.
| | 04:38 | Click Enable and set
default. Close out the overlay.
| | 04:42 | There, you see it made
quite a big change to our site.
| | 04:45 | If I were to switch it to Seven, it
makes the site's interface quite different.
| | 04:50 | Set default, close the
overlay. Yeah, very simple.
| | 04:53 | I think I like it as Bartik though,
| | 04:56 | so I'll go back here and
Set Bartik as the default.
| | 05:00 | If I wanted to, I could go back and
Disable Garland, although I don't really need to.
| | 05:05 | Now when I close out, I'm back as I was.
| | 05:08 | This video showed you only a few ways you
can change your site's identity and look.
| | 05:12 | We only scratched the surface about
themes though, and it's a huge subject.
| | 05:16 | There are literally hundreds of
alternate themes available to download for free.
| | 05:20 | In the section about changing a site's
interface, we'll show you how to get and
| | 05:23 | use them, and even a
little about creating your own.
| | Collapse this transcript |
| Giving visitors a way to contact you| 00:00 | This part of the course is intended to
give you just the basics you'd need to
| | 00:04 | create and launch a site quickly.
| | 00:06 | You've learned how to change the
site's identity and add simple content, but
| | 00:10 | there is one more thing I think every
site needs--even the simplest ones: a way
| | 00:14 | for visitors to contact you.
| | 00:16 | To make that happen, go up to
Modules and scroll down to Contact.
| | 00:21 | It's a model that's turned off by
default. To turn it on, click the check box and
| | 00:25 | scroll to the bottom,
and then click Save configuration.
| | 00:29 | That's actually all that we need to do.
| | 00:31 | Our contact form is now turned on.
| | 00:33 | If we go up for URL here and type in
"contact after" our domain name, we can see
| | 00:40 | the contact form, but we
can go further than that.
| | 00:43 | In order to add more than one contact
form, or to change some of the criteria
| | 00:47 | that make up this one, go to
Structure and Contact form.
| | 00:51 | Here we see Website feedback.
| | 00:53 | That's the one contact form we've seen already.
| | 00:56 | To configure it, I click Edit.
| | 00:58 | On this screen, we can change the
category, which again doesn't come into play
| | 01:02 | until we add other categories,
as we will later in this video.
| | 01:05 | You can change who receives the e-mails
that are sent through that contact form.
| | 01:09 | If you want more than one person to
receive them, put a comma between each
| | 01:12 | e-mail address. And we could put in
an auto-reply, just to tell people that
| | 01:16 | we're going to answer their e-mail soon.
| | 01:18 | In fact, I'll do that: "Thanks for your e-mail!
| | 01:21 | We'll respond soon."
| | 01:26 | I'll talk about the Weight and Selected
pop-up menus in a minute. But for now,
| | 01:30 | I'll just click Save, and then
I'll go back and look at the form.
| | 01:33 | Now we're looking at this as somebody
who is already logged in to this site.
| | 01:37 | So our name and e-mail
address is already filled out.
| | 01:40 | In addition, there is a Send yourself a
copy box down here. If we were to fill
| | 01:44 | this out and check that box and say
Send message, a copy would also go to our
| | 01:48 | e-mail address since it
already knows who we are.
| | 01:51 | But what if you look at this form
as somebody who is just visiting your
| | 01:54 | site without logging in?
| | 01:55 | Well, I've already brought up the site in
another browser where I haven't logged in.
| | 02:00 | On this page, I'll go to /contact and
try to take a look at that contact form.
| | 02:07 | We're not allowed to see it.
| | 02:08 | That's because by default Drupal only
allows people who are logged in to send
| | 02:13 | e-mail through that contact form.
| | 02:15 | We can change that, though. I'll go back
to my administrative interface and go
| | 02:19 | up to People and then click Permissions.
| | 02:22 | Then we scroll down to the Contact area
here. The thing we're editing is called
| | 02:26 | the site-wide contact form.
| | 02:28 | In addition, as you'll learn later,
individual users can set up contact forms
| | 02:33 | so that, for example, one user can
write to another by using a similar form.
| | 02:37 | I'm going to make it possible for
everybody to use this contact form.
| | 02:40 | To do so, I click Authenticated User
and Anonymous user in that row, scroll all
| | 02:46 | the way to the bottom,
and click Save permissions.
| | 02:50 | You'll learn more about permissions in
the section on managing users, and in
| | 02:53 | particular, the video
"Controlling access permissions."
| | 02:56 | I do also want to warn you that by
opening up our site so that anyone can send
| | 03:00 | us e-mail, we will start to get spam
from automated services that are going
| | 03:05 | around the web looking for
ways to send us junk mail.
| | 03:07 | They have already discovered this
contact form on Drupal, so you will start to
| | 03:11 | get some of that junk.
| | 03:13 | Anyway, let's go back and take a look at
our anonymous user and reload the page.
| | 03:18 | There. Now we can see the contact form.
| | 03:20 | However, neither the name or the
address are filled in, and there is not that
| | 03:24 | Send yourself an e-mail check box down
here, because again, the site doesn't
| | 03:27 | know who this anonymous user is.
| | 03:30 | Now let's go back and
actually send ourselves a note.
| | 03:33 | I'll close that out.
| | 03:34 | I'll change my name to Tom Geller,
| | 03:37 | change my e-mail address to my actual e-mail
address, and the Subject will be, "Hey there!"
| | 03:44 | Message is "Great Site,"
and I'll send myself a copy.
| | 03:49 | Now when I send this, I
should get three e-mails.
| | 03:52 | The first one will be the one that I'm
sending to the administrator, who happens to be me.
| | 03:57 | The second one is the
Send yourself a copy message.
| | 04:00 | The third message that
I'll get is the auto-reply.
| | 04:03 | Again, I'm sending this to myself, so
I'll see both sides of the equation, both
| | 04:07 | the sender and the recipient.
And I click Send message.
| | 04:11 | Drupal tells me that the message has
been sent. Now, we wait a little while.
| | 04:15 | And there is our mail.
| | 04:16 | Let's see what it is.
| | 04:19 | As I said, we have three messages.
The first one is the auto responder,
| | 04:23 | Thanks for your e-mail!
| | 04:25 | Then we have the message that was sent
from the sender to the recipient, and an
| | 04:29 | identical message that was sent from
the sender as a bounce-back, that is the
| | 04:34 | one that they said they wanted to get a copy of.
| | 04:37 | Now let's go a little bit further.
| | 04:39 | I'll go back to our site by closing
out my mailbox and take another look at
| | 04:43 | Structure and Contact form.
| | 04:47 | Let's add another contact form to see
how it works when there is more than one.
| | 04:50 | We click Add category, and this
one I'm going to call Suggestions.
| | 04:55 | Recipients will once again be admin@example.com.
| | 05:01 | We don't need an auto-reply,
and I'll leave Selected as No.
| | 05:05 | Click Save, and we're back at our list.
| | 05:08 | Now when we go to our contact form, we
see an extra control, this pop-up here.
| | 05:13 | Now you remember, we said, no, we didn't
want for Suggestions to be selected and
| | 05:18 | so the other one, Website feedback, is selected.
| | 05:21 | If we go back, by clicking Structure
and Contact form once again, we can make
| | 05:26 | this one the selected one
by changing Selected to Yes.
| | 05:30 | Now when I do that, it makes the other one No.
| | 05:32 | Obviously only one can be selected at the time.
| | 05:35 | We can also make the Suggestions show
up below Website feedback by editing it
| | 05:40 | and changing its weight.
| | 05:41 | The larger number means that it's
heavier. The smaller numbers, or the negative
| | 05:45 | numbers, float to the top.
| | 05:47 | I'll change that to 6 and say Save,
and as you see, it sank to the bottom.
| | 05:53 | Now when we go to our contact form,
it's obvious when you look at how the
| | 05:57 | Category selector is set up.
| | 05:58 | So now we have a contact form that
will direct e-mails wherever we want, but
| | 06:03 | there is still one problem:
people don't know it's there.
| | 06:06 | I'm going to make the path to it obvious,
by just very quickly adding a link to
| | 06:10 | it in our main menu.
| | 06:11 | To do that, I go up to Structure and
Menus, and then I add a link to our main menu.
| | 06:17 | The title will be Contact,
the Path will be contact--
| | 06:21 | and you'll remember that's what we saw in
our browser bar--and in the Description
| | 06:24 | I'll say, Contact us through this
e-mail form. Scroll down and save.
| | 06:32 | You'll learn more about menus in the
section on helping users find their way around.
| | 06:36 | When we close out this
administrative overlay, we then see it here.
| | 06:39 | And when we hover our cursor over it, we
see what we typed in as the description.
| | 06:44 | Contact forms like this are an
effective way to get valuable feedback, but they
| | 06:47 | are not the only way.
| | 06:49 | If you want to make things even more
interactive, consider also letting people
| | 06:53 | talk directly to each other, and you'll
learn how to do that in the video about
| | 06:57 | adding discussion forums.
| | 06:58 | Forums are a much more heavyweight
solution, because you have to keep an eye on
| | 07:03 | them to make sure they're not being abused.
| | 07:05 | By comparison, contact forms are fairly
simple, and they're really trouble-free,
| | 07:09 | and furthermore, they're really easy to set up.
| | Collapse this transcript |
|
|
7. Controlling ContentCreating content summaries| 00:00 | We haven't created any really big
nodes in this course yet, but you probably
| | 00:04 | will if you run a site for any length of time.
| | 00:07 | When Drupal groups nodes together--
| | 00:09 | for example, here on this front page--
it naturally cuts off those long strings of text.
| | 00:14 | So you just get the first 600
characters or so, with a link to click to read
| | 00:18 | more. But sometimes the first 600
characters don't summarize the nodes' contents well.
| | 00:25 | This video shows you how to get better
control over that so-called teaser text,
| | 00:29 | both in individual nodes and
throughout your Drupal site.
| | 00:33 | I am going to use this
little news story as an example.
| | 00:37 | We added this earlier on in the
course from the exercise files.
| | 00:40 | Right now, there is no trimmed text
because the story itself is pretty short.
| | 00:44 | If we look at it here on the front
page, as well as on the node itself, it's
| | 00:49 | just two paragraphs.
| | 00:50 | So I am going to edit that and make it
longer, so that we can see exactly what's going on.
| | 00:55 | At the end of the second paragraph, I
am just going to add "blah-blah" and copy
| | 01:00 | that over many, many times.
| | 01:03 | That should be enough. And then you
know what I'm going to do is I am going to
| | 01:06 | cut it into a third paragraph
here and add another paragraph.
| | 01:10 | Now we know that we don't want all of
that on the front page, and Drupal will in
| | 01:13 | fact cut it down a certain amount.
| | 01:15 | Let's find out exactly how much it cuts
it down by saving it and looking at it
| | 01:19 | from the front page.
| | 01:22 | So as we look it on the Node
view, we see the whole thing.
| | 01:25 | If we go back to the front page,
we see only the first paragraph.
| | 01:30 | That's great; we really didn't want to
see all of that stuff on the front page.
| | 01:34 | But we can change that.
| | 01:35 | Let's say that we really wanted to give
us the first two paragraphs in the front,
| | 01:39 | instead of just one.
| | 01:40 | I'll go back up, click and then edit
it again. And let's make it so that this
| | 01:46 | entire second paragraph should show up as well.
| | 01:49 | What I do then is I click Edit summary,
go down, copy exactly what it is that I
| | 01:53 | want to appear in the summary, paste
it, go down to the bottom, and save.
| | 02:01 | Once again, in the node itself we see
the full thing, but on the front page we
| | 02:06 | see only the amount that
we wanted as the summary.
| | 02:08 | I'll go back and of course
turn that back to the way it was.
| | 02:13 | We don't really need this here,
| | 02:15 | so I'll just delete it and Hide the
summary. And I'll return this so that it's
| | 02:21 | more like it should be.
| | 02:22 | I do want to point out, however, that
the summary doesn't have to contain any of
| | 02:26 | the same text at all.
| | 02:27 | If I go back up and say Edit Summary,
I can then type in let's say "Yet
| | 02:32 | another chef's association votes in our
products as their preferred brand of choice."
| | 02:44 | Scroll down to the bottom and save, go
back to the front page, and there it is.
| | 02:50 | That's pretty much all you need to
know about how to change the summary of a
| | 02:53 | single node. But since you're the
administrator of the whole site, you can also
| | 02:57 | change how long the automatically
trimmed text is, and whether editors can add
| | 03:02 | summaries themselves.
| | 03:03 | To do that, you'll edit the content
type. First, let's change the trim length.
| | 03:08 | To do that, go up to Structure, Content
types, and I'm going to change article
| | 03:13 | since that node in particular
was of the article content type.
| | 03:17 | Go to Manage Display and then note that
up here you have a separate control for
| | 03:22 | the default and the teaser.
| | 03:24 | What we are going to change is the
teaser, so I click that button there, and
| | 03:28 | here--here we are we see all of the
fields that are part of that content type.
| | 03:32 | The one we're going to change is the Body.
| | 03:34 | Now we could have that change the
entire node if we wanted, by changing this to
| | 03:38 | Default. We could also change it so
it's only plain text--that is, it'll show
| | 03:42 | up properly with all of the stylings
and such in the node, but on the front
| | 03:46 | page and anywhere else that it's
gathered together, like in a view, it'll show
| | 03:50 | up as plain text. But what we're going
to do is change the trim length, and to
| | 03:54 | do that, you click the widget next to
the body field, and there you have some
| | 03:59 | additional controls.
| | 04:00 | In this case, we can
only change the trim length,
| | 04:02 | so I could change it, for example, to 50
| | 04:05 | if I wanted. Very small excerpts on the
front page or much longer, we don't have
| | 04:09 | to do that here. Just click Cancel.
| | 04:12 | Now when you do that, it changes all
existing content. It doesn't change what's
| | 04:17 | in the node itself, only the way it's
displayed, but it'll happen consistently
| | 04:21 | throughout your site.
| | 04:23 | Finally, here's how you get rid of the
option that lets users add a summary
| | 04:26 | when they create nodes.
| | 04:28 | We will go back to managing our fields,
and the field we are talking about is
| | 04:31 | the Body. Click Edit next to it,
scroll down, and then uncheck Summary Input.
| | 04:39 | Now, if I go down and save, you'll see
the difference when I add content of the
| | 04:43 | article content type.
| | 04:45 | You see that Edit Summary
has disappeared from up here?
| | 04:47 | That's what that check box does.
| | 04:49 | I am just going to return it to its
previous status. Just go up to Structure,
| | 04:53 | Content types, Article, Manage fields
and Edit the body. And once again, I scroll
| | 05:01 | down, allow Summary Input, and save.
| | 05:05 | Now we haven't gotten into this area yet
of editing content types, and there are
| | 05:09 | a lot of controls available.
| | 05:10 | You'll learn about them in the
section on extending content.
| | 05:14 | Now I have found that trim text at its
default length tends to be fine for most
| | 05:19 | webmasters. The ones who take
advantage of the summary are usually running
| | 05:22 | content-driven sites such as those
associated with newspapers, because they are
| | 05:26 | used writing blurbs which are different
from the first paragraph of the story.
| | 05:30 | But I could also imagine some
very creative uses for summaries.
| | 05:33 | For example, let's say you are running
a site on riddles. The summary could be
| | 05:37 | the question and then you click
through, the full node is the answer.
| | 05:41 | If you're doing something unusual on
your site, take a minute to think about how
| | 05:45 | you might use summaries creatively.
| | 05:47 | Since the results generally appear
on the front page, the results will be
| | 05:51 | highly visible.
| | Collapse this transcript |
| Revising content| 00:00 | I've mentioned a few times that
Drupal is a multiuser system, and it is, as
| | 00:05 | you know, a content management system.
Put those two together and you get the
| | 00:09 | possibility of lots of people
editing the same content and the danger of
| | 00:13 | having them create what's called an
edit war, where they write over each
| | 00:16 | others' corrections.
| | 00:18 | You'll learn how to permit or restrict access
to node editing in the section on managing users.
| | 00:23 | This video shows you how to keep
track of node edits so at least you can
| | 00:27 | untangle the history of a piece of
content and then return it to a previous
| | 00:31 | version if necessary.
| | 00:33 | To demonstrate, I am going to make some
changes to this About page that we added
| | 00:37 | earlier on in the course.
| | 00:39 | So we click About--that takes us
to the node--and then click Edit.
| | 00:43 | Now I have some text in our exercise files
that I'm going to add to the end of that node.
| | 00:48 | So I select it and copy it and go back
and paste it. And I don't actually need
| | 00:54 | this continuation text right here,
so I'll take that out, and scroll down.
| | 01:01 | Now there is a vertical tab
here, Show Revision information.
| | 01:04 | That's where you make the control.
| | 01:05 | So 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:17 | Now you'll notice a difference about
this node that we can see because we
| | 01:20 | are the administrator.
| | 01:22 | We have View and Edit as before,
but we also have this Revisions tab.
| | 01:26 | I click there, and we see the original
version along with the new one with our
| | 01:30 | node, and above that node, it tells us
when and by whom that edit was made.
| | 01:35 | Let's go back and edit it one more time,
because I want to show you an additional
| | 01:39 | feature of revisions. So I go up here
and click Edit, and down here I'm going to
| | 01:44 | just make a contact link, so that
instead of it just saying Maria Ann Vitalia, it
| | 01:49 | actually sends them to the contact page.
| | 01:51 | You might remember that we added a
contact page earlier in the course which
| | 01:54 | is at /content, so I will just say
a href=' /contact, and then at the end, I
| | 02:04 | will close out that tag.
| | 02:06 | Go down and once again I'm going to add
a Revision, and I'll say "Added contact
| | 02:12 | link" and Save, and once again go back to
Revisions. But let's say that after we
| | 02:17 | left it up there a while
| | 02:18 | we don't like all of the e-mail
that we're getting from that page,
| | 02:21 | so we want to revert it back to the second one.
| | 02:23 | That's easy enough.
| | 02:24 | We just click revert.
| | 02:25 | We are asked if we really want to
do that, and we do, and we are done.
| | 02:28 | But there is something interesting.
| | 02:30 | It doesn't just step backwards;
| | 02:32 | It goes forward so that you can now
go back again to that third step where
| | 02:35 | the contact link was there, and it puts in an
automatic note here saying copy of this revision.
| | 02:41 | Now if we go and look at that node we
see that indeed the contact link is gone.
| | 02:46 | So that's how you create a
revision on a single node.
| | 02:49 | By default, Drupal forces you to check
the box every time in order to do this,
| | 02:53 | but you can change that setting so that
revisioning is turned on by default for
| | 02:58 | any given content type.
| | 03:01 | This particular node is of the basic page
content type, so that's the one we will change.
| | 03:05 | To do it, go up to Structure and Content types,
the one we're going to change is Basic page.
| | 03:11 | So I go Basic page and Edit. Then I
scroll down to my vertical tabs down here.
| | 03:17 | Now there is no vertical tab down
here for the revision; instead, it's in
| | 03:21 | Show publishing options.
| | 03:24 | I click there and then go to Create
new revision, and Save content type.
| | 03:30 | Now when I go up and add content of
the basic page content type, scroll down,
| | 03:35 | and you see that the revision
box is already checked by default.
| | 03:39 | That change incidentally affects all
existing nodes of the content type as well,
| | 03:44 | so it forces revisions even for those
nodes you created earlier before making
| | 03:47 | this change to the content type.
| | 03:49 | I can prove that by going back to our
About page. I'll go home, click About, and
| | 03:54 | then Edit. And as I scroll down,
you'll see the revision information now has
| | 03:59 | it checked by default.
| | 04:00 | You will learn more about controlling
content type defaults like this one in the
| | 04:04 | video on creating new content types.
| | 04:07 | In the beginning of this video, I
painted a scenario where multiple people are
| | 04:11 | fighting for control over one piece
of content. But in practice, I find
| | 04:15 | revisioning useful even if I'm
the only one who's making changes.
| | 04:19 | Hey, we all make mistakes. Keeping
revisions is a way to recover from them, and
| | 04:23 | the only cost is the small amount of
disk space that those revisions take up.
| | Collapse this transcript |
| Categorizing content with tags| 00:00 | Everywhere in life, we
encounter organization by categories.
| | 00:04 | A trip to the supermarket would be
chaos if the same shelf held, let's say
| | 00:08 | dental floss, cans of beans, and slabs of meat.
| | 00:12 | Instead, these items are all
separated into their aisles, according to
| | 00:15 | what's called taxonomy.
| | 00:17 | Drupal lets you distinguish
nodes by taxonomy as well.
| | 00:21 | It's a two-part process.
| | 00:23 | First, you define a vocabulary.
| | 00:25 | In the supermarket example,
it might be product type.
| | 00:28 | Second, you assign terms to the
individual items that fit in that category.
| | 00:33 | So dental floss would be
tagged with the term "health,"
| | 00:36 | beans go into "cans goods," and so on.
| | 00:38 | To demonstrate this, I've created a
handful of new article nodes in our site,
| | 00:42 | but I unchecked the setting that
would have put them on the front page.
| | 00:46 | I got this text from our exercise files.
| | 00:48 | To see them, we go up to Content.
And as we scroll down, there they are.
| | 00:53 | They are basically just moments in the
history of the company. I want to label
| | 00:57 | each of these nodes with the tag
"timeline," but before we do that, I have to
| | 01:02 | set up a vocabulary. To see what vocabularies
we have, we go up to Structure and then Taxonomy.
| | 01:07 | Now, there is already one set up.
| | 01:10 | It's a general-purpose vocabulary
called Tags, and I am just going to use that
| | 01:13 | one at first. But you can create your
own vocabularies as well, and I'll show
| | 01:17 | you how to do that in the video about
going further with content categories.
| | 01:22 | So to tag all of these, I go back to
Content, and then I'll edit each one.
| | 01:27 | I will start with this one, Edit,
and for Tag, I'll say Timeline, scroll to
| | 01:33 | the bottom, and save.
| | 01:36 | Then I'll go to the next one
which is 1908, Edit, Tags, Timeline.
| | 01:41 | Now as I start to type it in, you'll
notice that Drupal has remembered that it's
| | 01:44 | already in the Tags vocabulary.
| | 01:47 | So I could continue typing or just go down
and select it, and then go down and click Save.
| | 01:53 | Now I'm going to go ahead and tag all of these.
| | 01:55 | You should do the same thing yourself, but I
won't be showing it to now. I'll meet you at the end.
| | 01:59 | So now I've added that
tag to all of those nodes.
| | 02:03 | Let's go back and take a look at any one of
them, and you'll see exactly how that works.
| | 02:07 | So I'll click on Coming to America,
| | 02:09 | the first one in the
Timeline, and there's the tag.
| | 02:13 | Now, if I click it, I see a page which has
as its title Timeline, which is the tag
| | 02:18 | itself, and then all of the
other nodes that have that tag.
| | 02:23 | There is one thing about this, however.
| | 02:25 | You'll see that it's going in backwards
chronological order. That has to do with
| | 02:29 | the order in which I created the nodes.
| | 02:31 | You can change that order, and you
will learn how to do that in a section of
| | 02:34 | this course on creating views.
| | 02:36 | Now taxonomies are kind of hard to
grasp conceptually, so I would just like to
| | 02:40 | expand upon this a little bit to drive it home.
| | 02:42 | I'm going to change these last two, the
1995 and the 1945 ones, so that they also
| | 02:48 | have the tag "postwar." To do that, of
course I go to each individual node and edit
| | 02:53 | it, up to the Tags comma and postwar.
Scroll to the bottom and save. And of
| | 03:00 | course, I do that with the other
one as well, which I believe was 1945.
| | 03:04 | Yep, there it is. I'll edit it,
comma, postwar, scroll down, and save.
| | 03:12 | Now let's go back and look at one
of those two nodes--1945 let's say.
| | 03:17 | We see that indeed we have both tags.
| | 03:19 | If we click the Timeline tag, we will
see all of the nodes that are tagged
| | 03:22 | that way. Or of course, if we click
Postwar, as you would expect, we'll see only
| | 03:27 | those two: 1945 and 1995.
| | 03:30 | You might have noticed that at the top of
this Taxonomy page, there's also an Edit tab.
| | 03:36 | Let's click it and see what happens.
| | 03:38 | Now we are editing the tag
itself, not any particular node.
| | 03:43 | Let's say that I wanted postwar, for
example, to be capital P the same way the
| | 03:47 | Timeline was. I could do that, and I
could add a description, a URL alias--which
| | 03:51 | is actually quite useful, I will make
that postwar-timeline--and some other
| | 03:56 | changes which we won't go into
any detail now, and then click Save.
| | 04:01 | Now, when we go back to that page by
closing our administrative overlay, we
| | 04:05 | see it's capitalized.
| | 04:07 | Furthermore, if we go down and click
postwar again, we see that the URL has
| | 04:11 | changed to that URL alias.
| | 04:14 | Tagging content makes it easy for
visitors to just click around and see what
| | 04:17 | interests them most.
| | 04:19 | We've only just scratched the surface, though.
| | 04:20 | You have quite a bit more control over
taxonomies, and I'll show you that in the
| | 04:25 | video on going further with content categories.
| | Collapse this transcript |
| Going further with content categories| 00:00 | In the video on categorizing content, you
saw how to add tags to articles and how
| | 00:05 | Drupal gathers similarly
tagged content into the pages.
| | 00:09 | We can see that if we go up to our
list of Content, go down to one of
| | 00:12 | those tagged pages--
| | 00:13 | you might remember we have a Timeline
here--click on one of them, and then notice
| | 00:18 | the tag right there.
| | 00:19 | When we click the tag, we see all of
those nodes that are tagged as Timeline.
| | 00:25 | Now we're going to go a lot
further with Drupal's taxonomy system.
| | 00:28 | First, you'll see how to
create vocabularies besides tags.
| | 00:32 | Then you'll see how to add fields to
those terms, so people who create nodes on
| | 00:36 | your site can add them
the same as they added tags.
| | 00:39 | Finally, you'll learn a little trick
to make those pages of similarly tagged
| | 00:43 | nodes easier for users to access.
| | 00:46 | We saw that Drupal comes with the tags
vocabulary, and to look at that, we go up
| | 00:50 | to Structure and Taxonomy,
and there it is, Tags.
| | 00:54 | Now let's say you want
to separate news articles--
| | 00:58 | that is, recent stuff like press
releases and reviews--from the historical stuff
| | 01:02 | like timeline items and company trivia.
| | 01:05 | Let's also say that you want to make sure
that every article gets one of those tags.
| | 01:10 | To do that, we add another
vocabulary by clicking Add Vocabulary.
| | 01:14 | I'm going to give the name "Current news?"
| | 01:20 | and the Description will be "Two terms:
| | 01:24 | News and Historical," and then I'll
click Save, and there is our vocabulary.
| | 01:31 | Now we start adding terms by
clicking the add terms link.
| | 01:35 | The first term I'll add is, of course, News.
| | 01:38 | Scroll to the bottom and save.
And Drupal asks if we want to add another term.
| | 01:43 | That's because typically when you
start adding terms to vocabularies you add
| | 01:46 | many at a time, and Drupal
just works along those lines.
| | 01:49 | The second one will of
course be Historical, and save.
| | 01:55 | Now, if we go back to that taxonomy,
again Structure > Taxonomy and list terms,
| | 02:01 | there they are. So far so good.
| | 02:03 | So we've created the vocabulary,
but it's not actually doing anything.
| | 02:07 | If we go up and add an article, by
clicking Add content and Article, we
| | 02:12 | see Title, Tags, Body. There is no place
for us to add that news or historical thing.
| | 02:18 | To do that, we have to add a field to
whatever content type we want to have that tag on.
| | 02:23 | We're going to add it to the Article
content type. So we go up to Structure >
| | 02:28 | Content types, and then next to
Article, we click manage fields.
| | 02:34 | Under Add new field, I'll
ask, Is it current news?
| | 02:38 | And in the field name, I'll
just call it current_news.
| | 02:42 | Now here's where the magic comes in:
for Field type select Term reference.
| | 02:48 | That's Drupal's way of saying it's
going to be a taxonomy term. And in the
| | 02:52 | Select list, I'll choose whatever
I want--in this case it'll be check
| | 02:56 | boxes/radio buttons.
| | 02:58 | Now we are delving pretty deeply into
an area we haven't covered yet, but we
| | 03:01 | will cover it in a later section in
this course titled "Extending Content," so if
| | 03:06 | you see anything here you don't
understand, don't worry--we will get to it.
| | 03:10 | Anyway, going on, we click Save.
| | 03:12 | We make sure that it's referencing the
vocabulary that we want, "Current news?"
| | 03:15 | that's right, not Tags.
| | 03:17 | Save field settings, and then I'll
just scroll down through the rest of this.
| | 03:21 | The only thing I'm going to change here,
however, is that we want every article
| | 03:25 | to have a tag that's in this vocabulary.
| | 03:27 | So I click this Required field box,
scroll to the bottom, and click Save. Great!
| | 03:34 | Now we're back at our page
where we see all of our fields.
| | 03:36 | I am going to rearrange these.
| | 03:38 | I am going to move Tags up above Body,
and I'll move Is it current news? also above Body.
| | 03:44 | Then I go down and save.
| | 03:45 | I move those around, by the way, by
clicking on this little compass-like icon,
| | 03:50 | and then you can freely drag
them as you like. Now we're set.
| | 03:54 | If we go back to Add content and add an
article, we see we have our title, our
| | 03:59 | tags, as before, but then we are forced
to add whether it's historical or news.
| | 04:04 | So we're pretty golden at this point.
| | 04:06 | Now before going on, I'm going to go back and
tag all of my articles with his new vocabulary.
| | 04:12 | I go up to Content, and I'll filter
so that my type is Article. And to edit
| | 04:18 | these, of course, I would just click edit.
| | 04:21 | This one is News, go to the bottom,
click Save. Go back to my list of Content
| | 04:28 | and continue down the row.
| | 04:30 | There is one thing: if you go back and
edit one of these nodes and you don't
| | 04:33 | add that tag and try to save it again,
because you made it required, you're now
| | 04:38 | going to meet an error.
| | 04:40 | So you have to go down and say, okay,
this one is historical and save it.
| | 04:43 | So I'm going to go and add tags to all
of these articles, and then once I am
| | 04:48 | finished with that, I'll show
you how that affects our site.
| | 04:51 | Now that they're all tagged, we see
when we click on any one of these nodes
| | 04:55 | that we have our tags, its timeline, and then we
have a separate thing here, Is it current news?
| | 05:00 | It's Historical. And as usual, if we
click here, we would get a page which shows
| | 05:05 | only those historical items.
| | 05:07 | At the beginning of this video, I
said I'd show you three things.
| | 05:10 | You saw how to create your own
vocabularies, and you saw how to create a field
| | 05:14 | for them in content types.
| | 05:16 | Now, I'll show you something
unrelated to those two, but still quite handy.
| | 05:20 | We are going to make those term
pages more accessible to site visitors.
| | 05:25 | First thing you'll notice when we go to
this Historical link, we have this not
| | 05:29 | really very user-friendly URL up here.
| | 05:32 | We can change that in a few ways.
| | 05:34 | One is by going back to Structure,
clicking Taxonomy and then listing terms.
| | 05:40 | Now when we edit the term, we go
down, and we could add a URL alias.
| | 05:44 | Let's call that historical-items and save.
| | 05:50 | Another way we could do that, and I can
show you this by going to the News page,
| | 05:53 | clicking News here, then just go up to
Edit, and we come back to that same page,
| | 05:57 | and I'll call this news-items and save.
| | 06:02 | Now our URLs are much more friendly,
as you can see if you go down here and
| | 06:06 | click on a node and then click on
one of these links. Historical, yup,
| | 06:10 | historical-items, just as we wanted.
| | 06:12 | I'm going to copy that URL right there
and add a menu item for it right next to
| | 06:17 | all of these other ones up here.
| | 06:19 | To do that, click Structure and menus,
and then I'm going to add a link to the main menu.
| | 06:27 | The title will be Timeline, and then
under the Path, I paste historical-items.
| | 06:33 | In the Description, I'll say Timeline and
other historical info about our company.
| | 06:41 | Scroll down and Save.
| | 06:43 | Now when we close out this window and
go back to our historical-items page, I
| | 06:48 | see I have a Timeline tab here,
and as we click around, it remains there.
| | 06:53 | When we click back, it goes to Historical items.
| | 06:56 | You'll learn more about menus in this
section on Helping users find their way around.
| | 07:01 | I'll be honest,
| | 07:02 | it took me a while to warm up to
Drupal's taxonomy system, but it really
| | 07:06 | wasn't Drupal's fault.
| | 07:08 | The fact is, taxonomies are conceptually hard.
| | 07:11 | I've actually come to really like
the way Drupal implements them in this
| | 07:14 | categorization system, because it takes
that hard concept, makes it clearer, and
| | 07:20 | then lets you apply it in a flexible way.
| | Collapse this transcript |
| Publishing content via RSS| 00:00 | Years ago there were CompuServe and
America online, services where you dialed up
| | 00:05 | and got all of your
information from a single source.
| | 00:08 | When the Internet started to become
available and popular in the mid-90s, such
| | 00:12 | services were known as "walled gardens" by
comparison, since you could now go from
| | 00:16 | one garden to another on the
Internet simply by clicking links.
| | 00:20 | The Internet had brought those walls down.
| | 00:23 | Later, people started asking, why do we
actually have to go from site to site?
| | 00:27 | Couldn't we just get all the
information we want in one place?
| | 00:30 | And that's how RSS was born.
| | 00:32 | RSS stands for really simple syndication,
and it allows you to look at different
| | 00:37 | sources in one place.
| | 00:39 | The best way to explain
RSS is to show an example.
| | 00:42 | What I am going to do is I'm going to
look at the blog from lynda.com, as well
| | 00:46 | as my own blog from TomGeller.com, in one place.
| | 00:50 | The place I'm using is Google Reader,
which you can sign up for yourself
| | 00:53 | at google.com/reader.
| | 00:56 | But this isn't the only way
that you can look at RSS feeds;
| | 00:58 | there are many, many others.
| | 01:00 | In fact, I usually read them
on my mail program on my Mac.
| | 01:03 | And you can also use an iPhone or
any other kind of mobile device to
| | 01:07 | subscribe to RSS feeds.
| | 01:09 | So I'm already signed up for the lynda blog.
| | 01:12 | Now I'll go to my own site at
tomgeller.com/blog and look at my RSS feed, by
| | 01:20 | clicking this icon in the upper-right corner.
| | 01:22 | Now my site is, as you might guess, a
Drupal site, and I didn't have to do
| | 01:26 | anything special to create this page.
| | 01:29 | You'll see how that works in just a moment.
| | 01:30 | But for now I'm going to select my URL, go back
to Google Reader, and add it as a subscription.
| | 01:37 | It takes a minute to grab all that
information from the Internet, and here we are.
| | 01:43 | If we look at all of the items, and we
were to scroll down, you would see that
| | 01:47 | lynda's items are mixed in with mine,
and we can just easily get lots of
| | 01:51 | information from different sources this way.
| | 01:54 | But let's talk about how Drupal does
this, by going back to our site, the Two
| | 01:57 | Trees Olive Oil site.
| | 02:00 | You'll notice that here on the
front page we already have an RSS icon.
| | 02:03 | I click it, and we see the two front-page items
here, with clickable links to go back to them.
| | 02:09 | This one is an article, and it has its
tags down here, and this one is a basic page.
| | 02:14 | We click them, and we go
back to the node itself.
| | 02:18 | So I showed you that on the front page,
but actually Drupal does that anywhere
| | 02:21 | on your site that there
is a collection of nodes.
| | 02:23 | For example, we created this Timeline
here by collecting items onto a taxonomy
| | 02:28 | page, and up here we have
the little RSS Feed icon.
| | 02:31 | Click it, and as before, you see all of
the different links for items that have
| | 02:36 | been tagged as timeline items.
| | 02:38 | So that tells you about RSS, and
that tells you a little about how Drupal
| | 02:42 | handles it by default.
| | 02:43 | Now let's look at the settings you
can change in Drupal to affect how it
| | 02:47 | publishes that information.
| | 02:49 | The first method affects all of your
RSS feeds, and I'll show you that by going
| | 02:53 | back to our site, clicking Configuration,
and scrolling down to RSS Publishing.
| | 03:00 | Here you can add a description, for example,
"News from the Two Trees Olive Oil site."
| | 03:07 | You can change how many items show
up in each feed, and just by way of
| | 03:09 | demonstration, I'll change it from 10 to 5.
| | 03:12 | And you can change what
kind of content shows up.
| | 03:15 | Right now, we are showing the entire
node, but let's say that I just want to
| | 03:19 | show the titles and force people
to come to my site to read more.
| | 03:23 | Change that to Titles and
then click Save configuration.
| | 03:27 | Now when I close out the
administrative overlay, I go back to my timeline and
| | 03:31 | click the RSS feed to see how
our changes affected what we get.
| | 03:35 | And indeed, we see only five
nodes, and we see only the titles.
| | 03:39 | I am going to go back and change that
back actually, because I think I want to
| | 03:43 | show the full nodes to
demonstrate something else.
| | 03:46 | Once again, I go up to Configuration,
scroll to RSS Publishing, and I change it
| | 03:51 | back to Full text, and save.
| | 03:54 | So that affects all RSS feeds on your site.
| | 03:57 | The second method I'm going to show
you only affects specific content types,
| | 04:02 | and I'll demonstrate this by going back to
our front page and looking at our feed there.
| | 04:09 | So here we have an article,
and here we have a basic page.
| | 04:13 | One thing I don't like about this
article is that it includes all of these tags.
| | 04:17 | It seems that there is more information than
I really want to feed out over the Internet.
| | 04:21 | So to change that, I'll go back to my
site, click Structure and Content types,
| | 04:28 | and then next to Article,
I'll go to manage display.
| | 04:31 | You've already learned a little bit
about this page in previous videos.
| | 04:35 | You'll learn a lot more about it in a
section on extending content, which comes
| | 04:39 | later in this course.
| | 04:40 | But basically you can change how
individual fields are displayed in
| | 04:44 | different contexts.
| | 04:45 | Right now, we just have a default
context, which is what you see in the node
| | 04:48 | itself, and a teaser context.
| | 04:52 | But down here under Custom Display Settings,
we can also add an RSS context, and click Save.
| | 04:59 | Now when we click this RSS button
up here, we can change exactly what
| | 05:04 | comes through RSS fields.
| | 05:06 | And in this case, I want to get rid of
the label, make it hidden, and get rid of
| | 05:11 | the tags, make those hidden.
| | 05:15 | As you see, that moves it into an area
down here, Hidden, just to make clear
| | 05:18 | that it's not going to come through the feed.
| | 05:20 | Then I'll click Save.
| | 05:22 | Now to prove that this worked, let's go
back to our front page here and take a
| | 05:25 | look at the RSS feed, and there it is.
| | 05:29 | We see the title, the picture, the
body, but the Tags field, which we had
| | 05:33 | here, isn't showing.
| | 05:35 | If we want, we can also go back and
hide that "Is it current news?" field by
| | 05:39 | doing the same thing.
| | 05:41 | We go to Structure > Content types >
manage display, click the RSS button, and
| | 05:48 | hide it, and save, and there it is.
| | 05:54 | We now have no tags underneath that
particular node--or any node of the
| | 05:58 | article content type.
| | 06:00 | There is something strange about
Drupal, which is that there's no way to
| | 06:03 | turn off RSS entirely.
| | 06:06 | If you publish something publicly and
place it on a page that collects nodes,
| | 06:09 | such as the front page or a taxonomy terms
page, then it's going to be available on RSS.
| | 06:15 | The best you can do is to make only
the title available, as I showed you.
| | 06:20 | On that note, remember, whatever
you publish via RSS, other people will
| | 06:25 | republish on their sites.
| | 06:26 | If you don't want that,
limit what you publish that way.
| | 06:30 | But on the other hand, you can increase
how much you are publishing, and for a
| | 06:33 | promotional site like ours, you
probably want people to republish your content.
| | 06:39 | So that's how you control what
Drupal feeds to the Internet via RSS.
| | 06:43 | But Drupal also lets you
collect other sites' RSS feeds.
| | 06:47 | To learn about that, watch the
video on subscribing to RSS feeds.
| | Collapse this transcript |
| Using text formats to prevent content damage| 00:00 | In the beginning on the Internet was
the word, and the word was in plain text.
| | 00:05 | Then came HTML, designed as
a text-formatting language.
| | 00:09 | Then came extensions to HTML that let
people frame and redirect content and
| | 00:14 | JavaScript and cross-site exploits
and code injection, and there was
| | 00:19 | trouble unto the land.
| | 00:21 | As web technology has gained capabilities,
it's also gained complexity, and a lot
| | 00:25 | of different types of attacks take
advantage of that complexity on the web.
| | 00:30 | One place where Drupal opens itself up
to those attacks is in its system of text
| | 00:34 | formats, which defines how your content
will appear when delivered to visitors.
| | 00:40 | This video shows you how to cut down
on those dangers while still displaying
| | 00:43 | content the way that you want it.
| | 00:46 | First, let's take a look at the problem.
| | 00:48 | To do that, I will add
content and add a basic page.
| | 00:52 | As we scroll down, we see this Text format.
| | 00:55 | By default, it's in Filtered
HTML, which is actually quite safe.
| | 00:58 | It only allows these HTML tags here.
| | 01:02 | Most of them only define
how text appears on the page.
| | 01:05 | It doesn't let you do any fancy
tricks, except for linking, which can be
| | 01:09 | dangerous, but generally it's pretty safe.
| | 01:12 | If you go up to this Text format pop-up
and go down to Full HTML, that allows
| | 01:17 | all HTML tags to be included.
| | 01:20 | So let's say you want to put up
content that needs to use tags that's not in
| | 01:24 | that text format Filtered HTML.
| | 01:27 | You might be tempted to simply switch
it to Full HTML, but therein lies the
| | 01:31 | problem, and I'll show you.
| | 01:32 | In Title I will call this Dangerous
Content, and then I am going to type in a
| | 01:38 | little bit of code in the
body, just to demonstrate.
| | 01:41 | It will be an inline frame, iframe,
source will simply be http://google.com.
| | 01:49 | I will make the width=800 and the
height=600, and then I will close it out.
| | 01:58 | Now don't worry if you don't understand
it; it's just by way of demonstration.
| | 02:04 | Scroll down, make sure Full HTML
is turned on, and then click Save.
| | 02:09 | Now it looks as though our site is
delivering content that's actually
| | 02:12 | coming from another site.
| | 02:14 | Now in this case, it doesn't matter
that much because it's Google, and everybody
| | 02:17 | knows what Google is and
understands it. But it could be anything.
| | 02:20 | It could be a gambling site, it could be
content you really don't want your users to see.
| | 02:25 | The problem is even worse if you've
turned on a filter known as the PHP filter.
| | 02:30 | I will show you how to do that,
and later we will turn it off.
| | 02:33 | To start, go up to Modules
and scroll down to PHP filter.
| | 02:39 | Turn it on and then Save.
| | 02:43 | Now, let's go back to our node and edit it.
| | 02:45 | I am going to replace this with a
little bit of PHP code, scroll down, and
| | 02:53 | change the Text format to PHP
code and then save. Oh boy!
| | 02:59 | What I've just done is I have
created a page on my site that demonstrates
| | 03:03 | everything about the configuration of my server.
| | 03:06 | Once somebody has this page in front of
them, they could then figure out how to
| | 03:10 | take advantage of it,
| | 03:11 | so I really don't want
that information on my site.
| | 03:14 | To get rid of it, I will click Edit,
and I'm actually going to delete this
| | 03:17 | entire node by clicking Delete down
here. And yes, I want to get rid of it.
| | 03:22 | Now, there are sometimes good reasons
to permit PHP and content--and we'll talk
| | 03:26 | a bit about that in the "Developing
for Drupal" section of this course--
| | 03:30 | but generally speaking, you shouldn't
turn on that filter unless you need it.
| | 03:34 | I'm only showing it here because
sometimes you'll work on a site where it's
| | 03:37 | already been enabled.
| | 03:39 | But just to be sure, I'm
going to turn it off now.
| | 03:41 | We go up to Modules, scroll down to PHP, PHP
filter right there and turn it off and then Save.
| | 03:50 | So now you know the problem of giving
people too much access to text formats.
| | 03:55 | At the same time there's a different
problem if you don't give them enough access,
| | 03:59 | and I will show you that by
trying to embed a YouTube video.
| | 04:02 | So I have my video right here, and let's just
make sure it's what I want.
| | 04:06 | (video playing)
| | 04:09 | Yup. That's it.
| | 04:10 | So I want to embed that in my site,
| | 04:11 | so I click the video embed code
here, scroll down, and copy it.
| | 04:16 | Go back to my site and
create a node that contains that.
| | 04:19 | Click Add Content and Basic Page.
| | 04:23 | Title I will say, Video,
and paste it right here.
| | 04:28 | Scroll down to the bottom and save.
And because we are in filtered HTML, as you
| | 04:32 | might guess, it doesn't actually show up.
| | 04:36 | Now, if I were to change that to Full
HTML, it will show up, but we have the
| | 04:40 | same problems we described earlier,
and there it is.
| | 04:44 | (video playing)
| | 04:48 | We can see the problem if I
go back and edit this node.
| | 04:51 | Once again, filtered HTML only includes
these kinds of links, whereas the ones
| | 04:57 | that I need include
object and param and embed.
| | 05:02 | Those are the three tags that I need.
| | 05:04 | So what I'll have to do is create my
own text format which has those tags in
| | 05:08 | it but nothing else.
| | 05:10 | That would, for example, avoid the whole
iframe problem, because that tag isn't included.
| | 05:16 | To add a text format, we go up to
Configuration and Text Formats.
| | 05:20 | Now we could edit the Filtered HTML one,
but to be honest, I like to keep it the
| | 05:26 | way it is because it is designed by the
people who created Drupal, and I trust
| | 05:30 | them to watch out for my
safety more than I trust myself.
| | 05:34 | So I'll add one, and I'll
call this one Embed YouTube.
| | 05:40 | When you create a text format, you
can decide who is allowed to use it.
| | 05:44 | I am going to allow authenticated users
to do it as well as administrators, but
| | 05:48 | not anonymous users.
| | 05:49 | You will learn more about the
differences between these, and permissions in
| | 05:53 | general, in the "Managing Users" section.
| | 05:56 | The most important part
here is the enabled filters.
| | 05:59 | I am going to just quickly turn them
all on for demonstration purposes first.
| | 06:03 | If you had the PHP filter also turned
on, that module I mentioned earlier, there
| | 06:08 | would be another choice here as
well which would allow PHP code.
| | 06:11 | Some of these filters have additional
settings. Specifically, Convert URLs into
| | 06:16 | Links lets you chop off the URL, so
that it doesn't show the entire thing.
| | 06:20 | And the one that we're going to use, the
one that's most important to us, is this
| | 06:23 | Limit allowed HTML tags.
| | 06:26 | By default, it gives you the ones
that's in the Filtered HTML format.
| | 06:30 | I am going to just add a couple of more to that.
| | 06:32 | It's going to be embed, object, and param.
| | 06:37 | I'm going to just go up here and see
if I want to take any of these away.
| | 06:44 | No, I don't want to do that.
| | 06:46 | Convert line breaks, that's fine.
URLs into links, that all looks good.
| | 06:51 | I just want to mention a couple of other
little things here under Limit allowed HTML tags.
| | 06:55 | We will see what this Display
basic HTML help is in just a moment.
| | 07:00 | Add rel= "nofollow" is an anti-spam
device, which prevents some kinds of robots
| | 07:07 | from going onto your site and creating
nodes that will then profit other sites.
| | 07:11 | I am going to add that because it's
just a good general practice, and say
| | 07:14 | Save configuration.
| | 07:16 | Now, if we go back to our content,
scroll down and find that video, I am going
| | 07:22 | to edit that and change the Text
format to Embed YouTube, the one we just
| | 07:27 | created. And here is that help text I mentioned.
| | 07:30 | It shows all of the codes that
we had entered in that field.
| | 07:34 | Scroll down, cross our fingers, and click Save.
| | 07:39 | Now when we look at the node,
there's our video. It works.
| | 07:44 | Finally, if you really want to
prevent use of these text formats, you can
| | 07:48 | simply remove them.
| | 07:50 | Go up to Configuration, down to Text
formats, and then disable the one that
| | 07:56 | you don't want to use.
| | 07:58 | Now when you disable a text format,
it's really the same as deleting it.
| | 08:02 | You can no longer have it available for
nodes, and any nodes that have that text
| | 08:06 | format become not as available.
| | 08:08 | I am going to say Yes, Disable,
close out our administrative overlay.
| | 08:13 | So our text format is gone, and as I
said, we can no longer watch our video.
| | 08:17 | If I click Edit, I will see why.
| | 08:19 | We scroll down to text format,
| | 08:21 | you notice no text format is selected now.
| | 08:25 | If we try to delete this,
we can't even delete it.
| | 08:28 | We have to change it to a text format,
which you'll notice from that little
| | 08:32 | asterisk is required, put it on Filtered HTML.
| | 08:35 | It doesn't really matter what you
put it on because we're just going to
| | 08:38 | delete it, and it's gone.
| | 08:41 | Now I only very quickly talked about
what those individual text filters do, but
| | 08:46 | they come with pretty good explanatory
text, and a little playing around will get
| | 08:49 | you comfortable with them.
| | 08:50 | There is one caveat, however,
and I'll show you that by going back to
| | 08:54 | Configuration and Text formats, and then I
will just configure the Filtered HTML one.
| | 09:00 | The order that you have these
filters in makes a difference;
| | 09:04 | some of the filters strip
capabilities, while others add them.
| | 09:07 | So if you find a filter is not working
the way you want, think hard about the
| | 09:12 | order of operations, as well as
what the filters themselves do.
| | Collapse this transcript |
| Setting the comment policy| 00:00 | The Internet showed us that anything
that can be abused will be abused, and
| | 00:04 | nowhere is that more evident
than in comments and public forums.
| | 00:09 | The good news is that Drupal gives you
ways to control such abuse, and there are
| | 00:13 | several methods to give you control
over how comments appear on your site as
| | 00:16 | well, including whether they're allowed at all.
| | 00:18 | We will start by very quickly
looking at comment permissions--
| | 00:22 | that is, whether people are
allowed to comment at all.
| | 00:24 | Those controls are in two places.
| | 00:27 | The first one is in the Permissions
screen, which you get to by going to People
| | 00:31 | and then Permissions.
| | 00:33 | We scroll down to the Comments area.
| | 00:35 | The two most important ones here are
Post comments and Skip comment approval.
| | 00:40 | By default, only authenticated users
are able to post comments, and they don't
| | 00:45 | have to get your approval
after they have posted them.
| | 00:47 | What some administrators like to do is
to give anonymous users permissions to
| | 00:52 | post comments but not to skip comment approval.
| | 00:55 | That means that they will post their
thoughts, but then they'll get a message
| | 00:58 | saying that the administrator has to
approve it, and it won't appear on the site
| | 01:01 | for visitors until you as
the administrator do so.
| | 01:04 | I will just leave it as it is right now,
so that anonymous users can't actually post.
| | 01:09 | The other prominent setting in here
is View comments, and you can see that
| | 01:13 | everybody can see comments on the site.
| | 01:15 | Again, that's typical to leave it that way.
| | 01:17 | You will learn more about this screen,
and about permissions in general, in the
| | 01:21 | "Managing Users" section of this course.
| | 01:24 | Changing a permission affects all
content throughout the entire site, but you
| | 01:29 | can also change settings on a
content-type-by-content-type basis.
| | 01:33 | To do that, go up to Structure, and then
Content types, and then click Edit next
| | 01:39 | to the content type you want to affect.
| | 01:41 | In this case, I am going to change
the Article one, so I click Edit there and
| | 01:45 | scroll down toward the bottom.
| | 01:47 | In the vertical tabs, there is a Show
Comment settings tab, so click there, and
| | 01:52 | there are several settings.
| | 01:53 | I won't get into all of these right now.
| | 01:55 | The most important one to
look at is this first one.
| | 01:58 | You have three options:
| | 01:59 | Open means that you will accept comments in
response to any nodes of this content type;
| | 02:05 | Closed means that further comments
won't be accepted; and Hidden means that no
| | 02:09 | controls for comments are seen at all.
| | 02:11 | We will just leave this on Open
since we want to show how comments work.
| | 02:15 | Now this change only affects new
content; that is, it's the default comment
| | 02:20 | setting for new content.
| | 02:22 | It doesn't change content that already exists.
| | 02:25 | All the other settings do
affect nodes that already exist.
| | 02:29 | So let's talk about those other settings.
| | 02:31 | The next one is Threading, and the best
way to explain it is to show a node with
| | 02:35 | lots of comments, both
with and without threading.
| | 02:38 | I have gone ahead and added a bunch
of comments to one article up here.
| | 02:41 | I can get to it by
scrolling down and going to 1995:
| | 02:45 | Passing on the tradition.
| | 02:47 | As we scroll down, we see that
JoeBob left a comment, and then Polly Ann
| | 02:52 | Saturated left a comment in response.
| | 02:54 | The conversation continued like this.
| | 02:56 | Now, you see how this indenting works.
| | 02:59 | That's what they're talking
about when they say threading.
| | 03:01 | Well, what happens if we go back to
that content type and change it from
| | 03:05 | Threaded to Not Threaded?
| | 03:07 | Well, it's an article, so I'll go up to
Structure and Content Types and Edit
| | 03:12 | Article and again go down to Comment
Settings, and instead of Threading, I will
| | 03:17 | uncheck that box and
then say, Save content type.
| | 03:20 | I will close that overlay, let the
screen redraw and then scroll down, and as
| | 03:26 | you can see, it's all at the same level.
| | 03:29 | It's not really as easy to read.
| | 03:31 | For that reason, I pretty
much always leave Threading on.
| | 03:35 | Some people find it a little bit less
attractive, especially if you have a lot
| | 03:39 | of people replying to each other--
| | 03:41 | it gets to be very indented, and the
area where they can actually enter comments
| | 03:44 | get smaller and smaller for a while.
| | 03:46 | But I haven't had that
problem. So I will go back.
| | 03:49 | Edit, Comment, and Threading.
| | 03:53 | Now I also have this node
opened as an ordinary user.
| | 03:57 | This happens to be JoeBob, and by the way,
I added all of those users that you saw:
| | 04:02 | JoeBob, Maria Ann Vitalia,
OilExplorer there are few others in there.
| | 04:06 | If you're doing this at home from the
exercise files that come with this course,
| | 04:11 | they all have the same password,
which is drupal, all lowercase.
| | 04:16 | Now I am going to use JoeBob's account
just to show what happens when we make
| | 04:20 | these changes to the Commenting settings.
| | 04:23 | So I will go to that node, go back
to the administrator, save it so that
| | 04:27 | threading is turned back on,
| | 04:29 | and then as we reload this page,
| | 04:32 | we see the Threading back on.
And we will go back and edit those comments on the
| | 04:37 | article content type.
| | 04:39 | Comments Per Page is
pretty obvious what it does.
| | 04:41 | If you have more than 50 comments, what
would happen at the bottom of the page
| | 04:44 | is you'd see a little link that says
More, and you could go backwards and
| | 04:48 | forwards through the pages.
| | 04:49 | The Range is from 10 to 300.
| | 04:52 | Personally, I tend to turn it up
quite a bit on a busy site because I would
| | 04:56 | rather have people see everything all at once.
| | 04:59 | There are two reasons why you might
want to leave it at a lower setting.
| | 05:03 | First, you might be trying to force
more page views if you're serving up an
| | 05:07 | advertise-supported web site,
and you want more pages to show, more
| | 05:10 | opportunities to click on the ads.
| | 05:13 | The other reason to lower the number of
comments per page is if you're trying to
| | 05:16 | get your pages to load faster.
| | 05:18 | In the modern days of the Internet, it's
not that much of a difference, but for
| | 05:21 | some people, especially coming
through mobile devices and other slower
| | 05:24 | connections, it might make a difference.
| | 05:27 | For Allow Comment Title, I will simply
remove that and save it and then show you
| | 05:31 | what it looks like by
switching over to JoeBob's account.
| | 05:34 | So I will scroll down and show
you how it is without that change.
| | 05:39 | We have a Subject and Comment field.
| | 05:41 | Now when I reload the page with that new
setting, the Subject area has disappeared.
| | 05:46 | JoeBob can only enter a comment.
| | 05:49 | And as a matter of fact, when he does,
part of that comment becomes the title.
| | 05:53 | Here, I will show you.
| | 05:55 | I will type in "Yes, it was a great year!"
| | 05:59 | and say Save, and there it is.
| | 06:03 | If he had written a longer comment, it
would have just chosen the first few words.
| | 06:07 | But let's go back and take a
look at the rest of those settings.
| | 06:10 | Click on Edit next to Article.
| | 06:14 | The next setting, Show reply form on
the same page as comments, means that
| | 06:18 | somebody doesn't have to click a link
that says, please leave a comment here.
| | 06:21 | And in fact that's the
setting that we have here.
| | 06:24 | We're allowing people to simply scroll to
the bottom of the page and leave their comment.
| | 06:28 | Incidentally, if you wanted to reply
to something earlier on in the thread,
| | 06:32 | say that you wanted to reply to
OilExplorer here and not have it show up at
| | 06:35 | the bottom but rather indented here
under his, you'd click Reply under the
| | 06:39 | individual comment.
| | 06:42 | That brings you to a new page, showing
only the comment that you're applying to,
| | 06:46 | and that's very much
what this check box is like.
| | 06:49 | Finally, we have Preview comment.
| | 06:52 | At the moment it's optional, which means
that if I'm going to post something, I
| | 06:55 | have a choice between Save and Preview.
| | 06:58 | If I type something in here, "let me
say one more thing" and preview, before it
| | 07:05 | actually becomes part of the site, it
shows me what it's going to look like.
| | 07:09 | Then if I actually want to save it, I
would have to click Save here, but if I
| | 07:13 | don't now, the comment just gets thrown away.
| | 07:16 | Required, on the other hand, means
that you will only see a Preview button.
| | 07:21 | By contrast, Disabled means
you'll only see a Save button.
| | 07:25 | I am going to go back and allow
Comment title and Save content type, and then
| | 07:30 | we're back as we were before.
| | 07:32 | So as you can see, you have a lot of
control, both for how your site accepts and
| | 07:36 | how it displays comments.
| | 07:38 | In the next video you'll see how to
get finer grain control to manage
| | 07:42 | individual comments.
| | Collapse this transcript |
| Managing comments| 00:00 | In the video on setting comment policy,
you saw how you can change how people
| | 00:04 | leave and read comments throughout your
entire site, or in relation to nodes of a
| | 00:09 | specific content type, such as articles.
| | 00:11 | But if you allow comments at all on
your site, you will soon find that you need
| | 00:15 | to manage them individually for various
reasons--most notably, to prevent abuse.
| | 00:21 | Here are a few ways to do that.
| | 00:23 | First, let's take a quick look at what
kind of commenting Drupal allows by default.
| | 00:27 | Before we go on, I want to show you
that in this other browser I am looking
| | 00:30 | at the site as an anonymous user,
and I'll look at a note on the site where I
| | 00:34 | have some comments.
| | 00:35 | To do that, I will go to Timeline, and
then to this one that we've already added
| | 00:39 | to the site and put some comments on, 1995:
| | 00:42 | Passing on the tradition.
| | 00:43 | I will just click on that title there, and I
can see all of the comments and the node itself.
| | 00:49 | Now notice that by default if I want to
post a comment, all that I see is this
| | 00:53 | link here, Log in or register to post comments.
| | 00:57 | I can't actually create a comment directly yet.
| | 00:59 | Let's go back to the administrative
interface though, and make it possible for an
| | 01:04 | anonymous user to post comment.
To do that, go up to People and then to
| | 01:08 | Permissions and scroll down to the Comment area.
| | 01:12 | Already, anonymous users can view
comments but not post comments, and certainly
| | 01:17 | not skip comment approval.
| | 01:19 | I'm going to let them post the
comments but not skip comment approval.
| | 01:23 | I'll scroll to the bottom
and click Save permissions.
| | 01:29 | And you will see what that does
when I switch back to my anonymous user
| | 01:32 | and reload the page.
| | 01:35 | Now you see the reply link appears
below each comment. And in fact, if I go back
| | 01:39 | to that front page, I will see that I
can reply to the node in general. Or if I
| | 01:43 | scroll to the bottom of this
page, I see the commenting form.
| | 01:46 | But what happens if I
actually try to add a comment?
| | 01:49 | I am going to do that. I am just going to
make it a mildly abusive comment. So who cares?
| | 01:55 | Why don't you talk about
something interesting for once?
| | 02:01 | And I'll go down and save it.
| | 02:03 | You see this warning that gives me?
| | 02:05 | It's very polite about it, at least.
| | 02:07 | Your comment has been queued for
review by site administrators and will be
| | 02:10 | published after approval.
| | 02:12 | Well, since we are logged in as the
administrator in the other browser, let's
| | 02:15 | see what that looks like.
| | 02:17 | The way we would find out about that
is as an administrator we would get an
| | 02:21 | e-mail saying that there's a
comment waiting for your approval.
| | 02:24 | We click Content and then Comments,
and then we see there are Published comments
| | 02:30 | and Unapproved comments.
| | 02:33 | Click that Unapproved comments, and we
see all of the ones that are waiting.
| | 02:36 | Now, there are several things we can do.
| | 02:39 | We can go directly to the
comment and see what it is.
| | 02:42 | It shows up in a slight pink, so
that that's not actually been published yet.
| | 02:48 | From here, we can edit it,
actually change the message itself.
| | 02:51 | We could delete it directly or approve it.
| | 02:53 | Now we can do all three of those
things also back here on the Content page.
| | 02:59 | If we want to edit it, we would click
here. Or we could select it and then
| | 03:03 | choose one of our update options.
| | 03:04 | I am going to just say delete it.
| | 03:06 | We are asked to confirm that
choice, and I say Yes, and it's gone.
| | 03:12 | So that's how you handle a single
comment. But you have additional controls if
| | 03:17 | you decide that all of the comments
on a node have gotten out of hand.
| | 03:20 | To show that, I'm going to go back to
that node. So I will close this out here,
| | 03:24 | go to my Timeline, and click on 1995.
| | 03:29 | Right now, anybody who is logged in
can go ahead and post the comment and
| | 03:33 | skip approval, but let's say that this is
turned into some kind of horrible flame war.
| | 03:37 | We can go back up and edit the node,
| | 03:39 | then go down to the Comment
Settings in this vertical tab down here.
| | 03:43 | If we want to keep what's there already,
we would just change it from Open to
| | 03:47 | Closed and then Save.
| | 03:51 | Now as we look down the screen, we see,
okay there are those comments, but
| | 03:54 | there's no form at the bottom.
| | 03:56 | Similarly we can go up in Edit,
scroll down again, click Show Comment
| | 04:00 | settings, and hide it if we really just
want to get everything out of the way.
| | 04:04 | Click Save, and exactly as
you would expect, it's all gone.
| | 04:08 | I am just going to open it back up because
actually we're not having a flame war at all.
| | 04:15 | The last thing I want to mention
is that you as the administrator can
| | 04:18 | actually edit any comment.
| | 04:20 | I have found this to be useful when
somebody gets on to my site and will post the
| | 04:25 | comment but include some
sort of spam-y link in it.
| | 04:28 | Sometimes they will include useful
information, but then they will link to a
| | 04:32 | site that I don't really want to link to.
| | 04:34 | Well, you can go in and actually
change what they said for better or worse.
| | 04:39 | In short, Drupal gives you total
control over the content of your site.
| | 04:44 | The problem with that is if you've
opened your site to comments, it can be a lot
| | 04:48 | of work to deal with them.
| | 04:50 | Even on my obscure little blog at
tomgeller.com, I have to moderate about a dozen
| | 04:55 | spam comments a week, and that's
with other anti-spam measures in place.
| | 04:59 | So managers of busy sites often
delegate community management to someone else,
| | 05:04 | giving them the Administer comments
and comment settings permission, and again
| | 05:08 | that's up under People and Permissions and
then scroll down to Comment. There it is.
| | 05:13 | You will learn more about that in the
"Managing Users" section of the course.
| | Collapse this transcript |
|
|
8. Enabling Other Content TypesAdding blogs| 00:00 | By now you probably have a pretty good
handle on Drupal's two default content
| | 00:04 | types: articles and basic pages.
| | 00:07 | Drupal also includes a few other types
that work similarly, although with some
| | 00:11 | interesting display quirks.
| | 00:13 | The first one is blogs, which
we will cover in this video.
| | 00:16 | The others are forums and
polls, which we will cover in the two
| | 00:19 | videos following this one.
| | 00:20 | Then these is one more called books,
which we will show later in the course.
| | 00:24 | All of them come as part of core
Drupal, but they're disabled by default.
| | 00:29 | So let's turn on Blogs and
see what it has to offer.
| | 00:32 | To do so, go up to Modules, go down
to Blog, and turn that check box on.
| | 00:37 | Then scroll to the bottom of the
page and say Save configuration.
| | 00:42 | Doing so turns on a new content type
called Blog entry, and you notice that if
| | 00:46 | you go up to Add content.
| | 00:48 | See? You have Article, Basic page, and Blog entry.
| | 00:51 | However, Drupal doesn't make it
available to anyone at first except for you
| | 00:55 | as the administrator;
| | 00:56 | you have to turn on that permission explicitly.
| | 00:59 | To do so, go up to People and then to
Permissions, and then scroll down to the
| | 01:04 | node group. Here you notice several
permissions: Blog entry, Create new content,
| | 01:10 | Edit own content, and so on.
| | 01:11 | I am going to give that to
authenticated users, so they can create and
| | 01:15 | edit their own content.
| | 01:17 | Then I'll go down to the
bottom and say Save permissions.
| | 01:20 | Now I want to explain a little
bit about what a blog actually is.
| | 01:25 | The word itself comes from "weblog"
and signifies a sort of online journal.
| | 01:31 | One place that you can see a
blog is, of course, at blog.lynda.com.
| | 01:36 | There are a few
characteristics that are typical of blogs.
| | 01:39 | Posts almost always appear in
reverse chronological order, so the most
| | 01:43 | recent one is at the top.
| | 01:45 | They are usually written from a
personal point of view, and the posts
| | 01:49 | usually accept comments.
| | 01:51 | Now the term itself first showed up
around 1999, but people had used the format
| | 01:56 | like this for years before that,
including me, starting back in 1997.
| | 02:02 | So how is a blog different from say
a series of article posts that are
| | 02:05 | promoted to the front page?
| | 02:07 | Well, to tell you the truth, there is not that
much difference, except in how they display.
| | 02:13 | To demonstrate, I have created a
bunch of blog posts under the names of
| | 02:17 | different members of our Two Trees
Olive Oil site. You'll find that in the
| | 02:20 | exercise files if you have them.
| | 02:22 | I am going to import them right now
using techniques from the video on using
| | 02:26 | the exercise files.
| | 02:27 | If you don't have it, don't worry; you can
just create your own blog posts if you like.
| | 02:32 | There, I've imported all of those blog posts.
| | 02:35 | If you have any trouble doing this,
again, refer to the exercise files video
| | 02:38 | earlier in this course.
| | 02:40 | We can be sure that those blog posts
are there by going up to Content and then
| | 02:44 | filtering by the type Blog entry.
| | 02:47 | And there they are: four
different posts by three different people.
| | 02:52 | Let's go back to the front
page and take a look at those.
| | 02:54 | Blog posts by default promote to the front page.
| | 02:57 | Of course, you can change that if you
want, using the techniques you learned
| | 03:00 | earlier on in this course about content.
| | 03:03 | But as we go down, we see one by Poly Ann
Saturated about using Olive oil as a cosmetic.
| | 03:09 | Now one thing that's different between
a blog post and an article is this thing
| | 03:13 | down here, Poly Ann Saturated's blog.
| | 03:15 | If you click it, you come to a page
where you see everything that she has posted.
| | 03:19 | In this case, she's only posted the one
thing, but I happen to know that Joe
| | 03:23 | Bob posted two, so let's look at his blog.
| | 03:26 | And there they are, collected in
reverse chronological order, as is
| | 03:30 | traditional for blogs.
| | 03:32 | So each user can have a blog.
| | 03:33 | There is one difference
between blogs and articles.
| | 03:37 | Drupal gives you a couple of other ways
to control blogs that aren't available
| | 03:40 | for other content types.
| | 03:42 | First, there is a page that shows
everybody's blog. And you can get to there by
| | 03:46 | going up to your domain name/blog.
And as we scroll down, we see the most recent
| | 03:52 | one is on top, as expected.
| | 03:54 | There is one from Maria Ann Vitalia,
there is one from JoeBob, and so on.
| | 03:59 | Second, Drupal creates a recent blog post block.
| | 04:03 | I will enable it now, but I
won't go into much detail.
| | 04:05 | To learn the details of how to control
it, see this course's "Changing a Site's
| | 04:09 | Interface" section. But very briefly,
you go up to Structure and then down to
| | 04:13 | Blocks and scroll down
until you see Recent blog posts.
| | 04:19 | I'll put that in the left-hand column,
which I know is Sidebar first and save it.
| | 04:25 | I'll close the administrative overlay,
and we have a list of recent blog posts.
| | 04:30 | I am going to go back and hide that now.
| | 04:31 | Again, the detail of how this
happens is later on in the course.
| | 04:39 | Blogs are a sort of unusual feature in Drupal.
| | 04:41 | There is very little that sets them
apart from basic pages, aside from being
| | 04:45 | promoted to the front page. And all
those small features I showed here could
| | 04:49 | be replicated pretty easily using views, which
we will learn about near the end of this course.
| | 04:54 | I think the reason that this feature is in
Drupal is simply because the market demands it.
| | 04:59 | All of Drupal's other advantages--such as
revisioning, feeds, field customization
| | 05:03 | and so on--are available to blogs
just like on any other content type,
| | 05:07 | so it's a quick way to get a blog up
and running without cutting out any
| | 05:11 | of Drupal's features.
| | Collapse this transcript |
| Adding discussion groups| 00:00 | One of the first applications for
networked computers in the early 1970s was the
| | 00:05 | Bulletin Board System, or BBS, which
allowed users to have online discussions.
| | 00:10 | It's 40 years later, and that's still
one of the top reasons people get online.
| | 00:15 | And Drupal, of course, has a
BBS built in called Forums.
| | 00:19 | It's great, but it does have some
quirks that I'll focus on in this video, so
| | 00:23 | that you can watch out for them.
| | 00:25 | To turn it on, it's very easy.
| | 00:27 | You just turn on the Forum module by
going up to Modules, scrolling down
| | 00:32 | to Forum, checking the box, and scrolling to
the bottom, and clicking Save configuration.
| | 00:39 | Doing so adds a link in the Navigation
menu, which you can see by closing this
| | 00:42 | administrative overlay.
| | 00:44 | See over here, underneath Add Content?
| | 00:46 | That's also the first link that shows
up in that menu for ordinary users, and I
| | 00:51 | can show that by switching over to my
other browser, where I am logged in as the
| | 00:54 | user Polly Ann Saturated.
| | 00:56 | Here's what the screen looked like, and now
when I reload it, there's the Forums link.
| | 01:01 | When you click that, it goes to a list
of discussion forums, and clicking any
| | 01:06 | particular forum leads you into
any topics that are in that forum.
| | 01:10 | Now you see this notice up here at the
top when I'm logged in as an ordinary user.
| | 01:14 | I'm not allowed to post new content.
| | 01:17 | That's because although of the forums
are turned on, no permissions are granted
| | 01:21 | to anybody except the
administrator to put anything in them.
| | 01:24 | So let's change that.
| | 01:25 | I will switch back to my administrative
screen and go up to People and Permissions.
| | 01:30 | Then I will scroll down to the Node
group, where I see Forum topic, Create new
| | 01:37 | content, Edit own content, and so on.
| | 01:40 | I will allow authenticated
users to create forum topics.
| | 01:43 | I will then scroll to the
bottom and save my permissions.
| | 01:48 | You'll learn more about this screen
and about permissions in general in the
| | 01:51 | "Managing Users" section of this course.
| | 01:54 | Now when I switch back to my other
browser and reload the page, I see this:
| | 01:59 | Add New Forum Topic--and I think I'll do that.
| | 02:02 | I just click that link, and in the Subject,
I will say "Health benefits of olive oil."
| | 02:10 | There is only one forum right now, so
I will stay in that general discussion
| | 02:14 | area, and I'll type in the body.
| | 02:17 | "I have heard all sorts of
claims. what do you think?"
| | 02:23 | Scroll to the bottom and
click Save, and there it is.
| | 02:27 | Now, if I switch back to my
administrator and take a look at the Forums--I
| | 02:30 | will just close out this
Administrative overlay, go to the Forums--and I see
| | 02:34 | in my General discussion, not only is
there one topic, but there's one new
| | 02:38 | since I last looked.
| | 02:40 | That's something very clever that Drupal does.
| | 02:41 | It keeps track of each user and
what they have last looked at.
| | 02:45 | I can look at that topic either by
clicking on that 1 new, or I could go in
| | 02:49 | and see the whole list of topics, and then
click on any particular topic, and there it is.
| | 02:55 | There is what she wrote, and there's her title.
| | 02:58 | Like any other node, the administrator
can go in and administer it, change it,
| | 03:03 | delete it, and so forth.
| | 03:04 | There is one unusual
feature here, Leave shadow copy.
| | 03:08 | If you decide to move a topic from one
forum to another, Drupal will leave one
| | 03:13 | copy in the old forum so that
the conversation seems to continue.
| | 03:17 | However, further conversation
will continue in the new forum.
| | 03:21 | It's a very subtle and
clever way of handling things.
| | 03:25 | Anyway, we won't dwell on it.
| | 03:26 | Instead, I'll go back and take another
look at that, and let's say that I as the
| | 03:30 | administrator want to respond.
| | 03:32 | I might say, "I think it's great,
but remember it's a fat and should be treated as one."
| | 03:45 | Scroll down, click Save, and there we are.
| | 03:49 | You see the discussion is up here,
comments are down here, a link to all forums
| | 03:54 | is right here. And since I added that
comment, by the way, we see it right here.
| | 03:59 | So that's basically how you use Forums,
and it should look familiar if you've
| | 04:02 | been online and using any
other kind of forum system.
| | 04:05 | But let's talk about creating
entire discussion areas, like this
| | 04:09 | General discussion here.
| | 04:11 | To do that, go up to
Structure and then down to Forums.
| | 04:15 | I am going to add a couple of forums
now, and I'll talk about what containers
| | 04:18 | are in just a minute.
| | 04:20 | The first one will be, "Put it in your mouth!"
| | 04:25 | "All things about edible
olive oil," and I will click Save.
| | 04:31 | I will explain what the
Parent is in just a moment.
| | 04:33 | I will add another forum,
"Don't put it in your mouth!"
| | 04:39 | "Olive oil for external use."
| | 04:45 | Scroll down and Save.
| | 04:47 | Now let's go back and take
a look at our forums again.
| | 04:50 | Close the administrative overlay,
click Forums, and you see how it is.
| | 04:55 | We have the description. We have the title.
| | 04:57 | If we click on any of these, we go
in and can add topics just as before.
| | 05:01 | That's fine as it goes, but if we go
back to our list of forums, you might
| | 05:05 | decide you want to
categorize these a little bit better.
| | 05:07 | For example, two of these are
about olive oil, and this one is just
| | 05:11 | general discussion.
| | 05:13 | We can add them into categories by
creating what's called a container.
| | 05:17 | To do that, I'll go back up to Structure
and then down to Forums and Add Container.
| | 05:24 | The Container will be, "Things you can
do with olive oil," and we could add a
| | 05:30 | Description or not just as
before. I will click Save.
| | 05:34 | Now we have a container and these three forums.
| | 05:37 | If we look at our list of forums, it
doesn't really look very different.
| | 05:41 | We have the container
down here but nothing in it.
| | 05:43 | As you might have guessed from looking
at the previous screen, we can change
| | 05:46 | that by going to Structure and Forums,
and then move things around using these
| | 05:50 | little compass handles.
| | 05:52 | I'll move that right down there, move
that right down there. And if I wanted to,
| | 05:57 | I could make this multilevel like so,
but I think it's great the way it is,
| | 06:00 | so I will click Save.
| | 06:02 | Now, when I look at the Forum,
it makes a lot more sense.
| | 06:07 | There is something peculiar
about these containers, however.
| | 06:11 | Let's say that I add a new forum topic
from here, and I'm given a choice of what
| | 06:16 | forums to add it to.
| | 06:17 | I see the forums that I set up earlier
and should be able to add topics to, but
| | 06:22 | what if you try to add a
topic to a container? "Let's talk!"
| | 06:27 | I will just leave it as that
very quickly and try saving it.
| | 06:31 | You can't actually add
discussions to containers,
| | 06:34 | so I would have to change
it to one of the other ones.
| | 06:36 | There is another peculiarity, and I will show
this by going back, all the way to our Forums.
| | 06:44 | Let's say that you're already reading a
Forum, like this one about external use,
| | 06:48 | and you say Add new Forum topic.
| | 06:50 | Now remember before when I clicked on
this button from one level up, it asked me
| | 06:54 | what forum I want to put it in.
| | 06:56 | But if I click here, it automatically
assumes that I want to put it in the forum
| | 07:01 | that I am already reading.
| | 07:02 | That saves you just a little bit of time.
| | 07:05 | Just to complicate matters a little
bit more, forums themselves can act as
| | 07:09 | containers, and I'll show
you what I mean by that.
| | 07:12 | I go to Structure and Forums once again.
And I will add a forum I will just say
| | 07:17 | is Recipes, and scroll down and save it.
| | 07:22 | In Recipes I could put this, Put it in
your mouth and Don't put it in your mouth
| | 07:26 | discussion, then scroll down.
| | 07:29 | Now if I want to add a topic, I
could actually add it at this top level.
| | 07:32 | Go back to Forums and look at it.
| | 07:37 | If I click there and Add new forum topic,
"Let's talk about all kinds of recipes,"
| | 07:46 | scroll down and save and
then go back to our Forums,
| | 07:50 | we could either click that link--or I
should mention, you can always go to your
| | 07:54 | Forum simply by typing Forum at the
top of the screen--and you see we have a
| | 07:58 | topic at that top level.
| | 08:01 | That can be a little confusing.
| | 08:02 | So before you start out, it's a good idea to
plan exactly what your structure is going to be.
| | 08:07 | To do that, one more time, we go up to
Structure, and then Forums, and over here,
| | 08:12 | we go to the Settings tab.
| | 08:15 | As with Comments, you can
choose how many to display per page.
| | 08:19 | Again, if you have a lower selection,
such as 10 or 25, people will have to
| | 08:24 | reload their page often. On the other
hand, that the pages themselves will draw
| | 08:28 | more quickly, and you might want them
to reload the page frequently if, for
| | 08:31 | example, you're serving up advertising and
you get more money for the more pages you serve.
| | 08:37 | You can change the order in which the
forum topics appear, and you can change
| | 08:40 | this thing called Hot topic threshold.
| | 08:43 | What that is is let's say that
somebody has posted a topic, and it's drawn a
| | 08:47 | whole lot of comments.
| | 08:49 | That will appear on the Forums list
with a special icon next to it that
| | 08:53 | distinguishes it from the other forum topics.
| | 08:56 | But for us, we will leave it as it is.
| | 08:59 | When all is said and done, the Forum
system is actually just an interesting way
| | 09:03 | of organizing these nodes visually.
| | 09:06 | One interesting way to prove this is
by going to the Content list here, and if
| | 09:10 | you search by the type Forum topic,
you see those topics we posted earlier.
| | 09:15 | Also, if you go to Structure and
Taxonomy, you see there's a new
| | 09:19 | vocabulary called forums.
| | 09:23 | The forms that you added
are just taxonomy terms.
| | 09:26 | If you decide to open your site to
forums, I do want to give you one last piece
| | 09:30 | of advice, which is that you can
expect people to misbehave, as with anything
| | 09:34 | that's open to the public.
| | 09:36 | So be sure to monitor posts and the
comments in them and include enough time in
| | 09:40 | your budget so that you can plan out for that.
| | 09:43 | But done right, Forums can be one of
the most active parts of a community-based
| | 09:47 | site and make your site grow
more quickly than any other method.
| | Collapse this transcript |
| Adding polls| 00:00 | So far in this course, we've talked
about four features designed to give
| | 00:04 | visitors a way to respond to your site:
| | 00:06 | comments, blogs, forums, and contact forms.
| | 00:10 | Surveys, or polls, are one more that
people respond to well, perhaps because
| | 00:15 | they don't have to think up a
subject or write a narrative.
| | 00:18 | You just pose a provocative question,
and they click a button, and they're done.
| | 00:22 | You gain both user engagement
and sometimes valuable data.
| | 00:26 | Here is how you set them up.
| | 00:28 | As with many features in Drupal, you
go up to Modules and scroll down to the
| | 00:32 | module you want to turn on--in this case, Poll.
| | 00:36 | Check it's check box, go down to the
bottom and click Save configuration.
| | 00:41 | Now just because we've turned on polls,
doesn't mean we've given everybody
| | 00:44 | permission to actually take part in them.
| | 00:46 | So I am going to very quickly do that by
going up to People and then Permissions
| | 00:51 | and then scroll down to Poll.
| | 00:52 | I'll allow everybody to vote on polls, but not
to change their votes or to view the results.
| | 01:00 | This view voting results actually is not
related to the total count, but instead
| | 01:05 | the result of each individual person's vote.
| | 01:07 | I'll scroll down to the
bottom and click Save permissions.
| | 01:12 | So, what should we vote on?
| | 01:13 | Well, you might remember that the owner
of our fictional olive oil company made
| | 01:17 | a blog post that asked people
what flavors they should introduce.
| | 01:20 | Here I'll show you.
| | 01:21 | We'll just go back to the front page
where we have all our blog posts, scroll
| | 01:25 | down, and there it is, What
flavors should we introduce next?
| | 01:28 | I've already pre-populated this
discussion with a bunch of comments from people,
| | 01:32 | which you see by clicking Read more.
| | 01:35 | You'll find those comments in
your exercise files, by the way.
| | 01:38 | And there they are.
| | 01:39 | Somebody suggests fruit, somebody suggests herbs,
somebody suggest something sharp, and so on.
| | 01:45 | Let's turn this into a poll.
| | 01:47 | To do that, we go up to Add content,
and we see a new choice, Poll. Click it and
| | 01:53 | you see the form to create a Poll.
| | 01:55 | This will be "Vote for the
next Two Trees Olive Oil flavor!"
| | 02:02 | And for our Choice, we'll start with
Fruity, Spicy, and then we run out of
| | 02:09 | spaces, but that's okay, just click the
More choices button to get another one.
| | 02:14 | And then I'll add Herbal blend.
| | 02:18 | We'll talk about what Vote
Count is in just a minute.
| | 02:21 | We want this to be an active
poll so we leave it as Active.
| | 02:24 | We'll talk about Poll duration
again in just a few moments.
| | 02:27 | Since I am logged in right here as
the administrator, I think I'll make the
| | 02:30 | author Maria Ann Vitalia--
| | 02:34 | she's the one who told me
to do this--and save it.
| | 02:38 | And now we see that node presented as a poll.
| | 02:42 | Let's see what this looks like
when an anonymous visitor looks at it.
| | 02:45 | What I'll do is I'll go up here,
and I'll copy this URL, and I've already
| | 02:49 | brought it up in this other browser.
| | 02:51 | Now let's say I'm an anonymous visitor,
and I say, I think an Herbal blend is good.
| | 02:55 | I click that button and vote, and there it is.
| | 02:59 | I immediately see the results of all
of the votes so far, and I'm not allowed
| | 03:03 | to make another vote.
| | 03:04 | Now, let me go back as the
administrator and say that I want to vote.
| | 03:09 | I'll say I want Fruity and click Vote,
and now we see there is one of each.
| | 03:14 | Now you'll notice a button
down here, Cancel your vote,
| | 03:17 | that wasn't available for the anonymous user.
| | 03:19 | That was one of the things that you
could control in the Permissions screen.
| | 03:23 | Also, as the administrator, you have
two other options: Edit and Votes.
| | 03:28 | When we click Votes here, we see
how each individual person voted.
| | 03:32 | Now, I'll show you how that works by
going back to my browser here, and I'm
| | 03:36 | going to log in as JoeBob.
And again, the password for all users on our
| | 03:41 | exercise files is Drupal,
| | 03:42 | all lowercase. And again, I can vote
because I'm no longer that anonymous user.
| | 03:48 | And I think I'm going to also vote
for a Fruity kind and click Vote.
| | 03:52 | Now if we go back to the administrator and
reload this page, we see how JoeBob voted.
| | 03:57 | Very good!
| | 03:58 | There are a few other features of polls
that I want to point out, and to do that
| | 04:02 | I'll click the Edit tab.
| | 04:05 | The first one is that even though
you've already started this poll, Drupal
| | 04:09 | allows you to continue to change it.
| | 04:11 | That's somewhat unusual in survey
systems, but Drupal does give the
| | 04:15 | administrator more power than they do.
| | 04:18 | For one thing, you can change the vote count.
| | 04:20 | At first you might say oh, that's dishonest.
| | 04:22 | That's stuffing the ballot box.
| | 04:23 | But there are actually
legitimate reasons for doing this.
| | 04:26 | For example, let's say that you had
handed out cards at a convention and people
| | 04:30 | had turned in the results of the poll
there, and then you have to tally them up
| | 04:34 | and bring them online.
| | 04:35 | Well, this is how you would add them in.
| | 04:37 | So let's say that there is 32 Spicy
and 50 for Fruity but only 10 for Herbal
| | 04:43 | blend. Scroll down and save.
| | 04:45 | And if we take a look at
it, it's all tallied up.
| | 04:48 | Let's go back to Edit to look
at some of those other features.
| | 04:52 | As I mentioned, you can choose to
close a poll at any time by simply
| | 04:55 | switching this radio button to Closed.
Or you can make this automatically
| | 04:59 | close after a certain duration.
| | 05:01 | To do that, you would simply click
that pop down menu and change it to, let's
| | 05:05 | say a week and save.
| | 05:09 | Now there is something about that,
which is that users don't actually see any
| | 05:13 | notice as to when the poll is going to close.
| | 05:16 | If you wanted to do that, you'd have to
add some sort of text around the poll.
| | 05:20 | That leads me to my next point, which
is when you look at this poll, you don't
| | 05:24 | really have very many options.
All that you see is a title and then the tally
| | 05:29 | area, and as you saw before, you had
the place where you could make your vote.
| | 05:35 | But remember, a poll is just a
node of a specific content type.
| | 05:40 | So if you wanted to add another field
to it, you just go up to Structure and
| | 05:44 | then down to Content types and then
edit the fields connected with poll.
| | 05:48 | In this case, I'll manage fields,
and I'll actually add a body field.
| | 05:53 | I'll just type in Poll body, the field
will be poll_body, the field type will be
| | 06:00 | Text, and it'll be a Text field.
| | 06:03 | We don't have to go
through the whole process now.
| | 06:05 | You'll learn more about this in
the section on extending content.
| | 06:09 | But even without adding fields, you
can see that polls are really easy to set
| | 06:13 | up, and they have the same
options as any other kind of node.
| | 06:17 | You can promote them to the front page,
let people leave comments, and so forth.
| | 06:20 | They are little inflexible
unless you start adding fields.
| | 06:24 | And once again, you'll learn how to do
that in the section on extending content.
| | Collapse this transcript |
| Subscribing to RSS feeds| 00:00 | Running a web site is a lot of work,
and it's made even harder if you personally
| | 00:05 | create all the content. But what
webmasters have discovered over the past 15
| | 00:09 | years is that visitors get as much
value from borrowed and user created content
| | 00:14 | as the exclusive webmaster-created stuff.
| | 00:16 | We've talked a fair amount about
user-created content. Besides blogs and
| | 00:21 | comments and forum posts, you could
give users permission to simply create
| | 00:25 | articles and nodes of other content types.
| | 00:27 | But let's look now at how to display
content taken from other web sites by
| | 00:32 | subscribing to the news
feeds that those sites provide.
| | 00:35 | I have to emphasize that we're
not talking about stealing content;
| | 00:38 | we are only using stuff that
others have released specifically so we
| | 00:43 | could republish it.
| | 00:44 | I'll show you a few quick examples.
| | 00:48 | On my own web site, I write a blog,
and you see those post right here.
| | 00:53 | These in the left-hand columns are
nodes on this site, but over here in this
| | 00:57 | right-hand column is a feed
that's coming from an outside site.
| | 01:00 | Specifically, it's coming from planet
Drupal, which is at drupal.org/planet.
| | 01:05 | In exchange, Planet Drupal is just
subscribing to hundreds and hundreds of
| | 01:10 | feeds, including my own.
| | 01:13 | So if we go back to my site, let's
say that I post a new blog post, it will
| | 01:16 | eventually show up in the feed on their
site which I'm then feeding back onto my site.
| | 01:22 | So how do you get these feeds?
| | 01:24 | Well, I talk about that a little in an
earlier video on publishing RSS feeds,
| | 01:27 | but let's take another quick look at it.
| | 01:30 | As an example, I'm going
to go to blog.lynda.com.
| | 01:34 | On any page where there is a feed that
you could subscribe to, you'll see this
| | 01:38 | little icon here in the
address bar of most browsers.
| | 01:41 | You might also see it elsewhere on the page.
| | 01:44 | Clicking it gives you a URL that's in a
format that feed subscribers can understand.
| | 01:51 | So that brings us to another question:
| | 01:53 | How can we find RSS feeds
that are relevant to our site?
| | 01:56 | That's easy, just do an online
search, then look for the Feeds.
| | 02:00 | Anything labeled news or blog is a good bet.
| | 02:03 | So I'm going to say olive
oil news and see what comes up.
| | 02:08 | Well, it turns out that there is a
publication called oliveoiltimes.com.
| | 02:12 | So I click there, and I see I'm in luck.
| | 02:15 | There is our little RSS feed, right there.
| | 02:18 | I click it and just copy its URL.
| | 02:21 | Now I am going to go back to my
site and subscribe to that feed.
| | 02:25 | As with many things on Drupal, we first
have to turn on that feature, and we do
| | 02:29 | that by going to Modules and
check the box next to Aggregator.
| | 02:33 | Aggregator, in this case, is
short for feeds aggregator.
| | 02:36 | We scroll to the bottom of the screen,
and click Save configuration. Now we are ready.
| | 02:42 | The place you go to configure
these feeds is under Configuration.
| | 02:47 | Scroll down to the bottom of the
screen, and there's the Feed aggregator.
| | 02:51 | Click it and then click Add feed.
| | 02:54 | Categories are another subject
| | 02:55 | I'll the covering in the next video.
| | 02:57 | But for right now, we'll just say Add
feed is going to be News from Olive Oil
| | 03:03 | Times, and then paste in the URL.
| | 03:08 | Update interval is how frequently your
site will pull that information from the
| | 03:12 | external site, in this case, oliveoiltimes.com.
| | 03:16 | If you click this pop-up menu, you'll
notice that the shortest length of time is
| | 03:19 | 15 minutes. And you might say well, why
shouldn't I continually get that news?
| | 03:24 | Well, it's really not
very good online etiquette.
| | 03:27 | If you were to set that to something
like 10 seconds, then the other person's
| | 03:30 | site is going to be constantly hit by
your site, and that's going to drive up
| | 03:34 | their hosting costs, and it'll slow down
everybody else who is trying to access their site.
| | 03:39 | So the shortest you can do is 15 minutes.
| | 03:41 | And quite honestly, I
usually just leave it on an hour.
| | 03:45 | As for News items in block, I'll
tell you what that is in a few minutes.
| | 03:48 | For right now we click Save,
and we can add another one if we want.
| | 03:52 | I think I will in fact go back to
Olive Oil Times and do another search for,
| | 03:58 | how about olive oil news. And I see the
second one is from the New York Times. Who knew?
| | 04:07 | They categorize their olive oil
news, and I'll take their feed.
| | 04:13 | Again, I copy it, go back to my
aggregator, Olive oil news from the New York
| | 04:20 | Times, and paste in the URL and save. Great!
| | 04:26 | Now when I click List, I
see the feeds that I have.
| | 04:30 | However, I haven't received any
information yet because I'd have to wait for
| | 04:33 | that entire hour before they
would start sending me Feed items.
| | 04:37 | In order to bring them in manually,
I can click this Update items button.
| | 04:41 | This is considered okay etiquette,
because obviously you're not going to be
| | 04:45 | sitting there all day just to click that
button, and I'll update the other one as well.
| | 04:50 | Good, so we have six items in
this feed and two items in this feed.
| | 04:53 | So you might ask, how can I
actually see those feed items?
| | 04:57 | Well, you do have a link right here.
| | 05:00 | If I click here, I go to a page which has
all of those news items one after the other.
| | 05:05 | And if I click on these titles, it
actually takes me to the other site.
| | 05:09 | These are not nodes that live on my site.
| | 05:11 | It's just temporarily taking in the
information and then throwing it away again.
| | 05:15 | But let's go back to our site.
| | 05:18 | Those feed items also show up
in layout elements called blocks.
| | 05:22 | Now we'll talk a lot more about
managing blocks in the section of this course
| | 05:25 | called "Changing a Site's Interface," but I'll
just very quickly enable a few so you can see.
| | 05:31 | To go to them, go to Structure and Blocks.
| | 05:35 | As we scroll down to the disabled region,
we notice that we have two blocks that
| | 05:39 | were created by that Feed:
| | 05:41 | News from Olive Oil Times and
Olive oil news from the New York Times.
| | 05:44 | I am going to enable those in the right-
hand column on our page, which I happen
| | 05:50 | to know that Drupal calls
Sidebar second in this theme.
| | 05:55 | Then I scroll to the bottom
of the page and Save blocks.
| | 05:59 | Now when I close the
administrative overlay, there they are.
| | 06:03 | Not only do I see the feed items--
and again, clicking these takes you to the
| | 06:07 | external site--I also see a More
button, which takes you to a page which
| | 06:12 | collects all of those items.
| | 06:14 | This also explains what that
number of items per block is.
| | 06:18 | I had it as five, and here we see
five and then followed by More.
| | 06:22 | If you wanted to have a smaller block
over here, of course, you'd make it a
| | 06:24 | smaller number, or larger if you preferred.
| | 06:27 | Now just to prove that
these aren't nodes on our site,
| | 06:30 | I'll go up here and click Content
which shows all the nodes on our site.
| | 06:36 | And indeed, they're not there.
| | 06:38 | It is all the stuff we
entered earlier on in the course.
| | 06:41 | Looks pretty good, huh?
| | 06:42 | You could stop right here,
but let's go a little bit further.
| | 06:46 | Let's say we wanted to mix all of
these news items into one big feed.
| | 06:50 | That's a lot like what you saw
earlier with the Planet Drupal site.
| | 06:53 | It mixes together post from hundreds of
sources into what's called a blogroll.
| | 06:58 | And actually, Drupal has already
created a blogroll for our site.
| | 07:02 | You'll find that at /aggregator.
And there it is, mixing in both the News from
| | 07:10 | Olive Oil Times and the Olive
oil news from the New York Times.
| | 07:15 | We can tag individual feeds, or
individual feed items, so that they are grouped
| | 07:19 | together according to the
categories we give them.
| | 07:22 | I'll show you how to do that in the next video.
| | Collapse this transcript |
| Categorizing RSS feeds| 00:00 | When we last left our site, we had
just brought in two news feeds: one from
| | 00:05 | Olive Oil Times and one from the New York
Times. And we see their feed items here.
| | 00:09 | We've set up our site to grab
those feed items every hour.
| | 00:12 | But we can do even more;
| | 00:15 | we can split up these items or split
up the feeds themselves, so they show
| | 00:19 | on their own pages, depending on subject.
| | 00:22 | To do that, we click Configuration
and then go down to Feed aggregator.
| | 00:27 | Now we see our two feeds here, but we
also see Add category and a group of
| | 00:32 | categories down here.
| | 00:33 | I'm going to add one, and I'll say
Production news, and I'll save it. And then
| | 00:40 | I'll add another one, and let's call
that Sales of olive oil and save it.
| | 00:48 | Finally, I'm going to add one more
category, which is going to be all of
| | 00:52 | oil news and save it.
| | 00:55 | Now let's go back our list.
| | 00:58 | We have our two feeds,
and we have our categories.
| | 01:02 | Let's say that I want everything that
comes from these two feeds to go into
| | 01:05 | olive oil news, but I'm not sure
whether to be production or sales.
| | 01:09 | Well, we can categorize an entire
feed by going in and clicking Edit.
| | 01:14 | Now there is an option here, which we
didn't see before we added categories.
| | 01:18 | We can categorize the entire feed as
news by just clicking this button here and
| | 01:23 | saying Save. And I'll do the same for
the other one, olive oil news from the New
| | 01:28 | York Times is olive oil news, and save.
| | 01:33 | So now I want to categorize individual items
as production news or sales of olive oil.
| | 01:40 | To do that, I can't just
go back to my aggregator;
| | 01:43 | I have to go back to any sort
of individual feed or category.
| | 01:47 | Fortunately, I now have everything
going into olive oil news, so I click there,
| | 01:52 | and I see this page.
| | 01:53 | You'll notice a new tab at the top, Categorize.
| | 01:57 | We click there, and then we see
every item in the feeds, with little check
| | 02:02 | boxes next to them.
| | 02:03 | I'll scroll down and just find a few to
categorize. Advertising, I'd say that it's about sales.
| | 02:09 | Here's something about a supplier.
| | 02:10 | I'll say that's about sales.
Something about growing olives on Crete in Greece,
| | 02:15 | I'll change that to production. And here is
something about California olive oil, production.
| | 02:20 | Now we can make this a
lot more accessible, though.
| | 02:23 | When we create a category, it creates
a block, much like these over here in
| | 02:27 | the right-hand column.
| | 02:29 | So we'll go up to Structure and Blocks,
and then we can turn them on from there.
| | 02:34 | In fact, I'm going to get rid of these
other two. And I think production is the
| | 02:39 | most important thing, so I'll scroll
down to production items and put that in
| | 02:43 | the right-hand column.
| | 02:45 | Scroll down and save blocks, and take a
look to make sure it's there, and indeed it is.
| | 02:51 | Finally, I want to point out just a
few advanced settings for RSS feeds,
| | 02:55 | although, to tell you the truth,
I almost never touched them.
| | 02:59 | To get to them, go up to Configuration,
scroll down again to Feed aggregator,
| | 03:04 | and then click the Settings tab.
| | 03:07 | I won't go through all of the settings
on this page, just the most important
| | 03:11 | ones that I do sometimes affect.
| | 03:13 | First, the Allowed HTML tags, let's say
that you're subscribing to a feed that
| | 03:17 | includes some sorts of videos, like a
YouTube feed or something like that.
| | 03:21 | Well, you can't actually have those in
your feed, because you aren't allowed to
| | 03:25 | use those tags--the object and embed
tags as well as the param tag--but you can
| | 03:30 | add them here if you wanted.
| | 03:31 | This Discard items older than, as you
might guess, will throw away any items that
| | 03:35 | are older than a certain age.
| | 03:38 | When you're selecting categories, as
you see, you can choose check boxes,
| | 03:42 | which is what we saw earlier, or a
multiple selector, which is a sort of
| | 03:46 | different kind of menu I won't go into much now,
but you can play around with it if you like.
| | 03:50 | Finally, if you decide to display
these as a trim description instead of the
| | 03:54 | full node, you can decide exactly
how big you want that full item to be.
| | 03:59 | And you can see that by going back to
our aggregator, and it's only a very short
| | 04:06 | blurb, but I could make that longer
if I wanted by changing that length.
| | 04:10 | I do want to mention one other
thing that I sort of glossed over;
| | 04:15 | we have Add category, Add feed, and Import OPML.
| | 04:20 | OPML is a way of storing a whole
list of feeds, storing a blog roll for
| | 04:24 | example, and it gets kind of
complicated, so we won't go into it here.
| | 04:29 | Finally, I'd like to remind you
that all groups of nodes on your Drupal
| | 04:33 | site--for example, the front page--
get published as a feed, and you can see
| | 04:37 | that by going to the front page and then
clicking on the RSS icon that's on your own site.
| | 04:43 | So other webmasters might
end up publishing your content.
| | 04:46 | To learn more about that and how
to control it, see the video on
| | 04:49 | publishing content via RSS.
| | Collapse this transcript |
|
|
9. Extending ContentCreating new content types| 00:00 | When I teach Drupal, I'm always a
little afraid to use the term "content type"
| | 00:04 | because it's not something you
hear anywhere else in your life.
| | 00:08 | But once you see content types in
action, the concept just sort of clicks.
| | 00:12 | If you've been watching the course
straight through, you have probably
| | 00:15 | already had that "aha" moment because
we have dealt with about half a dozen
| | 00:19 | content type so far.
| | 00:20 | You can see them by going up to
Structure and then content types.
| | 00:25 | And you see all the content types we
have dealt with so far, five of them.
| | 00:29 | By now you have a pretty good sense of
how a basic page differs from a poll,
| | 00:33 | which differs from a blog post.
| | 00:35 | But these were all created by Drupal.
| | 00:38 | Now I'll show you how to
create your own content types.
| | 00:41 | Then in the videos that follow
including adding fields to content types,
| | 00:45 | you will learn how to bend these content
types until they sing your tune so to speak.
| | 00:50 | To get started, click Add content type.
| | 00:52 | The one I am going to add is called Product
and the Description, Items sold by Two Trees.
| | 01:02 | Then down at the bottom you will see
that these vertical tabs are very similar
| | 01:05 | to when you edit an individual node,
but they're a little bit different so I am
| | 01:09 | going to go through them one after another.
| | 01:12 | First, the Title, you can't
remove the title from a content type.
| | 01:16 | It's the primary key so to speak.
| | 01:18 | It's what identifies the node.
| | 01:20 | You can choose whether people have
a choice of previewing a node before
| | 01:23 | submitting it or if they're forced to
do so and you can add some explanation or
| | 01:27 | submission guidelines.
| | 01:28 | I think I'll add some of those.
| | 01:31 | I want to make sure that
every product has an SKU.
| | 01:36 | That is an identification number.
| | 01:38 | Under Publishing options, no, I don't
think it has to be promoted to the front page
| | 01:42 | but I do want it to
create a new revision each time.
| | 01:45 | We have talked a little bit about
revisions in the video earlier in this
| | 01:48 | course, Revising content.
| | 01:51 | Under Display Settings, we see this
Display author and date information.
| | 01:55 | To understand what that is, I am going
to just open up a new tab in our browser
| | 01:59 | with our site on it.
| | 02:00 | I did that by Ctrl+
Clicking on our Home up here.
| | 02:02 | Now as we scroll down here, we see
this one that says published by name at
| | 02:08 | time, whereas this node doesn't.
| | 02:11 | That's the difference that you're going
to make by checking or unchecking this box.
| | 02:15 | I'm going to uncheck it because we don't
really need to know who entered product
| | 02:18 | information or when.
| | 02:21 | Comment settings I discussed in
another video on setting comment policy.
| | 02:25 | In this case, I'm going to be posting
the primary information about products of
| | 02:29 | our company and I don't really want people to
be talking about it right there on the page.
| | 02:34 | It's too easy for people to start
throwing up all kinds of insulting trash.
| | 02:38 | So I will change it to Hidden.
| | 02:40 | Finally, we have Show Menu settings.
| | 02:43 | Again, I will go to our front
page here to explain what that means.
| | 02:46 | Let's say that we add a new basic page.
| | 02:50 | And we fill out the form up here and then
at the bottom we have Show Menu settings.
| | 02:54 | If I say, yes I do want to show that.
| | 02:57 | I have several choices one of them
being what parent item should it be in.
| | 03:01 | Which of the menus that are available to me.
| | 03:04 | And I actually only have one choice,
Main menu, and then the items that
| | 03:07 | are underneath that.
| | 03:08 | We will talk more about menus later on in
the course but Drupal comes with four menus.
| | 03:14 | And as I go back to my xontent
type I will show you what that means.
| | 03:17 | By default, when you create a new
content type, it only lets you put the
| | 03:21 | links in that Main menu and you
might remember the Main menu is what's up
| | 03:24 | toward the top of the screen.
| | 03:25 | There is also Management,
which is hidden by default.
| | 03:29 | Navigation, which is the one that
you see in that left-hand column.
| | 03:33 | And User menu, which is usually
seen up here in the right-hand column.
| | 03:37 | These are pretty well separated by
their task or by their function, so I will
| | 03:40 | just leave it as Main menu.
| | 03:43 | Finally, I'll save my
content type and there it is.
| | 03:48 | We see all of our old content types
and there's Product with the description
| | 03:52 | that we put right there.
| | 03:53 | But we still can't really add
content of that content type very easily.
| | 03:58 | At least, we can as the super
user, but nobody else on the site can.
| | 04:03 | In order to change that, we have to go up
and give permissions to those other roles.
| | 04:07 | We do that by clicking People and Permissions.
| | 04:11 | Then we scroll down to the node group.
| | 04:14 | Here we start to see some of the
different content types, Blog entry, Poll,
| | 04:18 | Forum topic, and as we go
further, ah there we are, Product.
| | 04:22 | We want to at least allow our
administrators to create products so I will give
| | 04:26 | them all of those permissions.
| | 04:27 | I select those boxes, scroll to the
bottom, and click Save Permissions.
| | 04:34 | Now, to create a node of that
content type it's very easy.
| | 04:37 | We do just as we did with Basic pages
and Articles. We go up, Add content >
| | 04:42 | Products, and there we are.
| | 04:44 | Incidentally, here we see
our help text right at the top.
| | 04:47 | Now that we have that Product content
type, we can start to distinguish products
| | 04:52 | from basic pages and articles.
| | 04:53 | I will show you some other ways of
doing that in the next few videos.
| | Collapse this transcript |
| Adding fields to content types| 00:00 | In the video about creating content types,
we made a content type called product
| | 00:05 | and we will use that from here on out
to make nodes about the products we offer
| | 00:09 | at our fictional Olive Oil Company.
| | 00:11 | But right now there's not much we can do
with it and we can see that by going up
| | 00:15 | to Add Content and clicking Product.
| | 00:17 | It just has a title and a
body and that's pretty much it.
| | 00:20 | So we are going to extend this content
type by adding fields for price, an image
| | 00:26 | for the product, and the SKU identifier.
| | 00:29 | That's the Stock Keeping Unit in merchant talk.
| | 00:32 | To do that, we go up to Structure and
Content types, and then next to Product we
| | 00:37 | click Manage Fields.
| | 00:40 | To add a new field, we enter the
information along this line under Add new field.
| | 00:44 | I am going to add SKU as the Label,
the field name, and this is the name that
| | 00:50 | Drupal looks at internally as opposed to
the label that you see when you look at
| | 00:54 | the field itself, will be sku.
| | 00:56 | That has to be all lowercase.
| | 00:59 | And as a field type, I am going to choose
Integer and the only option there is Text field.
| | 01:04 | Now this type of data to store is a very big
list and each one has its own set of options.
| | 01:10 | Rather than explain all of them here, I
will tell you about them in a different
| | 01:13 | video in this course which is about
exploring field types and options.
| | 01:18 | But for now we'll just click Save.
| | 01:21 | Now when you add a field to a content
type, you typically go through two screens.
| | 01:26 | The first setting screen is for that
field everywhere that it appears in your
| | 01:30 | Drupal site and it usually
doesn't have very many settings.
| | 01:34 | In this case it has no field
setting, so I will just say Save.
| | 01:37 | Then we come to the second page,
which only affects the SKU, the field that
| | 01:41 | we've just created, when it's
in the Product content type.
| | 01:45 | You see when you create a field you
can reuse it in different content types.
| | 01:49 | We won't be getting into that here.
| | 01:51 | The important thing is to
go through both screens.
| | 01:53 | In our case, I am going to make it a required
field and we have a minimum and maximum value.
| | 01:59 | Now let's just say that our olive oil
company keeps track of things by using
| | 02:03 | a five digit number.
| | 02:04 | Well, in that case, the minimum
should be 10,000 and the maximum should be
| | 02:11 | 999,999 and for Help Text, I am just going
to add "If the item has no SKU use 99,999."
| | 02:23 | The rest we'll leave as is.
| | 02:25 | But again, I'll come back and talk
about some of these things later on.
| | 02:29 | Click Save Settings.
| | 02:31 | Now I said, I was going to add two other fields.
| | 02:33 | One is a price and the other is an image.
| | 02:35 | I will quickly add the price.
| | 02:37 | Label will be Price, field name Price.
| | 02:41 | That will be a Decimal type and again
Text field is the only option and Save.
| | 02:47 | Here we have a few more
options in the first setting screen.
| | 02:50 | We can choose how precise we want the
decimal to be and how many digits to show
| | 02:55 | to the right of the period.
| | 02:57 | In our case, we don't need to
store a very precise number.
| | 03:00 | However, the smallest precision we can
have for decimal is 10, so that's fine.
| | 03:05 | Number of digits to the right of the
decimal, fortunately it's already on
| | 03:08 | 2, which is what you get in money,
and since we are in the United States,
| | 03:12 | or at least I am, I will say Decimal point
for the marker and Save those field settings.
| | 03:16 | We will make this field required.
| | 03:19 | We don't have a minimum or maximum.
| | 03:21 | For the Help Text, I will just say "Enter as
numbers and a period for the decimal point.
| | 03:31 | No need to include the dollar sign."
| | 03:35 | Under Prefix, I am going to add a
dollar sign and you will see how this comes
| | 03:39 | out in just a few minutes.
| | 03:41 | The rest I will leave as
it is and then say Save.
| | 03:45 | Finally, we are going to add an image.
| | 03:47 | This is going to be a little bit different.
| | 03:49 | I am going to call it Product photo,
product_photo, and the Field type will be Image.
| | 03:57 | We have only one option
there as well, Image, and Save.
| | 04:01 | In the first screen of settings,
I'm going to put in a default image.
| | 04:04 | I will click Browse and I have one
in my exercise files here, there's
| | 04:08 | no-image-available, and say OK.
| | 04:12 | The upload destination, we don't
really need to talk about right now.
| | 04:15 | Essentially, you have the option of
having either public files, which are
| | 04:18 | downloadable by anybody, or private files.
| | 04:21 | That's getting into an area
that's a little bit beyond this course.
| | 04:24 | But for now we'll click Save field.
| | 04:27 | On the next screen, the options are
quite different because we are dealing with
| | 04:30 | an image as opposed to a number.
| | 04:32 | I will leave things mostly as they are.
| | 04:35 | In particular, I'm going to leave
the image resolution by pixels as it is
| | 04:39 | because I'll be showing you how to
handle that in a later video about
| | 04:42 | modifying image styles.
| | 04:44 | However, I do want to make sure that
people don't upload absolutely enormous
| | 04:48 | files and fill up our server,
so I will turn this into 2 MB.
| | 04:52 | That should be big enough for most graphics.
| | 04:54 | I will enable the Alt and Title
fields and you'll see what those do when we
| | 04:58 | create a node of this content type and
the remainder I will leave as it is and
| | 05:03 | click Save Settings.
| | 05:04 | So we have our product content type
and we have the fields that we want.
| | 05:10 | Let's take a look at what happens now when
someone wants to create a product type node.
| | 05:14 | As usual we would go up to
Add Content and select Products.
| | 05:19 | There is our Title, there is our Body
and as we scroll down further, there are
| | 05:24 | the three fields that we added.
| | 05:26 | But there are few things that I
think are not quite right with this.
| | 05:29 | For one thing, we don't need all this space.
| | 05:31 | We are going to have very
short product descriptions.
| | 05:34 | Also, I don't think it should be called Body.
| | 05:36 | We could call it something
else like Product Description.
| | 05:39 | That will be a little bit easier for
people who are entering products later, who
| | 05:42 | perhaps aren't as well trained.
| | 05:44 | This way they'll know exactly what a
product description is as opposed to a body.
| | 05:49 | Furthermore, I think these things, the
SKU, Price, and Photo, should come above
| | 05:54 | because they are the first things you enter.
| | 05:56 | So we'll go back to our content type
by clicking Structure and Content types.
| | 06:02 | Then next to Products at the bottom of
the screen click once again Manage Fields.
| | 06:06 | The first thing I'll do is I will
change the name of that Body field by going
| | 06:09 | over and clicking Edit next to it.
| | 06:12 | Instead of Body, it will be Product description.
| | 06:16 | Instead of being 20 rows,
it will just be 5 rows.
| | 06:19 | I don't want people to
enter a lot of text there.
| | 06:22 | Go down and Save settings.
| | 06:26 | Now, to move things around, I just grab these
little compass icons and drag them as I like.
| | 06:30 | SKU goes there, Price goes there, and I think I
will leave the photo after it. Go down and save.
| | 06:37 | Now, we're ready to start adding products.
| | 06:40 | I'll go up to Add Content and Product
again, and I'll just add one as a sample.
| | 06:46 | Product is Pure Grade A olive oil, 1 liter.
| | 06:54 | The SKU, let's just say it's 15011.
| | 06:59 | The price is $18, and notice we
have our little bit of information here
| | 07:04 | telling us how to do that. .00.
| | 07:09 | I will enter a quick description here,
and I'll even put in a little bit of HTML.
| | 07:16 | We know what HTML is permitted of
course by this list here under the
| | 07:19 | Filtered HTML text format.
| | 07:21 | You can learn more about text formats in
a separate video earlier in this course.
| | 07:26 | So that's the product description.
| | 07:28 | Then we have a place for a photo.
| | 07:29 | Again, I will browse and go back to my
exercise files, select it, and upload.
| | 07:36 | Now, the alternate text is useful for
those people who are looking at the site
| | 07:40 | through a different kind of screen reader,
that is, not a browser, or for people
| | 07:44 | who are having problems with seeing.
| | 07:46 | So it's very useful to have.
| | 07:47 | This will be once again, let me see.
| | 07:49 | It was Pure Grade A olive oil.
| | 07:51 | Photo of Grade A olive oil bottle.
| | 07:59 | The title is just what people
see when they hover over the image.
| | 08:02 | So in this case, I am
going to say 1 liter for $18.
| | 08:10 | Scroll down and save, and there it is.
| | 08:13 | It looks pretty good. We have our photo.
| | 08:18 | We have our price, our SKU, and our description.
| | 08:21 | Of course we could have put all of
this information into the Body field and
| | 08:25 | just left it at that.
| | 08:26 | But by making separate fields, we will
later be able to play with the data in
| | 08:30 | interesting ways, particularly when we
start using views later in the series.
| | 08:35 | But first we're going to take advantage
of field settings to make things prettier.
| | 08:39 | We don't really need to have the word
product photo here for example and this
| | 08:43 | could be in line with price
as one line instead of two.
| | 08:46 | You will find out how to fix all of
these things and do a lot more in the video
| | 08:50 | about adjusting field display.
| | Collapse this transcript |
| Exploring field types and options| 00:00 | In an earlier video you saw how to
create a content type that we called product
| | 00:04 | and how to add fields to it.
| | 00:06 | Once again as a reminder, you go up to
Structure, down to Content types, and
| | 00:11 | then you can add a content type here,
or add fields to an existing content type
| | 00:15 | by clicking Manage fields.
| | 00:18 | We added three fields.
| | 00:20 | The SKU, which is a five digit
number, the Price, and a Product photo.
| | 00:25 | But those are only a few field types of
the many that are available in Drupal,
| | 00:29 | and you could see them by clicking
this Select a field type pop-up menu here.
| | 00:33 | Some of the ones we didn't even come
close to touching were List, Float, which
| | 00:37 | is a kind of number, and Long text,
along with Long text and summary.
| | 00:42 | We also didn't talk about this area
down here very much, Add existing field.
| | 00:46 | We'll explore both of
these things in this video.
| | 00:50 | Now, so we don't mess up anything we've
already done, I'm going to first create
| | 00:54 | a temporary content type,
which I'll simply call Temp.
| | 00:57 | As usual, I go up to Structure and Content
types. Add content type. It's called Temp.
| | 01:05 | Scroll down and save.
| | 01:06 | We'll be deleting this at the end of the video,
so we don't have to worry about it too much.
| | 01:11 | Now let's start playing with fields.
| | 01:13 | Go down to Temp and Manage fields.
| | 01:15 | We'll start with the Add existing field section.
| | 01:18 | When you click on this pop-up menu,
you see all of the custom fields that we
| | 01:22 | have in our entire Drupal site.
| | 01:25 | Now, when you add an existing field,
you're not bringing over any of the
| | 01:28 | previous data. Just the field
selections and some constraints.
| | 01:32 | That is, its configuration.
| | 01:34 | I'll sure that using the term
reference that we created earlier.
| | 01:38 | Right now that field only shows up in
the Article content type, but I'm just
| | 01:42 | going to add a label here.
| | 01:43 | I'll say, "Is it current news yet?"
| | 01:48 | Then over here, again, we have
choices that are related to term references.
| | 01:52 | Earlier on, we had check boxes.
| | 01:54 | This time I'm going to say
Autocomplete term widget and click Save.
| | 02:00 | On this page, I'll leave
everything as it is and say Save settings.
| | 02:04 | Now let's compare the two.
| | 02:06 | We have this field both in the
Article content type and Temp content type.
| | 02:10 | The best way to compare
them is by opening up tabs.
| | 02:13 | I'm doing this by Ctrl+Clicking on Add content.
| | 02:16 | In this tab, I'll add an Article node.
| | 02:19 | In this one, I'll add a Temp node.
| | 02:21 | Now, as we scroll down here, you see
there is our radio buttons and here we have
| | 02:28 | an autocomplete area.
| | 02:30 | The two terms now
available are Historical and News.
| | 02:33 | So if I were to start typing News, it would
pop up and we would be able to just select that.
| | 02:38 | However, there is something different.
| | 02:39 | Because I'm using this Autocomplete I
can also type in whatever I like and that
| | 02:44 | then becomes a term in that vocabulary.
| | 02:47 | So we have News and Historical. I'll
say it's Sort of news and I'll just create
| | 02:53 | a Temp node, which I'll
later delete, and say Save.
| | 02:59 | Now, I can prove that it was added on
to that vocabulary by going back to my
| | 03:02 | article and reloading the page.
| | 03:06 | Now you see we have that third choice there.
| | 03:08 | So you have to be careful when you
share fields among different content types.
| | 03:12 | In particular, if they're
taxonomy fields of this sort.
| | 03:15 | I want to go back and get rid of that
though, because obviously we don't need
| | 03:19 | to have that Sort of news there.
| | 03:20 | The way I'll do that is first
I'm going to delete this node.
| | 03:23 | Then I'll go up to Structure and
Taxonomy, I'll edit that Taxonomy by listing
| | 03:32 | its terms and get rid of that Sort of news.
| | 03:38 | At this point you know how to do all of this.
| | 03:40 | I just do it to keep my site clean.
| | 03:42 | Anyway, let's move on and
add some more new fields.
| | 03:45 | To do that, I go back to my Temp
content type and let's take another look at
| | 03:50 | the different kinds of field
types we have available to us.
| | 03:53 | These are divided into a
few different categories.
| | 03:56 | The first group is Numbers.
| | 03:58 | Decimal we already talked about
when we entered the Price field.
| | 04:01 | A Float is a different kind of number.
| | 04:04 | It's a mathematical concept,
which I won't get into here.
| | 04:07 | An Integer is a whole number.
| | 04:09 | Under Text, we have Long text,
ordinary Text, and Long text and summary.
| | 04:15 | Long text and summary is familiar to
you, because that's what Drupal uses for
| | 04:18 | the Body field in the Article
and Basic page content types.
| | 04:23 | I can show you that by going again to
the Article node we started to create.
| | 04:27 | And you'll remember, under the Body,
we can click Edit summary to add
| | 04:31 | something that shows up on collected
pages, such as the front page that's
| | 04:35 | different from the body.
| | 04:36 | We discussed this way back in
the content section of this course.
| | 04:40 | The other two are Text and Long text.
| | 04:43 | The major difference between those is
in the way it shows up on the forum.
| | 04:47 | Simply put, Long text has multiple
rows while simple Text is just one row.
| | 04:52 | Then we have Lists.
| | 04:53 | These differ from other field types
in that you create a list of allowable
| | 04:57 | values when you create the field.
| | 05:00 | That list cannot be changed later.
| | 05:02 | They're sort of like taxonomy terms
as we saw earlier, but more strict.
| | 05:07 | Now, the file type you've
already seen when we added an image.
| | 05:11 | The main difference between Image and
File is that items we put in the File
| | 05:15 | field don't get displayed as an image.
| | 05:17 | Rather they just show up as a list
of attachments to a node, as a list
| | 05:20 | of generic file icons.
| | 05:23 | One use of this field type would be
to give members of a workgroup a way to
| | 05:27 | exchange files that they're working on.
| | 05:29 | That's actually how we managed traffic
among a bunch of editors for a book that
| | 05:33 | I was working on recently.
| | 05:35 | The Boolean field type is designed to
provide users with simple yes or no input.
| | 05:41 | In truth, you could do this with
other content types by controlling their
| | 05:44 | criteria and using check boxes for entry,
but the Boolean type is a simpler way to do it.
| | 05:49 | Then finally, we come to
the Term reference field type.
| | 05:52 | This amazingly useful field lets you
reference taxonomy terms as you've already seen.
| | 05:58 | Now, when you add a Term reference field,
you specify which vocabulary it can draw from.
| | 06:04 | As you saw, you can let users add items
to vocabularies this way, so it become
| | 06:09 | sort of like a List field but with
choices that change depending on user input.
| | 06:14 | That brings us to the end of the types
of fields available in"core Drupal,
| | 06:18 | but that's not all. Some contributed
modules give you access to additional field types.
| | 06:24 | Now, when we go back to our site and
edit our Temp content type by clicking
| | 06:28 | Structure and Content types and then
back to manage the fields there, we can
| | 06:33 | see that each field type has its own options
and they're all too numerous to go into.
| | 06:38 | But I do want to mention one
option that's available for all of them.
| | 06:41 | The Number of values option.
| | 06:43 | To show that, I'm just going to call this
Temp field. The field will be temp_field.
| | 06:50 | I'll just make this an
ordinary Text field and save it.
| | 06:56 | Save again to get to our final screen.
| | 06:59 | Down at the bottom we have Number of values.
| | 07:01 | I could make that a specific number
from 1 to 10, or I could make it Unlimited,
| | 07:05 | which I'll do just to demonstrate.
| | 07:07 | Then Save settings.
| | 07:08 | I'll move that up to the top, scroll
down and Save, and create a new node of
| | 07:14 | that content type. Add content and Temp.
| | 07:19 | Here is that field. Let's say Red.
| | 07:22 | Add another item.
| | 07:23 | See, this is where that
unlimited number comes in.
| | 07:26 | Blue, and so forth.
| | 07:28 | We could go on forever.
| | 07:30 | So we've done a lot in this video.
| | 07:31 | Before going, I just want to
clean things up a little bit.
| | 07:34 | The first thing I'll do is I'll go
back to that content type, Structure,
| | 07:38 | Content types and Temp, manage those fields.
| | 07:43 | I'm just going to get rid of
the new fields that I created.
| | 07:45 | I click Delete, and yes, I
really do want to delete it.
| | 07:48 | In the Temp field, I'll do the same thing.
| | 07:52 | Finally, I'll delete the content type itself
by clicking Edit, going down and deleting it.
| | 07:59 | Yes, I really do want to do that.
| | 08:02 | We covered a lot in this video,
but in return we gained a lot.
| | 08:06 | Drupal offers you so many options when you
add fields, it can sometimes seem overwhelming.
| | 08:11 | My advice to you is to just create a
Temp content type like I did here and
| | 08:16 | start playing around with them.
| | 08:18 | Quickly you'll realize which ones
are most useful for your application.
| | Collapse this transcript |
| Adjusting field display| 00:00 | So you've created your
content type and added fields to it.
| | 00:03 | But somehow when you add nodes of that
content type, it doesn't quite look right.
| | 00:08 | I'll show you what that
Product node that we created.
| | 00:11 | We go up to Content and filter by
that product type and there it is.
| | 00:15 | Now let's take a look.
| | 00:16 | As you could see we have the SKU here
and then we have the number below it.
| | 00:22 | We don't really need a space in the
number since it's a straight ahead
| | 00:24 | five-digit number, the price doesn't
have to be on its own line, and we really
| | 00:28 | don't need a label that says Product Photo.
| | 00:30 | Also the photo is larger than I would
like but we'll come back and fix that
| | 00:33 | later in another video.
| | 00:35 | Right now what we want to do is
go in and edit this content type.
| | 00:39 | That will make all of the display
changes that we want and it will make them
| | 00:42 | consistently throughout the site.
| | 00:44 | To do that, go up to
Structure and then Content types.
| | 00:48 | The one we are going to change is Product.
| | 00:50 | And instead of clicking Manage fields,
we actually click Manage display.
| | 00:56 | Before we start changing all of
these things, I want to point out the two
| | 00:59 | buttons up here, Default and Teaser.
| | 01:01 | Essentially, when we change Default,
that changes the full node view that we
| | 01:05 | were just looking at.
| | 01:06 | You can also change the way
that this content type appears in
| | 01:08 | different contexts.
| | 01:09 | For example, the teaser or as you see down
here, RSS and searches and things like that.
| | 01:15 | We will talk more about that in the video
about customizing field display by context.
| | 01:19 | Right now, we are just
going to go with the default.
| | 01:22 | We can change the basic
settings on all four fields.
| | 01:25 | And remember that the Product
description is what we rename the body field back
| | 01:29 | in the video on adding fields to content types.
| | 01:32 | Notice that you have additional options
here as you can see from these widgets,
| | 01:35 | for changing the three fields that we
later added, the SKU, the Price, and the
| | 01:39 | Product photo, but we'll
start with the basic settings.
| | 01:43 | For the Product description, I didn't
see anything that I wanted to change so
| | 01:46 | I leave it as it is.
| | 01:47 | For the Price and the SKU, I am going to
make the label Inline. That will keep it
| | 01:53 | from appearing on a different
line from the actual information.
| | 01:56 | And in its format, I will leave it as it
is but I will show you what the choices are.
| | 02:00 | You can have it either as the Default,
which if there is HTML in it, it will show
| | 02:03 | up with the HTML styling or you can strip
out all of the HTML so it's just plain text.
| | 02:09 | Or you can actually hide the value that's in
that field. But we'll leave them as they are.
| | 02:14 | Now let's go back and take a look at
what that looks like after I click Save.
| | 02:18 | And then I close the overlay
so I can see the node behind it.
| | 02:21 | And as you see they are now in line.
| | 02:23 | Now we still do have this
Product photo, which I meant to remove.
| | 02:26 | So let's go back, Content types,
Product and Manage display. Easy enough to do.
| | 02:35 | Just hide that label.
| | 02:36 | Now let's make some of those additional
changes that are specific to the field type.
| | 02:41 | For the SKU, I will click on the widget here.
| | 02:43 | And I don't really want a thousands
marker at all. I am just going to say None
| | 02:48 | and that should bring it all together.
| | 02:50 | The rest looks good, so I say Update.
| | 02:52 | It gives me immediate feedback.
| | 02:54 | For the Price, I am going to add a
comma for the thousands. Not that any of
| | 02:58 | our olive oil costs over $1000 but just in
case we decide to sell a 55 gallon drum of it.
| | 03:03 | We want it to say Comma. And Update.
| | 03:07 | Then we go to the photo, which has
some unusual options available to it.
| | 03:11 | First of all, we can have it
linked to whatever we want.
| | 03:14 | We could permit users to click it and
then just see the file, that would be all
| | 03:18 | that's on the screen,
or go directly to that node.
| | 03:22 | I tend to like to have pictures
linked to nodes because people are used to
| | 03:25 | clicking on pictures and
going to further information.
| | 03:28 | So I will change that to Content.
Image style lets us change the size of that
| | 03:33 | graphic and you remember I right now
have it going to the original image, which
| | 03:36 | is bigger than I really want.
| | 03:38 | I am going to try Medium and
see what that looks like for now.
| | 03:41 | I think it will be okay but if you
want more information about these image
| | 03:44 | styles and how you can add your own,
see the video a little bit later about
| | 03:48 | modifying image styles.
| | 03:50 | For now though, I will
just click Update and Save.
| | 03:53 | Let's go back and see what that looks like.
| | 03:55 | I close the administrative overlay.
| | 03:56 | The screen redraws and pretty good.
| | 04:00 | We have the SKU showing, no comma in
there, the price showing, the dollar sign before it.
| | 04:05 | Everything's in line.
| | 04:06 | The picture is a little bit small but
again we will change that a little bit
| | 04:09 | later on in the course.
| | 04:11 | This gives you a pretty quick overview
of ways you can change field display.
| | 04:15 | And again, none of these
were available in Drupal 6.
| | 04:19 | Back then you had to hack at the
themes template files to make such changes,
| | 04:23 | which meant having a pretty solid
understanding of the CSS and PHP languages.
| | 04:28 | So the things you see here are
just one more thing to thank Drupal 7's
| | 04:31 | developers for and that will make
Drupal a much stronger content management
| | 04:35 | system in the future.
| | Collapse this transcript |
| Customizing field display by context| 00:00 | We've built our content types,
we've added fields to them, and we've
| | 00:04 | adjusted their appearance.
| | 00:05 | Now, I would like to show you one
more thing that's a bit advanced but it's
| | 00:08 | surprisingly useful.
| | 00:10 | That is changing how nodes of that
content type appear in different contexts.
| | 00:15 | Now before I get too deep into this,
I need to clarify that there's a module
| | 00:19 | called Context, but I'm not talking about that.
| | 00:21 | It's actually quite a complex module.
| | 00:24 | Instead, when I talk about context
here I mean content as it appears in
| | 00:28 | different situations
throughout your Drupal site.
| | 00:30 | We have already seen three kinds of context.
| | 00:34 | First, we have nodes as they appear on
the front page when they have been promoted.
| | 00:38 | They are a little bit different.
| | 00:40 | They have the Read more link down here.
| | 00:42 | In some cases if there's a lot of text
they will be cut off so you'll see only
| | 00:45 | the teaser or summary.
| | 00:47 | Then when you click the
title, you go to the full node.
| | 00:50 | That's another kind of context.
| | 00:52 | Going back to front page, we see a
third kind of context, which is up here,
| | 00:56 | clicking on the RSS link.
| | 00:58 | This is once again the same
information but in a different view or context.
| | 01:03 | What we're going to change now is the way that
this Poll content type appears in the RSS feed.
| | 01:10 | Let's say that we don't really want to
show the results in the RSS feed. We want
| | 01:13 | to get people to our site by saying
vote on this but not tell them how the vote
| | 01:17 | is going until they actually come to our site.
| | 01:20 | To do that, we just go back to our site.
| | 01:22 | And then we will go and edit the xontent
type by clicking Structure and Content types.
| | 01:27 | That one is the Poll and the thing
we're going to change is the display.
| | 01:31 | So we click Manage display.
| | 01:33 | I mentioned in an earlier video that we
already have two contacts showing here by default.
| | 01:38 | The Default one, which is what you see
when you look at the full node, and the
| | 01:42 | Teaser, which again is what you see on
the front page and any other place where
| | 01:46 | nodes are collected. But you can add
a few others by clicking this Custom
| | 01:50 | Display Settings down here.
| | 01:52 | In our case, I am going to add the RSS context.
| | 01:54 | So the thing I want to
hide is the poll results.
| | 02:01 | I simply go up to the RSS button up
here, change Poll results from Visible
| | 02:06 | to Hidden, and save.
| | 02:08 | Now let's go back to our front page.
We still see the results on the front page
| | 02:14 | but if we go up to our RSS
feed, now they're hidden.
| | 02:18 | Being able to change how content appears
in varying contexts is a sort of thing I
| | 02:23 | didn't realize that I needed until I
have been using Drupal for a while.
| | 02:26 | So you might not actually come across
this until your site is up and running.
| | 02:30 | But when I found I needed it, I really
needed it and it simply wasn't easy in
| | 02:34 | Drupal 5, which is what I was using back then.
| | 02:37 | In Drupal 6 with the CCK module, it
was possible but not nearly as flexible.
| | 02:42 | The best thing about it being built
into the core of Drupal 7 is that module
| | 02:46 | developers can extend it, so you might
get similar control over any new display
| | 02:51 | contexts that they dream up.
| | Collapse this transcript |
| Modifying image styles| 00:00 | One of the biggest complaints about
Drupal 6 was that it had no built-in
| | 00:04 | tools for image handling.
| | 00:06 | Just to get an image into a node took
an HTML hack and to really do it right
| | 00:10 | meant installing and
configuring a half-a-dozen modules.
| | 00:14 | Drupal 7 attacked that problem by
incorporating those half-dozen modules into
| | 00:17 | its core and the results are pretty good.
| | 00:20 | To get those images in now, you just add an
image field to a content type as we saw earlier.
| | 00:26 | This approach is less flexible than a
system that would let you mix graphics and
| | 00:29 | text freely, but you do get more
control over your images that way, because you
| | 00:34 | can apply image styles that impose
consistency throughout the entire site.
| | 00:38 | I'll show you how to do that by changing
a node we created earlier in the course.
| | 00:43 | It's this Pure Grade A olive oil one.
| | 00:45 | It's a product node, and as we scroll
down we see that we have the graphic here.
| | 00:50 | The original graphic we had was much
larger and we changed it to the medium
| | 00:54 | style that comes built-in to Drupal.
| | 00:56 | Now I'll show you how to create your own
styles and apply them throughout your site.
| | 01:00 | First, let's go back to that content
type and take a look at what exactly we did.
| | 01:04 | We go up to Structure, Content
types, and that particular node is of the
| | 01:09 | Product content type.
| | 01:10 | I go over to manage display and then
I look at the field Product photo.
| | 01:14 | And here is where the information is.
To change it, we quick this little widget here.
| | 01:19 | And instead of having Image style medium,
I'm going to change it to the original
| | 01:24 | image so you can see what that looks like.
| | 01:26 | Click Update and Save.
| | 01:29 | When I close out this administrative
overlay, the page redraws and as we scroll
| | 01:33 | down we see, yeah, it's quite a big
picture. Really too big for this page.
| | 01:37 | But as we saw before the picture we
were looking at was a little too small.
| | 01:41 | We want something that's in-between.
| | 01:43 | To change image styles, we go up to
Configuration and then scroll down to Media
| | 01:48 | and click Image styles.
| | 01:51 | This is where you get the three that are
built-in: thumbnail, medium, and large.
| | 01:56 | We could have chosen the large style, but
we're going to make it a little bit different.
| | 01:59 | First let's take a look at what large
actually is, by clicking the edit link here.
| | 02:04 | The large image style
constrains this image by its size.
| | 02:08 | It scales it to no larger than 480 pixels in
either direction, so we have a target size.
| | 02:14 | Let's go back to our Image styles by
clicking on this link here and what's
| | 02:17 | called the breadcrumb
trail, and add our own style.
| | 02:20 | For the product name, you can only use
lowercase letters, underscores, or hyphens.
| | 02:26 | So it will look like this,
and then click Create new style.
| | 02:31 | Now we can start adding effects.
| | 02:33 | If we don't add anything now and say
Update Style, it will basically just
| | 02:37 | show the original image in its original
format, but first we're going to scale it down.
| | 02:42 | So we'll do Scale and Add, and I'll bring
it down to, as the large one, was 480x480.
| | 02:48 | We'll just see what that looks like
and click Add effect. Then I go down
| | 02:55 | and click Update style. Great!
| | 02:57 | Now I'm going to go back to Structure and
see what happens if I change that content type.
| | 03:02 | Again, Content types, Product, Manage
display, change the Product photo to
| | 03:09 | product_style, and Update.
| | 03:13 | Then we'll go back to our node and scroll down.
| | 03:16 | It's about the same size really.
| | 03:19 | I'm going to make it little smaller and
I'll also add some other effects to it.
| | 03:22 | Again, we go up to Configuration,
back down to Image styles, and then we
| | 03:27 | edit our product style.
| | 03:31 | I should talk about what
some of the other effects are.
| | 03:34 | First, we have Crop.
That actually removes part of your image.
| | 03:37 | So be careful when you use it.
| | 03:39 | Desaturate is an interesting one.
| | 03:41 | It takes away all of the color information.
| | 03:44 | It could just as well be
called the black-and-white effect.
| | 03:47 | Resize stretches or shrinks your
image to be whatever dimensions you want.
| | 03:51 | That will distort the image however.
| | 03:53 | Rotate, as you can guess, rotates the image.
| | 03:56 | Scale we've already seen.
| | 03:58 | And Scale and crop changes one of the
dimensions, but it cuts off the other one.
| | 04:03 | Most of these has their own set of
options. Desaturate doesn't, because all it
| | 04:07 | does is take away the color
information, but we'll see a few of those.
| | 04:11 | So first thing I'm going to do is I'm
going to change the scale. I'm going to
| | 04:14 | make it 300x300 instead.
| | 04:18 | The Allow Upscaling, by the way, lets you
take a smaller graphic and make it larger.
| | 04:22 | The problem with that is that those
larger graphics after they've been
| | 04:26 | resized don't look as good.
| | 04:27 | There is not enough
information in the small graphic.
| | 04:30 | It just takes each pixel and makes it
bigger essentially, but we'll leave this
| | 04:35 | as it is, 300x300, and Update effect.
| | 04:39 | Then I think I want to try
the black-and-white effect.
| | 04:41 | So I select Desaturate and Add, and as
you see there are no options for that.
| | 04:47 | Finally, I think I'll rotate it a little bit.
| | 04:49 | Let's click Rotate and Add.
| | 04:52 | Make it a subtle -15 degrees and for the
background color, I'm going to make it a light #000066.
| | 05:02 | You can learn about hex codes of
course in other lynda.com courses.
| | 05:05 | You'll see exactly what this
background color is after you see what the
| | 05:09 | rotation effect does.
| | 05:11 | So I then click Add effect.
| | 05:13 | Okay, well, you can see
it's made quite a difference.
| | 05:16 | We have our original sample here
and this is the sample we end up with.
| | 05:20 | I really don't like that blue color
however, so I think I'll make that much
| | 05:24 | subtler and I'll make the
rotation a little bit less.
| | 05:27 | Again, you can always go
back and edit these things.
| | 05:30 | So I'll make the rotation angle only 7
degrees, I'll make the background color let's
| | 05:37 | say a grayish color, and Update effect, there.
| | 05:42 | That's a little bit better.
| | 05:44 | Finally, I'll just remove the Desaturate.
| | 05:48 | I like the way that looks.
| | 05:50 | Since we've already applied the
style to our product photo in the Product
| | 05:55 | content type, all we have to do
now is Update the style. Good!
| | 05:59 | It's taken, and then just to be sure I'm
going to go back to my content type. Go back.
| | 06:04 | Manage that display of that image.
| | 06:08 | Change it from original image to
product_style, click Save, and then we'll go
| | 06:14 | back to that product and
we should see the new style.
| | 06:17 | Scroll down and there it is.
| | 06:20 | So that's how the image styles work in
Drupal, and I want to mention once again
| | 06:23 | this will be consistent
throughout the entire site.
| | 06:26 | I can add as many product nodes as I want
and they will always come out looking like this.
| | 06:30 | And if I make any changes, they will
apply to all of those product nodes
| | 06:35 | throughout the entire site.
| | 06:37 | So we've seen how image styles work in Drupal.
| | 06:39 | Let's take a very quick look at
how they're stored on the server.
| | 06:42 | To do that, I'll go to my desktop where
I have my folder, go to 2trees, and into
| | 06:47 | my sites folder, and then
into the site itself. 2trees.
| | 06:52 | Inside the 2trees folder is the files
folder and in there you see a folder
| | 06:56 | called styles, and there is
all of our different styles.
| | 07:00 | If we look in product_style and
public, there is the graphic itself.
| | 07:04 | That's important, because we
haven't changed the original graphic.
| | 07:08 | If we make any other changes to the
style or we add a style or we decide not
| | 07:12 | to style the graphic at all,
we can go back to the original image.
| | 07:15 | I just want to close by saying that the
five filters you saw here aren't everything.
| | 07:20 | Many more are available for image cache,
which is this system's predecessor on Drupal 6.
| | 07:25 | I think we can expect to see many of
them get ported to Drupal 7's image system,
| | 07:29 | giving you access to such things as
reflections and watermarks and some other
| | 07:33 | really impressive graphic effects.
| | Collapse this transcript |
|
|
10. Managing UsersDefining new user policies| 00:00 | When you open up your site to the public,
you invite enormous collaboration but
| | 00:05 | also enormous trouble.
| | 00:07 | The same things that let people contribute
content also make it easy for them to cause problems.
| | 00:12 | We talked a little bit about that in
the videos on setting comment policy
| | 00:16 | and managing comments.
| | 00:18 | Now we'll go into what happens when
someone goes from being an anonymous visitor
| | 00:22 | to a site member and how you can control it.
| | 00:25 | To start with, I want to explain
that Drupal comes with four levels of
| | 00:28 | permission built-in.
| | 00:30 | You can see that by clicking
People and then the Permissions tab.
| | 00:35 | Here we see three different levels.
| | 00:38 | There is the Anonymous User.
| | 00:39 | That's anybody who visits
your site and isn't logged in.
| | 00:42 | Authenticated User. That's somebody
who has already signed in and that means
| | 00:46 | they first have to get an account.
| | 00:48 | The third level is the Administrator role,
which I'll come back to in just a minute.
| | 00:52 | There is a fourth level here which
isn't showing called the super user.
| | 00:56 | That's the first user that was created
when you set up your Drupal site and who
| | 01:00 | has access to absolutely everything on the site.
| | 01:02 | It's not shown here because you can't
add or remove permissions from that person.
| | 01:07 | I'll go more deeply into the system of
roles and permissions in the videos about
| | 01:10 | defining user roles and
controlling access permissions.
| | 01:14 | The important thing to know now is
that people who aren't signed in are the
| | 01:18 | anonymous user and people who are, are
authenticated users, and that you can
| | 01:24 | control what each group does.
| | 01:27 | So how does one go from
being anonymous to authenticated?
| | 01:30 | You control that in the account
settings, which you find under Configuration
| | 01:35 | and Account settings.
| | 01:37 | I'll walk through this entire screen.
| | 01:39 | The first thing is what you're
going to call anonymous users and by
| | 01:42 | default that's Anonymous.
| | 01:43 | There is one site out there,
slashdot.org, which calls them anonymous cowards,
| | 01:48 | which is one way of getting
people to sign up for the site.
| | 01:51 | You can call them whatever you want.
| | 01:54 | To explain some of the rest of the
settings, I'm going to open up my own user
| | 01:57 | account here by Ctrl+Clicking on Hello admin.
| | 02:00 | That shows my user page here.
| | 02:02 | Then I'll also click Edit.
| | 02:05 | Now going back to our settings,
we have enabled a personal contact form by
| | 02:09 | default for new users.
| | 02:11 | When you go to my profile,
I'll click again on View,
| | 02:15 | you see this tab here that says Contact.
| | 02:17 | Anybody who has the permissions to
reach this and clicks Contact can then send
| | 02:21 | me an e-mail message.
| | 02:23 | It's very similar to the contact form
that you saw earlier, but it's set up
| | 02:26 | for individual users.
| | 02:28 | Now if I go back up and edit my account,
you see that I have a check box down
| | 02:33 | here where I can either allow or
disallow that Personal contact form.
| | 02:37 | Going back to our Account settings,
we have this administrator role.
| | 02:42 | That's the one that I was talking
about a minute ago when you saw those three
| | 02:45 | columns of permissions.
| | 02:47 | The administrator role is
automatically assigned new permissions whenever a
| | 02:50 | module is enabled, as it says here.
| | 02:53 | Really I've never changed it from the
administrator role, but some people like
| | 02:56 | to have many more roles than that
and they might change the name.
| | 02:59 | So if they do that, they can change it
to whatever role they set up. When you
| | 03:03 | start out though, you only have a
choice of having in the administrator role be
| | 03:06 | the one administrator or turned off entirely.
| | 03:10 | Incidentally, when you set up a new
content type, the administrator does not
| | 03:14 | automatically get permission to add
or change nodes of that content type.
| | 03:18 | It's only for when you install modules.
| | 03:21 | As we scroll down, we get to the
most important part of the screen: who
| | 03:24 | can register accounts.
| | 03:27 | I'll go through all three of these in
the video on creating user accounts, but
| | 03:31 | essentially, you have three options.
| | 03:33 | The one that's there by default is
that Visitors can create accounts, but
| | 03:36 | they can't actually start doing
anything on the site as authenticated users
| | 03:40 | until you approve them.
| | 03:42 | That's not a bad setting
to keep at least at first,
| | 03:44 | because it lets you grow your
site but still have control.
| | 03:48 | The second option here, Visitors,
lets anybody setup an account and they
| | 03:52 | immediately become members of the site.
| | 03:54 | It's a little dangerous, but
it does encourage site growth.
| | 03:57 | And if you go on the Internet,
you'll find that most sites are set up so
| | 04:00 | visitors can set up their own accounts.
| | 04:03 | Finally, we have the option
Administrators only, which as you would guess, takes
| | 04:06 | away the option from
visitors to setup their own account.
| | 04:09 | The way this shows up to anonymous
users by the way is if you leave your site
| | 04:13 | in its default configuration there
is a link over in the left column that
| | 04:16 | says Create an account, but that only shows
up if Visitors or this last option are selected.
| | 04:23 | If you have Administrators only,
then it doesn't show up at all.
| | 04:27 | Going down a little bit further, you
can require e-mail verification when a
| | 04:30 | visitor creates an account.
| | 04:31 | And what that does is it checks to make
sure that the e-mail address that they
| | 04:34 | entered really does exist.
| | 04:36 | It sends a message to that address
with a secret key.z they have to click on a
| | 04:40 | link to go back to your site and if the
key isn't right they don't become a member.
| | 04:45 | And if they don't click that link
within a certain period of time, I think it's
| | 04:48 | 24 hours, they don't become a member.
| | 04:50 | Finally, you can decide what
happens when you cancel a user account.
| | 04:54 | And you can go through those options.
| | 04:56 | there they have to do with whether or
not the account itself gets deleted, or
| | 04:59 | merely disabled, and what happens to
the content that that person created.
| | 05:05 | Going further down the screen, you can
allow people to upload user pictures,
| | 05:09 | what are sometimes called avatars, and have
signatures, which appear at the end of comments.
| | 05:14 | All of these settings here have to do
with the pictures and if I uncheck that,
| | 05:17 | you see they simply disappear.
| | 05:21 | At the very bottom of the page
we have a set of e-mail messages.
| | 05:25 | You can customize the messages that
people get at various times as members.
| | 05:30 | There is, of course, the new user
created by an administrator when they try to
| | 05:34 | create an account and their
account is activated and so on.
| | 05:38 | Some of these you can choose whether or
not the e-mail goes out, like right here
| | 05:41 | under account activation,
Notify user when account is activated.
| | 05:45 | In each of these messages you have what
are called tokens, so you don't have to
| | 05:49 | type in an explicit message that says,
oh well, what's this person's name?
| | 05:53 | You can just put in this token that says,
username, and it gets filled in with
| | 05:57 | the proper information.
| | 05:59 | Details on all these variables
are at the top of the screen here.
| | 06:04 | Finally, we click save
configuration and we set our policy.
| | 06:08 | You might have noticed these two tabs at
the top, Manage Fields and Manage Display.
| | 06:12 | These are very similar to setting up
fields in nodes, that is, through content
| | 06:16 | types, but they have to do with user profiles.
| | 06:19 | And we'll talk about that more
in the video about user profiles.
| | 06:22 | There is one other thing I recommend
you change when you start accepting
| | 06:25 | members to your site.
| | 06:27 | And that's to turn on tracking.
| | 06:29 | You do that by going to Modules and
scrolling down until you get to the Tracker module.
| | 06:38 | Turn that on and
click Save configuration.
| | 06:42 | What that does is it add the tab to
user profiles that lets everybody see what
| | 06:46 | they have been doing on
the site to a certain extent.
| | 06:49 | And if I go back to my own profile here
and I'll go to View, we now see that tab,
| | 06:55 | Track, and as I said
it shows where I've been.
| | 07:01 | The one problem with the tracker is
that there aren't separate permissions
| | 07:04 | to access it. Anyone who can view profiles
can see what other users have been doing.
| | 07:09 | And you can see that by going to People
and Permissions and then scrolling all
| | 07:14 | the way down to the user section
at the bottom, View user profiles.
| | 07:20 | By default, however, only
administrators can see it.
| | 07:23 | That takes you through
most of the account settings.
| | 07:26 | The next step we're going to do is to
actually walk through those three sign up
| | 07:30 | scenarios that I showed you
before to learn how they work.
| | 07:33 | Whether you allow visitors to
sign themselves up or require
| | 07:36 | administrative intervention
depends on the sort of site you're running.
| | 07:40 | If you want to encourage public participation,
| | 07:43 | that is with creating nodes and
comments and so on, then by all means use the
| | 07:46 | one that doesn't require any
administrator participation.
| | 07:49 | If you do that, however, be sure that
you have a plan in place to prevent abuse.
| | 07:54 | And you could learn some of that
through the video about managing comments.
| | Collapse this transcript |
| Creating user accounts| 00:00 | In the video on defining new user
policies, we walked through some of the
| | 00:04 | controls you have over how people
sign up for your site and become, in
| | 00:07 | Drupal's words, authenticated users.
| | 00:10 | There are essentially three
possibilities, which you can see by clicking
| | 00:13 | Configuration and Account settings.
| | 00:16 | When we scroll down, we see a
Registration and Cancellation area.
| | 00:21 | You can either have only administrators
setup accounts, you can allow visitors
| | 00:25 | to set up their own accounts, or you
can have visitors set them up, but require
| | 00:28 | administrator approval.
| | 00:30 | We'll now walk through each of those.
| | 00:33 | During some of these procedures, Drupal
sends e-mails to both the person signing up
| | 00:37 | and to the administrator.
| | 00:40 | When we first created this site, I used
a bogus address for the administrator,
| | 00:43 | so now I'm going to go back and change
it so the administrator e-mail is one
| | 00:47 | that can actually receive mail.
| | 00:49 | To do that I go to Configuration and Site
information, then I enter my correct address.
| | 00:56 | Go down to the bottom and
click Save configuration.
| | 01:04 | Now it's time to run through the
three types of sign-up procedure.
| | 01:08 | Let's do the default one first.
| | 01:09 | Once again, we can see what it is
by going to Configuration and Account
| | 01:12 | settings and scrolling down.
| | 01:13 | It's one that lets visitor sign up,
but requires administrator approval.
| | 01:20 | To do that I'll switch to another
browser where I'm looking at the site as
| | 01:23 | somebody who hasn't logged in,
that is, as an anonymous user.
| | 01:27 | Down here I would click Create new account.
| | 01:30 | I'll call this person Oily Sam and
enter the email address here.
| | 01:40 | Then click Create new account.
| | 01:42 | As the anonymous user I get a little
bit of information up here saying that the
| | 01:45 | site administrator has to approve it and
that eventually I'll get e-mail messages
| | 01:49 | confirming everything.
| | 01:50 | Now let's go back to the administrator
account and take a look at my mailbox.
| | 01:55 | To be clear, this is the mailbox for
the administrator, the one that I just
| | 01:59 | entered into that configuration screen.
| | 02:01 | I see that I've received the
email, so I click. I see, aha,
| | 02:05 | somebody's applied for an account and
it gives me a handy little link here that
| | 02:08 | goes directly to that person's account.
| | 02:10 | I click it and then as I scroll down
I see that that person is now blocked.
| | 02:15 | I can also change other things, but
for the most part I'm just going to say
| | 02:18 | Active and then go down and
click Save. And we're done.
| | 02:23 | Now, if I go back to the anonymous
user's e-mail account, I'll switch over my
| | 02:27 | browser to do that, and take a look.
| | 02:30 | The first message that that person got
said that by the way you're going to
| | 02:33 | have to wait for
administrators to prove your account.
| | 02:37 | The second message that I got, said yup,
| | 02:40 | you've been approved and in order to get
onto the site you have to click on this link.
| | 02:45 | So I do so, and I go back to the site and
I'm told that I have to create my own password.
| | 02:52 | I'll click Log in to do so, and I'm
taken directly to my user account and I'll
| | 02:57 | enter a password here.
| | 02:58 | Incidentally, that password will be
drupal, all lowercase, so that those of you
| | 03:03 | who are using the exercise files
will be able to access this account.
| | 03:06 | Scroll to the bottom and Save.
| | 03:09 | Incidentally, you'll notice that I
do have an option to upload a picture,
| | 03:12 | because that was in the configuration
settings for the account earlier on, as
| | 03:16 | you saw the last video.
| | 03:18 | But we'll just click Save and Oily
Sam is now a member of the site with the
| | 03:21 | password that he chose.
| | 03:23 | You might have noticed that Oily Sam couldn't
have set his original password at the beginning.
| | 03:28 | That's because of a setting that
we made in account settings as the
| | 03:31 | administrator in the last video.
| | 03:33 | If we go back, I'll show you that.
| | 03:35 | Go up, click Configuration and Account
settings, and scroll down this Require
| | 03:40 | e-mail verification is what prevents
people from naming their own password.
| | 03:45 | Instead, it sends the password to
that e-mail address and that's how it
| | 03:49 | verifies the account.
| | 03:51 | So that's the first method. Don't worry.
| | 03:53 | The other two methods are
actually quite a bit simpler.
| | 03:55 | First, let's go back and delete Oily Sam.
| | 03:58 | To do that I go up to People as the
administrator, check Oily Sam's box, and
| | 04:03 | then cancel the selected
user accounts, and Update.
| | 04:07 | Here we have a choice about what to do with
the account. Do we just want to disable it,
| | 04:11 | that is, block it, or do we actually
want to delete the entire account?
| | 04:15 | And what do we want to happen to
content that that person created?
| | 04:18 | Well, there is no content.
| | 04:20 | We're just going to delete the
account and I'm just going to say Cancel.
| | 04:23 | Again, you can have that person give
their confirmation that they really want to
| | 04:27 | cancel if you want, but we'll
just say Cancel and it's done.
| | 04:31 | Now, let's go through with the second way.
| | 04:33 | To change it, we go up to Configuration
and Account settings. Scroll down a bit
| | 04:38 | and make it so that
visitors can sign themselves up.
| | 04:41 | Scroll down to the
bottom and Save configuration.
| | 04:44 | Now I'll go back to the site.
| | 04:46 | You'll notice, however, if I try to move
around the site as Oily Sam, I can't do it.
| | 04:50 | If I try to edit that page, I've deleted that
account so once again we're an anonymous user.
| | 04:56 | So now I'll try creating an account in
the other way where visitors can do that.
| | 05:00 | I click Create new account.
| | 05:02 | Enter my username and email address.
Once again, Oily Sam, and my address.
| | 05:07 | Then I click Create new account.
| | 05:13 | Once again, I'm told that a welcome
message has been sent to my e-mail address.
| | 05:18 | So I go up to my e-mail
account and click Inbox. There it is.
| | 05:22 | Now you'll notice these are the
messages we got before when administrator
| | 05:25 | approval was required,
pending admin approval, and approved.
| | 05:29 | This one though, just says,
yup! You've registered.
| | 05:32 | All you have to do is click this link.
| | 05:33 | It says though that first e-mail never arrived.
| | 05:36 | Okay, so that's the second method.
| | 05:38 | Once again, we'll go back, we'll
find Oily Sam and we will delete him.
| | 05:47 | The final method only allows
administrators to set up accounts.
| | 05:50 | To do that I go up to Configuration and
Account settings one more time and then
| | 05:54 | Administrators only and Save configuration.
| | 05:59 | Now when I go back to the site, again
I'll go back, reload, and I'm once
| | 06:04 | again an anonymous user.
| | 06:06 | However, the link that said create
new account no longer exists here.
| | 06:10 | I can only do it as an administrator.
| | 06:12 | To do that it's fairly simple. I would
go to the People page and then click Add user,
| | 06:17 | fill out all the
information and Create new account.
| | 06:20 | I wish I could recommend one of these
three policies over the others, but I can't.
| | 06:25 | It all depends on the circumstance.
| | 06:27 | So this is a good time to ask yourself,
what are you setting up this site for
| | 06:31 | in the first place?
| | 06:32 | Is it to publish, or is
it to invite conversation?
| | 06:36 | Are you so to speak a
loudspeaker or a tape recorder?
| | 06:39 | As in life and looking at how we
interact with others, we confront our own purpose.
| | Collapse this transcript |
| Setting up user profiles| 00:00 | As you've been building your site,
you might have noticed several places where
| | 00:04 | username show up as clickable links.
| | 00:06 | Here I'll show you by going down the front page.
| | 00:10 | Here we have JoeBob and Maria Ann Vitalia.
| | 00:14 | Let's click JoeBob and see what we have.
| | 00:16 | That brings us to the user's profile
but it doesn't really tell us much.
| | 00:19 | It just says how long he has been a member.
| | 00:22 | If we click Edit, we'll see that
similarly there is not very much we can change.
| | 00:26 | It's just the username, address,
password, whether they are blocked, what their
| | 00:30 | roles are and there is a place for a
picture because we allow that setting
| | 00:33 | earlier in the course in the Account Settings.
| | 00:36 | I'll just go ahead and give him a little
photo and scroll to the bottom and save.
| | 00:42 | But you can do a lot more by
adding fields to these profiles.
| | 00:47 | Here is how you do it.
| | 00:48 | Go up to Configuration and then to
Account settings and then to MANAGE FIELDS.
| | 00:55 | This looks familiar, doesn't it?
| | 00:57 | If you've gone through this
course from the beginning it should.
| | 00:59 | It's the same interface as you saw
when adding fields to nodes in the section
| | 01:03 | on extending content.
| | 01:04 | I'll tell you a little more about that
after I add a few fields, but first I am
| | 01:09 | going to switch over to my
other browser and login as JoeBob.
| | 01:13 | The name is JoeBob and the password
once again in this course is drupal,
| | 01:17 | all lowercase, and Log in.
| | 01:20 | Now I can go and look at my own account,
there's the picture, and here I can edit it.
| | 01:25 | This will be good because we'll see
the changes as we make them on the
| | 01:28 | Administrator side, but I'll go
back to the Administrator screen and
| | 01:31 | start adding fields.
| | 01:33 | This one will be, What is your
preferred way to use olive oil for cooking?
| | 01:43 | The field will just be oil_for_cooking.
| | 01:48 | The field type will be a text list and
we'll make that Check boxes and Save.
| | 01:54 | For Allowed values I'll say Flavoring,
Nutrition, Texture and Flavor transfer.
| | 02:05 | Scroll to the bottom and Save.
| | 02:07 | I'll leave all of this alone.
| | 02:09 | You can go through it yourself, and as
usual when you add fields there are lot
| | 02:12 | of options, too many for us
to go through in this course.
| | 02:15 | One thing I will do is I'll allow
people to have unlimited values and Save.
| | 02:21 | Then just to be complete,
I'll add one more field.
| | 02:23 | How about Favorite use of olive oil?
| | 02:28 | favorite_use, and that'll
just be a freeform text field.
| | 02:34 | Save, save and save. Great!
| | 02:40 | Now we're ready to go back to JoeBob's
account and see what this actually looks like.
| | 02:44 | I'll switch over and reload the page.
| | 02:48 | Now when JoeBob edits his account,
he still has all of the things before,
| | 02:52 | including the picture, but then he has
two additional choices down here, which
| | 02:56 | are the ones that we provided.
| | 02:58 | I like it for Flavoring
and for a Massage and save.
| | 03:03 | That's pretty much all there is to it,
except I want to mention that people who
| | 03:07 | can view this account will
see all of this information.
| | 03:11 | Now earlier in the video, I pointed out
how adding fields to a profile is pretty
| | 03:15 | much the same as adding them to nodes.
| | 03:18 | That's because in Drupal 7 nodes and
fields are actually handled very similarly.
| | 03:23 | They are both something called
entities and the fields you add to one can be
| | 03:28 | added to the other as well.
| | 03:29 | And I'll show you how that works.
| | 03:30 | I go back to my Administrator account,
go to Structure and Content types, and
| | 03:39 | I am just going to manage
fields on the Product content type.
| | 03:41 | I am not actually going to add something.
| | 03:43 | I'll just show you.
| | 03:44 | Now when I go down to this Add existing
field and click this popup menu, as I
| | 03:50 | scroll down I see
Text: field_favorite_use.
| | 03:53 | That's a field that we actually created for
profiles but now we can also use it for nodes.
| | 03:58 | Very flexible!
| | 03:59 | If you want to see a list of all fields
and where they're being used, go to the
| | 04:03 | Report pages by clicking
on Reports and Field list.
| | 04:07 | There is one last thing we need to do
and I can demonstrate it by going back to
| | 04:12 | this account and logging out.
| | 04:14 | Now that I have logged out, I'll scroll
down the page and you'll notice that I
| | 04:19 | actually can't click on those links anymore.
| | 04:21 | I can't see JoeBob's account anymore.
| | 04:23 | If I want to allow anonymous users to do
that, I have to change the permissions.
| | 04:28 | So I'll go back into my Administrative
interface, click People and Permissions,
| | 04:33 | and then scroll all the way to the
bottom to the Users group, and then here is
| | 04:39 | where you change View user profiles.
| | 04:41 | There are several other permissions
also that you might want to consider.
| | 04:45 | I'll let authenticated users to look at
each other's profiles but I won't give
| | 04:48 | that permission to anonymous users,
then I Save permissions and we are done.
| | 04:53 | But even if you're the only person who
can view profiles, you'd be missing a big
| | 04:57 | opportunity by not adding fields here.
| | 05:00 | On our Olive Oil site, for example,
the fields we added let us do valuable
| | 05:05 | market research, all for free!
| | 05:07 | People like to talk about themselves.
| | 05:10 | The guidance you provide by crafting
relevant profile fields gives them a
| | 05:13 | context to do it in a way that
benefits them, other users, and you.
| | Collapse this transcript |
| Defining user roles| 00:00 | Although Drupal is known as a
content management system, it's also a
| | 00:04 | user management system.
| | 00:06 | One feature of that is roles,
which lets you impose complex security
| | 00:10 | controls with confidence.
| | 00:13 | A role simply categorizes users into groups,
you then grant permissions to these groups.
| | 00:18 | But first things first.
Let's talk about roles.
| | 00:21 | You get there by clicking People and
then the Permissions tab and then this
| | 00:26 | little button, Roles.
| | 00:28 | To start off with you don't have very much.
| | 00:29 | You have the Anonymous User, that is
someone who is not logged in, Authenticated
| | 00:33 | User, someone who is logged in, and
there's the Administrator role which we
| | 00:36 | discussed a little bit about in
the video about account settings.
| | 00:40 | I am going to just add one here and I
am going to call it content manager and
| | 00:44 | then click Add role.
| | 00:46 | That's really all you have to do.
| | 00:48 | However, now you can start to
rearrange them by dragging them up and down and
| | 00:52 | then once you've done that, Save order.
| | 00:54 | If you go back and edit any of these
roles you actually don't get very much.
| | 00:58 | It's just the name of the role, or
you could delete it by clicking Delete.
| | 01:02 | Similarly, by clicking Edit Permissions,
it takes you back to that Permissions
| | 01:06 | screen except it only shows you that one role.
| | 01:10 | Generally speaking, I find that less
useful than going to People and then
| | 01:14 | Permissions and seeing all of the roles,
because then I can compare one to the other.
| | 01:19 | But anyway, let's get back to our roles.
| | 01:22 | So now we have this extra
role. What does that give us?
| | 01:25 | Nothing, until it's applied to users.
| | 01:28 | So let's take a look at all of our users by
clicking List here. We're already on the People tab.
| | 01:35 | Let's say this site is been up for a
while and we've really gotten to know this
| | 01:38 | Polly Ann Saturated well
and gotten to trust her.
| | 01:41 | She's an active member of the site and
we want to make her our content manager.
| | 01:45 | There are two ways that you can do that,
one is by editing that person's profile,
| | 01:50 | like so, and adding the content manager
role and then clicking Save, or if I go back,
| | 01:55 | we can do it to multiple people
at once by clicking their boxes, going up
| | 01:59 | to Update Options, and
adding the role and click Update.
| | 02:03 | So you might ask, how does that
affect what you can do on the site?
| | 02:07 | Actually it doesn't at all, until you
start giving that role some permissions,
| | 02:11 | and you would do that, again,
under People and Permissions.
| | 02:16 | We'll talk about that more in the
video, Controlling access permissions.
| | 02:20 | Now once you do start granting such
permissions you'll be able to delegate just
| | 02:24 | about every task on your
site to trusted outside people.
| | 02:28 | That's important and I remember
what an instructor said to me once in a
| | 02:31 | class about nonprofit management.
She said, "Whatever someone else can do, don't you do."
| | 02:37 | Delegating lets you grow your site
beyond what you personally have the
| | 02:41 | skills and time for.
| | 02:42 | This system of roles is
Drupal's way of making that possible.
| | Collapse this transcript |
| Controlling access permissions| 00:00 | Managing user permissions in
Drupal is a two-step process.
| | 00:04 | In the last video, we went through the
first step by giving the users roles.
| | 00:09 | Now we'll perform the second step, which is
granting permissions to the role we created.
| | 00:14 | First let's just review what we have.
| | 00:16 | We go up to People and we see everybody
who is an authenticated user on this site.
| | 00:20 | In the last video we gave Polly Ann
Saturated this role, content manager.
| | 00:25 | I am going to go over to my
other browser and log in as her.
| | 00:29 | Username is Polly Ann Saturated and
the password, as for all users in this
| | 00:34 | course, is drupal, all lowercase, and log in.
| | 00:38 | We can see right away that there are
different permissions between Polly and the
| | 00:42 | administrator by just looking at the front page.
| | 00:45 | So let's go there as the administrator.
| | 00:47 | First, we have this feed over here,
which we added several videos ago.
| | 00:51 | We don't see that as Polly.
| | 00:52 | That suggests that actually she
doesn't have permission to see it.
| | 00:55 | There is no toolbar up here as there is
for the administrator and if you look in
| | 00:59 | the navigation area there are far more
choices over here, most of them, again,
| | 01:03 | relating to feeds, but still quite a
bit more available to the administrator.
| | 01:08 | So let's go in and add
some permissions to that role.
| | 01:11 | We go up and click People and then Permissions.
| | 01:15 | Now I know you've seen this screen
dozens of times throughout this course so far,
| | 01:19 | so I am not going to simply say, oh,
to add permissions you click the box
| | 01:22 | and then save them and you're done,
because you already know that.
| | 01:25 | I'm going to go into some detail as to
what exactly these permissions are and
| | 01:29 | how they separate from each.
| | 01:31 | On the other hand, there are dozens
and dozens and dozens of them, so I won't
| | 01:35 | have time to go into all of them, just
some of the more important ones for, in
| | 01:39 | this case, a content manager.
| | 01:41 | I'll also talk about how each role
interacts with the authenticated user and
| | 01:46 | the anonymous user. So let's go down.
| | 01:49 | The Aggregator is something
that brings together news feeds.
| | 01:52 | I think that's something I would
want to give to a content manager.
| | 01:55 | I'll let that person administer
news feeds and view news feeds.
| | 01:59 | But again, we want to make sure that
everybody can view those news feeds, so I
| | 02:03 | click authenticated user as well.
| | 02:05 | Now you all will notice when I
do that, it grays out these boxes.
| | 02:09 | That's because by definition
everybody who's not an anonymous user is an
| | 02:13 | authenticated user, including any other roles.
| | 02:16 | So it wouldn't make sense to say that
authenticated users can do something but
| | 02:19 | the content manager can't because the
content manager is an authenticated user.
| | 02:23 | And incidentally, if you have a
complicated series of check marks over here and
| | 02:27 | you add this, it remembers what they
are when you uncheck it again, which I think is very clever.
| | 02:32 | We'll let everybody see the news feeds.
| | 02:36 | Going down, I think I'll give the content
manager ability to do things with comments.
| | 02:40 | Administer them, delete them, and
so on, and also edit her own comments.
| | 02:45 | The most important part for somebody
handling content, however, is found in
| | 02:49 | this large Node group.
| | 02:51 | Every content type has multiple
listings for permissions in this Node group.
| | 02:56 | We'll scroll past the first group here,
which I'll come back to in a minute,
| | 02:59 | and we see Blog Entry.
| | 03:00 | Create new content, Edit own
content, Edit any content, five
| | 03:04 | different selections.
| | 03:05 | Same is true for Poll,
Forum topic, and so forth.
| | 03:08 | I'm going to give all of
those to the content manager.
| | 03:12 | That person can create content, edit it,
delete it, anything he or she wants.
| | 03:17 | And so that we don't waste your time I'll
just fast forward to the end of this process.
| | 03:21 | There, I just gave the content
manager permission to change nodes of
| | 03:25 | every content type.
| | 03:26 | I'll just look through here again
and see other things that I want the
| | 03:29 | authenticated users to be able to do.
| | 03:32 | Well, View published content.
| | 03:33 | Obviously, everyone should be able to do.
| | 03:35 | I do want to point out one up here.
| | 03:37 | It gives a warning, and you'll see this
several times throughout the permissions screen,
| | 03:41 | Give to trusted roles only.
This permission has security implications.
| | 03:46 | This warning is generally put on those
permissions that if granted would allow
| | 03:51 | somebody to basically take over the site, so
be especially careful before giving those away.
| | 03:57 | Continuing to scroll down, let's
see what else we might want to give to
| | 03:59 | the content manager.
| | 04:01 | Access the administrative overlay?
Sure, since they're an administrator.
| | 04:05 | Administer URL aliases, sure,
since that has to do with content.
| | 04:09 | I don't think I'll let them change
polls, but then this Search area,
| | 04:13 | this is very interesting.
| | 04:14 | We haven't even noticed that although
we have a search box on our site, nobody
| | 04:18 | has been able to use it up until now.
| | 04:21 | So I am going to say yes, we want
everybody to be able to use search.
| | 04:25 | Scrolling down a little bit further,
we might want to give the content
| | 04:29 | manager access to Taxonomy.
| | 04:31 | Although actually I'll
leave that alone as it is.
| | 04:33 | We do want to give access to the toolbar,
| | 04:35 | usually to anyone who's doing
administration, because it gives them easy access
| | 04:40 | to the commands that
they need. But don't worry.
| | 04:42 | It won't show any commands that they don't
have access to reach, as you'll see in a minute.
| | 04:46 | Scrolling down further, and I think were done.
| | 04:49 | Click Save permissions.
| | 04:50 | So now we have done three things.
| | 04:53 | We've set up that content manager role,
we've granted it to our user Polly Ann
| | 04:58 | Saturated, and we've given it permissions.
| | 05:01 | So let's see what things look
like now from her point of view.
| | 05:03 | I'll switch back to her account in my
other browser and reload the page. Ah!
| | 05:10 | You see several changes.
| | 05:11 | We have the toolbar up here, we have
the shortcut bar, which just says Add
| | 05:15 | Content because she can only do that,
she can't see all content, so the Find
| | 05:19 | Content button is gone, and
we can see the Feeds over here.
| | 05:24 | There are quite a few changes.
| | 05:25 | And if I were to give her additional
permissions they would show up in the toolbar.
| | 05:29 | Now as it turns out there is not much
there so we couldn't take it away but
| | 05:33 | let's leave it for now.
| | 05:35 | You know, I think I referred to this
video more than any other in the course,
| | 05:39 | because you'll find yourself constantly
adjusting permissions while setting up
| | 05:42 | a Drupal site and then again as you add
and remove functionality throughout its life.
| | 05:48 | I know that that Permissions
page is really a lot to take in.
| | 05:52 | But take heart. After a while you'll
really get to know it well and you'll
| | 05:56 | quickly feel confident with
Drupal systems of Permissions.
| | Collapse this transcript |
| Canceling user accounts| 00:00 | There is a joke about used cars.
| | 00:02 | It's important that they go, but
it's even more important that they stop.
| | 00:07 | On your site, too, there will be times
when you want to end user memberships or
| | 00:10 | let them end their own.
| | 00:12 | I'll show you how to do that by
deleting a user that we created earlier.
| | 00:15 | We're going to work on JoeBob, who you
might remember has a blog, so that means
| | 00:19 | he has posted nodes and
he has also posted comments.
| | 00:23 | We'll go through three procedures.
| | 00:25 | First, I'll show you how to delete him
from the administrator's point of view.
| | 00:29 | Second, I'll show you how to
let JoeBob delete his own account.
| | 00:32 | And third, I'll show you how to
change some behaviors around account
| | 00:36 | deletion generally.
| | 00:38 | To start with, I'll show you how to delete a
user from the administrator's point of view.
| | 00:41 | It's very easy.
| | 00:42 | You just go up to People, find the
user you want to delete, and then you can
| | 00:48 | either edit the account, or just from
here check this box and say Cancel the
| | 00:53 | selected user account and Update.
| | 00:56 | That brings you to a few options and I'm
going to just very quickly describe them now.
| | 01:01 | You have a choice of either disabling
his account or deleting his account.
| | 01:06 | By disabling it, there remains a
JoeBob user, but that person can't actually
| | 01:11 | access the site as an authenticated user.
| | 01:14 | When you delete an account,
it completely wipes it out from the system.
| | 01:18 | That means that somebody else
could then sign up as JoeBob.
| | 01:21 | The other thing these options take
care of is what happens to content that
| | 01:25 | JoeBob created and we'll go
through all of these options.
| | 01:28 | Finally, there is a check box at
the bottom, which would require e-mail
| | 01:31 | confirmation from JoeBob.
| | 01:33 | In other words, after you clicked
Cancel accounts, an e-mail would go out to
| | 01:37 | JoeBob and he would have to click a link to
say yes, I really do want to leave this site.
| | 01:41 | If you're kicking someone off,
obviously you don't want to require their confirmation.
| | 01:45 | I'm not actually going to delete it
here, so I'll just go back one screen.
| | 01:49 | Now, to show a few other things, I'm
going to switch over to my other browser
| | 01:53 | and I'm going to login as JoeBob.
| | 01:55 | I scroll down to User login, type
in his name, and the password, which
| | 02:00 | throughout this course is Drupal,
all lowercase, and click Log in.
| | 02:05 | Now I'll go up to My account and Edit.
| | 02:07 | Now, as we scroll down here, all the
way to the bottom, we see that we can save
| | 02:12 | our account, but there is
no Delete account button.
| | 02:16 | In order to let him do that, we have
to first grant that permission and you
| | 02:20 | learned all about that in the video
about controlling access permissions.
| | 02:23 | I'll just do it very quickly by
switching back to the administrator account,
| | 02:27 | going up to People and Permissions,
and then scroll all the way down to the
| | 02:31 | bottom to the User group.
| | 02:36 | In User, I'll let him cancel his own
account and then click Save permissions.
| | 02:42 | Now when I go back to JoeBob's account
and reload the page, I see there is that
| | 02:46 | Cancel account button.
| | 02:48 | It worked similarly to the one that
you already saw, but I'll go into the
| | 02:51 | difference in just a moment.
| | 02:53 | We reload the page and now we
see this Cancel account button.
| | 02:56 | Let's give it a try.
| | 02:57 | Click it and we're asked for a confirmation.
| | 03:01 | Now, we're not asked what should
happen with the content and we're not asked
| | 03:04 | whether an e-mail confirmation is
necessary, as we were when we were the
| | 03:07 | administrator. We just have a choice
of canceling or canceling the account.
| | 03:12 | Now, when you click Cancel,
I know it's kind of confusing,
| | 03:14 | that actually means stop this process.
| | 03:17 | Should he decide to click Cancel
account, the choice of what happens to all
| | 03:20 | of his content and whether he is
deleted or disabled will just be defined by
| | 03:25 | the default method.
| | 03:26 | So now I'll tell you how to
change that default method.
| | 03:29 | To do that, I go back to my Administrator
and click Configuration and Account settings.
| | 03:35 | We scroll down a little bit and we
have When canceling a user account.
| | 03:39 | When we change this,
that's what defines the default.
| | 03:42 | Again, if you don't let users
choose their own, as you can do through
| | 03:45 | permissions, then they'll get
whatever you give them here.
| | 03:49 | But enough messing around.
| | 03:51 | Let's actually cancel this account, so
you can see what happens to nodes and
| | 03:54 | comments that JoeBob created.
| | 03:57 | As we've seen, there are four options.
| | 03:59 | I'll just show the default one where we
disable the account and keep all of the content.
| | 04:03 | You could check out all the others easily
enough by playing around in the test site.
| | 04:07 | Just to keep this simple,
I'll do it as the Administrator.
| | 04:10 | I go up to People, select JoeBob,
cancel his account, and Update.
| | 04:17 | We'll leave it at the default. There.
| | 04:20 | Now you'll notice he still shows
up in the list, but he is blocked.
| | 04:24 | That's because the default
is to disable, not to delete.
| | 04:27 | But what about all that content?
| | 04:29 | Well, let's go up to
Content here and take a look.
| | 04:33 | I'll click Reset so we can see all nodes.
| | 04:35 | Then I'll search for the author, being JoeBob.
| | 04:38 | Oh, there is one of them.
| | 04:39 | Let's click on it and then click on
his user link here and see what we get.
| | 04:46 | It's still there, but that's because
his account is disabled, not deleted.
| | 04:50 | If we wanted, we could go
back in and make it active again.
| | 04:54 | Since we're already editing JoeBob's
account, all I have to do to cancel it is
| | 04:58 | click Cancel account.
| | 05:00 | This time I will actually delete it by
choosing this button and clicking Cancel account.
| | 05:06 | So now he is actually deleted.
| | 05:08 | If we go up to Content, we see that all of the
nodes that he created are gone. His blog is gone.
| | 05:15 | However, there is something interesting.
| | 05:16 | If we go up to Comments, we see that any
comments he posted show up still in the thread.
| | 05:23 | But as somebody who is not a user, it's
just an unverified JoeBob and you can't
| | 05:27 | click on his name in order to get to
his user page, because it doesn't exist.
| | 05:31 | I bet you didn't think account
cancellation would have so many subtleties, did you?
| | 05:35 | Neither did Drupal's designers
apparently, because this problem engaged them
| | 05:39 | for over eight years before they settled on
a way to let users cancel their own accounts.
| | 05:44 | No kidding, really.
| | 05:45 | If you go to drupal.org/node/8, that is
the eighth node on this site, which now
| | 05:51 | has almost a million nodes, you can see
that the conversation started way back
| | 05:55 | in 2001 and didn't finish until quite recently.
| | 06:00 | This discussion, however, I think
shows you the length to which Drupal's
| | 06:03 | developers will go in order to give
you functionality that's really useful
| | 06:06 | for your Drupal site.
| | Collapse this transcript |
|
|
11. Changing a Site's InterfaceUnderstanding Drupal page layout| 00:00 | Nothing in web development has changed
as much as the design options available,
| | 00:04 | but Drupal has kept up and now it's
fair to say that it can create just about
| | 00:09 | any page layout that HTML can.
| | 00:11 | After all Drupal is based in HTML and CSS.
| | 00:15 | However, Drupal has its own way of
doing things that makes some kinds of designs
| | 00:19 | easy and some really hard.
| | 00:21 | Knowing which is which will help you
to go with the flow or to force it to
| | 00:25 | create undrupally designs when you need to.
| | 00:28 | First let's cover a few things
about Drupal's design that you've
| | 00:31 | probably noticed already.
| | 00:33 | Like most content management
systems, it's extremely consistent.
| | 00:37 | As we go from page-to-page you see the
same header, you see the same sidebars,
| | 00:41 | for the most part, and it doesn't matter
if you go to something that's a page or
| | 00:44 | if you go to a user account.
Again, it stays mostly consistent.
| | 00:48 | Along those lines there are
different areas of the page.
| | 00:52 | We have the header as I mentioned and
the sidebars but there's also this footer
| | 00:55 | area that we haven't taken advantage of
yet and all of the main content shows up
| | 00:59 | in this middle area here.
| | 01:01 | The way that a Drupal site appears is
defined by its theme and you can see the
| | 01:06 | themes by going up to Appearance.
| | 01:08 | We talked a bit about themes in the
configuration videos earlier on in this course,
| | 01:11 | but I will just very
quickly go over them again.
| | 01:14 | The default theme that visitors see
in Drupal is called Bartik, and you can
| | 01:17 | change its colors and some of the
other settings as we've already done.
| | 01:21 | So instead of looking once again like that
screenshot we see here with the blue top,
| | 01:25 | it has that green top that we added earlier.
| | 01:28 | The Garland theme was the main theme in
Drupal 6 and they have carried it over to Drupal 7.
| | 01:32 | Let's change to it, just
to see what it looks like.
| | 01:34 | So we do that by clicking Set default,
closing out our overlay, and there it is.
| | 01:39 | I will change it back by
going back up to Appearance.
| | 01:42 | You've already seen the Seven themes
since that's what shows up in all the
| | 01:45 | administrative overlays and then we
have something called Stark, which I will
| | 01:48 | talk about a little bit more later.
| | 01:50 | Stark is there just so
that you can learn theming.
| | 01:53 | It's a very basic Drupal theme
with no actual styling added to it.
| | 01:57 | But we're going to switch back to
the Bartik theme, so we just go back up
| | 02:01 | and click Set default.
| | 02:02 | Close our window and we're back.
| | 02:05 | So those are the themes that come with
core Drupal, but there are dozens of free
| | 02:09 | ones available for download.
| | 02:11 | To get them, you go to drupal.org/
project/themes and you see it actually says
| | 02:17 | that there are hundreds of themes,
but these won't all work with Drupal 7.
| | 02:21 | In order to see which ones will, you
have to filter by compatibility and then
| | 02:25 | click Search. There.
| | 02:28 | Now I'm making this video before the
official launch of 7.0 and already there
| | 02:32 | are six dozen themes available.
| | 02:34 | By the time you see this video,
there should be many more.
| | 02:38 | You will learn more about these
contributed themes in the video "Selecting and
| | 02:41 | installing downloaded themes," but
besides these, you can also create your own
| | 02:45 | themes mostly by editing image and
CSS files. PHP is also helpful, but it's
| | 02:51 | often not necessary.
| | 02:52 | I'll show you where those files are
by going back to our Desktop and to our
| | 02:56 | Drupal installation.
| | 02:57 | We open it up here, go into the
sites folder, and then go to all.
| | 03:02 | In here is the themes folder and that's
where you'll put any contributed themes
| | 03:06 | or themes that you've created.
| | 03:08 | If you want to see the themes that
come with Drupal, we will go back up a
| | 03:11 | little bit, to the top level of Drupal's
installation ,and you see that there is a folder, themes.
| | 03:16 | I do want to warn you though, don't
change anything in that folder. If you are
| | 03:20 | going to make any changes, it
should all be in your sites folder.
| | 03:23 | We will talk more about theme design
later in this section of the course.
| | 03:28 | So that's a quick tour of themes, but
there's another part to Drupal layout that
| | 03:32 | lets you do a lot without ever
leaving the web-based interface.
| | 03:35 | It's called Blocks, and to
show it, I will go back to our
| | 03:37 | administrative interface.
| | 03:39 | To get there, you click
Structure and then Blocks.
| | 03:43 | We've already done a fair amount with
Blocks in this course. This page shows a
| | 03:47 | list of available blocks and the
regions you can put them in and you can see a
| | 03:51 | map of what they look like on the page
by clicking Demonstrate block regions.
| | 03:55 | You will learn more about blocks in the
videos "Taking advantage of block regions"
| | 03:59 | and "Creating new blocks."
| | 04:02 | So to review, the two main ways to
exercise control over Drupal's visual
| | 04:06 | interface is through themes, which you
get to through Appearance and Blocks,
| | 04:10 | which are under Structure.
| | 04:12 | You can do a lot with blocks without
ever leaving the web-based interface but
| | 04:16 | if you want to make some really fundamental
changes, you have to do that by creating themes.
| | 04:21 | We won't cover that entirely in this
course and if you want to learn more about
| | 04:24 | Drupal theming, the course to watch is
Drupal: Creating and Editing Custom Themes also on lynda.com.
| | 04:30 | But I will give you the basics of
theming just to get you started.
| | Collapse this transcript |
| Taking advantage of block regions| 00:00 | A Drupal page has traditionally been
sort of like a solar system with a main
| | 00:04 | content here as the sun and all
this other content circling around it.
| | 00:08 | Drupal 7 changed that in two ways.
| | 00:11 | First of all the sun turns out to be
just another planet and the system is a lot
| | 00:15 | more lively than before, with far more
planets on which the content can live.
| | 00:20 | These planets, which are actually
called blocks in Drupal, are also easier to
| | 00:24 | handle. This video shows you the way.
| | 00:26 | There are a few different
ways to administer blocks.
| | 00:29 | For one, you could hover your cursor
over them when you're the administrator and
| | 00:33 | then go to the block configuration page.
| | 00:35 | That will let you configure any
individual block, but if you want to configure
| | 00:39 | them all, the place to go
is Structure and Blocks.
| | 00:43 | The way this page is set up is it
lists regions here in bold, Header, Help
| | 00:48 | and so forth, and then in each of these
regions it says which blocks are in that region.
| | 00:53 | You can move blocks from one region
to another in three different ways.
| | 00:56 | For one, you can grab this little icon
here and drag it and after you do that,
| | 01:00 | you have to click Save at the bottom of
the screen to make it stick, or you can
| | 01:04 | use this pop-up. So I could just move
this up to the header by going to Header
| | 01:08 | and it does the same thing.
| | 01:09 | Finally you can click configure, either
here or through that menu on the front page,
| | 01:13 | and then change where it appears
through this pop-up menu here, save it, and
| | 01:18 | go back to your layout.
| | 01:20 | But this screen doesn't really give you a
visual representation of what the page is.
| | 01:24 | Until you get used to it, you don't
really know where the help section is and
| | 01:27 | the highlighted section and so forth.
| | 01:29 | To see that you click this
Demonstrate block regions link here.
| | 01:33 | That shows all of the regions as these
little yellow areas and when we scroll down,
| | 01:38 | we see there are quite a few.
| | 01:40 | In Bartik, which is the default theme
we are seeing here, there are 15 regions.
| | 01:45 | Now compare that with Garland, which
was the default theme for Drupal 6.
| | 01:48 | In that earlier version, it only had
five regions and now it's been brought over
| | 01:53 | to Drupal 7 and it still has fewer than Bartik.
| | 01:55 | We can see that by clicking on
Demonstrate block regions after switching to
| | 01:59 | the Garland tab up at the top, and once
again we click here to get back to where we were.
| | 02:04 | Incidentally, I'm glad I'm showing you
around these tabs, because whenever you
| | 02:07 | make a change to the block layout,
it only affects the theme that you are on.
| | 02:13 | But let's go back to Bartik.
| | 02:14 | From this page, you might think that all
blocks are the same but they vary in two major ways.
| | 02:20 | First, blocks sometimes grow or shrink to
accommodate the contents of other blocks.
| | 02:25 | Second, each block region has its own
unique CSS definitions, so a block you
| | 02:30 | place in the Header region might not
look the same as one placed in the sidebar.
| | 02:34 | I'll show you that by moving blocks
around. Dirst let's go back and take a look
| | 02:38 | at what our site looks like right now.
| | 02:40 | We have this one block over here in the
right column. I am going to take it out
| | 02:45 | and you will see how the main area
actually expands to take up that space.
| | 02:49 | So I take it from Sidebar second up to
None, and then go down and Save block,
| | 02:54 | and you see it's expanded.
| | 02:56 | Now let's take that same block and we
are going to move it around the page so
| | 02:59 | you can see how its style changes.
| | 03:02 | Since it's not on the page,
there's no little icon here to click.
| | 03:04 | I will go up to Structure and Blocks and
then scroll down to the bottom so I can find it.
| | 03:09 | I believe it was News from Olive Oil Times.
| | 03:12 | I move that back into the right-hand column,
which is called Sidebar second. Go down and Save.
| | 03:17 | When I close that window, it's a
different block but close enough.
| | 03:22 | Let's move that to a different area.
| | 03:23 | I will first move it up to the Header and Save.
| | 03:29 | And as you see, its whole style changed.
| | 03:31 | Move it again, this time I'll bring
it all the way down to the bottom,
| | 03:36 | the Footer first column.
| | 03:39 | Save the block, see what it looks like.
Very, very different. You know what?
| | 03:45 | I am going to remove it from the page
entirely by going up to None, scroll down
| | 03:49 | and Save block, and we are back.
| | 03:53 | Now I mentioned this thing about
these regions growing and shrinking.
| | 03:56 | It all depends on how the theme was
programmed and actually this is the only
| | 04:00 | place it happens in Bartik, in the two
columns in the main area, but in some
| | 04:04 | other themes such as those you
download from drupal.org, that change happens
| | 04:08 | all over the place.
| | 04:09 | Blocks grow and shrink all the time.
| | 04:11 | You notice it mostly in blocks
that sit side-by-side by the way.
| | 04:15 | Now that might make block region seem
unpredictable, but it's really not that bad.
| | 04:20 | The lesson is clear.
| | 04:21 | Don't just move blocks into a region blindly.
| | 04:24 | Thoroughly test your site after each
move and then again when they're all done
| | 04:27 | to see how they work together.
| | 04:29 | Because in reality, they're
not that unpredictable at all.
| | 04:32 | You just have to learn the
stylings of each block region.
| | 04:35 | Once you have that, you will be able to
move the blocks around faster and with
| | 04:38 | confidence that you know exactly how
they will look in their new places.
| | Collapse this transcript |
| Creating and modifying blocks| 00:00 | I talked about how to move blocks
around in the previous video about taking
| | 00:03 | advantage of block regions, but you
don't have to live with just the blocks
| | 00:07 | that Drupal gives you.
| | 00:09 | You can create your own and even change
the behavior of the ones that are built-in.
| | 00:13 | The result can be a site whose look
changes depending on which page you are on
| | 00:17 | or whether you're logged
in or a few other criteria.
| | 00:20 | First, I'll talk about how to
create blocks, then I'll show you how to
| | 00:23 | master their settings.
| | 00:25 | To take a look at blocks, we will go
up to Structure and then click Blocks.
| | 00:30 | Now this page shows mostly only
blocks that were created by modules.
| | 00:34 | As we scroll down, we see for example
this Search form is created by the search
| | 00:39 | module, which is part of core Drupal.
| | 00:41 | Navigation is part of the
menuing system and so forth.
| | 00:44 | As we scroll all the way to the
bottom, then we come to blocks that are
| | 00:47 | created because of modules.
| | 00:49 | For example, this one here, News from
Olive Oil Times, we brought in a feed
| | 00:53 | through the Aggregator module and
that module in turn created this block.
| | 00:57 | But let's go ahead and create
our own block with content that we
| | 01:01 | specifically put in it.
| | 01:02 | To do that, go up to the top of
the screen and click Add block.
| | 01:05 | I am going to make this a contact
block so it will be "Talk to a real person"
| | 01:11 | and then in the Block title, it will
say the same thing and then I will just
| | 01:14 | add a Block body, there.
| | 01:19 | We will scroll down to the bottom.
| | 01:21 | I am just going to put that
into the Sidebar first region.
| | 01:23 | We can do that here or on
that Block administration page.
| | 01:27 | I will tell you more about these
Visibility settings in just a minute.
| | 01:29 | For now, we'll just say Save block and take a
look at what that looks like. I don't see it.
| | 01:35 | Let's scroll down to the bottom.
| | 01:36 | Ah! There it is.
| | 01:37 | That's one thing about blocks. When
you add them they get put into the region
| | 01:41 | but not necessarily in the order you want.
| | 01:43 | To change the order, let's go
back to Structure and Blocks.
| | 01:47 | Back down to that first Sidebar.
| | 01:49 | I'll bring that up to the top right
below the Search form and as long as I am there,
| | 01:53 | I will move up the User login.
| | 01:55 | Scroll down more and then Save blocks again.
| | 01:58 | Let's see how that looks. Yup, much better!
| | 02:01 | Now there is one thing I haven't
talked about much in this course, which is
| | 02:04 | whenever you make a change like this
especially with blocks, it's a good idea to
| | 02:08 | take a look at it from the point of
view of somebody who's not logged in.
| | 02:12 | So I'll switch to another browser
and I'll reload the page and see what
| | 02:15 | the changes look like. Yeah, I like that.
| | 02:18 | One of the things that we change was to
move this User login block up, so now it
| | 02:22 | goes above the fold, so
to speak, on small screens.
| | 02:25 | Now I would like to go back and show you some
of the options you have for block placement.
| | 02:30 | To do that I go back to my
Administrative account and I can edit this block
| | 02:34 | simply by clicking on its widget
here and then clicking Configure block.
| | 02:37 | If we scroll back down to the bottom of
the screen, we come to those vertical tabs.
| | 02:41 | Now you know these from editing
nodes and this is very similar.
| | 02:45 | The first one lets us decide what
pages we want this to show on and we
| | 02:48 | can either have it show only on specific
pages or on all pages except specific pages.
| | 02:54 | In this case, I think I'll
only put it on the front page.
| | 02:57 | So for that, I add this sign,
front, and then the closing sign.
| | 03:01 | And incidentally the details on how
you build the selection criteria are here
| | 03:05 | underneath the field.
| | 03:07 | I will say Save block and there it
is on the front page. What happens?
| | 03:10 | Let me just make sure that it's
not there on any other page. Yup!
| | 03:14 | It's gone.
| | 03:15 | So it's now behaving the way we want.
| | 03:17 | I just want to quickly show you a few
other ways that you could change how it
| | 03:20 | appears by going back and editing the block.
| | 03:23 | Once again we are at the bottom of the
screen and you can decide what content
| | 03:26 | types that you should show next to.
| | 03:28 | Now we're talking about here is the
content type that shows in the main content area.
| | 03:33 | You could for example have this block
only show when it's next to a Product page.
| | 03:38 | That's something that you
commonly find on catalog sites.
| | 03:40 | You will have an order block next to
Product pages, but not on things that are
| | 03:44 | about our company because there
is really nothing to order there.
| | 03:48 | We could have it only show to certain
roles or let users themselves decide
| | 03:52 | whether or not it shows.
| | 03:54 | I just want to show you
how that works very quickly.
| | 03:56 | I'm going to say this is customizable
but that it shows until you tell it not to.
| | 04:01 | Then I click Save block and as expected,
it shows up because we haven't told it not to.
| | 04:05 | The way you would do that as an ordinary
user is by going up to My account and Edit.
| | 04:10 | And as you scroll down, you now
see this PERSONALIZE BLOCKS area.
| | 04:15 | In this area we will list all of
the blocks that have that turned on.
| | 04:20 | There is just one more thing I
want to mention about blocks.
| | 04:22 | At the beginning of this video,
I showed you that first screen, that block
| | 04:26 | administration screen, and said that all
of those blocks were created by modules.
| | 04:30 | There are some differences between
blocks that are created by modules and those
| | 04:33 | that you create yourself.
| | 04:35 | Most notably, the ones that you
create yourself have an extra field.
| | 04:38 | I will show that by going to
Structure and then down to Blocks.
| | 04:41 | Now here is the one we created.
| | 04:43 | We click Configure and we
could see this Block body.
| | 04:46 | That's what actually shows up in the block.
| | 04:48 | But if I go back and I take a look
at one of the ones that's created by a
| | 04:52 | module, let's say the Search form,
there is no block body because what's
| | 04:57 | actually being delivered as the
body is defined by the Search module.
| | 05:01 | There are some other differences and in
fact as you add more modules into your site,
| | 05:05 | you'll find that these blocks
often have additional configuration options
| | 05:10 | that you weren't expecting.
| | 05:11 | So it's a good idea to take a look
at all of the blocks that get added by
| | 05:14 | modules when you first add them.
| | 05:16 | Another great thing about blocks is
that after you create them, you can simply
| | 05:19 | disable them very easily.
| | 05:21 | Change it from whatever region therein to None.
| | 05:24 | So blocks give you lots of opportunity
to improve how you deliver information on
| | 05:28 | your site and the way they are setup
you can play around with them without
| | 05:31 | worrying about hurting anything.
| | 05:33 | So as you can see, blocks are
surprisingly flexible and you can configure them
| | 05:37 | for some really interesting applications.
| | Collapse this transcript |
| Selecting and installing downloaded themes| 00:00 | Up until now you've only seen three
different themes, all of them part of Drupal
| | 00:04 | 7's core download, but there are dozens
more available for free on Drupal.org.
| | 00:09 | This video will show you how to
download and install them as well as how to
| | 00:13 | decide which ones will fit your needs best.
| | 00:15 | The first place for us to go is drupal.org.
| | 00:19 | Once there, click Download &
Extend and then click Themes.
| | 00:23 | You can also go there directly by
simply typing drupal.org/project/themes in
| | 00:28 | your browser's address bar.
| | 00:30 | The first thing we need to do is make
sure we're looking for Drupal 7 themes,
| | 00:33 | Those that are designed for Drupal 6 or
any earlier version simply won't work.
| | 00:37 | So we Filter by compatibility as 7 and Search.
| | 00:41 | By default, these are sorted by most installed.
| | 00:44 | That is to say which are the most
popular, and we can scroll down through here
| | 00:47 | and see which ones they are.
| | 00:49 | The first batch or actually something called
Base Themes, which I'll get to in just a moment.
| | 00:53 | The one that I think that
we'll look at is called Danland.
| | 00:56 | It shows you a little bit of
information about it, but to get the download link
| | 00:59 | you have to either click the
title or click Find out more.
| | 01:02 | Then as you scroll down
further you see the Downloads area.
| | 01:07 | I could download this directly to my
Desktop by clicking this link but I am
| | 01:10 | going to show you a slightly easier way.
| | 01:12 | You right-click it if you have a
two-button mouse or Ctrl+Click with a
| | 01:15 | one-button mouse and then choose Copy
Link Location, then go back to your site.
| | 01:20 | You might remember from earlier
videos that to see Theme Settings, you go to
| | 01:24 | Appearance up here in the toolbar.
| | 01:26 | Currently we have the Bartik theme showing.
| | 01:29 | I am going to install a new theme by
clicking here on Install new theme. Then I
| | 01:33 | paste the URL that I just
copied and click Install.
| | 01:36 | It only takes a few seconds and then
you can go back to that Theme page by
| | 01:40 | clicking Enable newly added themes.
| | 01:43 | If we scroll down to the bottom
we see there's our theme, Danblog.
| | 01:47 | In order to make it actually
work we say Enable and set default.
| | 01:51 | That makes it replace Bartik as the main
theme that people see when they visit the site.
| | 01:55 | To prove that I'll go
back Home and there it is.
| | 01:58 | That was pretty easy, wasn't it?
| | 01:59 | Now that we have got this installed
we can explore it a little bit and you'll
| | 02:03 | see a few things that are
different from theme to theme.
| | 02:06 | First let's go up to
Appearance and click Settings.
| | 02:09 | You might remember that Bartik was re-
colorable and I can show that by clicking
| | 02:13 | on the Bartik button up here.
| | 02:15 | That was actually how we changed that
header graphic so that instead of going
| | 02:18 | from blue from blue it when from green to green.
| | 02:20 | Well, Danblog doesn't have that, but
some themes will have additional features
| | 02:24 | that you don't have in Bartik.
| | 02:26 | The other way that themes differ quite
a bit is in their block layout. To see
| | 02:30 | that, go up to Structure and then to Blocks.
| | 02:34 | Now one thing to watch out for. When
you see this Blocks page it only refers to
| | 02:39 | a specific theme and in this case
we're still looking at Bartik's theme.
| | 02:43 | In order to see how Blocks are
arranged on the Danblog page we have to click
| | 02:46 | Danblog and then we can scroll down,
and we see, for example, there's something
| | 02:50 | here Superfish menu.
| | 02:52 | It has an additional
region, which isn't in Bartik.
| | 02:55 | If we want to see all of the block
regions, as usual we would click up here on
| | 02:58 | Demonstrate block regions, and there it is.
| | 03:02 | To exit click Exit block region demonstration.
| | 03:06 | You can learn more about moving and
configuring blocks through other videos in this course.
| | 03:11 | So, we have our theme, but you might be
asking how did I decide which team to try?
| | 03:15 | There is a lot of jargon around themes so
here are a few tips and a bit of a glossary.
| | 03:21 | As I said before, when you choose a
theme it must be a version that matches your
| | 03:26 | version of Drupal, in this case Drupal 7.
| | 03:28 | It should also be a released
version if that's possible.
| | 03:32 | If I go back to that Themes page, and
again I'll just switch over to this tab
| | 03:35 | and go back to drupal.org/project/
themes, you see that some of them, as I
| | 03:42 | click on Zen for example, have
versions that are still in development.
| | 03:46 | Then there are some that are on a
yellow background, which means you could use
| | 03:49 | them although it's not necessarily the
preferred version, and then the green
| | 03:52 | area up here is the most preferred version.
| | 03:55 | In this case, 7 hasn't yet been
released so allegedly it's not stable.
| | 03:59 | The truth is, though,
| | 04:00 | some of the unstable versions are
pretty good, while some of the supposedly
| | 04:03 | stable ones aren't perfect.
| | 04:05 | If you hang around the Drupal
community long enough you'll find out which
| | 04:08 | ones really work, but without that
your best bet is to stick with those that
| | 04:12 | are in the green area.
| | 04:14 | When you're looking at themes don't
judge it based on the main graphic.
| | 04:18 | Many of these themes will have a
large graphic in the header but they won't
| | 04:21 | really have all the settings that you want.
| | 04:23 | It's easy to change a graphic.
| | 04:25 | It's not so easy to add settings.
| | 04:28 | Finally, look for features
that you couldn't create yourself.
| | 04:30 | Again, a graphic you can add but
could you add rounded corners or rollover
| | 04:34 | effects or things like that?
| | 04:36 | If not and you need them, choose
a theme that has those features.
| | 04:39 | And while we're on the subject, here's
a glossary that'll help you look through
| | 04:43 | those descriptions and
decide which one is right for you.
| | 04:46 | The first one is Fluid/Fixed and the
best way to demonstrate this is by going
| | 04:50 | back to our site and
switching our theme to Garland.
| | 04:54 | I'll do that by going to Appearance
and then clicking Set default next to
| | 04:58 | Garland and closing our window.
| | 05:01 | Here we see Garland and
you've seen this before.
| | 05:03 | It has certain settings that let you
choose whether it's Fixed or Fluid.
| | 05:07 | You can see the difference between
Fixed and Fluid by taking your browser
| | 05:11 | window and unlocking it from the edges of the
screen like so, and then drag the corner in and out.
| | 05:17 | This one is what's called a fluid
version of Garland and I can tell that because
| | 05:21 | this main area grows and shrinks as
I make the window smaller and larger.
| | 05:25 | In Garland's settings, which I can get
to through Appearance and Settings, this
| | 05:29 | one in particular
switches between Fluid and Fixed.
| | 05:32 | I'll change it to the Fixed version
just so that you could see the difference.
| | 05:36 | I close the window. Now when I
move this in and out you see that this
| | 05:39 | central area stays frozen.
| | 05:42 | I'll just make this window large
again and switch back to our Bartik theme
| | 05:47 | and close that out.
| | 05:49 | There, we are back as we were.
| | 05:51 | Continuing on with the glossary, some
themes are re-colorable, you've seen this
| | 05:55 | with Bartik, and also some have
more block regions than others.
| | 05:58 | Again, Bartik has 15 regions
whereas the old Garland only had five.
| | 06:03 | But what if you decide you want to
design your own theme or you want to
| | 06:06 | extend the theme somehow?
| | 06:08 | Well, there are some additional things
you can do besides just downloading the
| | 06:11 | theme and living with it.
| | 06:13 | First, if you want to design your own
it's a good idea to start out with a base theme,
| | 06:17 | and there are quite a few to choose from.
| | 06:19 | If we go back to drupal.org/project/
themes you can see that the first few, Zen
| | 06:26 | and Fusion in particular, are both base themes.
| | 06:29 | That is they don't have very much
styling themselves but they are setup so that
| | 06:32 | you can easily style them yourselves.
| | 06:35 | A sub-theme is when you take a base
theme and make your own theme from it.
| | 06:39 | It's a much larger topic and one that I
won't be getting into this course, but
| | 06:43 | you can find out more about it by
looking at Chris Charlton's course on
| | 06:46 | designing Drupal themes on lynda.com.
| | 06:48 | Then there are other modules such as
Skinr and Suckerfish that add certain
| | 06:52 | features to your theme.
| | 06:54 | The last thing I am going to do is
to get rid of the theme we downloaded.
| | 06:57 | That will keep both our
Appearance page and the sites folder clean.
| | 07:02 | To do that, I'll go to my Drupal
installation folder and then to sites, and then
| | 07:06 | if you look in all, you'll find a
themes folder. This is where themes were
| | 07:10 | installed by default.
| | 07:11 | Then I'll just get rid of it by
dragging it to the Recycle Bin.
| | 07:14 | Before you do this, make sure that
you've turned it off in your Drupal site of
| | 07:17 | course, as I did just a minute ago.
| | 07:20 | Now when I go back up to my site, I click on
Appearance and Danland is no longer there.
| | 07:26 | So you can see, it's really quite
easy to install themes on your own site.
| | 07:30 | So why not try out a whole bunch of them?
| | 07:32 | It only takes a few minutes
and you can always switch back.
| | Collapse this transcript |
| Building themes the traditional way| 00:00 | Now we're going to dip our toes into a
topic that everyone's eager to learn, but
| | 00:03 | that's incredibly complicated.
| | 00:05 | That is Drupal theme design.
| | 00:07 | At its fullest, it involves PHP and
JavaScript programming, CSS code, and
| | 00:13 | knowledge of Drupal's API or
Application Programming Interface.
| | 00:17 | This video can only barely scratch the surface.
| | 00:20 | I'll get you started by showing you how
to get set up to create a new theme and
| | 00:23 | then I'll show you some
resources to learn the rest.
| | 00:26 | We'll start with something called a base
theme and I'll demonstrate what that is
| | 00:30 | by going to Appearance.
| | 00:31 | Drupal 7 includes a base theme called Stark.
| | 00:34 | You see that down at the
bottom in the Disabled Themes.
| | 00:37 | I'll Enable it and set it as the
default, just so that you can see what it is
| | 00:40 | and you can see the changes that we make.
| | 00:42 | However, it's going to be very
different from the themes that you're used to.
| | 00:46 | it has no styling information whatsoever.
| | 00:48 | It's only a very basic theme that
you then add your own styling to.
| | 00:52 | So I click Enable and set default and
then close that window and there it is.
| | 00:59 | So what we're going to do now is
we're going to go back to our desktop and
| | 01:02 | duplicate that Stark theme
and make our own based on it.
| | 01:06 | We go to our Drupal installation,
which we've called 2trees, and then we open
| | 01:11 | up the themes folder.
| | 01:13 | Now remember, you should never change
anything outside of the sites folder in
| | 01:16 | your Drupal installation.
| | 01:18 | And we're not going to change anything here.
| | 01:20 | All I'm going to do is make a copy of
the Stark theme and put it here on my
| | 01:24 | Desktop, then I'll change its
name to the new theme's name.
| | 01:28 | I'm going to call it twotrees.
| | 01:33 | I'll then open that folder and
make a few important changes.
| | 01:36 | The first one is this .info file.
| | 01:40 | This file is formatted especially so
that Drupal can understand where all of the
| | 01:43 | files are that make up the theme.
| | 01:45 | And it has to have the same name
as the folder that encloses it.
| | 01:49 | So I'll call it twotrees, then I'll
go and Edit that file in a text editor.
| | 01:54 | Some of these lines were put in
automatically by Drupal.org and I'm going to get
| | 01:58 | rid of them, so they don't confuse anything.
| | 02:00 | The first one is this first line here.
| | 02:03 | I'll delete everything between the
dollar signs and then the ones at the very
| | 02:07 | end, these were added once again
by the drupal.org packaging script.
| | 02:11 | And you only need to keep this sort of
thing in or deal with it if you plan to
| | 02:15 | redistribute the theme, but for us,
we're not going to, so I'll delete it.
| | 02:19 | The other two things to change
are the name and the description.
| | 02:22 | For the name, I'll call it Two Trees and
the description I'll just say, "This is
| | 02:28 | based on stark," and save
it and close it out. Great!
| | 02:33 | We now have our theme it'll be exactly
the same as the Stark theme, but we can
| | 02:37 | start to edit it now without
affecting the earlier Stark theme.
| | 02:42 | To install it in our site, I'll do
that manually by going back to my sites
| | 02:46 | folder and then into all and themes,
and then I just drag the folder in there.
| | 02:52 | Now we go back to our site, go
to Appearance, and scroll down.
| | 02:58 | Way down at the bottom in Disabled Theme you
see our Two Trees and it has our description.
| | 03:03 | I'll say Enable and set default.
| | 03:05 | And as I say, when I remove the
administrative overlay, it will look exactly the
| | 03:09 | same as the stark theme, because the
only thing we've changed is the name, but
| | 03:13 | now we can start adding styling information.
| | 03:16 | To do that I go back to the theme itself.
| | 03:18 | Once again, that's in 2trees > sites >
all and themes, and then I can edit the
| | 03:24 | files that are inside that twotrees folder.
| | 03:27 | The first one I'll edit is
once again the info file.
| | 03:31 | Right now, it only refers to
one CSS file, this layout.css.
| | 03:35 | If I close out this window and take a
look at that one, we see it's really
| | 03:40 | very, very simple CSS.
| | 03:42 | It only contains enough
information to layout the page.
| | 03:47 | I'm going to add my styling information
to another file that's called local.css.
| | 03:52 | I have to tell the .info
file that it exists first.
| | 03:55 | So I edit it and right here next to
the stylesheet, I'll copy and paste and
| | 04:01 | add local.css and save.
| | 04:05 | Then I create a new file and add my CSS info.
| | 04:08 | I'm going to do some very, very simple
styling just so you can see the difference.
| | 04:15 | So finally, I'll save this file in
the same folder as local.css and Save.
| | 04:21 | Now we close the window and go back to our site.
| | 04:25 | I'll reload the theme cache by
visiting the Appearance page.
| | 04:28 | And now I'll go back to my front
page and see if the changes have taken.
| | 04:32 | And indeed they have.
| | 04:34 | There is the text, green as we expected ,in
the back in that CCC color as we expected.
| | 04:39 | As you can see, you'll need to know
CSS and that's a huge subject that I
| | 04:44 | won't talk about here.
| | 04:45 | Of course, lynda.com has several courses
that will guide you through its intricacies.
| | 04:49 | So check those out if you
don't already know CSS well.
| | 04:53 | So that takes care of the CSS part of a
Drupal theme, but there are many other parts.
| | 04:58 | You can see those by going back into
your Drupal folder and taking a look in the
| | 05:03 | themes folder at let's say the bartik theme.
| | 05:06 | In there, there are template files,
and color files, and many, many more CSS
| | 05:11 | files than you've seen here.
| | 05:14 | To edit the template files in
particular, you really do need to know the PHP
| | 05:18 | and Drupal standards.
| | 05:20 | For the first, there are lynda.com
courses and for the second the Drupal standards.
| | 05:25 | The best place to go is the
theming guide on Drupal.org.
| | 05:29 | You get there by going to Drupal.org,
clicking Documentation, and then scrolling
| | 05:35 | down to the Theming Guide.
| | 05:37 | Another place where you can find even
more about the PHP standards is in the API
| | 05:42 | as I mentioned before.
| | 05:44 | That's simply at api.drupal.org, but
once you're there, make sure you click on
| | 05:49 | the correct version, in this case Drupal 7.
| | 05:52 | Well, there is your overview, but
before we leave, I want to make sure that our
| | 05:55 | site is back the way it was.
| | 05:57 | So I'll go back to 2trees, go up to my
Appearance, and switch back to Bartik.
| | 06:04 | I'll also disable the Two Trees theme
and finally just to be completely safe
| | 06:10 | I'll go in and throw it
away from my sites' folder.
| | 06:16 | So I think you can see that Drupal theming is
much too big a subject to cover in a single video.
| | 06:20 | That's why I recommend very
highly Chris Charlton course, Drupal:
| | 06:24 | Creating and Editing Custom
Themes, which is also on lynda.com.
| | Collapse this transcript |
|
|
12. Helping Users Find Their Way AroundUnderstanding Drupal default menus| 00:00 | There are some things that have been
right in front of our faces this whole
| | 00:03 | course and yet we haven't mentioned them.
| | 00:05 | I am talking about the menus.
| | 00:07 | You will notice the main menu right here,
which we have been adding tabs to and
| | 00:10 | then we have this user menu up here.
| | 00:12 | I am not talking about these two bars
at the top, which are the toolbar and
| | 00:15 | shortcut bar, but rather the things
that are part of the main page that
| | 00:19 | everybody who visits the site sees.
| | 00:21 | When we added these links here, we
never really questioned how this Home link
| | 00:25 | got here or why these links
would appear in this menu.
| | 00:28 | When we switch to a user who is
not logged in, this menu disappears.
| | 00:32 | Let's talk about this a little bit.
| | 00:34 | There are three areas in
Drupal where you control menus.
| | 00:37 | The first one is a listing of all
menus on the site and I'll show you that
| | 00:40 | by going back to my administrative interface,
going up to Structure, and then clicking Menus.
| | 00:46 | These four menus, Main, Management,
Navigation and User, come with Drupal by default.
| | 00:52 | The group of tabs that we saw up here,
the one with the Home in i,t was the Main
| | 00:56 | menu, whereas the User menu is the one
that's up here in the right-hand corner.
| | 01:00 | I will come back to the Management
and Navigation menus in a minute.
| | 01:03 | The second place where Drupal lets
you control menus is in the blocks.
| | 01:07 | All menus, whether these four or
created by a module that you installed or
| | 01:11 | created by you personally, comes with a
block so that you can display that menu
| | 01:15 | in any block region on the page.
| | 01:17 | We can see that by going up to
Structure and then Blocks and as we scroll down
| | 01:22 | to the bottom of the page where the
Disabled blocks are, we see Main menu and
| | 01:26 | Management. The other two are actually
already on the page, Navigation and User
| | 01:30 | login, and you can see those
when we go back to the main page.
| | 01:34 | Just to demonstrate, I'm going to move
these two into the right-hand column.
| | 01:38 | Management to Sidebar second
and Main menu to Sidebar second.
| | 01:42 | Then I will scroll down to
the bottom and click Save.
| | 01:46 | And to demonstrate, I will close out
this overlay and there it is, Management and
| | 01:50 | Main menu right here, and then in the
left-hand column we see Navigation.
| | 01:54 | We don't see the User menu though.
However when we switch back to the person
| | 01:58 | who is not logged in, you don't see any of
those menus but you do see this User login block.
| | 02:03 | So like other blocks, these can be
conditional based on whether someone is
| | 02:06 | logged in or other criteria.
Let's go back and just remove those.
| | 02:10 | I'll go to Structure and Blocks, go
into that right-hand column and move them
| | 02:16 | back to None and Save.
| | 02:22 | If you need a refresher on how these
blocks work, see the video on taking
| | 02:25 | advantage of block regions.
| | 02:27 | So what about these Main menu and User menu
areas? Why do those show up in these locations?
| | 02:32 | Well that's a special setting in
Drupal and you can see it by going up to
| | 02:36 | Structure, Menus and Settings.
| | 02:40 | These right here are known as the
main links what we now have as the Main
| | 02:43 | menu, and the thing up here in the
corner where we have the User menu is known
| | 02:47 | as secondary links.
| | 02:48 | Drupal's designers set this up
because this is such a standard in web sites
| | 02:52 | today to have some place around the
top of the screen where you can go to the
| | 02:56 | main areas of the site and some
place where you can handle your account.
| | 03:00 | Since everybody is expecting them to
be there, they have this special screen
| | 03:03 | where you can additionally put those menus.
| | 03:06 | Now I'll show you how to
create a menu of your own.
| | 03:08 | As you can see, our site is built
around educating people about all olive oil,
| | 03:12 | and of course selling it.
| | 03:13 | I've added a few nodes of the product
type, which you can see if we go up here
| | 03:17 | to Content and filter based on type.
| | 03:21 | These are for our lemon,
basil, and garlic olive oil.
| | 03:23 | I am going to open each of these nodes
in their own tab by holding down Ctrl and
| | 03:28 | clicking on their links.
| | 03:31 | Reason for this is that I'm going to
create a menu which shows all of our
| | 03:34 | products in one place, and I want to
just have the URLs here handy so I can
| | 03:38 | copy them over quickly.
| | 03:39 | They are node/21, 22, 23, and
24. Well, that makes it easy.
| | 03:45 | Creating effective menus happens in three steps.
| | 03:48 | First, we make the menu, which is
really a container for links, then we add
| | 03:52 | the links themselves.
| | 03:53 | Finally we make it all visible by
moving the block it creates into place.
| | 03:57 | So first things first. Go to
Structure and menus and add the menu.
| | 04:01 | We will call this Products and Save.
| | 04:05 | Now we add the links.
| | 04:06 | The first one is for our Pure olive
oil, and that's node 21, easy enough.
| | 04:16 | And all we have to do is type node/21.
We don't actually need the full URL,
| | 04:20 | although we could put it in if we wanted.
These links can go off-site as well as
| | 04:24 | staying on your site.
| | 04:26 | And I will just save.
| | 04:27 | If you like you can look through the other
settings but this is the quickest way to add a menu.
| | 04:31 | Second one, lemon, which is 22, and then
I'll just quickly do the other two. Great!
| | 04:43 | So we now have a menu and
we have the links in it.
| | 04:45 | All we have to do now is make that visible.
| | 04:48 | You remember it shows up in a block.
So we go to Structure and Blocks and scroll
| | 04:52 | down to the bottom and
there we see our Products block.
| | 04:55 | I will move that into the left column.
You remember that's called Sidebar
| | 04:58 | first and Save blocks.
| | 05:02 | Go back to our screen, see how that looks.
| | 05:04 | Let's pull down a little bit. Ah!
| | 05:06 | These it is. You know what?
| | 05:07 | I am going to try adding it to a
different area. So I go up and edit the block
| | 05:11 | again, Configure block, and let's move that
into Triptych first just to see how it looks.
| | 05:17 | Remember, styles will change when you
move blocks from one region to another.
| | 05:21 | Scroll down, see how that looks.
| | 05:24 | I really like that.
| | 05:25 | So we are all done.
| | 05:26 | That covers the basics of menus but
they do have some subtleties and I'll get
| | 05:30 | into those in the next videos in this course.
| | Collapse this transcript |
| Creating multilevel menus| 00:00 | We cover the basics of menus in the video
about understanding Drupal's default menus.
| | 00:05 | This video goes into one of the
subtleties that isn't immediately obvious
| | 00:08 | from Drupal's interface, namely
multilevel menus or as they're sometimes
| | 00:12 | called hierarchical menus.
| | 00:15 | You already know what a hierarchical
menu is from the Navigation menu, which you
| | 00:18 | see in the left-hand column here.
| | 00:20 | See this little arrow next to Feed
aggregator? When we click that link it opens
| | 00:25 | up and shows another level below it.
| | 00:27 | That's what a multilevel menu is.
| | 00:29 | Now I'll demonstrate how to set up such a menu.
| | 00:32 | When we scroll down to the bottom
of the page you see a menu that we
| | 00:35 | created earlier, Products.
| | 00:37 | However, it's all at one level. To
change it I'll go up and I'll edit that menu
| | 00:41 | by clicking on its little
contextual menu link here.
| | 00:44 | Go down to List links and
we see all that we have.
| | 00:47 | Now we could make this menu multilevel by
simply dragging these things in and out.
| | 00:51 | That's the basic mechanism of it.
| | 00:53 | But that wouldn't make sense because
garlic olive oil isn't a subcategory
| | 00:57 | of basil olive oil.
| | 00:58 | What I will do instead is I'll
create a top-level link here, which will
| | 01:02 | be called edible oils.
| | 01:03 | The thing is, whenever you create a menu
link you have to have a place where it goes.
| | 01:07 | So first I'm going to create a page,
which lists all of our edible oils.
| | 01:11 | To do that I go up to
Add content and Basic page.
| | 01:15 | I already have the text in my exercise
files so I'll go and get that and copy it over.
| | 01:27 | If you're using the exercise files from
lynda.com by the way, you might have to
| | 01:30 | change some of these links if you've
added any other nodes that weren't shown in
| | 01:34 | this course, because the node numbers
will be different. But for us I know that
| | 01:38 | that's okay, and I want to have
this page of its own URL alias.
| | 01:42 | So I'll go down and do that,
under URL path settings.
| | 01:46 | You learned all about this in the section on
creating and editing content. Then I click Save.
| | 01:52 | Great! Now I have the page that I want.
| | 01:56 | The next thing to do is to
put it into the correct menu.
| | 01:59 | I know that the page is at edible-
oils, so all I have to do is add it to
| | 02:03 | that menu down here.
| | 02:04 | So I go down and choose List links,
then add a link. I'll call this Edible oils
| | 02:11 | and its path, and once again I say Save.
| | 02:14 | But before I do, notice this
Show as expanded check box.
| | 02:18 | We haven't talked about this yet
because it only comes into play when you're
| | 02:21 | doing multilevel menus.
| | 02:22 | I'll leave it off for now and then
I'll turn it on and you can see the
| | 02:25 | difference, but for now I just click Save.
| | 02:28 | Now I can rearrange my links as I want.
| | 02:30 | I'll put these all underneath Edible oils.
| | 02:36 | And I think I'll move the Pure
olive oil to the top and then I click
| | 02:39 | Save configuration.
| | 02:41 | Now let's see what that menu looks
like. Scroll down to it and there it is.
| | 02:45 | But the thing is we only see edible
oils. The reason is that Show as expanded
| | 02:50 | check box, which you remember we left unchecked.
| | 02:52 | I'll go back and edit that menu by
listing its links, edit that particular link
| | 02:57 | for edible oils, and this time Show as
expanded and Save. When we close it again,
| | 03:04 | we go down to the bottom
of the page and there it is.
| | 03:07 | Now in this case it's not really showing as a
hierarchical menu in the same way as it is up here.
| | 03:12 | That's because of the region that it's
in and remember when you move blocks
| | 03:15 | from one region to another
it changes their display.
| | 03:18 | Let's move it into that left-hand
column just to make sure it works the way we
| | 03:21 | expect. We go to Configure block,
move it into Sidebar first, and save it.
| | 03:28 | Now when we scroll down,
it looks the way that we expected.
| | 03:32 | But you can go even
further with hierarchical menus.
| | 03:35 | You can make it so that when you come
up here and point to that first link,
| | 03:38 | Edible oils, it shows
you all of the other links.
| | 03:40 | I'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:00 | Way earlier in the enabling other
content types section of this course,
| | 00:04 | we enabled blogs, polls, forums and feeds.
| | 00:07 | Each of those creates its own content
type and each delivers information in
| | 00:11 | its own unique way.
| | 00:13 | Now we are going to add one more called books.
| | 00:16 | Now the reason I didn't include this
one in the earlier batch is because
| | 00:18 | individual nodes of the book type are
really very similar to basic pages and articles.
| | 00:23 | The only difference is that they have
features that make it easier for visitors
| | 00:26 | to find their way around
from one node to another.
| | 00:29 | Books are navigational rather than functional.
| | 00:32 | The best way to understand them is
to take a look at a book and one place
| | 00:35 | to find them is on drupal.org, where much
of the documentation is actually in books.
| | 00:41 | We click Documentation and then go to
Understanding Drupal, which is a book on the site.
| | 00:46 | The first thing that you notice is that
there's a block over here, which lists
| | 00:50 | all of the chapters in the book.
| | 00:51 | Down here at the bottom, as you
click through, you see what's in that
| | 00:55 | particular chapter.
| | 00:56 | Now since we are at the top level of
this book, we see everything but if we
| | 00:59 | were to go into Drupal concepts, we
would only see the sections that are in
| | 01:03 | that Drupal concepts area, and you see that
I got here in the block on the right as well.
| | 01:07 | We also have some navigational tools
here, go to the previous chapter and the
| | 01:12 | next chapter, or we could add a child
page, that is, add another chapter that's
| | 01:17 | below this one, or we could show the
entire book in a printer friendly version.
| | 01:22 | Now I have been using the words
page and chapter interchangeably when I
| | 01:26 | talk about Drupal books.
| | 01:27 | And the best explanation for that is to
take another look at how books are set up.
| | 01:33 | This is another representation of
the book we were just looking at.
| | 01:37 | Understanding Drupal is the top level
but it's a page just like any other one.
| | 01:41 | Unlike a regular book which you would
see in real life which has a cover, which
| | 01:44 | is very different from a page, everything
in a book in Drupal is a page and it in
| | 01:50 | turn can contain other pages
or it could end right there.
| | 01:54 | Now let's get back to our own site
and start setting up our own book.
| | 01:57 | The first thing we need to do is to turn
on the book module by clicking Modules,
| | 02:02 | scrolling down to Book and enabling it,
and then clicking Save configuration.
| | 02:08 | That module makes two changes on your site.
| | 02:11 | The first is if you go up to Content,
you now notice a new tab called Books.
| | 02:16 | Right now we haven't created any books
so it's empty but we'll come back here
| | 02:19 | in just a few minutes.
| | 02:21 | The other change you will notice is if
we go up to Add content as with other
| | 02:24 | content types, we now have a
new content type called Book page.
| | 02:28 | I'll click that to start creating our book.
| | 02:30 | The titles for pages in our book
I already have in an exercise file.
| | 02:34 | And the first one is going
to be "How olive oil is made."
| | 02:37 | So I just add that there and I will
leave the body empty for all of these pages
| | 02:42 | just for brevity's sake.
| | 02:44 | As we scroll down, you see a new vertical
tab, Show Book outline. I'll click that.
| | 02:49 | That's how we control into which book
we are going to put a page and also where
| | 02:53 | in the book it's going to go.
| | 02:55 | Since this is the top level one, we
will say create a new book and then Save.
| | 02:58 | Now if we go back to Content, as you
might expect we have "How olive oil is made."
| | 03:04 | That's our first page of the book or you
could call it the cover. Let's keep going.
| | 03:08 | We will Add content > Book page, go
back to our exercise file and the first
| | 03:12 | level is going to be Harvesting and cleaning.
| | 03:14 | So I will paste that in.
| | 03:17 | Scroll to the bottom. Show Book outline.
| | 03:20 | Now in this case, I want it to be part
of the book I already created, so I select that
| | 03:24 | and once I do that I have a choice
of which one of the pages in that book
| | 03:28 | this should be a child of.
| | 03:30 | You could think of it as a chapter.
There is only one right now so it's going to
| | 03:34 | be inside that chapter. And click Save.
| | 03:36 | Since we have done that, we now
have a little bit of a hierarchy.
| | 03:40 | This is the second level down. If we
click up, we go back up to the top level
| | 03:44 | and see what's underneath it.
| | 03:46 | Now there are other ways of adding
pages into a book besides going to Add
| | 03:49 | content, Book page, and all that.
| | 03:51 | Once you're inside a book, you could
say Add child page and in fact that's
| | 03:55 | what I will do here.
| | 03:56 | I go back to my exercise file and I see,
oh yes, Releasing the oil is a child of
| | 04:01 | How olive oil is made, so I go back,
put that in, scroll to the bottom.
| | 04:05 | And if I want to be sure, I just click Show
Book outline and it's already set up, and then Save.
| | 04:10 | I will just very quickly add
the other pages in this book.
| | 04:13 | You have to see the rest of the process.
| | 04:16 | Now we are down to adding the last
page and since we have already added a few
| | 04:20 | others, I want to show you
what the book looks like.
| | 04:22 | So we have Bottling here.
| | 04:24 | That's going to be the last page, and we
show the book outline, you see that the
| | 04:27 | Parent item dropdown menu is much more complex.
| | 04:31 | In this case, we are going to make it
at the top level, so I'll leave it there
| | 04:34 | just below How olive oil is made, and save.
| | 04:37 | There, now we have our complete book.
| | 04:39 | Let's take a look at it by
going up to Content and Books.
| | 04:42 | In order to see the content of that
book, you click Edit order and titles.
| | 04:47 | And as I look through it I see that I
really want this one be over here, so I
| | 04:52 | can move it around just as in other screens
in Drupal by dragging things on this page.
| | 04:56 | And I also want Bottling to be at the
end, so that it's more in order. Great!
| | 05:00 | I'll then click Save book pages and we are done.
| | 05:04 | So we've completed our book, but we
don't have any way to see it really.
| | 05:08 | We could add a link up here in the menu,
but there's another way that we could
| | 05:11 | also see our book, which is that
the Book Module creates a block.
| | 05:15 | To see it, go up to Structure and
Blocks and then scroll down to your Disabled
| | 05:20 | blocks at the bottom.
| | 05:21 | There it is, Book navigation.
| | 05:23 | I am going to move that into the right-
hand column, which I know is Sidebar second.
| | 05:27 | Scroll to the bottom, Save blocks,
and let's see how that looks. There.
| | 05:31 | Now in order to move around the Book,
all we have to do is click on whatever
| | 05:34 | link we want, and as usual it's
multilevel and we could add child pages.
| | 05:40 | The last thing I want to make sure is
that everybody can actually access this page.
| | 05:43 | To do that I'm going to switch over to
my other user who isn't logged in yet
| | 05:47 | and reload the page.
| | 05:48 | Yup, and there it is.
| | 05:50 | However you'll notice that ordinary
users cannot add child pages since we
| | 05:54 | haven't given them that permission.
| | 05:55 | If you'd like to give them that
permission refer to the managing users
| | 05:58 | section of this course.
| | 05:59 | Now I'll be honest, I've
never been that hard on books.
| | 06:03 | I find their structure is a little
confusing because they're not completely
| | 06:06 | analogous to real-life books.
| | 06:07 | There is a tacit expectation that they
have to have content on every page for
| | 06:11 | example and visitors don't see
the whole book structure at once.
| | 06:15 | But books are good at two things.
| | 06:17 | First, they help you break down large
amounts of content into smaller pieces
| | 06:21 | that can be moved around it well.
| | 06:23 | Second, their navigational structure is
easier to set up then, for example, menus.
| | 06:28 | As long as you recognize their
limitations and strengths, books are a great way
| | 06:32 | for setting up certain
kinds of content structures.
| | Collapse this transcript |
|
|
13. Expanding a Site's Capabilities with ModulesInstalling and uninstalling modules| 00:00 | By this point in the course, we've
visited the Module page many times to turn on
| | 00:05 | and off some of Drupal's core features.
| | 00:07 | Once again, to do that, you go up to Modules.
| | 00:09 | You might have noticed a couple
of links at the top of this page.
| | 00:12 | First, this Install new module one,
and then this link here to contributed
| | 00:16 | modules to expand Drupal's functionality.
| | 00:18 | They are little links but they lead
to an enormous wealth of resources.
| | 00:22 | This video shows you how to
take advantage of that wealth.
| | 00:25 | I won't talk much about
configuring modules in this video.
| | 00:28 | Instead, that'll be in the next video,
which is titled configuring modules.
| | 00:32 | But for now let's go and take a
look at this contributed modules link.
| | 00:35 | I'll Ctrl+Click it to open it in
a new window, and there we are.
| | 00:39 | It takes us to drupal.org/project/modules.
| | 00:43 | You can also get there on the Drupal
site by going to Download & Extend and
| | 00:47 | then clicking Modules.
| | 00:48 | Now the first thing you should do anytime you
come to this page is to Filter by compatibility.
| | 00:53 | Since we're using Drupal 7, we
have to only look at Drupal 7 modules.
| | 00:57 | None of the others will work.
| | 00:58 | So we do that and say Search.
| | 01:00 | Now we scroll down.
| | 01:02 | In this case, they are sorted by
Most installed, so the most popular
| | 01:05 | modules float to the top.
| | 01:06 | The one I'm going to look at is Views,
and let's just take a quick look at
| | 01:09 | how it's listed here.
| | 01:10 | There is no place where you can
download views from this listing.
| | 01:14 | It just shows you the title, who
wrote it, and in fact if you click there,
| | 01:17 | you'll go to that person's user page
on Drupal.org, some tags, and a link to
| | 01:21 | bugs and feature requests.
| | 01:23 | To learn more about the module and to
download it, you can either click Find out more,
| | 01:27 | or go up to the top and
click the title of the module.
| | 01:31 | On this page, you get additional information.
| | 01:33 | First of all, you find out
everybody who is taking care of this module.
| | 01:37 | It's not listed in order of the most
commits-- and the one with the most commits
| | 01:40 | is usually the one who is the most involved.
| | 01:42 | To see all of them, just click View all
committers and then on that page you
| | 01:46 | can sort by number of commits.
| | 01:48 | We see, once again, merlinofchaos.
| | 01:50 | The person listed is the author is
also the one who has done the most commits,
| | 01:54 | and who made the first commit 5 years ago.
| | 01:57 | But let's get back to Views by clicking up here.
| | 02:01 | As we scroll down, we see a lot more
information and this is all free-form.
| | 02:04 | It's up to the person who created the module.
| | 02:07 | Sometimes it'll say dependencies.
| | 02:09 | That is, other modules you have to
download in order to make this one work.
| | 02:12 | Sometimes it'll say how you can get
involved, specific bugs to watch out for,
| | 02:16 | and things like that.
| | 02:17 | So we'll just scroll all the way down
to the bottom of the screen where we can
| | 02:20 | download the module itself.
| | 02:21 | Now remember, we need one that worked
with Drupal 7 and our only option here
| | 02:25 | is this dev version.
| | 02:26 | So I click on Download and that
brings it to my local computer.
| | 02:30 | I'll then switch to my download location,
which for me is on the Desktop. Yup!
| | 02:34 | There it is.
| | 02:35 | I'll close out that Download window.
| | 02:38 | Now we go back to our site and
then we click Install new module.
| | 02:42 | There are two ways of doing this.
| | 02:43 | One is by simply copying the
URL that you saw on that page.
| | 02:47 | But since I downloaded it, I'll click
Browse, then go to my download location,
| | 02:52 | find the file, and open it,
and finally, Install. Terrific!
| | 02:56 | It worked. And then to enable it, we go
back to our Modules page by clicking here.
| | 03:01 | Now, after you've started building a site,
you'll see that this page gets very, very busy.
| | 03:05 | One thing I like to do to make it
easier to find what's there is I close up
| | 03:09 | this CORE modules thing, since I know
it's not going to be installed there, and
| | 03:13 | there it is, Views.
| | 03:14 | However, now it's telling me it
requires another module, Ctools.
| | 03:18 | So I'll go back to Drupal.org,
search for it, and there it is.
| | 03:23 | I then go through the same procedure here.
| | 03:26 | Find the version I want, download it,
go back to my site, and install it.
| | 03:39 | Now when I go back to my administration
pages to enable the module, scroll down
| | 03:43 | and see if it's there.
| | 03:45 | Now I can click the box.
| | 03:47 | When I do so, it'll automatically
turn on whatever is needed in that other
| | 03:50 | module I downloaded called Chaos tools.
| | 03:53 | It gives me a warning
and I say sure, turn it on.
| | 03:55 | So, we've installed Views and the
other module that it requires and they're
| | 03:59 | both ready to be configured.
| | 04:01 | I'd like to back up a bit and talk
about something I sort of glossed over.
| | 04:04 | That is, how to decide which
modules to download in the first place.
| | 04:09 | Well, as I mentioned, they
must have a Drupal 7 version.
| | 04:12 | You can find that out by
going back to the Modules page at
| | 04:14 | drupal.org/project/modules.
| | 04:15 | Then once you're there, Filter by compatibility.
| | 04:22 | Then there are several ways of finding
modules that actually respond to your needs.
| | 04:27 | One way is by a simple search.
| | 04:28 | Let's say that I need
some sort of mapping module.
| | 04:30 | I might do a search for map and
indeed at the top is Map module.
| | 04:35 | There are several problems
with this approach however.
| | 04:37 | One is that the top result might not
be the best one for what you want to do.
| | 04:42 | Another is that by searching,
you're going to get a whole lot of results.
| | 04:46 | In this case, we got over 16,000 results.
| | 04:49 | The good news is that you can filter
it down further by clicking Modules.
| | 04:52 | Even so, we have over 200.
| | 04:55 | But then of course, you can filter even
further by the compatibility to Drupal 7.
| | 04:59 | If we go back to our Modules page
and once again we can do that in a few
| | 05:02 | different ways, one of them through
Download & Extend and then Modules, we see
| | 05:06 | that we have this Modules category dropdown.
| | 05:09 | As you can imagine, that's very
useful because we can select not only a
| | 05:12 | category, but also compatibility.
| | 05:14 | Let's see for example what sort of games
there are available for Drupal 7 already.
| | 05:18 | Hmm, only seven, still not bad.
| | 05:21 | Another way to find modules is
actually not on the Drupal.org site itself.
| | 05:26 | It's on a completely different
site called drupalmodules.com.
| | 05:29 | Here you'll find not only links to the
modules themselves, but also reviews and
| | 05:34 | ratings and things like that.
| | 05:36 | It's a place for people to go to talk
outside of official channels about which
| | 05:39 | modules are the best.
| | 05:41 | The final way to find out which
modules are best for you is to ask around.
| | 05:44 | For help with that, see the videos
on getting help with Drupal issues and
| | 05:48 | joining the Drupal community.
| | 05:49 | I also talk about some of the more
successful modules in the video on
| | 05:52 | surveying popular modules.
| | 05:54 | Now as you know, I like to clean up
things when I'm done with the video.
| | 05:57 | That's the last thing I'm going to
show you here, how to uninstall modules.
| | 06:01 | Usually, all you have to do is turn it off.
| | 06:03 | Again, you go to Modules, scroll down to the
modules you want to turn off, and uncheck them.
| | 06:08 | But here you'll see a complication.
Because this module has some dependencies,
| | 06:13 | you have to go through
the screen more than once.
| | 06:15 | So Save Configuration and then I do it
again, because by un-checking that one box,
| | 06:19 | I can now uncheck other boxes.
| | 06:22 | In this case, I have to do it three
times, because there are so many layers of
| | 06:25 | complexity, and once more.
| | 06:28 | I believe that un-checks
everything in both of those new modules.
| | 06:32 | Then to clean up the database,
check out the Uninstall tab.
| | 06:36 | Not every module uses the Uninstall
tab, but in this case I see that Views,
| | 06:41 | Views UI, and Chaos tools all do.
| | 06:44 | As before, you might have to go
through the screen more than once.
| | 06:47 | So I click on Uninstall, then uninstall Views.
| | 06:53 | Finally, I can uninstall Chaos tools.
| | 06:55 | The modules are now completely removed from
your site, but they're still in your folder.
| | 07:00 | So if you want to get rid of them
completely, just go into your folder by going
| | 07:03 | to sites/all/modules and
dragging them to the Trash.
| | 07:08 | If you're like me, you're going to
want to try out everything on that
| | 07:11 | Modules page on Drupal.org.
| | 07:13 | That's okay. How else
would you know what's useful?
| | 07:15 | Of course, you should do that
experimentation on a practice site, not one that's
| | 07:19 | live or that has important data.
| | 07:21 | But don't be afraid.
| | 07:23 | As long as you're safe, the worst that
can happen is that you lose a few minutes
| | 07:26 | while you delete and reinstall Drupal.
| | 07:28 | Finally, I should mention that you'll
have to update your modules from time to
| | 07:31 | time to keep them secure and bug free.
| | 07:33 | To learn how to do that, see
the video on updating Drupal.
| | Collapse this transcript |
| Configuring modules| 00:00 | After you have selected, installed,
and enabled a module, you are still not
| | 00:04 | completely clear to use it.
| | 00:06 | Some modules require configuration,
although the amount needed varies from none
| | 00:10 | at all to as much as a half-hour or more.
| | 00:13 | In this video, I'll show you a few
different configuration scenarios using the
| | 00:17 | following three modules:
| | 00:18 | Token, Pathauto and Views.
| | 00:21 | If you would like to follow along, you
will have to download and install those
| | 00:23 | modules yourself from the
URLs you see on your screen.
| | 00:26 | I've already downloaded them and enabled them.
| | 00:29 | If you need any help doing that,
see the video on finding and
| | 00:32 | installing modules.
| | 00:33 | We will start with the Token module.
To go to it, of course you click Modules,
| | 00:38 | and then we will close up CORE, so we can
see just the ones we added. And there it is.
| | 00:42 | We see this little Help next to it.
| | 00:44 | I click it and it tells us a
little bit more about the module itself.
| | 00:47 | Another place to get help is
to look at the module itself.
| | 00:51 | In our case, we will go into our
Drupal installation to sites/all/modules
| | 00:56 | and then into token.
| | 00:58 | What I'm looking for is a README file,
although there might be other such
| | 01:01 | as installation.txt.
| | 01:03 | That really doesn't give
us very much information.
| | 01:06 | So we will switch to another place
where we might find a little bit more
| | 01:09 | information about what this
module does and how to set it up.
| | 01:11 | I will open up a new tab and go to
drupal.org/project, to its project page,
| | 01:18 | which I happen to know is at token.
| | 01:21 | As I scroll down here, oh, good there's
a documentation page, and that gives me
| | 01:26 | actually quite a bit more information.
| | 01:28 | After hacking our way through this,
I found out the Token actually doesn't
| | 01:31 | require any configuration at all.
| | 01:33 | It's just ready to use.
| | 01:34 | So that's the easiest case.
| | 01:37 | Now let's get a little bit more
complex with the Pathauto module.
| | 01:40 | I have already installed and enabled it,
as you can see under Modules and then
| | 01:44 | scrolling down to the
bottom where we see Pathauto.
| | 01:47 | As before there's a Help page.
| | 01:49 | Let's see what that gives us.
| | 01:50 | It gives us a little bit of
information but not very much.
| | 01:52 | So let's take another look at the project page.
| | 01:55 | That's drupal.org/project/pathauto.
| | 02:00 | And here again, we have a
little bit more documentation.
| | 02:03 | Let's go back to our site and
see if we can't get some more help.
| | 02:05 | I am going back to the Modules
page and scrolling down. Ah!
| | 02:10 | I noticed that next to
Pathauto there is a Configure link.
| | 02:13 | So I click that and that actually takes
me to all of the configuration options
| | 02:17 | that I have available,
and there are quite a few.
| | 02:20 | But at least we can reach them easily and
now we know exactly what we have to change.
| | 02:25 | Finally, I'm going to attack the Views
module. This is Drupal 7's most popular
| | 02:29 | downloadable module and a whole
ecosystem of other modules is grown up around it.
| | 02:34 | I will talk a lot more about it in the
section on displaying information with views.
| | 02:38 | Despite being such an amazing module,
it's fairly complicated to set up and the
| | 02:42 | help info is among the
hardest to access of any module I know.
| | 02:45 | We will start once again by
going to the Modules page.
| | 02:48 | I will scroll down and see if there
is anything down here that'll help me.
| | 02:52 | Nope, no help links at all.
| | 02:53 | Okay, let's try the project page.
| | 02:56 | I will just go back to drupal.org/project
/views and as I scroll down, let's see.
| | 03:03 | Is there a documentation? Yup!
| | 03:04 | There's a documentation page. Ooo!
| | 03:06 | It's an awful lot of stuff and it
starts out with this ARCHIVE, which suggests
| | 03:10 | to me that it's not going to be
current and in fact if I look down here,
| | 03:13 | it's not good for Drupal 7.
| | 03:15 | So that's not very much help.
| | 03:16 | So once again, we can take
a look at the README file.
| | 03:19 | I go back to my installation, open it
up, go to sites/all/modules and views,
| | 03:28 | and indeed there is a README file but that's it.
| | 03:31 | It really doesn't tell me very much.
| | 03:33 | So I will close it out.
| | 03:34 | There is one last resource I can show you.
| | 03:36 | It's a page that's kind of hidden in
Drupal 7 but it's sometimes a lot of help.
| | 03:40 | It lists the configuration pages by module.
| | 03:43 | And to go to it, let's go back to our
site then scroll up to the top of the
| | 03:47 | screen and click Administration here in
the breadcrumb trail. Then click Index.
| | 03:52 | Let's see if we have anything here for views.
| | 03:54 | I am actually going to search for views. Nope!
| | 03:57 | We can only configure the permissions.
| | 03:59 | Well, I told you it was hard.
| | 04:00 | As it turns out, after you slash your
way through all of the documentation
| | 04:04 | on the drupal.org web site, Views and
Settings are in Structure and there they are.
| | 04:09 | By the way, when I run up against a
wall like this, the two places I usually
| | 04:12 | check are in Structure and Configuration.
| | 04:15 | That's sort of the catch-all places for
configuration for modules that you add to Drupal.
| | 04:19 | As you can see, there is no standard
way to configure modules and few standards
| | 04:23 | about where to learn how.
| | 04:25 | I didn't even show you
the most complicated ones.
| | 04:27 | You will see one that's particularly
tough in the video on enabling styled text
| | 04:30 | with the WYSIWYG editor.
| | 04:32 | But honestly, even the hardest ones,
they are not so bad. Except for programming
| | 04:36 | related modules, which require
custom code in which I never touch,
| | 04:40 | it's rare that I have to spend more than
10 or 15 minutes with a module. By then,
| | 04:44 | I have a good sense of what it
is and how I can get it running.
| | Collapse this transcript |
| Surveying popular modules| 00:00 | Now that you know how to install
and configure modules downloaded from
| | 00:03 | Drupal.org, you might be
wondering what some of them do.
| | 00:06 | Obviously, it's impossible to run
through the thousands available on Drupal.org,
| | 00:11 | including the hundreds available for Drupal 7.
| | 00:13 | But here are the very top ones.
| | 00:16 | Once again, the Modules page is
at drupal.org/projects/modules.
| | 00:20 | And when you go there, you'll notice that
by default they are sorted by popularity.
| | 00:25 | CCK, Views, Token, and so on.
| | 00:28 | These are the most popular modules.
| | 00:30 | Here in fact is a list of the top ten.
The order might be slightly different by
| | 00:34 | the time you're seeing this and in fact
I noticed a change since I first wrote
| | 00:37 | this slide, but basically it stays the same.
| | 00:40 | Now this is the popularity for all
versions of Drupal, and of course, most
| | 00:43 | people are still using Drupal 6 at
the time that I am making this movie.
| | 00:47 | I expect that to change however
because many of these modules were actually
| | 00:51 | incorporated into Drupal 7.
| | 00:53 | The Content Construction Kit
became the Field System, and then all of
| | 00:56 | those other things,
| | 00:57 | File Field, ImageAPI and so forth,
became part of the image system.
| | 01:01 | So that leaves the other five.
| | 01:03 | I won't talk much about views in
this video because I go into it at much
| | 01:06 | greater depth in a few videos
later in this course in the displaying
| | 01:09 | information with View section.
| | 01:11 | That brings us to the Token module,
which actually works well together with
| | 01:14 | the Pathauto module.
| | 01:15 | So I will demonstrate both of those together.
| | 01:17 | To do that, we will go back to our site and
click Add content and then just add a Basic page.
| | 01:23 | Now I want to mention that I've already
uploaded and enabled these modules but
| | 01:27 | incidentally you won't find
them in your exercise files.
| | 01:30 | That's because by the time you see
this video, they're going to have new
| | 01:33 | versions anyway, so there's not much
point in giving you obsolete software.
| | 01:37 | So if you want to follow along, just go
ahead and download them from drupal.org
| | 01:40 | at the URLs you saw earlier in this video.
| | 01:43 | Anyway, back here. We will create a
Title. We will say, This is a test.
| | 01:47 | It doesn't really matter what we put in
the body but as we go down here we see
| | 01:50 | Show URL path settings.
| | 01:52 | I click that and there is what Pathauto does.
| | 01:56 | We don't have to type in a URL alias to get
something other than node, slash whatever.
| | 02:00 | If I click Save here, you notice that
the node is already /content/test and
| | 02:06 | that's based on the title.
| | 02:07 | If I change the title to "This is a
test page which I love," scroll down and
| | 02:13 | save, indeed the URL changes.
| | 02:16 | So that's Pathauto.
| | 02:17 | But where does Token show up in this?
| | 02:19 | It shows up when you want to configure Pathauto.
| | 02:22 | I will get there the easy way by
clicking Edit on this node, scroll down again
| | 02:27 | to that tab, take a look there, and
then Ctrl+Click to open a window with
| | 02:31 | these URL alias patterns.
| | 02:34 | This is the configuration screen for Pathauto.
| | 02:37 | And you see this node:title.
| | 02:40 | That's what token does.
| | 02:42 | If you come down here to
REPLACEMENT PATTERNS you see all of the things
| | 02:45 | that token provides.
| | 02:47 | It lets you type in a simple little
bit of text and then replaces that with
| | 02:50 | what it actually means.
| | 02:52 | And there are quite a few other
modules that use Token besides Pathauto.
| | 02:55 | You can learn more about them on
Token's project page on drupal.org.
| | 02:59 | Let's move on to the next one,
| | 03:00 | the Administration menu.
| | 03:02 | To understand it, let's
look at Drupal's toolbar first.
| | 03:05 | I will scroll up and close this out
just to keep our screen clean and to
| | 03:08 | delete this node. Great.
| | 03:12 | The toolbar, as you know, gives you
links, which will take you to different
| | 03:15 | administration areas in your Drupal site.
| | 03:18 | But it's only at one level.
| | 03:19 | So you have to click Configuration
and then go down to Account settings and
| | 03:22 | possibly go two or three levels deeper.
| | 03:24 | What Administration menu does is it
replaces the toolbar with something that's
| | 03:28 | hierarchical and I'll show you how that works.
| | 03:30 | First, we go up to Modules and we turn it on.
| | 03:33 | The reason I didn't turn it on is
because it conflicts with the toolbar.
| | 03:37 | So first I'll turn the toolbar off,
just scrolling down and uncheck Toolbar,
| | 03:41 | then I scroll down further
and turn on Administration menu.
| | 03:45 | Scroll all the way down and Save configuration.
| | 03:50 | Now I'll close out my overlay here.
| | 03:53 | And now we see the Administration menu.
| | 03:56 | It's a lot smaller so it doesn't take
up as much space on your screen and as I
| | 04:00 | said before, it's hierarchical like this.
| | 04:03 | I will just go back and
change it back to the way it was.
| | 04:07 | Once again, I simply turned on Toolbar
and turn off the Administration menu,
| | 04:13 | Save configuration, and possibly redraw
the screen once or twice to make sure
| | 04:17 | that it takes and there we go.
| | 04:21 | Finally, we come to the Date module.
| | 04:24 | It makes your Drupal site
understand dates, which is actually a really
| | 04:27 | complicated thing because it has to
take into account leap years and daylight
| | 04:30 | savings time and multi-day events and regional
differences and format. Lots and lots of stuff.
| | 04:35 | It's most immediate and obvious
interface to you as an administrator is when you
| | 04:39 | add fields to a content type.
| | 04:41 | So to do that, I go up to Structure and
Content types and then I will add a temporary one.
| | 04:47 | I will just call it temporary and Save.
| | 04:52 | Go down and Manage fields.
| | 04:54 | I will add a new field
and we'll call it Birthday.
| | 04:59 | Then when I click on the type, we notice
we also have Date, Datestamp and Datetime.
| | 05:05 | I will just leave it on Date and we have
many different choices of how to show that date.
| | 05:10 | I will say with a custom pop-up
calendar. Move that up to the top and Save.
| | 05:16 | It gives us several options of
how to configure that as usual.
| | 05:20 | Save field settings. I will just
leave it on its defaults, good.
| | 05:24 | Now we have our new temporary
content type with that new field.
| | 05:27 | If I add content, go down to temporary
and there we see our date with a pop-up
| | 05:33 | calendar, very handy.
| | 05:35 | And as usual I'll go back and I will
delete that field and that content type by
| | 05:39 | going to Structure, Content types,
Manage fields and then delete Birthday.
| | 05:48 | Finally, I will delete the content type itself.
| | 05:53 | I know that was a whirlwind tour and
I wish I have the time to keep going
| | 05:56 | through some of these top modules
because a lot of them are really amazing.
| | 06:01 | Fortunately, the rest of the Drupal
community provides commentary on them, both
| | 06:04 | on drupal.org and on their
own individual web sites.
| | 06:09 | Here are a few places to check out if
you want to learn more about modules and
| | 06:13 | how to compare them.
| | Collapse this transcript |
| Enabling styled text with a WYSIWYG editor| 00:00 | Now that we know how to work with
modules, I'm going to show you how to install a
| | 00:03 | WYSIWYG editor that lets
you style text visually.
| | 00:07 | Now that word WYSIWYG is an acronym.
| | 00:09 | It describes what it does.
| | 00:11 | It stands for What You See Is What You Get.
| | 00:14 | This course is almost entirely about
Drupal as you get it from drupal.org
| | 00:17 | without adding any modules.
| | 00:19 | But I wanted to include a video
about this one for two reasons.
| | 00:23 | First, the lack of a WYSIWYG editor is a
huge shortcoming in Drupal that a lot of
| | 00:27 | site designers want to fix.
| | 00:29 | Second installing a WYSIWYG tool is
pretty complicated, so doing it gives me an
| | 00:33 | opportunity to help you get
used to installing complex tools.
| | 00:37 | I've already installed the
WYSIWYG module, which you can get at
| | 00:40 | drupal.org/project/wysiwyg.
| | 00:43 | If you need any help installing it
see the video on finding and installing
| | 00:47 | modules, but to turn it on we just go
up to Modules, close the CORE group and
| | 00:53 | there it is, a simple check
box, and Save configuration.
| | 00:57 | Once we've done that we see the
Configure link, which we'll click to go
| | 01:00 | its configuration page.
| | 01:02 | Now the WYSIWYG module doesn't
actually give your site WYSIWYG abilities,
| | 01:06 | Instead it connects Drupal to any of
several projects that do and you can see a
| | 01:11 | list of these as you go
down. There are quite a few.
| | 01:14 | There are lots of discussions on
drupal.org and elsewhere about which is the
| | 01:18 | best, but for simplicity's sake I'm just going
to go with the first one in the list, CKEditor.
| | 01:23 | I found it to be just fine for my purposes.
| | 01:26 | So to get it I'll open up links in two
tabs, first this one and this one, and I do
| | 01:31 | that by holding down the Ctrl key while I click.
| | 01:36 | One screen gives me more information
about the project generally and the other
| | 01:40 | one gives me a download link. I'll go
ahead and download it to my Desktop.
| | 01:47 | Once it's downloaded, go to your
download location. You'll have to
| | 01:51 | uncompress this file.
| | 01:52 | If you're on Windows and you don't
have 7-Zip or some other decompression
| | 01:55 | utility you'll need to get one.
| | 01:57 | See the video about using the exercise
files for a little more information about that.
| | 02:02 | Now that it's downloaded,
I'll double-click it and extract it.
| | 02:10 | So I have the CKEditor itself and I
have the WYSIWYG module loaded into my
| | 02:14 | Drupal site, but how do I put the two together?
| | 02:17 | For that I go back to my site and look
at the instructions on that page, so we
| | 02:21 | click there and it tells
us exactly where to put it.
| | 02:25 | It should be put in sites
/all/libraries/ckeditor.
| | 02:29 | So once again back to my installation,
go into sites/all. Oh, there is no folder
| | 02:36 | librarie.s I actually have to create that.
| | 02:41 | Libraries, and then I'll
drop this into libraries.
| | 02:47 | Go back and make sure that's what it told me.
| | 02:49 | So the actual library is found
at libraries/ckeditor/ckeditor.js.
| | 02:53 | Make sure one more time. sites/all/
libraries/ckeditor and there it is, terrific!
| | 03:03 | Now when I go back to my site and reload
the page, I actually have controls so I
| | 03:09 | can make that WYSIWYG
editor show up where I want.
| | 03:12 | However I could go on and
install other visual editors.
| | 03:15 | You'll notice that those earlier
instructions are under this link here, showing
| | 03:21 | that CKEditor is in fact
installed, but that the others aren't.
| | 03:24 | Back up to our controls.
We're ready to rock and roll.
| | 03:27 | I'm going to make it appear on
filtered HTML and then click Save.
| | 03:31 | So now when we've installed the
module and we've installed the CKEditor and
| | 03:36 | we've made it so the CKEditor
is applied to all filtered HTML.
| | 03:39 | The last thing we have to do is tell it
what commands to make available to all
| | 03:44 | people who have access to that text format.
| | 03:46 | So I go to Edit and down to Buttons and Plugins.
| | 03:49 | There is a huge number of buttons available.
| | 03:52 | I'm only going to say that I want
people to be able to bold and italicize text.
| | 03:57 | So I'll check those, go down to the
bottom and Save. Incidentally these other
| | 04:01 | settings are enormously complex, I'm afraid
I won't be able to go in to them in this video.
| | 04:06 | But you could of course explore
them on your own. Click Save.
| | 04:10 | So what does that actually give us?
Basically wherever someone has an
| | 04:13 | opportunity to enter content using
the filtered HTML format they now get a
| | 04:17 | toolbar, much like you see
in a word processing document.
| | 04:20 | I'll show you that by creating some content.
| | 04:22 | I go up to Add content and Article.
| | 04:27 | And since this is Filtered HTML, we see
our Bold and Italic tab. "This is great."
| | 04:34 | And if I select some text then say
Bold, there it is, just as we expect.
| | 04:37 | I'm going to remove this module before
continuing with the course but certainly
| | 04:41 | you could continue by making the
rich text appear in other text formats.
| | 04:45 | That brings me to a recommendation that you
limit use of the editor to specific roles.
| | 04:50 | Unfortunately the WYSIWYG module
doesn't have its own permissions. If you click
| | 04:54 | People and PERMISSIONS, you
won't find it anywhere on this page.
| | 04:59 | So the way to limit who uses this
rich text editor is to create a new text
| | 05:03 | format as you learned how to do in the
video on using text formats to prevent
| | 05:06 | damaging content. Then you limit
access to that text format to the roles that
| | 05:11 | you want to be able to use it.
| | Collapse this transcript |
|
|
14. Displaying Information with ViewsUnderstanding views| 00:00 | When I created lynda.com's Drupal 6
Essential Training course, the number one
| | 00:04 | thing people in the Drupal
community ask me was, did you cover Views?
| | 00:08 | You see Views is the
number one module out there.
| | 00:11 | Many Drupal sites simply
couldn't function without it.
| | 00:14 | And in fact, it's installed on about
two-thirds of all Drupal sites, according
| | 00:17 | to this statistics.
| | 00:18 | But Views is a huge subject.
| | 00:20 | So I split it off into a separate course,
Drupal 6: Online Presentation of Data,
| | 00:25 | and that's still current
in available on lynda.com.
| | 00:27 | Although, its title is Drupal 6,
you can still use it with Drupal 7.
| | 00:31 | With all this going on with Views, I
think it needs at least an introduction
| | 00:35 | here because chances are good
that you too will be using it.
| | 00:38 | This video gives you the conceptual
foundation to understand Views and then the
| | 00:42 | next to, we will show you the
basics of implementing them.
| | 00:45 | I have already installed Views, which
you can get at drupal.org/project/views.
| | 00:48 | I have also installed a module it
depends on which is called Chaos tools at
| | 00:54 | drupal.org/project/ctools.
| | 00:56 | Finally, I have installed an optional
supporting module called Advanced Help,
| | 01:00 | which is at drupal.org/project/advanced_help.
| | 01:05 | If you're having trouble installing
any of these modules, see the video on
| | 01:08 | finding and installing modules.
| | 01:10 | First we have to enable them.
| | 01:12 | To do so, go up to Modules and then
scroll to the bottom or more quickly just
| | 01:16 | close the Core group and go down to views.
| | 01:19 | You will need Views and Views UI.
| | 01:22 | You will also want to have Advanced Help.
| | 01:24 | Now, when I click Save Configuration
that's automatically going to turn on the
| | 01:27 | part of Chaos tools that I need.
| | 01:28 | So I save configuration, yup,
I will turn that on and Continue.
| | 01:32 | We are now ready to use Views.
| | 01:35 | To configure it go up to
Structure and then Views.
| | 01:39 | This page shows a number of views already
installed but they're all actually disabled.
| | 01:43 | These were created to show you some of
the examples of how Views can be used and
| | 01:47 | also to replace some of
Drupal's core functionality.
| | 01:50 | If you wanted to use any of these, for
example to change the front page, you
| | 01:54 | would click Enable over
here and then start editing it.
| | 01:57 | The advantage of using a view for the
front page or a taxonomy term or any other
| | 02:01 | thing like that is that you could then
modify it, which you couldn't do with the
| | 02:04 | default ones that come with Drupal Core.
| | 02:06 | Now, let me take a step back to
explain exactly what a view is.
| | 02:11 | In essence, it's a way of drawing
information from your Drupal site and then
| | 02:15 | displaying it in a way that you specify.
| | 02:17 | Consider a sample node.
| | 02:19 | This one looks a little bit like our
Product content type that we created
| | 02:22 | earlier in the course.
| | 02:24 | It contains certain fields but you
will notice that that last one, Author,
| | 02:28 | actually connects to a different
kind of entity, the user, so that author
| | 02:32 | implies a whole bunch of other
information, and in fact if you click through on
| | 02:36 | an Author link, you will get that information.
| | 02:39 | When you set up a view, you're able to
pull together a whole lot of different
| | 02:43 | information from all kinds of entities.
| | 02:45 | In this example here, I am pulling the
Author photo from that user entity and
| | 02:49 | then I pulled the Title
from the node entity itself.
| | 02:52 | I could then also count up the number
of comments and that's pulling from a
| | 02:55 | whole different part of Drupal.
| | 02:56 | So you can see that you can collect
information with views in interesting ways.
| | 03:00 | We've already seen some, let's call them
pseudo-views that are built into Drupal.
| | 03:06 | The most obvious example is on the front page.
| | 03:09 | Here we have a node and that's up at the
top that is sticky and then we have nodes of
| | 03:13 | different content types, this one is a
poll, this one is blog post and as we go
| | 03:17 | down there are articles and so forth.
| | 03:20 | When we click one of the blog links,
this is also kind of a pseudo-view.
| | 03:24 | As you added more blog posts,
| | 03:25 | This page would automatically show them.
| | 03:28 | The main features of views are that
first as I said, it dynamically collects
| | 03:32 | information from entities and
that word dynamically is important.
| | 03:36 | As that user Maria Ann added a blog post,
it would simply put that blog post on the page.
| | 03:41 | She wouldn't have to explicitly say oh,
by the way I put another blog post up.
| | 03:45 | The second feature of views is
that it sorts the information.
| | 03:48 | So on the front page for example,
it shows the most recent post first.
| | 03:52 | Again, the front page isn't actually a
view but it works very much like one.
| | 03:56 | The third feature of views is that it
displays whatever specific fields you want to show.
| | 04:02 | It doesn't have to show the entire node.
| | 04:03 | It could show just the title for example.
| | 04:06 | Fourth, Views can display that
information in a number of different formats.
| | 04:10 | So it could be collected on a page as
we have seen or could it be put in a
| | 04:13 | block or an RSS Feed.
| | 04:16 | By comparison, consider a page we
created a few videos back, where we collected
| | 04:20 | all of the edible oils into one page.
| | 04:23 | This is just an ordinary node and if we
click Edit, we see that we manually had
| | 04:28 | to type in what nodes these were in.
| | 04:30 | That's a real pain because we would
have to update this page every time our
| | 04:33 | fictional olive oil company added a new product.
| | 04:36 | What we'll do in the next two videos
is we are going to set up a view that
| | 04:39 | automatically updates this page along
with an associated block whenever we add
| | 04:44 | or remove a product.
| | Collapse this transcript |
| Creating views| 00:00 | You might remember that in an earlier
video we set up a page of links to all the
| | 00:04 | products that our
fictional olive oil company sells.
| | 00:07 | If you've been following along, it's at
/edible-oils or you could get there by
| | 00:12 | going down to this link
here and clicking Edible Oils.
| | 00:15 | The problem with this page is that
it's just a node and we have to update it
| | 00:19 | manually every time we add a product.
| | 00:22 | By the end of this video we'll have
set up a view that automatically displays
| | 00:25 | and updates this page.
| | 00:27 | But first we have to understand our data.
| | 00:29 | I'll go up to Content and then filter
so that we only see our products, and I
| | 00:35 | see that we have four of them already.
| | 00:36 | I'll click on one of them and then Edit,
just so we could see the structure.
| | 00:41 | Okay, so there's a Title,
there is an SKU and a Price.
| | 00:44 | Those are two custom fields we added.
| | 00:46 | Product description where the
body would usually go and a photo.
| | 00:49 | Okay, good, so we have an
idea what we're talking about.
| | 00:52 | Now let's create our view.
| | 00:54 | To do so, go up to Structure and then
down to Views and then Add new view.
| | 01:01 | We'll call this Products and the View
description doesn't really matter.
| | 01:04 | It's only in the administrative user interface.
| | 01:07 | I'll say "Products that we sell."
| | 01:10 | The View tag field is so that
you can categorize your views.
| | 01:13 | After you've been doing this for a
while and have dozens of use, that helps you
| | 01:16 | keep them clear and straight and organized.
| | 01:19 | We are going to be collecting
information from nodes so we'll leave it on Node.
| | 01:22 | That's usually what you'll have, and click Next.
| | 01:26 | Now we are at the place
where we can edit our view.
| | 01:28 | We are going to take this in three steps.
| | 01:30 | First, we'll filter things so we only
see the nodes we want. Then we'll decide
| | 01:35 | which Fields we want to display
and we'll display that as a list.
| | 01:39 | In this case, it will just
be the title from each node.
| | 01:41 | Then finally we'll change the Displays
up here to show both a page and a block
| | 01:46 | with that information. Are you ready?
| | 01:48 | Let's go.
| | 01:49 | First we filter, so we click Plus
next to Filters and go down here.
| | 01:55 | Now this is a huge list of things that
you have a choice of. So I am going to
| | 01:58 | make it a little bit smaller
by going only to the Node group.
| | 02:01 | Again, we won't be able to go into very many
details of views here, just the very basics.
| | 02:06 | The thing that we're looking for is
all nodes that are of a certain type,
| | 02:09 | that is, the Product type, and that
have been Published. Then we click Add.
| | 02:14 | Once we do that, we can change
some options with each of those.
| | 02:17 | We want it to be all those that, yes
have been published so Update, and it
| | 02:21 | should be of the Product type and Update.
| | 02:24 | So now we are selecting the right nodes
but we immediately get an error because
| | 02:28 | this display is asking us
what fields do we want to show.
| | 02:31 | Well, that's our second step.
| | 02:32 | Go up to Fields and Plus.
| | 02:35 | And again, I am going to show only
the Node group and I want us to show the
| | 02:40 | Title and click Add.
| | 02:45 | Once again, there are many options here.
The only thing that we are going to be
| | 02:49 | doing is making sure that it
Links to its node and click Update.
| | 02:53 | We are actually there already.
| | 02:54 | We have a list of all the products on our
site, as you can see down here in the preview.
| | 02:59 | The last part of this is to create Displays.
| | 03:02 | We want it to show in a page of its
own, and why not? We'll also have it
| | 03:05 | replaced the block that we created earlier.
| | 03:07 | To do that, we go back up here
and we start adding displays.
| | 03:11 | I am going to add a page, and then change
some of the settings that are specific to pages.
| | 03:16 | For one thing we need to know
what path it's going to go to.
| | 03:18 | So I'll say it should go to all-
products. Scroll down and Update.
| | 03:25 | Then I'll also add a block.
| | 03:27 | Add that display, and once again I am
going to give it the administrative name
| | 03:32 | "All products" and Update and Save.
| | 03:37 | And we are actually done now.
| | 03:39 | Let's take a look at those two, the
page that we created and also the view that
| | 03:43 | we created, and compare what they look like.
| | 03:45 | I am going to create a new window
here and go back to our site 2trees.
| | 03:51 | From there, I'll open up a tab with the page.
| | 03:54 | Now remember, this is a node.
We would have to update this ourselves.
| | 03:58 | Then I'll also go back and I'll
display the page that we created.
| | 04:02 | Once again, if we scroll
down we see, it's all-products.
| | 04:05 | Easy enough, 2trees/all-products.
| | 04:11 | So here's the page and here's the view.
| | 04:14 | Similar, but not quite there. I am
going to just touch it up a little bit.
| | 04:18 | First, I want to remove the word
title from here. Second I want up with the
| | 04:22 | phrase Our edible oils at the top.
| | 04:24 | Okay, so here we go.
| | 04:26 | We can edit that view either by going
back to the screen or we could close it
| | 04:30 | out and use the little
contextual menu we see here.
| | 04:33 | Click it and go to Edit view.
| | 04:36 | We'll change that title so the word
Title doesn't show up next to it and Update.
| | 04:42 | I am going to say Update default
display, which means that it will update not
| | 04:46 | only the page but also the block and
anything else that relies on the defaults
| | 04:50 | that we set up at first, and then click Save.
| | 04:54 | Almost there. The last thing is the title,
which is Our edible oils. Go back and edit it.
| | 05:01 | And I'll put on a header.
| | 05:02 | That's going to be a Text area, and
click Add and it will be Our edible oils.
| | 05:11 | Then I'll click Update default display and Save.
| | 05:18 | It's not quite there, but it's a lot
better and the most important thing is as
| | 05:23 | we add new products they will
simply show up in this list.
| | 05:27 | I can prove that by adding a product.
| | 05:29 | I'll go up to Add content and Product
and then I'll go to my exercise files
| | 05:34 | where I already have this
text selected. Here is my title.
| | 06:01 | And save it.
| | 06:02 | Now as we go back and take a look at
all of our products, our view shows five
| | 06:10 | items whereas our page, since of course it's
just a Node, only shows the four. Pretty cool, huh?
| | 06:17 | It should be immediately obvious, what
a boon this is for any data driven site.
| | 06:21 | And we didn't really do
much to create that view.
| | 06:23 | I'll show you some ways to enhance
it in the next video, "Modifying views."
| | Collapse this transcript |
| Modifying views| 00:00 | In the video on creating views, we set
up a view that displays a simple list of
| | 00:04 | all published nodes of the product type.
| | 00:07 | Basically, it's a catalog of
everything that our Olive Oil Company sells.
| | 00:10 | We've then established a page to display
the results and we put it at all-products.
| | 00:16 | This page mimics one that we created
manually earlier, which you see by clicking
| | 00:20 | Edible oils here. I'll
Ctrl+Click it so we can compare the two.
| | 00:24 | So here's our view and here's the
thing we're trying to get it to look like.
| | 00:27 | All right, let's go back and make a
few small modifications and then we will
| | 00:31 | actually bring it beyond that,
so it's even more functional.
| | 00:35 | In order to edit that view,
I will Ctrl+Click on Structure.
| | 00:39 | That way we can edit the view, come back and
look at it, and then compare it to our original.
| | 00:44 | Once you are on Structure, click Views.
| | 00:47 | And then next to the Products
view, click Edit. So, here we go.
| | 00:52 | The first thing that I noticed between
this, our original, and this, our view, is
| | 00:56 | the size of this header here.
| | 00:58 | So we go into the view, and the way
that I did that was with this header.
| | 01:03 | Actually in views it's
done with this Title link.
| | 01:06 | And the reason that I did this is to
show you that you really have to play with
| | 01:09 | views to understand the subtle differences.
| | 01:11 | There is no way that you could
understand that a header was different from a
| | 01:14 | title until you actually
went in and played with them.
| | 01:17 | Okay, no problem. I will go in and
I'll get rid of this global header by
| | 01:21 | removing it, then I will go up to title,
as long as I'm here, I will actually
| | 01:26 | change it to All our products and
Update and save it and then I'll reload over
| | 01:33 | here to see how that looks. Great!
| | 01:36 | The next thing I notice is that this
has done as a list, whereas this is just
| | 01:40 | simple text without any kind of bullet points.
| | 01:43 | That's easy enough to change.
| | 01:45 | You will find that in the Style Settings.
| | 01:47 | Right now, it's unformatted but
I will change it to HTML List and Update.
| | 01:52 | Leave all of these options as they are.
| | 01:55 | Update again and save.
| | 01:58 | Once again, I'll reload it. Great!
| | 02:01 | Now it looks pretty much the same
except of course our list here, shown as a
| | 02:05 | view, will continually update as we add products.
| | 02:07 | Well, let's talk about that
menu that we created down here.
| | 02:11 | You might remember that we manually
added each one of these things into a menu.
| | 02:16 | I'm going to go down now and delete that
entire menu by going to Edit menu and Delete.
| | 02:23 | Now when you do this, it warns you
that it's going to delete the links but
| | 02:26 | that's okay. We are going to
replace all of this with our view.
| | 02:29 | So I say Delete and indeed when we
close our administrative overlay we see
| | 02:34 | it's completely gone.
| | 02:35 | Now, those nodes are still there, all
of these as well as the main one, this
| | 02:39 | edible oils one we created to be our menu.
| | 02:41 | We can get rid of that later but for now
we can just close this whole thing out
| | 02:45 | and deal only with our view.
| | 02:48 | Now in a previous video, we
created a block that goes down in there.
| | 02:51 | The way we did that was simply saying,
change this to Block and Add display.
| | 02:56 | So to make it display, we will go up
to Structure, to Blocks, and then scroll
| | 03:02 | down and see where it is.
| | 03:03 | Blocks as usual start out in the
Disabled area and there it is, All products.
| | 03:08 | Change that to Sidebar first, which is the
same place the other one was and Save Blocks.
| | 03:14 | Let's see how that looks.
| | 03:15 | As we scroll down, there
it is and it looks pretty good.
| | 03:19 | You know, I don't even think we
have to make any changes there.
| | 03:22 | But I will make one change
that shows up on our page.
| | 03:25 | I am going to make it so the block
stays as it is, but the page displays
| | 03:29 | slightly differently and
gives us more information.
| | 03:32 | To do that, I go back to our view and this
time I'm going to override these defaults.
| | 03:37 | I do that by going to our page,
clicking on Fields and then say yes, I
| | 03:42 | actually want to Override.
| | 03:44 | This is going to make the page diverge
from any other displays we've set up.
| | 03:48 | We then say Update.
| | 03:49 | You will notice that it's overridden
because instead of being in italics, which
| | 03:53 | means it's the same as the default.
| | 03:55 | It's now just in ordinary type.
| | 03:57 | Now we can add another field and I'm
going to just add the price. Scroll down a
| | 04:01 | bit and you will find
that in Field price and Add.
| | 04:05 | And I will say Price as
its label. Update and save.
| | 04:13 | Now if we go back to our
page, let's take a look.
| | 04:15 | Looks good. We have our block
down here and our page, which has
| | 04:18 | additional information.
| | 04:19 | The last thing I'm going to do is I am
going to change the format of this page.
| | 04:24 | Go to Edit view Products. Go once again
to our page and override the style setting.
| | 04:30 | Instead of showing it as an HTML List,
I will override that, Update, and go back
| | 04:37 | up and turn it into a Table and Update.
| | 04:43 | We have several options, which I
will leave as they are, and Update.
| | 04:46 | Finally, we will save this entire thing.
| | 04:50 | Go back to our page and see how that looks. Oh!
| | 04:53 | I really like this.
| | 04:54 | We now have all of our products down here
in a block and that shows on every page.
| | 04:58 | If we go to the Contact Page, there it is,
and then if we go back Home, there it is,
| | 05:05 | but we also have that page, All products.
| | 05:08 | The last thing I'll do is I will go up and
edit the view and add a link to that page.
| | 05:13 | To do that, I go to the Page settings,
add a menu, it will be a Normal menu
| | 05:18 | entry, Our products, and I'll put that in
the Main menu and Update. Save and we are done.
| | 05:28 | You can see how much you can do
with views just from this little bit.
| | 05:32 | I know I just ran through a lot of
that very quickly, but I wanted you to get a
| | 05:36 | sense of what's possible with views
and I think you can see just how much is.
| | 05:40 | Besides the default styles some
contributed modules make it possible to create
| | 05:44 | charts and calendars and even maps using views.
| | 05:48 | And the best part is they stay in
sync with your content automatically.
| | 05:52 | You never have to maintain
redundant information like we did before.
| | 05:56 | If you want a lot more information about
views, check out my lynda.com course Drupal 6:
| | 06:01 | Online Presentation of Data.
| | 06:03 | Although it was created with an older
version of Drupal, nearly all of it is
| | 06:06 | still valid with only
very minor interface changes.
| | Collapse this transcript |
|
|
15. Administering DrupalLaunching a Drupal site| 00:00 | Now we get to one of the hardest things
in Drupal: actually launching the site.
| | 00:05 | Up until now, we've done all of
our development on local computers.
| | 00:08 | But now we have to move all this to a Web
server that's connected to the Internet.
| | 00:12 | Unfortunately, there are literally dozens, if
not hundreds of differences among Web hosts.
| | 00:17 | I'll just show you how to get online using
the most common basic system, an FTP program.
| | 00:22 | This might not work for you on a step-by
-step basis, but I'm hoping you'll get
| | 00:26 | some tips from it that you can use.
| | 00:28 | By necessity, I'll have to go through
some parts quickly and without much detail.
| | 00:32 | When you run into problems,
contact your web hosting provider.
| | 00:35 | They'll be able to explain the
quark specific to their system.
| | 00:38 | I've already set up a hosting environment on
webenabled.net, one of many hosting providers.
| | 00:44 | My address, as you can see here,
is 2trees.dev3.webenabled.net.
| | 00:50 | I'll connect to it using an SFTP program.
| | 00:53 | The one that I'll use here is
available for both Mac and Windows and
| | 00:56 | it's called FileZilla.
| | 00:57 | You can get it from filezilla-project.org.
| | 01:00 | I've already connected to
the site using FileZilla.
| | 01:05 | Now as you know, Drupal is a
combination of files and a database and then you
| | 01:10 | have to connect the two.
| | 01:11 | I'll move the files first.
| | 01:13 | But before we do that, we have to
keep in mind that the Acquia Drupal
| | 01:16 | Stack Installer we were using on
our local computer is set up for a
| | 01:19 | multi-site installation.
| | 01:21 | So we're going to have to change some
things because the host we're using is
| | 01:24 | going to expect only one site.
| | 01:26 | So the first thing I do is I go
back to my Drupal installations, which
| | 01:29 | I've called 2trees.
| | 01:31 | I open that up and then my sites folder.
| | 01:34 | In here, I see all, which is
where I store my modules and themes.
| | 01:38 | Those are things that go for all sites.
| | 01:40 | There is also a default folder, which we
haven't really used throughout this course.
| | 01:45 | Then there is 2trees, which is what the
Acquia Drupal Stack Installer knows to
| | 01:49 | look for, because our site is called 2trees.
| | 01:52 | However, this folder's name has to
be specific to where it's hosted.
| | 01:56 | So I'm going to change that.
| | 01:58 | In this case, it becomes
2trees.dev3.webenabled.net.
| | 02:04 | As you know, that's the domain that we're using.
| | 02:07 | We'll have to make further changes,
but for now, let's go back to our server.
| | 02:11 | When I logged in, it took us to this area,
which is the top level of our user account.
| | 02:16 | What we're looking for is the
place where web files are stored.
| | 02:19 | In this case, that's the
folder called public_html.
| | 02:23 | Again, this is going to vary from host to
host, but this is a common one, public_html.
| | 02:29 | I go inside it and I see this 2trees folder.
| | 02:32 | When I open it up, we see what we
actually get right now if we go to that site.
| | 02:37 | In fact, if I click that link, all that we
have is a simple page with the graphic on it.
| | 02:42 | I can prove that that's where
we're going by deleting this page.
| | 02:49 | Then let's revisit it and make sure
that we're actually in the right place.
| | 02:52 | Reload and indeed that change
what we see. So far so good.
| | 02:58 | Now we're ready to move over all of our files.
| | 03:01 | I'll go back to the Desktop and
this is the folder I'm going to move.
| | 03:04 | It's going to be my folder called
2trees replacing this folder called 2trees.
| | 03:09 | There are several ways of doing this.
| | 03:11 | In this case, what I'll do is I'll
delete this one and then I'll drag it in.
| | 03:16 | While that's uploading, and
it's going to take a long while,
| | 03:20 | let's move the database over.
| | 03:22 | Again, this is a step that
varies tremendously from host to host.
| | 03:25 | Fortunately, this host, WebEnabled,
offers the same graphical interface, PHP
| | 03:30 | Admin, as we've been using.
| | 03:31 | It works a little
differently though as you'll see.
| | 03:33 | In this case, we'll go back and
we'll login to phpMyAdmin right here.
| | 03:39 | That redirects us to another screen where
I enter my username and password and Go.
| | 03:45 | The biggest difference between this
phpMyAdmin screen and the one you're used to
| | 03:49 | is there is no Import tab.
| | 03:51 | We're going to have to create the
database first and then move over the one
| | 03:54 | that we have on our local computer.
| | 03:57 | So I'll do that and again I'll
call it 2trees and Create. Good!
| | 04:02 | So we've created it.
| | 04:03 | Now we just have to move over all
of the parts of our old database.
| | 04:07 | To make this clear, we
couldn't import a whole database.
| | 04:10 | Instead, we have to create the database,
and then into that database we can
| | 04:14 | import what we want.
| | 04:15 | So now there is an Import tab here.
| | 04:17 | I click it, then click Browse, and find
the file that I want, and there it is.
| | 04:24 | Click Open and then Go.
| | 04:27 | This process may take a few minutes.
| | 04:30 | If it works correctly, you'll see a
notice at the top saying that it's
| | 04:33 | successful and we were.
| | 04:35 | Now all our pieces are on the remote
host, but we're not quite done yet.
| | 04:39 | You see different environments vary in
how they connect the files to the database.
| | 04:43 | Those settings are in a file called
settings.php, which is inside our site folder.
| | 04:48 | We can change it on the server if we want or
on our own source folder on our local machine.
| | 04:52 | I'm going to do it locally,
and then upload it using SFTP.
| | 04:55 | I just find it easier to use
the local programs like Notepad++.
| | 05:00 | To edit it, I'll go back to my Drupal
installation on the local computer, go
| | 05:04 | into sites, and here is that folder we
renamed, and in there is our settings.php file.
| | 05:09 | For safety, I'm going to copy it and
paste it, just so that I have a backup,
| | 05:14 | and then I'll just move that to the Desktop.
| | 05:16 | Drupal lock some of these files for
safety, so you might have to unlock this to
| | 05:19 | edit it and then lock it again.
| | 05:21 | The way you do that
depends on your operating system.
| | 05:24 | I'll just make sure on Windows by
going in here to Properties. Nope!
| | 05:28 | I'd already turned off Read-only,
which is sometimes turned on. So I am OK.
| | 05:33 | Now I'll go in and edit it with Notepad.
| | 05:36 | The settings that we want are
typically down here under Database settings if
| | 05:40 | you're using an AMP stack such as MAMP or WAMP.
| | 05:44 | In fact, this is where it
would usually be, around line 181.
| | 05:48 | However, Acquia DAMP does
some things a little differently.
| | 05:51 | One of them being it puts
all of it stuff at the end.
| | 05:54 | So we go down there to edit it and
here you see all of the specifications for
| | 05:58 | connecting to the database.
| | 05:59 | This is what we'll have to change.
| | 06:01 | The first thing I'll do is I'll
comment out the base_url. That has to do with
| | 06:06 | multi-site installations, which we don't have.
| | 06:09 | Then I'll change the username in the
database to what it is on the host.
| | 06:13 | In this case, it's w_2trees.
| | 06:14 | I also have to change the password.
| | 06:18 | In this case, I just made it Drupal.
| | 06:21 | If you remember from our WebEnabled
screen, WebEnabled actually uses a different
| | 06:25 | port number, and you can
see that down here, 4926.
| | 06:27 | So I'll have to change that as well.
| | 06:32 | Again, this is specific to my host.
| | 06:34 | Your own web host may be different.
| | 06:36 | So I'll save that, go back to my Desktop,
and make sure to lock it again for safety.
| | 06:45 | Now we're ready to move that over
and our site should run just fine.
| | 06:48 | I'll go back into FileZilla, find the
same file on the server, and replace
| | 06:53 | the one that's there.
| | 06:56 | First, I'll delete the old one and
then load in the new one. All right!
| | 07:02 | Now we cross our fingers and hope.
| | 07:04 | Let's test and see if it actually works.
| | 07:07 | I'll go to my site and click the URL,
2trees.dev3.webwnabled.net. It works, amazing!
| | 07:15 | So to recap, moving your site to the
server is essentially a three-step process.
| | 07:20 | First, you move the files.
| | 07:22 | Second, you move the database and third,
you edit settings.php so it connects the two.
| | 07:28 | But the devil is in the details, and
again there is no way we can cover the
| | 07:32 | many variations here.
| | 07:34 | If you're not able to work it out, your
best bet is to contact your web host provider.
| | 07:38 | Good luck to you!
| | Collapse this transcript |
| Troubleshooting a Drupal installation| 00:00 | For this video we're going to go way
back to before we installed Drupal to
| | 00:04 | check out some of the problems
you might run into along the way.
| | 00:07 | Of course, this isn't the complete list.
The world contains an infinite quantity
| | 00:11 | of wrong, but it touches
on the most common problems.
| | 00:15 | The first batch of problems are
related to the Acquia Drupal Stack Installer.
| | 00:19 | I've already downloaded it
from acquia.com/downloads.
| | 00:21 | and I've grabbed a fresh copy of core
Drupal from drupal.org called new site.
| | 00:27 | I also have an import site for a
problem I'll show you in just a minute.
| | 00:31 | But let's say I want to import that new
site and create a new database for it.
| | 00:36 | We go up to local host, say More and
Import, find the path, there it is, newsite,
| | 00:44 | and create a new
database, which we'll call new site.
| | 00:48 | But let's say that we leave the
server at local host, which is very common.
| | 00:52 | Click Import. Oops, we can't do it.
| | 00:55 | The reason for that is that Acquia
Drupal reserves that name for itself.
| | 00:59 | It goes with the first site that was
installed when it installs the control panel.
| | 01:04 | You can't change it and you
can't delete it, but that's okay.
| | 01:06 | Just choose a different name.
| | 01:09 | Now let's move on to a problem that
comes up a lot when you try to import a site
| | 01:12 | within existing database, as you would
normally do if you were moving a site
| | 01:15 | from one place to another.
| | 01:17 | I'm going to use a database
that's in the exercise files.
| | 01:21 | It's called import.sql and
the site I'll use is importsite.
| | 01:26 | Once again, we go back here and we click Import.
| | 01:31 | We browse and find importsite.
| | 01:33 | There are the files.
| | 01:34 | We're going to use a database,
and there it is, import.sql.
| | 01:43 | Open that up. The new database name will
be import and the server will be import.
| | 01:47 | Now that should work fine. Let's see.
| | 01:49 | Click Import. So far so good.
| | 01:52 | Well, it looks like it worked.
| | 01:53 | Let's go to the site and see by clicking Go to.
| | 01:57 | Oh no, we don't see our site.
| | 01:59 | Instead it's asking us to install it again.
| | 02:02 | The problem here is in the database file,
and you can see that by going back and
| | 02:06 | opening it up in a text editor.
| | 02:08 | I'll highlight it and open it up.
| | 02:11 | You see the database name
that it's expecting is 2trees.
| | 02:15 | The names have to match between what's
in the database itself and the name that
| | 02:19 | you give to the stack installer.
| | 02:21 | So to change this, I was simply change all
of these to import and then it should work.
| | 02:26 | I save that file and close it. So
I've made the changes and now I have to
| | 02:34 | make the import again.
| | 02:35 | So, I'll remove this one by clicking
Delete. Yes, I really do want to delete it.
| | 02:40 | And then go back and try again.
| | 02:42 | Once again, go to importsite.
| | 02:44 | I'm using an existing database.
| | 02:49 | I go ahead and find it.
| | 02:54 | That's called import.
| | 02:56 | The site is called import and do it again.
| | 03:00 | Now let's see. And it works.
| | 03:03 | In this case I was using just the
database without the files, which is why the
| | 03:07 | site looks a little strange, but you
can see that all of the information is
| | 03:10 | there, so the database did work as expected.
| | 03:13 | Finally, let's talk about another
database problem that crops up when your
| | 03:17 | site starts to get big.
| | 03:18 | For this one I'm going to use a file called
really big databases and it's about 11 MB.
| | 03:23 | In this case I actually won't try
to import it through the Acquia DAMP.
| | 03:26 | Instead I'm going to go straight to
phpMyAdmin, but it's actually the same
| | 03:30 | error that you get in both cases.
| | 03:33 | To go there, I go to my DAMP and click
Manage my database, and then I'll try to
| | 03:37 | import it, browse to it, and
click Open, and as usual, Go. Oops!
| | 03:47 | We got an error.
We tried to upload too large a file.
| | 03:50 | If we go back to that tab, we see the problem.
| | 03:53 | We have a maximum of 8 MB.
| | 03:56 | So you ask what can you do.
| | 03:57 | Well, you have three options.
| | 03:59 | One is to compress the file.
| | 04:01 | That would work here, since it's only
11 MB and we would shrink down to maybe
| | 04:04 | about two or three, but
that doesn't always work.
| | 04:07 | What if you have one that's 100 megabytes?
| | 04:09 | You could also use something called big
dump, which you can search for online.
| | 04:13 | It's a PHP program.
| | 04:14 | It's a little difficult to use, but it
works well, or you can increase the PHP limit.
| | 04:20 | To do that go back to your Acquia
Drupal control panel, go to Settings and
| | 04:26 | Config, then go to PHP, and click Edit.
| | 04:30 | The thing that you're looking for is
post_max_size, and I'll just do a search
| | 04:34 | for it, and as you see, there it is says 8 MB.
| | 04:37 | What you would have to do is, change
that to something bigger, let's say 64 MB
| | 04:42 | to be sure, then restart the
AMP Stack and you'd be golden.
| | 04:45 | Now I'm really glad that I have a
chance to make this video because this answers
| | 04:49 | a lot of questions I had while I was
learning Drupal. But the real answer for
| | 04:53 | any of these problems is to make sure
you regularly backup your site and then
| | 04:57 | make a special backup, before you
make any substantial changes to it.
| | 05:01 | Furthermore, you should test your
backups by restoring from them once in a while.
| | 05:05 | A backup you can't use is no
better than no backup at all.
| | 05:08 | Next, 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:00 | The tasks you'll learn in this video
are the most important you'll learn in the
| | 00:03 | entire course: backing up
and then restoring from backup.
| | 00:08 | The truth is though you already know how
to do this through a few different ways.
| | 00:12 | If you watch the "Launching a Drupal
site" video or the "Using the exercise files"
| | 00:17 | video, you can already piece together
exactly how to backup and migrate your
| | 00:21 | site as well as restore from backup.
| | 00:24 | But I want to show you another system
that I have only recently started using
| | 00:27 | myself and I think it's really
good and well worth knowing because it
| | 00:30 | simplifies the whole process.
| | 00:32 | It's a module called backup and migrate.
| | 00:35 | You can find it at drupal.
org/project/backup_migrate.
| | 00:39 | I'll download and install it.
| | 00:44 | I copy the URL in a usual way.
| | 00:46 | Go to Modules and Install.
| | 00:49 | If you need any help doing this of
course go back in the course to the area
| | 00:52 | about extending Drupal, then I
just click Install, and I enable it.
| | 00:58 | Roll down to the bottom or it's a
simple check box and Save configuration, and
| | 01:04 | I'll just go back to my
front page for cleanliness.
| | 01:06 | Now the controls that it introduces
are under structure and there it is,
| | 01:11 | Backup and Migrate.
| | 01:13 | Before I can use it however I have to
specify where the backups are going to go
| | 01:17 | if I'm going to back up to the server.
| | 01:18 | I won't go into too much detail here but
essentially Backup and Migrate works in
| | 01:23 | two ways. You can backup files to your
local computer or right on the server and
| | 01:28 | then you can restore from
files that are on the server.
| | 01:30 | The reason you need that in a private
file system path is to keep those files safe.
| | 01:35 | That is, they'll be in a place where
the general population can't get to
| | 01:39 | it through your site.
| | 01:40 | This module has many different options
for backing up, restoring, and where you
| | 01:45 | want everything to go and you could
set a profile so you can have one kind of
| | 01:48 | backup that happens once a week,
once that happens every day, and so forth.
| | 01:52 | You can also specify a backup style just
as a one-off, something that you do just
| | 01:56 | one time, by clicking Advanced Backup.
| | 01:59 | But for us I'm just going to stick
to our defaults and say Backup now.
| | 02:02 | It offers to save a file, I say Yes, and then
I go to my download location and there it is.
| | 02:08 | Now it's very important to notice that
Backup and Migrate only backs up your database.
| | 02:14 | It doesn't back up your files as well.
So what I would recommend you do is
| | 02:17 | take your entire Drupal installation and
compress it and save it together with that database.
| | 02:22 | On Windows I would right-click and
say Send to > Compressed. There is a
| | 02:26 | similar command on the Mac.
| | 02:28 | Now when you do your backups make sure
that you keep them in good order.
| | 02:32 | I'm going to just create a backup folder
here, I'll call it backups, and the way I
| | 02:36 | like to do it, this is a style
matter mind you, not a Drupal matter,
| | 02:39 | I create a new folder with the date, go
to New and Folder, and I give it today's
| | 02:44 | date, 2010 December 08, and I
put both of those files in there.
| | 02:50 | The reason that I do that is so that it'll
sort properly when I have it sorted by name.
| | 02:54 | It will always be the earliest one at
the top and the latest one at the bottom.
| | 02:59 | When I want to restore, all I have to do
is go back to my site and click Restore,
| | 03:03 | then browse for that file and import it.
| | 03:08 | Incidentally you'll notice that it's
tagged already with the date as well as the time,
| | 03:12 | very handy if you want
to do several backups a day.
| | 03:15 | Open and Restore now, and we're done.
| | 03:19 | I wish I had time to show all the
things that Backup and Migrate will do, but
| | 03:23 | your best bet is to just try it a few
times including the restore and don't
| | 03:27 | forget to back up the files as well.
| | 03:29 | I have to say I'm really pleased
with the Backup and Migrate module.
| | 03:32 | When I made my first Drupal course for
lynda.com, Drupal 6 Essential Training,
| | 03:37 | there really weren't any
solutions that were quite as elegant.
| | 03:39 | But this one I've actually taken
on myself because it's so good.
| | Collapse this transcript |
| Updating Drupal| 00:00 | Your Drupal site is like a living beast.
| | 00:03 | The software that runs it occasionally
needs to be tended, so that you can fix bugs,
| | 00:07 | protect against newly
discovered security holes, and to add features.
| | 00:11 | You already know how to keep content fresh.
| | 00:13 | this video shows you how to keep Drupal fresh.
| | 00:16 | There are two kinds of update.
| | 00:17 | One is the themes and modules
and the other is the Drupal itself.
| | 00:21 | I will start with the hard one, which is
updating Drupal itself, and I will do it
| | 00:24 | only on my local machine, but of course,
you should adapt these procedures to
| | 00:28 | update Drupal on a server.
| | 00:30 | The first question is how do you find
out that your site needs to be updated?
| | 00:33 | Well, if you've been clicking around for
a while, eventually you'll come across
| | 00:37 | a warning like this one. It's a
security update and it will give you some
| | 00:40 | links where you can go to
see what those updates are.
| | 00:42 | So I'll click that link, Available
updates, and it tells me that I have a module
| | 00:46 | here that needs to be updated and the core.
| | 00:49 | As I say, I will start with the core.
| | 00:51 | INSTALLED VERSION is right here. beta3. A-ha!
| | 00:54 | And the release candidate 1 is out.
| | 00:55 | I would better go and get that.
| | 00:57 | To manually update Drupal,
you have to download a new copy.
| | 01:01 | So I will go to drupal.org/project/druple.
| | 01:05 | Then I find the version that I want,
the most recent one will be up near the top,
| | 01:08 | and I download it.
| | 01:11 | Then I go to my Desktop, which
happens to be my download location.
| | 01:15 | You uncompress that file in the usual
way, in my case I'm using 7-Zip File
| | 01:19 | Manager, and then you can throw
away the file that you downloaded.
| | 01:29 | So this is the new Drupal, and this is
the old one, but we can't simply replace
| | 01:34 | one with the other, because remember
we have certain files in the old one that
| | 01:37 | will need to carry over.
| | 01:39 | That's easy enough. All of those
files are found in the sites folder.
| | 01:43 | So what you do is you throw away the
sites folder that's in the new Drupal and
| | 01:47 | you move over the sites folder from the old one.
| | 01:50 | I will do it by copying and then pasting here.
| | 01:55 | The last thing we have to do is we
have to rename this folder so it has the
| | 01:59 | same one as the old site.
| | 02:00 | So I will just call this one olddrupal-BAD,
and then rename the new one to olddrupal.
| | 02:07 | Okay, now we are ready to go back to
our site and reload this page. Good.
| | 02:14 | The warning that we have to
update Drupal has disappeared.
| | 02:16 | We are not done though.
| | 02:18 | Every time you do an update of any
kind to Drupal, you have to run a program
| | 02:23 | called update.php, and you do that by
going to your domain, deleting everything
| | 02:28 | at the end of it, and typing update.php.
| | 02:31 | There are other ways to do it, but
that's the direct way, and I'll show you the
| | 02:34 | other way in just a minute.
| | 02:36 | It gives you some instructions about backing
up your database and your code and so forth.
| | 02:40 | We are going to skip those for now, but
absolutely read these and follow the instructions.
| | 02:45 | When you're done, click Continue.
| | 02:46 | You will be told how many updates there
are and you can take a look at exactly
| | 02:50 | what's being updated if you like,
but we'll just go ahead and apply them.
| | 02:54 | The procedure usually only takes a
few seconds and if everything worked out fine,
| | 02:58 | this is the screen you will get.
| | 02:59 | Let's go to our Front page and
then go to Reports and Status report.
| | 03:04 | That will confirm that we have the latest
version of Drupal, and in fact, there it is.
| | 03:09 | We can check again by running a
program manually clicking here, where it
| | 03:13 | says Check manually. Good, it checked.
| | 03:16 | Now as I go down the screen, I notice
that that module is still out of date.
| | 03:20 | Let's click again on available
updates, and there it is, Token.
| | 03:24 | Now we are going to get into
updating a module. It's much easier.
| | 03:28 | All that you have to do is check and say
Download these updates and then Continue.
| | 03:32 | Now while Drupal is going through this
procedure, it's going to take your site
| | 03:36 | off-line, but only for a moment.
| | 03:38 | Again, you are warned to backup your site,
but we'll just say go ahead. And we are done.
| | 03:44 | Now remember how we ran update.php earlier.
| | 03:47 | This time we get a handy link to do it.
| | 03:49 | So we click, go through the
same procedure, and we are done.
| | 03:54 | Once again, I go to my front page and
them to the Reports and the Status report.
| | 03:59 | Make sure that everything is good.
| | 04:01 | Check it one more time.
Everything is green and we're golden.
| | 04:07 | Now the truth is, in our examples,
everything worked swimmingly and that's
| | 04:12 | usually the case, but that's
not always the way it happens.
| | 04:15 | So be absolutely sure you backup
before doing these updates and if you have
| | 04:19 | any troubles, you will find tips
that'll help you in the "Troubleshooting of
| | 04:22 | Drupal installation" video.
| | Collapse this transcript |
| Deleting Drupal| 00:00 | When I'm developing a site I find that
I'll try several ideas before settling on
| | 00:04 | one that I want to complete and I tend
to delete all the ideas as I go, just to
| | 00:08 | give myself a clean slate.
| | 00:10 | There are other reasons to
learn how to delete sites of course.
| | 00:12 | For example to be sure that
you've left no sensitive data online.
| | 00:16 | I've backed up our site and will
restore it once this video is done.
| | 00:19 | If you've done any work you want to save,
you should do the same using techniques
| | 00:22 | you learned in the video
about backing up a Drupal site.
| | 00:25 | Now as you know, Drupal is a collection
of files paired together with a database.
| | 00:30 | You're going to have to delete both, the
files and the database. I will show you
| | 00:33 | how to do that very quickly in DAMP.
| | 00:36 | You simply go down to your sites
here to More, click the site you want to
| | 00:39 | delete, and click Delete.
| | 00:41 | I am not going to do it here because I
want to show you another way as well.
| | 00:44 | There is one thing to know about this.
If you do it through the DAMP you are
| | 00:48 | only deleting your database unless you
have your site files located together in
| | 00:53 | the default location,
which for me is never the case.
| | 00:56 | So in addition to deleting it here,
I would have to go back to my location where
| | 01:00 | I have the site, in this case
the Desktop, and throw that away.
| | 01:03 | But I'd rather show you a manual way of
deleting the database because it works
| | 01:06 | in other AMP stacks as well, such as
MAMP and WAMP and also on remote servers.
| | 01:11 | The only thing that you have
to have is phpMyAdmin running.
| | 01:15 | To launch it we'll go to
Manage my database in DAMP.
| | 01:18 | Then we click the Databases tab. We find
the one we want to delete, in this case
| | 01:22 | 2trees, and check this little x box down here.
| | 01:25 | Now you're going to get a scary warning
and it should be scary, because this is
| | 01:30 | all of the information in your site.
Not only the content, but also all the
| | 01:35 | settings and users everything. The
only thing you'd have left is the files.
| | 01:39 | But in this case we really do
want to destroy it, so we say Yes.
| | 01:43 | It takes a moment and then it's done.
| | 01:46 | Now it's just a matter of deleting the files.
| | 01:49 | I go back to my Desktop where I have
the files, simply drag them into the Trash,
| | 01:53 | and empty if it I like.
| | 01:55 | On a remote server, the process is
essentially the same, although your web host
| | 01:59 | might not give you the access you need
to directly delete files or the database.
| | 02:03 | If you have any problems along those
lines contact the System Administrator.
| | 02:07 | Now I don't think I need to
point out that this is an absolutely
| | 02:11 | irreversible procedure.
| | 02:12 | Once it's gone, it's gone, so be sure you
make backups if you think you'll ever need them.
| | 02:17 | On the other hand, remember that
deleting the site doesn't delete your backups.
| | 02:22 | So if you're deleting your site to hide
any sensitive information it contains,
| | 02:25 | such as the database's password in the
settings PHP file you'll also have to
| | 02:30 | secure your backups.
| | Collapse this transcript |
|
|
16. Going Further with DrupalMonitoring performance| 00:00 | How many web sites from 1995 are still alive?
| | 00:03 | Probably not many. Just those that have
been watched and tended over the years.
| | 00:08 | That's where monitoring comes in.
| | 00:10 | I'll show you three ways
to monitor your Drupal site.
| | 00:13 | First, Drupal itself provide some tools.
| | 00:16 | Second, the AMP stack that runs Drupal
keeps logs in a raw but complete form.
| | 00:21 | Third there are ways to browse the
site to quickly catch common problems.
| | 00:26 | First, let's look at some of the
monitoring tools that Drupal provides.
| | 00:29 | You will find these under
the Reports button up here.
| | 00:31 | I will just very quickly go through these.
| | 00:33 | The status report you've already seen
in the video about updating Drupal.
| | 00:38 | If anything is wrong here, you will see it
show up with a yellow or red background,
| | 00:41 | instead of this green background.
| | 00:45 | Available updates is where you go if
you find that there is a problem in your
| | 00:48 | status report, and it will show
whatever modules, themes, or if Drupal itself
| | 00:52 | needs to be updated.
| | 00:55 | Recent log messages shows everything
that's happened on your site that's notable.
| | 00:59 | It doesn't show every time somebody
accesses a page. Just things like searches
| | 01:04 | and if there are any errors or warnings.
| | 01:07 | You can filter this page further by
clicking this link here, FILTER LOG MESSAGES.
| | 01:11 | For example, let's just see all
of the errors that came up. A-ha!
| | 01:14 | So that tells us we are having a
database problem and then you would go to your
| | 01:18 | system administrator and figure out what it is.
| | 01:21 | Going back up to Reports,
the next one is Field list.
| | 01:25 | This tells you all of the fields
that are being used in your entire site.
| | 01:28 | Now I found this to be important
because sometimes I'll go back and I'll delete
| | 01:32 | a content type that contains a field.
| | 01:34 | But in doing so, I haven't deleted the
field. So if I later go back and try to
| | 01:38 | use the same field name, I'm told
nope, sorry, it already exists.
| | 01:41 | So before I delete a content type, I'll
often come in here, see if the field is
| | 01:45 | being used there, and delete it there.
| | 01:48 | The next two are very similar, Top
'access denied' and Top 'page not found' errors,
| | 01:53 | and they're
exactly what you think that be.
| | 01:54 | Access denied tells you if anybody's
tried to get to a page that they didn't
| | 01:58 | have permission to, and in this case,
there is only one page I believe, as an
| | 02:01 | anonymous user I tried to go to the Contact
page when I hadn't given that person permission.
| | 02:07 | Finally we have Top search phrases, which
again is exactly what you think it would be.
| | 02:11 | A-ha! And I see here more people have searched
for California than anything else on my site.
| | 02:16 | I find this page unusually valuable
for marketing reasons, because it gives
| | 02:20 | me an insight into what people
actually want to get out of my sight.
| | 02:23 | So that's what Drupal itself will tell you.
| | 02:25 | Next up, let's take a look at the
logs that are kept by your AMP stack.
| | 02:29 | To do that, we will switch back to Acquia DAMP.
| | 02:32 | The location of where these logs are
is going to vary depending on which AMP
| | 02:36 | stack you use and how the system
administrators have set up the server.
| | 02:39 | Fortunately for us, the Acquia DAMP
Stake Installer that we've been using, puts
| | 02:43 | the logs in a very easy to find place.
| | 02:46 | We just go down to Settings and up to Logs.
| | 02:50 | Then you click any of these
view links to see that log.
| | 02:53 | So let's take a look at the Apache
log, for example, and there it is.
| | 02:57 | Again, you don't have to understand this,
because that leads me to my next point.
| | 03:00 | There are actually some tools
that will interpret this for you.
| | 03:04 | A popular one for Apache is called Analog
and you could find that it analog.cx.
| | 03:10 | Finally, there are several ways to spot
trouble when touring your site through a browser.
| | 03:14 | I talked about some of these in an
article I wrote for my blog, called 5 TESTS
| | 03:20 | TO STOP YOUR DRUPAL SITE'S SILENT DEATH.
| | 03:22 | Here's a summary of tips from that article.
| | 03:25 | First, view your site as an anonymous user.
| | 03:28 | Otherwise you won't know if some
content or important features are missing
| | 03:32 | from their experience. Second,
| | 03:34 | sign up for your own site
using a disposable e-mail address.
| | 03:38 | You want people to be able to get on to
your site easily and you're never sure
| | 03:42 | about that until you try it yourself.
| | 03:44 | Third and fourth, check links and check images.
| | 03:48 | This should be obvious. Just tour the site
once in a while and click on all the links.
| | 03:51 | Fifth, be sure that you
back up and restore frequently.
| | 03:55 | As I have said before, a backup that
doesn't work is no better than no backup at all.
| | 04:00 | Here are some more tips, which
didn't make it into the article.
| | 04:04 | First, actually read any e-mail
notifications that your site sends you.
| | 04:08 | Along the same lines, check the site
configuration to make sure that the e-mail
| | 04:12 | address that it has, both there in the
configuration and in user 1, the super user,
| | 04:17 | is correct and current.
| | 04:19 | Secondly, go to your own contact
page and send yourself some mail.
| | 04:23 | The e-mail sending capabilities of one
of my sites actually went down once and I
| | 04:26 | had no way of knowing it.
| | 04:28 | That's what spurred me to
write the article by the way.
| | 04:30 | Finally, look through the user list,
look through the content list, and look
| | 04:33 | through the comment list once in a while.
| | 04:36 | Sometimes you'll see a user
whose name is obviously fake.
| | 04:39 | You know such and such Viagra or a
string of what's obviously random letters.
| | 04:43 | Those users are often produced by
automated programs and then they'll go back
| | 04:46 | and they'll create nodes and
comments and your site will be full of spam.
| | 04:50 | Another possibility, and one that I
use on my own sites, is Google Analytics.
| | 04:55 | Google Analytics keeps track and
produces very readable reports on what's
| | 04:59 | happening on your site.
| | 05:00 | Now that means sending some of your
site data to Google so be sure to read its
| | 05:04 | privacy policys if you are
concerned about such things.
| | 05:07 | It works quite well with the Google
Analytics Module for Drupal as well, which
| | 05:10 | is at drupal.org/project/google_analytics.
| | 05:16 | But really, whatever tools you use are
secondary to your vigilance and most
| | 05:20 | Drupal sites don't really require much.
| | 05:22 | Just 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:01 | This video is really a catch-all of
tricks that I picked up from administering
| | 00:04 | Drupal since version 5.
| | 00:06 | It's by no means exhaustive and it
reflects my own personal way of doing things.
| | 00:11 | First, let's talk about how the public
sees your site, the so-called user experience.
| | 00:16 | Now I have said before that you should
browse the site as users of all different roles,
| | 00:20 | especially as an anonymous user,
and here I am looking at the site as an
| | 00:23 | anonymous user by
switching to a different browser.
| | 00:26 | But along the same lines, sit some
friends down in front of your site and ask
| | 00:30 | them to look around and then watch what
they do. Things that seemed obvious to
| | 00:34 | you might be completely invisible to them.
| | 00:36 | For example, if I were to sit somebody
else down in front of my own site here,
| | 00:39 | they might say, well what is this site about?
| | 00:42 | Why are there no graphics here?
| | 00:44 | What exactly does this mean
down here, Feed aggregator?
| | 00:47 | It's just as important to remove
information that doesn't contribute to your
| | 00:50 | site as to add it and sitting somebody
down in front of it who has never seen
| | 00:54 | it before will help you do that.
| | 00:56 | So that's the user experience.
| | 00:58 | Let's talk a little bit about
the administrator experience.
| | 01:01 | Now here is something that I used to do
a lot more with Drupal 6 before we had
| | 01:04 | the toolbar up here.
| | 01:05 | I didn't like the way the links
were set up, so instead of clicking to
| | 01:09 | administer things, I would tend to
just go up to the address bar and
| | 01:13 | type in URLs to administer.
| | 01:15 | One thing that's sort of strange
about Drupal 7 is now when you click a button,
| | 01:18 | you get the overlay and so the
URL is much longer, but you could still
| | 01:22 | go to that page which is admin/people
by typing in admin/people, and if you're
| | 01:28 | the sort of person who prefers to type
instead of click buttons, you might find this faster.
| | 01:32 | Another advantage of this is that the
more you do it, the more your browser will
| | 01:36 | keep track of what pages you've been on.
| | 01:39 | So for example, now if I just go back
to admin, I see all of these pages and
| | 01:43 | the ones that I use most show up at the top.
| | 01:46 | So I would just hit Ctrl+L or Command+L
on the Mac, go to admin, and then scroll
| | 01:51 | down until I find the one that I want.
| | 01:53 | You might find it faster.
Maybe not but give it a try.
| | 01:56 | The one thing about this method is of
course it gets rid of the overlay, which
| | 02:00 | if you want you will just
have to click the buttons.
| | 02:03 | Another way to get around
quickly is to use the shortcut bar.
| | 02:06 | Now we talked about this in the video
earlier on about using the shortcut bar,
| | 02:10 | but I didn't really show its application.
| | 02:11 | Let me give you an example. Let's say
that I want to set up a shortcut bar for a
| | 02:15 | community administrator and I know
that that person is mostly going to be
| | 02:18 | working with people, they're going to
be managing the user accounts, they are
| | 02:22 | going to be changing roles and
permissions, and that sort of thing.
| | 02:25 | Well, it's easy I just go People, add
one, go to PERMISSIONS, add another link,
| | 02:33 | go to Roles, add another link, and
there we are. We now have some very easy to
| | 02:39 | access links here for my community manager.
| | 02:42 | Once again the video you want to watch to
learn how to do that is "Using the shortcut bar."
| | 02:46 | Along the same lines, some people find
the dashboard to be a handy center for
| | 02:50 | administrative tools.
| | 02:52 | If you want to learn more about that,
see the video on customizing the Dashboard.
| | 02:56 | Now those are just a few very small tricks.
| | 03:00 | As always, the best place to get a
broader perspective is in the Drupal community
| | 03:04 | where thousands of people use Drupal every day.
| | 03:08 | Believe me, if there's a faster or
easier way to do something in Drupal,
| | 03:11 | they'll discover it.
| | 03:12 | Find out your resources for
interacting with them in the video about joining
| | 03:16 | the Drupal community.
| | Collapse this transcript |
| Reviewing security and permissions| 00:00 | Drupal has a good reputation
for security and it deserves it.
| | 00:04 | Now, every piece of complex software
has security issues, but the thing about
| | 00:08 | Drupal is that it has an especially
large and well-organized team to respond
| | 00:12 | quickly when new problems appear.
| | 00:14 | And it has well-established systems to
help people like you and me fix them.
| | 00:18 | This video reviews what those systems
are and gives you additional tips to
| | 00:22 | ensure that your site is safe.
| | 00:24 | Now I mentioned that security
team. Their home on the web is at
| | 00:28 | drupal.org/security-team.
| | 00:31 | The advisories that they
release are at drupal.org/security.
| | 00:36 | Notice that this is for Drupal Core.
| | 00:38 | If you want to keep track of any
security advisories for Ccntributed projects,
| | 00:41 | that is modules or themes, just
click there and then Public service
| | 00:45 | announcements is for less critical matters.
| | 00:48 | You could come back to the web site
to read these or if you would prefer to
| | 00:51 | receive them in an RSS feed, each
one of these pages has that available.
| | 00:56 | And of course, you would subscribe to
that in your mail program or any other way
| | 00:59 | that you watch RSS feeds.
| | 01:02 | But let's say that you're not
subscribed to that feed or you forget to read it.
| | 01:05 | You will still find out about
security issues in a couple of ways.
| | 01:09 | One way that you'll be notified is by
e-mail and you'll notice that when you
| | 01:12 | first install your site.
| | 01:14 | Now here I am on the last screen before
finishing, where I put in the site name
| | 01:18 | and username and so forth. At the
bottom of that page we have this e-mail
| | 01:22 | notifications check box.
| | 01:25 | If you leave this box checked, and it
is checked by default, you'll receive an
| | 01:29 | e-mail message whenever there's an
important security announcement about Drupal.
| | 01:33 | That message by the way will be
sent to the super user's address.
| | 01:36 | So make sure that you enter that
correctly when you set up your site.
| | 01:40 | The other way that you'll
automatically find out about security issues is
| | 01:43 | in your site itself.
| | 01:44 | So let's go back to our site.
| | 01:46 | Now, I've installed an older
version of a certain module.
| | 01:49 | And so Drupal has to tell me, hey,
wait a second, the newer version is out.
| | 01:52 | I will notice that when I start going to
administrative pages, like when I click
| | 01:56 | Modules and here it is. I see the
warning saying, hey, there's a newer version.
| | 02:01 | And then I click Available updates as it
suggests and I can update that module if I like.
| | 02:06 | To learn how to do that and how to update
Drupal itself, see the video "Updating Drupal."
| | 02:12 | Okay. So your site is running the
latest versions of Drupal and the
| | 02:16 | contributed modules and themes.
| | 02:18 | Let's talk about a few things you can do
to avoid other kinds of security holes.
| | 02:22 | The first one is to restrict
registration. The control for that is under
| | 02:26 | Configuration and Account Settings.
| | 02:29 | As we scroll down, we see that you have
a setting that allows only you to give
| | 02:33 | people accounts or that requires your
approval when someone applies for one.
| | 02:37 | We discussed these settings in
the video on creating user accounts.
| | 02:41 | Next, check users' roles and
permissions from time to time to see if anybody is
| | 02:46 | tried to get in who shouldn't.
| | 02:48 | So let's go up to People
and just look down our list.
| | 02:51 | Ah, you see that name?
| | 02:53 | That doesn't look right to me, so I
might want to take a look and see what the
| | 02:56 | e-mail address is or any other notices.
| | 02:58 | Yeah, that looks obviously fake to me.
| | 03:01 | So what I might do is I might send a
note to that person saying, Hey, I see you
| | 03:04 | joined my site, could you tell me a bit
about yourself" and see if I get anything back.
| | 03:08 | And if not, I might decide to
delete it or not. It's up to you.
| | 03:12 | Along with individual users of course,
you should take another look and make
| | 03:16 | sure that everybody has the role that
you really want them to have and that each
| | 03:19 | of those roles has the
permissions you want them to have.
| | 03:23 | Now, the thing about restricting
registration is that it can turn people
| | 03:27 | off from your site.
| | 03:28 | So I would like to suggest a module that
can be set up automatically to increase
| | 03:32 | access when people prove themselves trustworthy.
| | 03:35 | It's called User Points and you'll
find it at drupal.org/project/userpoints.
| | 03:41 | It's a little complicated to set up and
decide how to promote people from role
| | 03:45 | to role, but once you have it
set up, it's really valuable.
| | 03:48 | But let's get back to one more
way to make your site more secure.
| | 03:52 | The last one is to avoid the
full HTML and PHP text formats.
| | 03:57 | I demonstrated their dangers in an
earlier video on using text formats to
| | 04:01 | prevent damaging content.
| | 04:02 | In short, anyone who can create content
that has those text formats can inject
| | 04:08 | unwanted content that's beyond your
control and might even be able to take over
| | 04:12 | your site completely.
| | 04:13 | We can see that by going to Add
content and let's just say Article.
| | 04:18 | This is the point of danger. If they
can enter PHP code or full HTML, then
| | 04:23 | you might be in trouble and the way to fix
that is under Configuration > Text formats.
| | 04:28 | Each one of these can be
restricted by role, as you see here.
| | 04:33 | That's a fairly brief overview of ways
to stay on top of |
|
|